004a2533118f52a6c7d96906046703cb7464a19d
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
2
3 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
4 New file.
5 * update-gnulib.sh: Apply patch.
6 * configure: Re-generate.
7
8 2018-09-18 John Baldwin <jhb@FreeBSD.org>
9
10 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
11 description. Make "info proc" command descriptions more
12 consistent.
13
14 2018-09-18 John Baldwin <jhb@FreeBSD.org>
15
16 * NEWS: Mention 'info proc files' command.
17
18 2018-09-18 John Baldwin <jhb@FreeBSD.org>
19
20 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
21 descriptors for IP_FILES and IP_ALL.
22
23 2018-09-18 John Baldwin <jhb@FreeBSD.org>
24
25 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
26 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
27 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
28 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
29 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
30 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
31 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
32 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
33 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
34 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
35 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
36 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
37 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
38 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
39 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
40 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
41 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
42 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
43 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
44 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
45 (struct fbsd_sockaddr_un): New types.
46 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
47 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
48 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
49 (fbsd_core_info_proc_files): New functions.
50 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
51 IP_ALL.
52 * fbsd-tdep.h (fbsd_info_proc_files_header)
53 (fbsd_info_proc_files_entry): New.
54
55 2018-09-18 John Baldwin <jhb@FreeBSD.org>
56
57 * defs.h (enum info_proc_what) [IP_FILES]: New value.
58 * infcmd.c (info_proc_cmd_files): New function.
59 (_initialize_infcmd): Register 'info proc files' command.
60
61 2018-09-18 John Baldwin <jhb@FreeBSD.org>
62
63 * gnulib/aclocal-m4-deps.mk: Re-generate.
64 * gnulib/aclocal.m4: Re-generate.
65 * gnulib/config.in: Re-generate.
66 * gnulib/configure: Re-generate.
67 * gnulib/import/Makefile.am: Re-generate.
68 * gnulib/import/Makefile.in: Re-generate.
69 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
70 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
71 * gnulib/import/arpa_inet.in.h: New file.
72 * gnulib/import/inet_ntop.c: New file.
73 * gnulib/import/m4/arpa_inet_h.m4: New file.
74 * gnulib/import/m4/inet_ntop.m4: New file.
75 * gnulib/import/m4/netinet_in_h.m4: New file.
76 * gnulib/import/m4/socklen.m4: New file.
77 * gnulib/import/m4/sockpfaf.m4: New file.
78 * gnulib/import/m4/stdalign.m4: New file.
79 * gnulib/import/m4/sys_uio_h.m4: New file.
80 * gnulib/import/netinet_in.in.h: New file.
81 * gnulib/import/stdalign.in.h: New file.
82 * gnulib/import/sys_socket.c: New file.
83 * gnulib/import/sys_socket.in.h: New file.
84 * gnulib/import/sys_uio.in.h: New file.
85 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
86 module.
87
88 2018-09-18 John Baldwin <jhb@FreeBSD.org>
89
90 * gnulib/aclocal-m4-deps.mk: New file.
91 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
92 deterministically.
93
94 2018-09-18 John Baldwin <jhb@FreeBSD.org>
95
96 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
97 KVE_PATH.
98
99 2018-09-18 Tom Tromey <tom@tromey.com>
100
101 * compile/compile-object-load.c (struct
102 link_hash_table_cleanup_data): Add constructor and destructor.
103 Use DISABLE_COPY_AND_ASSIGN.
104 (~link_hash_table_cleanup_data): Rename from
105 link_hash_table_free. Now a destructor.
106 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
107
108 2018-09-18 Tom Tromey <tom@tromey.com>
109
110 * compile/compile-object-run.c (do_module_cleanup): Use delete.
111 * compile/compile-object-load.c (struct munmap_list): Move to
112 header file.
113 (munmap_list::add): Rename from munmap_list_add; rewrite.
114 (munmap_list::~munmap_list): Rename from munmap_list_free.
115 (munmap_listp_free_cleanup): Remove.
116 (compile_object_load): Update.
117 * compile/compile-object-load.h (struct munmap_list): Move from
118 compile-object-load.c. Rewrite.
119
120 2018-09-18 Alan Hayward <alan.hayward@arm.com>
121
122 * aarch64-tdep.c (pass_in_v): Use register size.
123 (aarch64_extract_return_value): Likewise.
124 (aarch64_store_return_value): Likewise.
125
126 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
127
128 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
129 rlim_t.
130
131 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
132
133 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
134 Fix short help line.
135
136 2018-09-17 Tom Tromey <tom@tromey.com>
137
138 PR python/20445:
139 * configure: Rebuild.
140 * configure.ac: Conditionally use -DNDEBUG for Python.
141
142 2018-09-17 Tom Tromey <tom@tromey.com>
143
144 * configure: Rebuild.
145 * configure.ac: Use gmp as a library dependency when checking for
146 mpfr.
147
148 2018-09-17 Pedro Alves <palves@redhat.com>
149
150 * python/py-inferior.c (find_inferior_object): Delete.
151
152 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
153
154 * compile/compile-cplus-types.c
155 (compile_cplus_instance::enter_scope): Don't use new_scope after
156 std::move.
157
158 2018-09-17 Tom Tromey <tom@tromey.com>
159
160 * common/pathstuff.c (get_standard_cache_dir): Use
161 ~/Library/Caches on macOS.
162 * common/pathstuff.h (get_standard_cache_dir): Update comment.
163
164 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
165
166 PR python/23669
167 * breakpoint.c (commands_cmd_element): New.
168 (_initialize_breakpoint): Assign commands_cmd_element.
169 * breakpoint.h (commands_cmd_element): New.
170 * cli/cli-script.c (while_cmd_element, if_command,
171 define_cmd_element): New.
172 (command_name_equals): Remove.
173 (process_next_line): Compare commands by pointer, not by name.
174 (_initialize_cli_script): Assign the various cmd_list_element
175 variables.
176 * compile/compile.c (compile_cmd_element): New.
177 (_initialize_compile): Assign compile_cmd_element.
178 * compile/compile.h (compile_cmd_element): New.
179 * guile/guile.c (guile_cmd_element): New.
180 (install_gdb_commands): Assign guile_cmd_element.
181 * guile/guile.h (guile_cmd_element): New.
182 * python/python.c (python_cmd_element): New.
183 (_initialize_python): Assign python_cmd_element.
184 * python/python.h (python_cmd_element): New.
185 * tracepoint.c (while_stepping_cmd_element): New.
186 (_initialize_tracepoint): Assign while_stepping_cmd_element.
187 * tracepoint.h (while_stepping_cmd_element): New.
188
189 2018-09-17 Tom Tromey <tom@tromey.com>
190
191 * infrun.c (save_infcall_suspend_state): Return
192 infcall_suspend_state_up.
193 (save_infcall_control_state): Return infcall_control_state_up.
194 * inferior.h (save_infcall_suspend_state)
195 (save_infcall_control_state): Declare later. Return unique
196 pointers.
197
198 2018-09-17 Tom Tromey <tom@tromey.com>
199
200 * infrun.c (struct stop_context): Declare constructor,
201 destructor, "changed" method.
202 (stop_context::stop_context): Rename from save_stop_context.
203 (stop_context::~stop_context): Rename from
204 release_stop_context_cleanup.
205 (normal_stop): Update.
206 (stop_context::changed): Rename from stop_context_changed. Return
207 bool.
208
209 2018-09-17 Tom Tromey <tom@tromey.com>
210
211 * inferior.h (struct infcall_suspend_state_deleter): New.
212 (infcall_suspend_state_up): New typedef.
213 (struct infcall_control_state_deleter): New.
214 (infcall_control_state_up): New typedef.
215 (make_cleanup_restore_infcall_suspend_state)
216 (make_cleanup_restore_infcall_control_state): Don't declare.
217 * infcall.c (call_function_by_hand_dummy): Update.
218 * infrun.c (do_restore_infcall_suspend_state_cleanup)
219 (make_cleanup_restore_infcall_suspend_state): Remove.
220 (do_restore_infcall_control_state_cleanup)
221 (make_cleanup_restore_infcall_control_state): Remove.
222
223 2018-09-17 Tom Tromey <tom@tromey.com>
224
225 * gdbthread.h (struct thread_control_state): Add initializer.
226 (class thread_info) <control>: Remove initializer.
227 * inferior.h (struct inferior_control_state): Add initializer.
228 (class inferior) <control>: Remove initializer.
229 (exit_inferior_1): Update.
230 * infrun.c (struct infcall_control_state): Add constructors.
231 (save_infcall_control_state): Use new.
232 (restore_infcall_control_state, discard_infcall_control_state):
233 Use delete.
234
235 2018-09-17 Tom Tromey <tom@tromey.com>
236
237 * infrun.c (struct infcall_suspend_state) <registers>: Now a
238 unique_ptr.
239 <siginfo_data>: Now a unique_xmalloc_ptr.
240 (save_infcall_suspend_state, restore_infcall_suspend_state)
241 (discard_infcall_suspend_state)
242 (get_infcall_suspend_state_regcache): Update.
243
244 2018-09-17 Tom Tromey <tom@tromey.com>
245
246 * gdbthread.h (struct thread_suspend_state): Add initializers.
247 (class thread_info) <suspend>: Remove initializer.
248 * infrun.c (struct infcall_suspend_state): Add initializers.
249 (save_infcall_suspend_state): Use new.
250 (discard_infcall_suspend_state): Use delete.
251
252 2018-09-16 Tom Tromey <tom@tromey.com>
253
254 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
255 Remove.
256 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
257 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
258 (py_varobj_iter_new): Likewise.
259 (py_varobj_get_iterator): Use gdbpy_ref.
260
261 2018-09-16 Tom Tromey <tom@tromey.com>
262
263 * python/py-threadevent.c (py_get_event_thread): Simplify.
264 * python/py-inferior.c (infpy_thread_from_thread_handle):
265 Return immediately after calling thread_to_thread_object. Use
266 Py_RETURN_NONE.
267 (thread_to_thread_object): Set the exception on a NULL return.
268
269 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
270
271 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
272
273 2018-09-16 Tom Tromey <tom@tromey.com>
274
275 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
276 Remove.
277
278 2018-09-16 Tom Tromey <tom@tromey.com>
279
280 * python/python-internal.h (thread_to_thread_object): Change
281 return type.
282 * python/py-inferior.c (thread_to_thread_object): Return a new
283 reference.
284 (infpy_thread_from_thread_handle): Update.
285 * python/py-infthread.c (gdbpy_selected_thread): Update.
286 * python/py-stopevent.c (create_stop_event_object): Update.
287 * python/py-threadevent.c (py_get_event_thread): Return a new
288 reference.
289 (py_get_event_thread): Update.
290 * python/py-event.h (py_get_event_thread): Change return type.
291 * python/py-continueevent.c (create_continue_event_object):
292 Update.
293
294 2018-09-16 Tom Tromey <tom@tromey.com>
295
296 * python/py-progspace.c (pspy_get_objfiles): Update.
297 * python/python-internal.h (objfile_to_objfile_object): Change
298 return type.
299 * python/py-newobjfileevent.c (create_new_objfile_event_object):
300 Update.
301 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
302 Update.
303 * python/python.c (gdbpy_get_current_objfile): Update.
304 (gdbpy_objfiles): Update.
305 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
306 Update.
307 (objfile_to_objfile_object): Return a new reference.
308 * python/py-symtab.c (stpy_get_objfile): Update.
309 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
310 Update.
311
312 2018-09-16 Tom Tromey <tom@tromey.com>
313
314 * python/py-inferior.c (infpy_get_progspace): Update.
315 * python/python-internal.h (pspace_to_pspace_object): Change
316 return type.
317 * python/py-newobjfileevent.c
318 (create_clear_objfiles_event_object): Update.
319 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
320 Update.
321 * python/python.c (gdbpy_get_current_progspace): Update.
322 (gdbpy_progspaces): Update.
323 * python/py-progspace.c (pspace_to_pspace_object): Return a new
324 reference.
325 * python/py-objfile.c (objfpy_get_progspace): Update.
326 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
327 Update.
328
329 2018-09-16 Tom Tromey <tom@tromey.com>
330
331 * python/lib/gdb/__init__.py (current_progspace, objfiles)
332 (solib_name, block_for_pc, find_pc_line): New functions.
333 (execute_unwinders): Update.
334 * python/py-block.c (gdbpy_block_for_pc): Remove.
335 * python/py-inferior.c (infpy_get_progspace): New function.
336 (inferior_object_getset) <progspace>: Add.
337 * python/py-progspace.c (pspy_objfiles): Rewrite.
338 (pspy_solib_name, pspy_block_for_pc)
339 (pspy_find_pc_line, pspy_is_valid): New functions.
340 (progspace_object_methods): Add entries for solib_name,
341 block_for_pc, find_pc_line, is_valid.
342 * python/python-internal.h (gdbpy_block_for_pc)
343 (build_objfiles_list): Don't declare.
344 * python/python.c: Don't include solib.h.
345 (gdbpy_solib_name, gdbpy_find_pc_line)
346 (gdbpy_get_current_progspace, build_objfiles_list)
347 (gdbpy_objfiles): Remove.
348 (GdbMethods) <current_progspace, objfiles, block_for_pc,
349 solib_name, find_pc_line>: Remove entries.
350
351 2018-09-16 Tom Tromey <tom@tromey.com>
352
353 * top.c (new_ui_command): Use GNU style for metasyntactic
354 variables.
355 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
356 variables.
357 * maint.c (maintenance_translate_address): Remove "<>" around
358 text.
359 * interps.c (interpreter_exec_cmd): Use GNU style for
360 metasyntactic variables.
361 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
362 metasyntactic variables.
363 * tracepoint.c (tfind_range_command): Use GNU style for
364 metasyntactic variables.
365 (tfind_outside_command): Likewise.
366 (_initialize_tracepoint): Likewise.
367 * remote.c (extended_remote_target::create_inferior): Use GNU
368 style for metasyntactic variables.
369 * sparc64-tdep.c (adi_examine_command): Use GNU style for
370 metasyntactic variables.
371 (adi_assign_command): Likewise.
372
373 2018-09-16 Tom Tromey <tom@tromey.com>
374
375 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
376 metasyntactic variables. Print message if no disassembler options
377 are available.
378
379 2018-09-15 Tom Tromey <tom@tromey.com>
380
381 * infcmd.c (get_inferior_args): Return const char *.
382 * inferior.h (get_inferior_args): Return type now const.
383 * linux-tdep.c (linux_fill_prpsinfo): Update.
384 * procfs.c (procfs_target::make_corefile_notes): Update.
385
386 2018-09-07 Tom Tromey <tom@tromey.com>
387
388 * python/python.c (execute_gdb_command): Call bpstat_do_actions
389 inside the TRY.
390
391 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
392
393 * nios2-tdep.c (nios2_type_align): New.
394 (nios2_gdb_arch_init): Install type_align hook.
395
396 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
397
398 * eval.c (fake_method::fake_method): Call xzalloc directly for a
399 type that is neither object file owned, nor gdbarch owned.
400 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
401 gdbarch is non-NULL.
402 (alloc_type_instance): Allocate non-objfile owned types on the
403 gdbarch obstack.
404 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
405 using TYPE_ALLOC to ensure memory is allocated on the correct
406 obstack.
407 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
408 obstack, or the gdbarch obstack.
409 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
410
411 2018-09-14 Tom Tromey <tom@tromey.com>
412
413 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
414 block.
415
416 2018-09-14 Tom Tromey <tom@tromey.com>
417
418 * nat/fork-inferior.c (get_startup_shell): Remove "static".
419
420 2018-09-13 Tom Tromey <tom@tromey.com>
421
422 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
423 static.
424
425 2018-09-13 Tom Tromey <tom@tromey.com>
426
427 * exec.c (try_open_exec_file): Use std::string.
428
429 2018-09-13 Tom Tromey <tom@tromey.com>
430
431 * utils.h (gdb_bfd_errmsg): Return std::string.
432 * exec.c (exec_file_attach): Update.
433 * compile/compile-object-load.c (compile_object_load): Update.
434 * utils.c (gdb_bfd_errmsg): Return std::string.
435
436 2018-09-13 Tom Tromey <tom@tromey.com>
437
438 * procfs.c (struct procinfo_deleter): New.
439 (procinfo_up): New typedef.
440 (do_destroy_procinfo_cleanup): Remove.
441 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
442
443 2018-09-13 Tom Tromey <tom@tromey.com>
444
445 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
446
447 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
448 2018-09-13 Tom Tromey <tom@tromey.com>
449
450 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
451 (pspy_get_objfiles): New function.
452 (progspace_object_methods): New.
453 (pspace_object_type): Add tp_methods callback.
454 * python/python-internal.h (build_objfiles_list): New
455 declaration.
456 * python/python.c (build_objfiles_list): New function.
457 (gdbpy_objfiles): Implement using build_objfiles_list.
458 * NEWS: Mention the Progspace.objfiles method.
459
460 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
461
462 * python/py-inferior.c (infpy_get_progspace): New function.
463 (inferior_object_getset): Add progspace property.
464 * NEWS: Mention the new property.
465
466 2018-09-13 Tom Tromey <tom@tromey.com>
467
468 PR rust/23650:
469 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
470
471 2018-09-13 Tom Tromey <tom@tromey.com>
472
473 PR rust/23626:
474 * rust-lang.c (rust_enum_variant): Now static.
475 (rust_empty_enum_p): New function.
476 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
477 Handle empty enum.
478
479 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
480
481 * python/py-inferior.c (infpy_repr): New.
482 (inferior_object_type): Register infpy_repr.
483 * python/py-objfile.c (objfpy_repr): New.
484 (objfile_object_type): Register objfpy_repr.
485
486 2018-09-12 John Baldwin <jhb@FreeBSD.org>
487
488 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
489
490 2018-09-12 John Baldwin <jhb@FreeBSD.org>
491
492 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
493 typo.
494
495 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
496
497 * common/common-utils.c: Don't include '<sys/stat.h>'.
498 (is_regular_file): Move to...
499 * common/filestuff.c (is_regular_file): ... here.
500 * common/common-utils.h (is_regular_file): Move to...
501 * common/filestuff.h (is_regular_file): ... here.
502
503 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
504
505 * skip.c (debug_skip): New variable.
506 (skiplist_entry::do_skip_file_p): Add debug output.
507 (skiplist_entry::do_skip_gfile_p): Likewise.
508 (skiplist_entry::skip_function_p): Likewise.
509 (_initialize_step_skip): Create debug command.
510 * NEWS: Mention set/show debug skip.
511
512 2018-09-11 Xavier Roirand <roirand@adacore.com>
513
514 * darwin-nat.c (should_disable_startup_with_shell):
515 New function.
516 (darwin_nat_target::create_inferior): Add call.
517
518 2018-09-11 Xavier Roirand <roirand@adacore.com>
519
520 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
521 inf_port, msg_state>: Initialize.
522 (struct darwin_thread_info) <signaled, single_step>: Change
523 type and initialize.
524 (struct darwin_thread_info) <event>: Initialize.
525
526 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
527
528 PR gdb/23555
529 PR gdb/23558
530 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
531 guesses.
532
533 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
534
535 Revert:
536 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
537
538 PR gdb/23555
539 PR gdb/23558
540 * gnulib/aclocal.m4: Regenerate.
541 * gnulib/config.in: Regenerate.
542 * gnulib/configure: Regenerate.
543 * gnulib/import/Makefile.am: Update.
544 * gnulib/import/Makefile.in: Update.
545 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
546 * gnulib/import/_Noreturn.h: ... this.
547 * gnulib/import/alloca.in.h: Update.
548 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
549 * gnulib/import/arg-nonnull.h: ... this.
550 * gnulib/import/assure.h: Update.
551 * gnulib/import/at-func.c: Update.
552 * gnulib/import/basename-lgpl.c: Update.
553 * gnulib/import/extra/snippet/c++defs.h: Rename to...
554 * gnulib/import/c++defs.h: ... this.
555 * gnulib/import/canonicalize-lgpl.c: Update.
556 * gnulib/import/cdefs.h: Update.
557 * gnulib/import/chdir-long.c: Update.
558 * gnulib/import/chdir-long.h: Update.
559 * gnulib/import/cloexec.c: Update.
560 * gnulib/import/cloexec.h: Update.
561 * gnulib/import/close.c: Update.
562 * gnulib/import/closedir.c: Update.
563 * gnulib/import/config.charset: Update.
564 * gnulib/import/dirent-private.h: Update.
565 * gnulib/import/dirent.in.h: Update.
566 * gnulib/import/dirfd.c: Update.
567 * gnulib/import/dirname-lgpl.c: Update.
568 * gnulib/import/dirname.h: Update.
569 * gnulib/import/dosname.h: Update.
570 * gnulib/import/dup-safer-flag.c: Update.
571 * gnulib/import/dup-safer.c: Update.
572 * gnulib/import/dup.c: Update.
573 * gnulib/import/dup2.c: Update.
574 * gnulib/import/errno.in.h: Update.
575 * gnulib/import/error.c: Update.
576 * gnulib/import/error.h: Update.
577 * gnulib/import/exitfail.c: Update.
578 * gnulib/import/exitfail.h: Update.
579 * gnulib/import/extra/update-copyright: Update.
580 * gnulib/import/fchdir.c: Update.
581 * gnulib/import/fcntl.c: Update.
582 * gnulib/import/fcntl.in.h: Update.
583 * gnulib/import/fd-hook.c: Update.
584 * gnulib/import/fd-hook.h: Update.
585 * gnulib/import/fd-safer-flag.c: Update.
586 * gnulib/import/fd-safer.c: Update.
587 * gnulib/import/fdopendir.c: Update.
588 * gnulib/import/filename.h: Update.
589 * gnulib/import/filenamecat-lgpl.c: Update.
590 * gnulib/import/filenamecat.h: Update.
591 * gnulib/import/flexmember.h: Update.
592 * gnulib/import/float+.h: Update.
593 * gnulib/import/float.c: Update.
594 * gnulib/import/float.in.h: Update.
595 * gnulib/import/fnmatch.c: Update.
596 * gnulib/import/fnmatch.in.h: Update.
597 * gnulib/import/fnmatch_loop.c: Update.
598 * gnulib/import/fpucw.h: Update.
599 * gnulib/import/frexp.c: Update.
600 * gnulib/import/frexpl.c: Update.
601 * gnulib/import/fstat.c: Update.
602 * gnulib/import/fstatat.c: Update.
603 * gnulib/import/getcwd-lgpl.c: Update.
604 * gnulib/import/getcwd.c: Update.
605 * gnulib/import/getdtablesize.c: Update.
606 * gnulib/import/getlogin_r.c: Update.
607 * gnulib/import/getprogname.c: Update.
608 * gnulib/import/getprogname.h: Update.
609 * gnulib/import/gettext.h: Update.
610 * gnulib/import/gettimeofday.c: Update.
611 * gnulib/import/glob-libc.h: Update.
612 * gnulib/import/glob.c: Update.
613 * gnulib/import/glob.in.h: Update.
614 * gnulib/import/glob_internal.h: Update.
615 * gnulib/import/glob_pattern_p.c: Update.
616 * gnulib/import/globfree.c: Update.
617 * gnulib/import/hard-locale.c: Update.
618 * gnulib/import/hard-locale.h: Update.
619 * gnulib/import/intprops.h: Update.
620 * gnulib/import/inttypes.in.h: Update.
621 * gnulib/import/isnan.c: Update.
622 * gnulib/import/isnand-nolibm.h: Update.
623 * gnulib/import/isnand.c: Update.
624 * gnulib/import/isnanl-nolibm.h: Update.
625 * gnulib/import/isnanl.c: Update.
626 * gnulib/import/itold.c: Update.
627 * gnulib/import/libc-config.h: Update.
628 * gnulib/import/limits.in.h: Update.
629 * gnulib/import/localcharset.c: Update.
630 * gnulib/import/localcharset.h: Update.
631 * gnulib/import/localtime-buffer.c: Update.
632 * gnulib/import/localtime-buffer.h: Update.
633 * gnulib/import/lstat.c: Update.
634 * gnulib/import/m4/00gnulib.m4: Update.
635 * gnulib/import/m4/__inline.m4: Update.
636 * gnulib/import/m4/absolute-header.m4: Update.
637 * gnulib/import/m4/alloca.m4: Update.
638 * gnulib/import/m4/builtin-expect.m4: Update.
639 * gnulib/import/m4/canonicalize.m4: Update.
640 * gnulib/import/m4/chdir-long.m4: Update.
641 * gnulib/import/m4/close.m4: Update.
642 * gnulib/import/m4/closedir.m4: Update.
643 * gnulib/import/m4/configmake.m4: Update.
644 * gnulib/import/m4/d-ino.m4: Update.
645 * gnulib/import/m4/d-type.m4: Update.
646 * gnulib/import/m4/dirent_h.m4: Update.
647 * gnulib/import/m4/dirfd.m4: Update.
648 * gnulib/import/m4/dirname.m4: Update.
649 * gnulib/import/m4/double-slash-root.m4: Update.
650 * gnulib/import/m4/dup.m4: Update.
651 * gnulib/import/m4/dup2.m4: Update.
652 * gnulib/import/m4/eealloc.m4: Update.
653 * gnulib/import/m4/environ.m4: Update.
654 * gnulib/import/m4/errno_h.m4: Update.
655 * gnulib/import/m4/error.m4: Update.
656 * gnulib/import/m4/exponentd.m4: Update.
657 * gnulib/import/m4/exponentl.m4: Update.
658 * gnulib/import/m4/extensions.m4: Update.
659 * gnulib/import/m4/extern-inline.m4: Update.
660 * gnulib/import/m4/fchdir.m4: Update.
661 * gnulib/import/m4/fcntl-o.m4: Update.
662 * gnulib/import/m4/fcntl.m4: Update.
663 * gnulib/import/m4/fcntl_h.m4: Update.
664 * gnulib/import/m4/fdopendir.m4: Update.
665 * gnulib/import/m4/filenamecat.m4: Update.
666 * gnulib/import/m4/flexmember.m4: Update.
667 * gnulib/import/m4/float_h.m4: Update.
668 * gnulib/import/m4/fnmatch.m4: Update.
669 * gnulib/import/m4/fnmatch_h.m4: Update.
670 * gnulib/import/m4/fpieee.m4: Update.
671 * gnulib/import/m4/frexp.m4: Update.
672 * gnulib/import/m4/frexpl.m4: Update.
673 * gnulib/import/m4/fstat.m4: Update.
674 * gnulib/import/m4/fstatat.m4: Update.
675 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
676 * gnulib/import/m4/getcwd-path-max.m4: Update.
677 * gnulib/import/m4/getcwd.m4: Update.
678 * gnulib/import/m4/getdtablesize.m4: Update.
679 * gnulib/import/m4/getlogin.m4: Update.
680 * gnulib/import/m4/getlogin_r.m4: Update.
681 * gnulib/import/m4/getpagesize.m4: Update.
682 * gnulib/import/m4/getprogname.m4: Update.
683 * gnulib/import/m4/gettimeofday.m4: Update.
684 * gnulib/import/m4/glibc21.m4: Update.
685 * gnulib/import/m4/glob.m4: Update.
686 * gnulib/import/m4/glob_h.m4: Update.
687 * gnulib/import/m4/gnulib-cache.m4: Update.
688 * gnulib/import/m4/gnulib-common.m4: Update.
689 * gnulib/import/m4/gnulib-comp.m4: Update.
690 * gnulib/import/m4/gnulib-tool.m4: Update.
691 * gnulib/import/m4/hard-locale.m4: Update.
692 * gnulib/import/m4/include_next.m4: Update.
693 * gnulib/import/m4/inttypes-pri.m4: Update.
694 * gnulib/import/m4/inttypes.m4: Update.
695 * gnulib/import/m4/isnand.m4: Update.
696 * gnulib/import/m4/isnanl.m4: Update.
697 * gnulib/import/m4/largefile.m4: Update.
698 * gnulib/import/m4/limits-h.m4: Update.
699 * gnulib/import/m4/localcharset.m4: Update.
700 * gnulib/import/m4/locale-fr.m4: Update.
701 * gnulib/import/m4/locale-ja.m4: Update.
702 * gnulib/import/m4/locale-zh.m4: Update.
703 * gnulib/import/m4/localtime-buffer.m4: Update.
704 * gnulib/import/m4/longlong.m4: Update.
705 * gnulib/import/m4/lstat.m4: Update.
706 * gnulib/import/m4/malloc.m4: Update.
707 * gnulib/import/m4/malloca.m4: Update.
708 * gnulib/import/m4/math_h.m4: Update.
709 * gnulib/import/m4/mbrtowc.m4: Update.
710 * gnulib/import/m4/mbsinit.m4: Update.
711 * gnulib/import/m4/mbsrtowcs.m4: Update.
712 * gnulib/import/m4/mbstate_t.m4: Update.
713 * gnulib/import/m4/memchr.m4: Update.
714 * gnulib/import/m4/memmem.m4: Update.
715 * gnulib/import/m4/mempcpy.m4: Update.
716 * gnulib/import/m4/memrchr.m4: Update.
717 * gnulib/import/m4/mkdir.m4: Update.
718 * gnulib/import/m4/mkstemp.m4: Update.
719 * gnulib/import/m4/mmap-anon.m4: Update.
720 * gnulib/import/m4/mode_t.m4: Update.
721 * gnulib/import/m4/msvc-inval.m4: Update.
722 * gnulib/import/m4/msvc-nothrow.m4: Update.
723 * gnulib/import/m4/multiarch.m4: Update.
724 * gnulib/import/m4/nocrash.m4: Update.
725 * gnulib/import/m4/off_t.m4: Update.
726 * gnulib/import/m4/onceonly.m4: Update.
727 * gnulib/import/m4/open-cloexec.m4: Update.
728 * gnulib/import/m4/open.m4: Update.
729 * gnulib/import/m4/openat.m4: Update.
730 * gnulib/import/m4/opendir.m4: Update.
731 * gnulib/import/m4/pathmax.m4: Update.
732 * gnulib/import/m4/rawmemchr.m4: Update.
733 * gnulib/import/m4/readdir.m4: Update.
734 * gnulib/import/m4/readlink.m4: Update.
735 * gnulib/import/m4/realloc.m4: Update.
736 * gnulib/import/m4/rename.m4: Update.
737 * gnulib/import/m4/rewinddir.m4: Update.
738 * gnulib/import/m4/rmdir.m4: Update.
739 * gnulib/import/m4/save-cwd.m4: Update.
740 * gnulib/import/m4/secure_getenv.m4: Update.
741 * gnulib/import/m4/setenv.m4: Update.
742 * gnulib/import/m4/signal_h.m4: Update.
743 * gnulib/import/m4/ssize_t.m4: Update.
744 * gnulib/import/m4/stat-time.m4: Update.
745 * gnulib/import/m4/stat.m4: Update.
746 * gnulib/import/m4/std-gnu11.m4: Update.
747 * gnulib/import/m4/stdbool.m4: Update.
748 * gnulib/import/m4/stddef_h.m4: Update.
749 * gnulib/import/m4/stdint.m4: Update.
750 * gnulib/import/m4/stdio_h.m4: Update.
751 * gnulib/import/m4/stdlib_h.m4: Update.
752 * gnulib/import/m4/strchrnul.m4: Update.
753 * gnulib/import/m4/strdup.m4: Update.
754 * gnulib/import/m4/strerror.m4: Update.
755 * gnulib/import/m4/string_h.m4: Update.
756 * gnulib/import/m4/strstr.m4: Update.
757 * gnulib/import/m4/strtok_r.m4: Update.
758 * gnulib/import/m4/sys_socket_h.m4: Update.
759 * gnulib/import/m4/sys_stat_h.m4: Update.
760 * gnulib/import/m4/sys_time_h.m4: Update.
761 * gnulib/import/m4/sys_types_h.m4: Update.
762 * gnulib/import/m4/tempname.m4: Update.
763 * gnulib/import/m4/time_h.m4: Update.
764 * gnulib/import/m4/unistd-safer.m4: Update.
765 * gnulib/import/m4/unistd_h.m4: Update.
766 * gnulib/import/m4/warn-on-use.m4: Update.
767 * gnulib/import/m4/wchar_h.m4: Update.
768 * gnulib/import/m4/wchar_t.m4: Update.
769 * gnulib/import/m4/wctype_h.m4: Update.
770 * gnulib/import/m4/wint_t.m4: Update.
771 * gnulib/import/malloc.c: Update.
772 * gnulib/import/malloc/scratch_buffer.h: Update.
773 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
774 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
775 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
776 * gnulib/import/malloca.c: Update.
777 * gnulib/import/malloca.h: Update.
778 * gnulib/import/malloca.valgrind: Update.
779 * gnulib/import/math.in.h: Update.
780 * gnulib/import/mbrtowc.c: Update.
781 * gnulib/import/mbsinit.c: Update.
782 * gnulib/import/mbsrtowcs-impl.h: Update.
783 * gnulib/import/mbsrtowcs-state.c: Update.
784 * gnulib/import/mbsrtowcs.c: Update.
785 * gnulib/import/memchr.c: Update.
786 * gnulib/import/memmem.c: Update.
787 * gnulib/import/mempcpy.c: Update.
788 * gnulib/import/memrchr.c: Update.
789 * gnulib/import/mkdir.c: Update.
790 * gnulib/import/mkstemp.c: Update.
791 * gnulib/import/msvc-inval.c: Update.
792 * gnulib/import/msvc-inval.h: Update.
793 * gnulib/import/msvc-nothrow.c: Update.
794 * gnulib/import/msvc-nothrow.h: Update.
795 * gnulib/import/open.c: Update.
796 * gnulib/import/openat-die.c: Update.
797 * gnulib/import/openat-priv.h: Update.
798 * gnulib/import/openat-proc.c: Update.
799 * gnulib/import/openat.c: Update.
800 * gnulib/import/openat.h: Update.
801 * gnulib/import/opendir.c: Update.
802 * gnulib/import/pathmax.h: Update.
803 * gnulib/import/pipe-safer.c: Update.
804 * gnulib/import/rawmemchr.c: Update.
805 * gnulib/import/readdir.c: Update.
806 * gnulib/import/readlink.c: Update.
807 * gnulib/import/realloc.c: Update.
808 * gnulib/import/ref-add.sin: Update.
809 * gnulib/import/ref-del.sin: Update.
810 * gnulib/import/rename.c: Update.
811 * gnulib/import/rewinddir.c: Update.
812 * gnulib/import/rmdir.c: Update.
813 * gnulib/import/same-inode.h: Update.
814 * gnulib/import/save-cwd.c: Update.
815 * gnulib/import/save-cwd.h: Update.
816 * gnulib/import/scratch_buffer.h: Update.
817 * gnulib/import/secure_getenv.c: Update.
818 * gnulib/import/setenv.c: Update.
819 * gnulib/import/signal.in.h: Update.
820 * gnulib/import/stat-time.c: Update.
821 * gnulib/import/stat-time.h: Update.
822 * gnulib/import/stat-w32.c: Update.
823 * gnulib/import/stat-w32.h: Update.
824 * gnulib/import/stat.c: Update.
825 * gnulib/import/stdbool.in.h: Update.
826 * gnulib/import/stddef.in.h: Update.
827 * gnulib/import/stdint.in.h: Update.
828 * gnulib/import/stdio.in.h: Update.
829 * gnulib/import/stdlib.in.h: Update.
830 * gnulib/import/str-two-way.h: Update.
831 * gnulib/import/strchrnul.c: Update.
832 * gnulib/import/strdup.c: Update.
833 * gnulib/import/streq.h: Update.
834 * gnulib/import/strerror-override.c: Update.
835 * gnulib/import/strerror-override.h: Update.
836 * gnulib/import/strerror.c: Update.
837 * gnulib/import/string.in.h: Update.
838 * gnulib/import/stripslash.c: Update.
839 * gnulib/import/strnlen1.c: Update.
840 * gnulib/import/strnlen1.h: Update.
841 * gnulib/import/strstr.c: Update.
842 * gnulib/import/strtok_r.c: Update.
843 * gnulib/import/sys_stat.in.h: Update.
844 * gnulib/import/sys_time.in.h: Update.
845 * gnulib/import/sys_types.in.h: Update.
846 * gnulib/import/tempname.c: Update.
847 * gnulib/import/tempname.h: Update.
848 * gnulib/import/time.in.h: Update.
849 * gnulib/import/unistd--.h: Update.
850 * gnulib/import/unistd-safer.h: Update.
851 * gnulib/import/unistd.in.h: Update.
852 * gnulib/import/unsetenv.c: Update.
853 * gnulib/import/verify.h: Update.
854 * gnulib/import/extra/snippet/warn-on-use.h: Update.
855 * gnulib/import/wchar.in.h: Update.
856 * gnulib/import/wctype.in.h: Update.
857 * gnulib/import/xalloc-oversized.h: Update.
858 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
859 "53e2c179f26a890fa6685af4b6c1397ee370433b".
860
861 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
862
863 * record-btrace.c (get_thread_current_frame): Remove
864 old_inferior_ptid.
865
866 2018-09-10 Jerome Guitton <guitton@adacore.com>
867
868 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
869 with check_tag to 1 if and only if the type is tagged and the
870 component being searched cannot been found in the current
871 view. Otherwise, always call ada_to_fixed_type with
872 check_tag to 0.
873
874 2018-09-10 Xavier Roirand <roirand@adacore.com>
875
876 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
877 declaration.
878 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
879 * ada-varobj.c (ada_varobj_get_number_of_children,
880 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
881
882 2018-09-10 Xavier Roirand <roirand@adacore.com>
883
884 * ada-valprint.c (ada_value_print): Use type instead of
885 enclosing type.
886
887 2018-09-10 Xavier Roirand <roirand@adacore.com>
888
889 * ada-lang.c (ada_value_subscript): Handle case when parameter is
890 an array of access to unconstrained array.
891
892 2018-09-10 Xavier Roirand <roirand@adacore.com>
893
894 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
895 (ada_check_typedef): Use it.
896
897 2018-09-10 Xavier Roirand <roirand@adacore.com>
898
899 * ada-varobj.c (ada_varobj_describe_struct_child)
900 (ada_varobj_describe_child): Handle union case like struct one.
901
902 2018-09-10 Tom Tromey <tom@tromey.com>
903
904 PR python/18380:
905 * python/python.c (_initialize_python): Make example in "python"
906 help work in Python 3.
907
908 2018-09-10 Eli Zaretskii <eliz@gnu.org>
909
910 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
911 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
912 $(EXEEXT) to the script, as it is not a program.
913
914 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
915
916 * python/py-prettyprint.c (pretty_print_one_value): Return
917 gdbpy_ref<>.
918 (print_string_repr): Adjust.
919 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
920 * python/python-internal.h (apply_varobj_pretty_printer): Return
921 gdbpy_ref<>.
922 * varobj.c (varobj_value_get_print_value): Adjust.
923
924 2018-09-08 Tom Tromey <tom@tromey.com>
925
926 PR python/16047:
927 * python/py-prettyprint.c (pretty_print_one_value): Check for
928 to_string method.
929
930 2018-09-08 Joel Brobecker <brobecker@adacore.com>
931
932 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
933 replace_operator_with_call.
934
935 2018-09-08 Joel Brobecker <brobecker@adacore.com>
936
937 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
938
939 2018-09-08 Joel Brobecker <brobecker@adacore.com>
940
941 * ada-typeprint.c (print_range): Print the bounds using TYPE
942 rather than its TYPE_TARGET_TYPE.
943
944 2018-09-08 Joel Brobecker <brobecker@adacore.com>
945
946 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
947 call to ada_to_fixed_value_create.
948
949 2018-09-08 Jerome Guitton <guitton@adacore.com>
950
951 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
952
953 2018-09-08 Joel Brobecker <brobecker@adacore.com>
954
955 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
956 by calls to error.
957
958 2018-09-08 Joel Brobecker <brobecker@adacore.com>
959
960 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
961 Move update of loop variable "fi".
962
963 2018-09-08 Joel Brobecker <brobecker@adacore.com>
964
965 * ada-lang.c (value_assign_to_component): In the case of
966 big-endian targets, extract the bits of the given VAL
967 using an src_offset of zero if container is not a scalar.
968
969 2018-09-06 Simon Ser <contact@emersion.fr>
970
971 PR gdb/23105
972 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
973 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
974 * fbsd-tdep.c (fbsd_make_note_desc): New.
975 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
976 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
977 * target.h (enum target_object) Add FreeBSD-specific
978 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
979
980 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
981
982 * compile/compile-c.h (generate_c_for_variable_locations):
983 Change reference to pointer.
984 * compile/compile-c-support.c (compile_program) <compute>:
985 Likewise.
986 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
987 (generate_c_for_for_one_variable): Likewise
988 (generate_c_for_variable_locations): Likewise
989 * compile/compile-c-types.c (compile_c_instance::convert_type):
990 Likewise
991 * compile/compile-cplus-symbols.c (convert_one_symbol):
992 std::move the scope passed to enter_scope.
993 * compile/compile-cplus-types.c
994 (compile_cplus_instance::enter_scope): Make parameter
995 rvalue-reference.
996 (compile_cplus_instance::new_scope): Change reference to
997 pointer.
998 (compile_cplus_instance::convert_type): Likewise
999 (compile_cplus_convert_typedef): std::move the scope passed to
1000 enter_scope.
1001 (compile_cplus_convert_struct_or_union): Likewise.
1002 (compile_cplus_convert_enum): Likewise.
1003 (compile_cplus_convert_namespace): Likewise.
1004 * compile/compile-cplus.h (compile_cplus_instance)
1005 <enter_scope>: Make parameter rvalue-reference.
1006 * compile/compile-internal.h (compile_instance)
1007 <get_cached_type>: Likewise
1008 * compile/compile-loc2c.c (push): Likewise
1009 (pushf): Likewise
1010 (unary): Likewise
1011 (binary): Likewise
1012 (print_label): Likewise
1013 (pushf_register_address): Likewise
1014 (pushf_register): Likewise
1015 (do_compile_dwarf_expr_to_c): Likewise
1016 (compile_dwarf_expr_to_c): Likewise
1017 (compile_dwarf_bounds_to_c): Likewise
1018 * compile/compile.c (compile_instance::get_cached_type):
1019 Likewise
1020 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1021 (compile_dwarf_bounds_to_c): Likewise
1022 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1023 (dwarf2_compile_property_to_c): Likewise
1024 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1025 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1026 Likewise
1027
1028 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1029
1030 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1031 * tui/tui-data.c (init_content_element): Don't initialize it.
1032
1033 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1034
1035 * tui/tui-data.h (struct tui_win_info)
1036 <detail::opaque>: Remove.
1037 * tui/tui-data.c (init_win_info): Remove assignment.
1038
1039 2018-09-05 Tom Tromey <tom@tromey.com>
1040
1041 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1042 -Wformat-nonliteral.
1043 * target-float.c (host_float_ops<T>::to_string)
1044 (host_float_ops<T>::from_string): Use
1045 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1046 * configure: Rebuild.
1047
1048 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1049
1050 * printcmd.c (printf_c_string): Use
1051 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1052 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1053
1054 2018-09-05 Tom Tromey <tom@tromey.com>
1055
1056 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1057
1058 2018-09-05 Tom de Vries <tdevries@suse.de>
1059
1060 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1061 with resolve_abstract_p == true.
1062 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1063 defaulting to false. Propagate resolve_abstract_p to
1064 dwarf2_fetch_die_loc_sect_off.
1065 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1066 parameter, defaulting to false.
1067 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1068 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1069 parameter.
1070 * dwarf2read.h (struct die_info): Forward-declare.
1071 (die_info_ptr): New typedef.
1072 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1073
1074 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1075
1076 GDB 8.2 released.
1077
1078 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1079 Pedro Alves <palves@redhat.com>
1080
1081 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1082 "aclocal-m4-deps.mk". Include file here.
1083 $(srcdir)/aclocal.m4: Add "configure.ac".
1084 * gnulib/aclocal-m4-deps.mk: New file.
1085 * gnulib/update-gnulib.sh: Automatically update
1086 "aclocal-m4-deps.mk".
1087
1088 2018-09-04 Tom Tromey <tom@tromey.com>
1089
1090 * configure: Rebuild.
1091 * configure.ac: Remove multi-ice code.
1092
1093 2018-09-04 Tom Tromey <tom@tromey.com>
1094
1095 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1096 (ada-exp.o): Update.
1097
1098 2018-09-04 Tom Tromey <tom@tromey.com>
1099
1100 * Makefile.in (printcmd.o, target-float.o): Remove.
1101 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1102
1103 2018-09-04 Tom Tromey <tom@tromey.com>
1104
1105 * gnulib/Makefile.in: Remove obsolete comment.
1106 * Makefile.in: Remove obsolete comment.
1107
1108 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1109
1110 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1111 line with '+'.
1112
1113 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1114
1115 * riscv-tdep.c: Add 'prologue-value.h' include.
1116 (struct riscv_unwind_cache): New struct.
1117 (riscv_debug_unwinder): New global.
1118 (riscv_scan_prologue): Update arguments, capture register details
1119 from prologue scan.
1120 (riscv_skip_prologue): Reformat arguments line, move end of
1121 prologue calculation into riscv_scan_prologue.
1122 (riscv_frame_cache): Update return type, create
1123 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1124 details.
1125 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1126 (riscv_frame_prev_register): Use the trad_frame within the
1127 riscv_unwind_cache.
1128 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1129 flag.
1130
1131 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1132
1133 * trad-frame.h (trad_frame_set_realreg): Declare.
1134 (trad_frame_set_addr): Declare.
1135 * trad-frame.c (trad_frame_set_realreg): Define new function.
1136 (trad_frame_set_addr): Define new function.
1137 (trad_frame_set_reg_realreg): Use new function.
1138 (trad_frame_set_reg_addr): Use new function.
1139
1140 2018-09-01 Keith Seitz <keiths@redhat.com>
1141
1142 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1143 pulongest instead of "%lld".
1144 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1145 ATTRIBUTE_UNUSED.
1146
1147 2018-08-31 Tom Tromey <tom@tromey.com>
1148
1149 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1150 variant part type.
1151
1152 2018-08-31 Pedro Alves <palves@redhat.com>
1153
1154 * gdbarch.h: Regenerate.
1155
1156 2018-08-31 Pedro Alves <palves@redhat.com>
1157
1158 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1159 * target.h (Hardware watchpoint interfaces): Describe
1160 continuable/steppable/non-steppable watchpoints.
1161 * gdbarch.h, gdbarch.c: Regenerate.
1162
1163 2018-08-31 Pedro Alves <palves@redhat.com>
1164
1165 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1166 Delete.
1167 * s390-linux-nat.c
1168 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1169 * target.h (target_ops::have_continuable_watchpoint): Delete.
1170 (target_have_continuable_watchpoint): Delete.
1171 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1172 * target-delegates.c: Regenerate.
1173
1174 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1175
1176 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1177 the files present in "gnulib/import/m4/".
1178
1179 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1180
1181 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1182 c.sw, c.swsp, and c.sdsp.
1183
1184 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1185
1186 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1187 (riscv_read_misa_reg): Don't cache value read into inferior data.
1188 (riscv_new_inferior_data): Delete.
1189 (riscv_inferior_data_cleanup): Delete.
1190 (riscv_inferior_data): Delete.
1191 (riscv_invalidate_inferior_data): Delete.
1192 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1193
1194 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1195
1196 * compile/compile-cplus-types.c
1197 (compile_cplus_instance::leave_scope): Take the address of scope
1198 object.
1199 (compile_cplus_instance::convert_qualified_base): Compare quals
1200 to 0.
1201
1202 2018-08-30 Keith Seitz <keiths@redhat.com>
1203
1204 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1205 Use "%s" and host_address_to_string instead of "%p" in printf.
1206
1207 2018-08-29 Keith Seitz <keiths@redhat.com>
1208
1209 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1210 and compile-cplus-types.c.
1211 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1212 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1213 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1214 Declare.
1215 * compile/compile-c-support.c: Include compile-cplus.h.
1216 (load_libcompile): Templatize.
1217 (get_compile_context): "New" function.
1218 (c_get_compile_context): Use get_compile_context.
1219 (cplus_get_compile_context): New function.
1220 (cplus_push_user_expression, cplus_pop_user_expression)
1221 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1222 (cplus_compute_program): Define new structs/functions.
1223 * compile/compile-cplus-symmbols.c: New file.
1224 * compile/compile-cplus-types.c: New file.
1225 * compile/compile-cplus.h: New file.
1226 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1227 Declare.
1228 * compile/compile-object-load.c (get_out_value_type): Use
1229 strncmp_iw when comparing symbol names.
1230 (compile_object_load): Add mst_bss and mst_data.
1231 * compile/compile.c (_initialize_compile): Remove
1232 -Wno-implicit-function-declaration from `compile_args'.
1233 * compile/gcc-cp-plugin.h: New file.
1234 * NEWS: Mention C++ compile support and new debug options.
1235
1236 2018-08-29 Keith Seitz <keiths@redhat.com>
1237
1238 * linespec.c (collect_info::add_symbol): Make virtual.
1239 (struct symbol_searcher_collect_info): New struct.
1240 (symbol_searcher::find_all_symbols): New method.
1241 * symtab.h (class symbol_searcher): New class.
1242
1243 2018-08-29 Keith Seitz <keiths@redhat.com>
1244
1245 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1246 Change to vector of block_symbol. Update all users.
1247 (struct collect_info) <symbols>: Likewise.
1248 (collect_info::add_symbol): Take block_symbol as argument.
1249 Update all callers.
1250 (decode_compound_collector) <m_symbols>: Change type to vector
1251 of block_symbol. Update all users.
1252 (decode_compound_collector::operator ()): Change parameter type
1253 to block_symbol.
1254 (find_method, find_function_symbols, find_linespec_symbols)
1255 (find_label_symbols_in_block, find_label_symbols): Change symbol
1256 vectors to block_symbol vectors.
1257 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1258 block_symbol.
1259
1260 2018-08-29 Keith Seitz <keiths@redhat.com>
1261
1262 * linespec.c (symbolp): Remove typedef and VEC definitions.
1263 (bound_minimal_symbol_d): Likewise.
1264
1265 2018-08-29 Keith Seitz <keiths@redhat.com>
1266
1267 * linespec.c (decode_compound_collector::decode_compound_collector):
1268 Remove initialization for `m_symtabs'.
1269 (decode_compound_collector::release_symbols): Change return type
1270 to std::vector. Update all callers.
1271 (class decode_compound_collector) <m_symbols>: Change type to
1272 std::vector.
1273 (lookup_prefix_sym): Change return type to std::vector. Update all
1274 callers.
1275 (compare_symbols): Remove.
1276 (std_compare_symbols): Rename to `compare_symbols'.
1277 (find_method): Change `sym_classes' parameter to std::vector.
1278 Update all callers. Use std::sort to sort sym_classes.
1279 (find_linespec_symbols): Remove cleanup.
1280
1281 2018-08-29 Keith Seitz <keiths@redhat.com>
1282
1283 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1284 std::vector. Update all users.
1285 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1286 (struct collect_info) <minimal_symbols>: Likewise.
1287 (compare_msymbols): Return bool. Change parameters to const
1288 bound_minimal_symbol references.
1289 (find_method, find_function_symbols, find_linespec_symbols): Change
1290 `minsyms' parameter to std::vector. Update all callers.
1291
1292 2018-08-29 Keith Seitz <keiths@redhat.com>
1293
1294 * linespec.c (struct linespec) <label_symbols>: Change type to
1295 std::vector. Update all users.
1296 (find_label_symbols_in_block): Change `result' parameter to
1297 std::vector. Update all callers.
1298 (find_label_symbols): Return std::vector. Update all callers.
1299
1300 2018-08-29 Keith Seitz <keiths@redhat.com>
1301
1302 * linespec.c (struct linespec) <function_symbols>: Change type to
1303 std::vector. Update all users.
1304 (struct collect_info) <function_symbols>: Likewise.
1305 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1306 (std_compare_symbols): New function.
1307 (find_method, find_function_symbols, find_linespec_symbols)
1308 (find_label_symbols_in_block): Change `symbols' parameter to
1309 std::vector. Update all callers.
1310 (find_label_symbols): Likewise for `function_symbols' and
1311 `label_funcs_ret'.
1312
1313 2018-08-29 Keith Seitz <keiths@redhat.com>
1314
1315 * linespec.c (symtab_vector_up): Define.
1316 (struct linespec) <file_symtabs>: Change type to std::vector *.
1317 Update all uses.
1318 (struct collect_info) <file_symtabs>: Likewise.
1319 (collect_symtabs_from_filename): Return symtab_vector_up.
1320 Update all callers.
1321 (decode_objc): Remove cleanup.
1322 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1323 (symtab_collector::release_symtabs): Return symtab_vector_up.
1324 Update all callers.
1325 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1326 Update all users.
1327 (collect_symtabs_from_filename, symtabs_from_filename): Return
1328 symtab_vector_up. Update all callers.
1329
1330 2018-08-29 Tom Tromey <tom@tromey.com>
1331
1332 * csky-tdep.c (csky_analyze_prologue): Use
1333 core_addr_to_string_nz.
1334
1335 2018-08-29 Tom Tromey <tom@tromey.com>
1336
1337 * windows-nat.c (struct xlate_exception) <them>: Change type to
1338 DWORD.
1339 (xlate): Fix formatting. Remove last entry.
1340 (struct xlate_exception, xlate): Comment out.
1341 (windows_nat_target::resume): Use ranged for.
1342
1343 2018-08-29 Jim Wilson <jimw@sifive.com>
1344
1345 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1346 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1347 of NT_PRFPREG.
1348 (riscv_linux_nat_target::store_registers): Likewise.
1349
1350 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1351
1352 PR gdb/23555
1353 PR gdb/23558
1354 * gnulib/aclocal.m4: Regenerate.
1355 * gnulib/config.in: Regenerate.
1356 * gnulib/configure: Regenerate.
1357 * gnulib/import/Makefile.am: Update.
1358 * gnulib/import/Makefile.in: Update.
1359 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1360 * gnulib/import/_Noreturn.h: ... this.
1361 * gnulib/import/alloca.in.h: Update.
1362 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1363 * gnulib/import/arg-nonnull.h: ... this.
1364 * gnulib/import/assure.h: Update.
1365 * gnulib/import/at-func.c: Update.
1366 * gnulib/import/basename-lgpl.c: Update.
1367 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1368 * gnulib/import/c++defs.h: ... this.
1369 * gnulib/import/canonicalize-lgpl.c: Update.
1370 * gnulib/import/cdefs.h: Update.
1371 * gnulib/import/chdir-long.c: Update.
1372 * gnulib/import/chdir-long.h: Update.
1373 * gnulib/import/cloexec.c: Update.
1374 * gnulib/import/cloexec.h: Update.
1375 * gnulib/import/close.c: Update.
1376 * gnulib/import/closedir.c: Update.
1377 * gnulib/import/config.charset: Update.
1378 * gnulib/import/dirent-private.h: Update.
1379 * gnulib/import/dirent.in.h: Update.
1380 * gnulib/import/dirfd.c: Update.
1381 * gnulib/import/dirname-lgpl.c: Update.
1382 * gnulib/import/dirname.h: Update.
1383 * gnulib/import/dosname.h: Update.
1384 * gnulib/import/dup-safer-flag.c: Update.
1385 * gnulib/import/dup-safer.c: Update.
1386 * gnulib/import/dup.c: Update.
1387 * gnulib/import/dup2.c: Update.
1388 * gnulib/import/errno.in.h: Update.
1389 * gnulib/import/error.c: Update.
1390 * gnulib/import/error.h: Update.
1391 * gnulib/import/exitfail.c: Update.
1392 * gnulib/import/exitfail.h: Update.
1393 * gnulib/import/extra/update-copyright: Update.
1394 * gnulib/import/fchdir.c: Update.
1395 * gnulib/import/fcntl.c: Update.
1396 * gnulib/import/fcntl.in.h: Update.
1397 * gnulib/import/fd-hook.c: Update.
1398 * gnulib/import/fd-hook.h: Update.
1399 * gnulib/import/fd-safer-flag.c: Update.
1400 * gnulib/import/fd-safer.c: Update.
1401 * gnulib/import/fdopendir.c: Update.
1402 * gnulib/import/filename.h: Update.
1403 * gnulib/import/filenamecat-lgpl.c: Update.
1404 * gnulib/import/filenamecat.h: Update.
1405 * gnulib/import/flexmember.h: Update.
1406 * gnulib/import/float+.h: Update.
1407 * gnulib/import/float.c: Update.
1408 * gnulib/import/float.in.h: Update.
1409 * gnulib/import/fnmatch.c: Update.
1410 * gnulib/import/fnmatch.in.h: Update.
1411 * gnulib/import/fnmatch_loop.c: Update.
1412 * gnulib/import/fpucw.h: Update.
1413 * gnulib/import/frexp.c: Update.
1414 * gnulib/import/frexpl.c: Update.
1415 * gnulib/import/fstat.c: Update.
1416 * gnulib/import/fstatat.c: Update.
1417 * gnulib/import/getcwd-lgpl.c: Update.
1418 * gnulib/import/getcwd.c: Update.
1419 * gnulib/import/getdtablesize.c: Update.
1420 * gnulib/import/getlogin_r.c: Update.
1421 * gnulib/import/getprogname.c: Update.
1422 * gnulib/import/getprogname.h: Update.
1423 * gnulib/import/gettext.h: Update.
1424 * gnulib/import/gettimeofday.c: Update.
1425 * gnulib/import/glob-libc.h: Update.
1426 * gnulib/import/glob.c: Update.
1427 * gnulib/import/glob.in.h: Update.
1428 * gnulib/import/glob_internal.h: Update.
1429 * gnulib/import/glob_pattern_p.c: Update.
1430 * gnulib/import/globfree.c: Update.
1431 * gnulib/import/hard-locale.c: Update.
1432 * gnulib/import/hard-locale.h: Update.
1433 * gnulib/import/intprops.h: Update.
1434 * gnulib/import/inttypes.in.h: Update.
1435 * gnulib/import/isnan.c: Update.
1436 * gnulib/import/isnand-nolibm.h: Update.
1437 * gnulib/import/isnand.c: Update.
1438 * gnulib/import/isnanl-nolibm.h: Update.
1439 * gnulib/import/isnanl.c: Update.
1440 * gnulib/import/itold.c: Update.
1441 * gnulib/import/libc-config.h: Update.
1442 * gnulib/import/limits.in.h: Update.
1443 * gnulib/import/localcharset.c: Update.
1444 * gnulib/import/localcharset.h: Update.
1445 * gnulib/import/localtime-buffer.c: Update.
1446 * gnulib/import/localtime-buffer.h: Update.
1447 * gnulib/import/lstat.c: Update.
1448 * gnulib/import/m4/00gnulib.m4: Update.
1449 * gnulib/import/m4/__inline.m4: Update.
1450 * gnulib/import/m4/absolute-header.m4: Update.
1451 * gnulib/import/m4/alloca.m4: Update.
1452 * gnulib/import/m4/builtin-expect.m4: Update.
1453 * gnulib/import/m4/canonicalize.m4: Update.
1454 * gnulib/import/m4/chdir-long.m4: Update.
1455 * gnulib/import/m4/close.m4: Update.
1456 * gnulib/import/m4/closedir.m4: Update.
1457 * gnulib/import/m4/configmake.m4: Update.
1458 * gnulib/import/m4/d-ino.m4: Update.
1459 * gnulib/import/m4/d-type.m4: Update.
1460 * gnulib/import/m4/dirent_h.m4: Update.
1461 * gnulib/import/m4/dirfd.m4: Update.
1462 * gnulib/import/m4/dirname.m4: Update.
1463 * gnulib/import/m4/double-slash-root.m4: Update.
1464 * gnulib/import/m4/dup.m4: Update.
1465 * gnulib/import/m4/dup2.m4: Update.
1466 * gnulib/import/m4/eealloc.m4: Update.
1467 * gnulib/import/m4/environ.m4: Update.
1468 * gnulib/import/m4/errno_h.m4: Update.
1469 * gnulib/import/m4/error.m4: Update.
1470 * gnulib/import/m4/exponentd.m4: Update.
1471 * gnulib/import/m4/exponentl.m4: Update.
1472 * gnulib/import/m4/extensions.m4: Update.
1473 * gnulib/import/m4/extern-inline.m4: Update.
1474 * gnulib/import/m4/fchdir.m4: Update.
1475 * gnulib/import/m4/fcntl-o.m4: Update.
1476 * gnulib/import/m4/fcntl.m4: Update.
1477 * gnulib/import/m4/fcntl_h.m4: Update.
1478 * gnulib/import/m4/fdopendir.m4: Update.
1479 * gnulib/import/m4/filenamecat.m4: Update.
1480 * gnulib/import/m4/flexmember.m4: Update.
1481 * gnulib/import/m4/float_h.m4: Update.
1482 * gnulib/import/m4/fnmatch.m4: Update.
1483 * gnulib/import/m4/fnmatch_h.m4: Update.
1484 * gnulib/import/m4/fpieee.m4: Update.
1485 * gnulib/import/m4/frexp.m4: Update.
1486 * gnulib/import/m4/frexpl.m4: Update.
1487 * gnulib/import/m4/fstat.m4: Update.
1488 * gnulib/import/m4/fstatat.m4: Update.
1489 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1490 * gnulib/import/m4/getcwd-path-max.m4: Update.
1491 * gnulib/import/m4/getcwd.m4: Update.
1492 * gnulib/import/m4/getdtablesize.m4: Update.
1493 * gnulib/import/m4/getlogin.m4: Update.
1494 * gnulib/import/m4/getlogin_r.m4: Update.
1495 * gnulib/import/m4/getpagesize.m4: Update.
1496 * gnulib/import/m4/getprogname.m4: Update.
1497 * gnulib/import/m4/gettimeofday.m4: Update.
1498 * gnulib/import/m4/glibc21.m4: Update.
1499 * gnulib/import/m4/glob.m4: Update.
1500 * gnulib/import/m4/glob_h.m4: Update.
1501 * gnulib/import/m4/gnulib-cache.m4: Update.
1502 * gnulib/import/m4/gnulib-common.m4: Update.
1503 * gnulib/import/m4/gnulib-comp.m4: Update.
1504 * gnulib/import/m4/gnulib-tool.m4: Update.
1505 * gnulib/import/m4/hard-locale.m4: Update.
1506 * gnulib/import/m4/include_next.m4: Update.
1507 * gnulib/import/m4/inttypes-pri.m4: Update.
1508 * gnulib/import/m4/inttypes.m4: Update.
1509 * gnulib/import/m4/isnand.m4: Update.
1510 * gnulib/import/m4/isnanl.m4: Update.
1511 * gnulib/import/m4/largefile.m4: Update.
1512 * gnulib/import/m4/limits-h.m4: Update.
1513 * gnulib/import/m4/localcharset.m4: Update.
1514 * gnulib/import/m4/locale-fr.m4: Update.
1515 * gnulib/import/m4/locale-ja.m4: Update.
1516 * gnulib/import/m4/locale-zh.m4: Update.
1517 * gnulib/import/m4/localtime-buffer.m4: Update.
1518 * gnulib/import/m4/longlong.m4: Update.
1519 * gnulib/import/m4/lstat.m4: Update.
1520 * gnulib/import/m4/malloc.m4: Update.
1521 * gnulib/import/m4/malloca.m4: Update.
1522 * gnulib/import/m4/math_h.m4: Update.
1523 * gnulib/import/m4/mbrtowc.m4: Update.
1524 * gnulib/import/m4/mbsinit.m4: Update.
1525 * gnulib/import/m4/mbsrtowcs.m4: Update.
1526 * gnulib/import/m4/mbstate_t.m4: Update.
1527 * gnulib/import/m4/memchr.m4: Update.
1528 * gnulib/import/m4/memmem.m4: Update.
1529 * gnulib/import/m4/mempcpy.m4: Update.
1530 * gnulib/import/m4/memrchr.m4: Update.
1531 * gnulib/import/m4/mkdir.m4: Update.
1532 * gnulib/import/m4/mkstemp.m4: Update.
1533 * gnulib/import/m4/mmap-anon.m4: Update.
1534 * gnulib/import/m4/mode_t.m4: Update.
1535 * gnulib/import/m4/msvc-inval.m4: Update.
1536 * gnulib/import/m4/msvc-nothrow.m4: Update.
1537 * gnulib/import/m4/multiarch.m4: Update.
1538 * gnulib/import/m4/nocrash.m4: Update.
1539 * gnulib/import/m4/off_t.m4: Update.
1540 * gnulib/import/m4/onceonly.m4: Update.
1541 * gnulib/import/m4/open-cloexec.m4: Update.
1542 * gnulib/import/m4/open.m4: Update.
1543 * gnulib/import/m4/openat.m4: Update.
1544 * gnulib/import/m4/opendir.m4: Update.
1545 * gnulib/import/m4/pathmax.m4: Update.
1546 * gnulib/import/m4/rawmemchr.m4: Update.
1547 * gnulib/import/m4/readdir.m4: Update.
1548 * gnulib/import/m4/readlink.m4: Update.
1549 * gnulib/import/m4/realloc.m4: Update.
1550 * gnulib/import/m4/rename.m4: Update.
1551 * gnulib/import/m4/rewinddir.m4: Update.
1552 * gnulib/import/m4/rmdir.m4: Update.
1553 * gnulib/import/m4/save-cwd.m4: Update.
1554 * gnulib/import/m4/secure_getenv.m4: Update.
1555 * gnulib/import/m4/setenv.m4: Update.
1556 * gnulib/import/m4/signal_h.m4: Update.
1557 * gnulib/import/m4/ssize_t.m4: Update.
1558 * gnulib/import/m4/stat-time.m4: Update.
1559 * gnulib/import/m4/stat.m4: Update.
1560 * gnulib/import/m4/std-gnu11.m4: Update.
1561 * gnulib/import/m4/stdbool.m4: Update.
1562 * gnulib/import/m4/stddef_h.m4: Update.
1563 * gnulib/import/m4/stdint.m4: Update.
1564 * gnulib/import/m4/stdio_h.m4: Update.
1565 * gnulib/import/m4/stdlib_h.m4: Update.
1566 * gnulib/import/m4/strchrnul.m4: Update.
1567 * gnulib/import/m4/strdup.m4: Update.
1568 * gnulib/import/m4/strerror.m4: Update.
1569 * gnulib/import/m4/string_h.m4: Update.
1570 * gnulib/import/m4/strstr.m4: Update.
1571 * gnulib/import/m4/strtok_r.m4: Update.
1572 * gnulib/import/m4/sys_socket_h.m4: Update.
1573 * gnulib/import/m4/sys_stat_h.m4: Update.
1574 * gnulib/import/m4/sys_time_h.m4: Update.
1575 * gnulib/import/m4/sys_types_h.m4: Update.
1576 * gnulib/import/m4/tempname.m4: Update.
1577 * gnulib/import/m4/time_h.m4: Update.
1578 * gnulib/import/m4/unistd-safer.m4: Update.
1579 * gnulib/import/m4/unistd_h.m4: Update.
1580 * gnulib/import/m4/warn-on-use.m4: Update.
1581 * gnulib/import/m4/wchar_h.m4: Update.
1582 * gnulib/import/m4/wchar_t.m4: Update.
1583 * gnulib/import/m4/wctype_h.m4: Update.
1584 * gnulib/import/m4/wint_t.m4: Update.
1585 * gnulib/import/malloc.c: Update.
1586 * gnulib/import/malloc/scratch_buffer.h: Update.
1587 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1588 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1589 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1590 * gnulib/import/malloca.c: Update.
1591 * gnulib/import/malloca.h: Update.
1592 * gnulib/import/malloca.valgrind: Update.
1593 * gnulib/import/math.in.h: Update.
1594 * gnulib/import/mbrtowc.c: Update.
1595 * gnulib/import/mbsinit.c: Update.
1596 * gnulib/import/mbsrtowcs-impl.h: Update.
1597 * gnulib/import/mbsrtowcs-state.c: Update.
1598 * gnulib/import/mbsrtowcs.c: Update.
1599 * gnulib/import/memchr.c: Update.
1600 * gnulib/import/memmem.c: Update.
1601 * gnulib/import/mempcpy.c: Update.
1602 * gnulib/import/memrchr.c: Update.
1603 * gnulib/import/mkdir.c: Update.
1604 * gnulib/import/mkstemp.c: Update.
1605 * gnulib/import/msvc-inval.c: Update.
1606 * gnulib/import/msvc-inval.h: Update.
1607 * gnulib/import/msvc-nothrow.c: Update.
1608 * gnulib/import/msvc-nothrow.h: Update.
1609 * gnulib/import/open.c: Update.
1610 * gnulib/import/openat-die.c: Update.
1611 * gnulib/import/openat-priv.h: Update.
1612 * gnulib/import/openat-proc.c: Update.
1613 * gnulib/import/openat.c: Update.
1614 * gnulib/import/openat.h: Update.
1615 * gnulib/import/opendir.c: Update.
1616 * gnulib/import/pathmax.h: Update.
1617 * gnulib/import/pipe-safer.c: Update.
1618 * gnulib/import/rawmemchr.c: Update.
1619 * gnulib/import/readdir.c: Update.
1620 * gnulib/import/readlink.c: Update.
1621 * gnulib/import/realloc.c: Update.
1622 * gnulib/import/ref-add.sin: Update.
1623 * gnulib/import/ref-del.sin: Update.
1624 * gnulib/import/rename.c: Update.
1625 * gnulib/import/rewinddir.c: Update.
1626 * gnulib/import/rmdir.c: Update.
1627 * gnulib/import/same-inode.h: Update.
1628 * gnulib/import/save-cwd.c: Update.
1629 * gnulib/import/save-cwd.h: Update.
1630 * gnulib/import/scratch_buffer.h: Update.
1631 * gnulib/import/secure_getenv.c: Update.
1632 * gnulib/import/setenv.c: Update.
1633 * gnulib/import/signal.in.h: Update.
1634 * gnulib/import/stat-time.c: Update.
1635 * gnulib/import/stat-time.h: Update.
1636 * gnulib/import/stat-w32.c: Update.
1637 * gnulib/import/stat-w32.h: Update.
1638 * gnulib/import/stat.c: Update.
1639 * gnulib/import/stdbool.in.h: Update.
1640 * gnulib/import/stddef.in.h: Update.
1641 * gnulib/import/stdint.in.h: Update.
1642 * gnulib/import/stdio.in.h: Update.
1643 * gnulib/import/stdlib.in.h: Update.
1644 * gnulib/import/str-two-way.h: Update.
1645 * gnulib/import/strchrnul.c: Update.
1646 * gnulib/import/strdup.c: Update.
1647 * gnulib/import/streq.h: Update.
1648 * gnulib/import/strerror-override.c: Update.
1649 * gnulib/import/strerror-override.h: Update.
1650 * gnulib/import/strerror.c: Update.
1651 * gnulib/import/string.in.h: Update.
1652 * gnulib/import/stripslash.c: Update.
1653 * gnulib/import/strnlen1.c: Update.
1654 * gnulib/import/strnlen1.h: Update.
1655 * gnulib/import/strstr.c: Update.
1656 * gnulib/import/strtok_r.c: Update.
1657 * gnulib/import/sys_stat.in.h: Update.
1658 * gnulib/import/sys_time.in.h: Update.
1659 * gnulib/import/sys_types.in.h: Update.
1660 * gnulib/import/tempname.c: Update.
1661 * gnulib/import/tempname.h: Update.
1662 * gnulib/import/time.in.h: Update.
1663 * gnulib/import/unistd--.h: Update.
1664 * gnulib/import/unistd-safer.h: Update.
1665 * gnulib/import/unistd.in.h: Update.
1666 * gnulib/import/unsetenv.c: Update.
1667 * gnulib/import/verify.h: Update.
1668 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1669 * gnulib/import/wchar.in.h: Update.
1670 * gnulib/import/wctype.in.h: Update.
1671 * gnulib/import/xalloc-oversized.h: Update.
1672 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1673 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1674
1675 2018-08-16 Gary Benson <gbenson@redhat.com>
1676
1677 PR gdb/13000:
1678 * gdb/main.c (captured_main_1): Exit with nonzero status
1679 in batch mode if the last command to be executed failed.
1680 * NEWS: Mention the above.
1681
1682 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1683
1684 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1685 end of warning message.
1686
1687 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1688
1689 PR gdb/22943:
1690 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1691 (aarch64_extract_return_value): Use
1692 aapcs_is_vfp_call_or_return_candidate.
1693 (aarch64_return_in_memory): Likewise.
1694 (aarch64_store_return_value): Likewise.
1695
1696 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1697
1698 * aarch64-tdep.c
1699 (aapcs_is_vfp_call_or_return_candidate): Make static
1700 (pass_in_v_or_stack): Remove function.
1701 (pass_in_v_vfp_candidate): New function.
1702 (aarch64_push_dummy_call): Check for float register candidates.
1703
1704 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1705
1706 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1707 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1708 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1709
1710 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1711
1712 PR build/23399
1713 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1714 (struct ipa_sym_addresses): Rename to...
1715 (struct ipa_sym_addresses_common): ... this.
1716 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1717
1718 2018-08-28 Tom Tromey <tom@tromey.com>
1719
1720 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1721 (token_fifo): Now a std::vector.
1722 (yylex, c_parse): Update.
1723 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1724 (token_fifo): Now a std::vector.
1725 (yylex, d_parse): Update.
1726 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1727 (token_fifo): Now a std::vector.
1728 (yylex, go_parse): Update.
1729
1730 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
1731
1732 * parser-defs.h (struct type_stack) <elements>: Change type to
1733 std::vector<union type_stack_elt>.
1734 <depth, size>: Remove.
1735 * parse.c (parse_exp_in_context_1): Adjust.
1736 (type_stack_reserve): Remove.
1737 (check_type_stack_depth): Remove.
1738 (insert_into_type_stack): Adjust to std::vector.
1739 (insert_type): Likewise.
1740 (push_type): Likewise.
1741 (push_type_int): Likewise.
1742 (insert_type_address_space): Likewise.
1743 (pop_type): Likewise.
1744 (pop_type_int): Likewise.
1745 (pop_typelist): Likewise.
1746 (pop_type_stack): Likewise.
1747 (append_type_stack): Likewise.
1748 (push_type_stack): Likewise.
1749 (get_type_stack): Likewise.
1750 (type_stack_cleanup): Likewise.
1751 (push_typelist): Likewise.
1752 (follow_types): Likewise.
1753 (_initialize_parse): Likewise.
1754
1755 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
1756
1757 * NEWS: Mention csky target.
1758
1759 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
1760 Hafiz Abid Qadeer <abidh@codesourcery.com>
1761 Don Breazeal <donb@codesourcery.com>
1762
1763 * csky-linux-tdep.c: New file.
1764 * csky-tdep.c: Likewise.
1765 * csky-tdep.h: Likewise.
1766 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1767 csky-tdep.o.
1768 (HFILES_NO_SRCDIR): Add csky-tdep.h.
1769 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1770 * configure.tgt: Add csky support.
1771
1772 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
1773
1774 * python/py-framefilter.c (py_print_frame): Print frame architecture
1775 when printing on an MI output.
1776
1777 2018-08-27 Tom Tromey <tom@tromey.com>
1778
1779 PR build/23087:
1780 * configure: Rebuild.
1781 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1782
1783 2018-08-27 Tom Tromey <tom@tromey.com>
1784
1785 * aarch64-linux-tdep.c
1786 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1787 casts to int.
1788
1789 2018-08-27 Tom Tromey <tom@tromey.com>
1790
1791 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1792 unsigned.
1793 (ppc64_standard_linkage1, ppc64_standard_linkage2)
1794 (ppc64_standard_linkage3, ppc64_standard_linkage4)
1795 (ppc64_standard_linkage5, ppc64_standard_linkage6)
1796 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1797 unsigned.
1798
1799 2018-08-27 Tom Tromey <tom@tromey.com>
1800
1801 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1802 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1803
1804 2018-08-27 Tom Tromey <tom@tromey.com>
1805
1806 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1807 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1808 ULONGEST_MAX.
1809 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1810 ULONGEST_MAX.
1811 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1812 ULONGEST_MAX.
1813 * sparc-linux-tdep.c (sparc32_linux_sigframe)
1814 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1815 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1816 ULONGEST_MAX.
1817 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1818 (ppc64_linux_sigaction_tramp_frame)
1819 (ppc32_linux_sighandler_tramp_frame)
1820 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1821 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1822 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1823 * mn10300-linux-tdep.c (am33_linux_sigframe)
1824 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1825 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1826 * mips-linux-tdep.c (mips_linux_o32_sigframe)
1827 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1828 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1829 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1830 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1831 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1832 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1833 * microblaze-linux-tdep.c
1834 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1835 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1836 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1837 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1838 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1839 * common/common-types.h (ULONGEST_MAX): New define.
1840 (CORE_ADDR_MAX): Fix formatting.
1841 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1842 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1843 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1844 (arm_linux_rt_sigreturn_tramp_frame)
1845 (arm_eabi_linux_sigreturn_tramp_frame)
1846 (arm_eabi_linux_rt_sigreturn_tramp_frame)
1847 (thumb2_eabi_linux_sigreturn_tramp_frame)
1848 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1849 (arm_linux_restart_syscall_tramp_frame)
1850 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1851 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1852 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1853 ULONGEST_MAX.
1854 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1855
1856 2018-08-27 Tom Tromey <tom@tromey.com>
1857
1858 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1859 CORE_ADDR_MAX.
1860 * mips-tdep.c (mips_deal_with_atomic_sequence)
1861 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1862 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1863 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1864 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1865 CORE_ADDR_MAX.
1866 * aarch64-tdep.c (aarch64_software_single_step): Use
1867 CORE_ADDR_MAX.
1868
1869 2018-08-27 Tom Tromey <tom@tromey.com>
1870
1871 * linespec.c (complete_linespec_component): Add cast to "char".
1872 * completer.c (completion_tracker::build_completion_result): Add
1873 cast to "char".
1874
1875 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1876
1877 * solist.h (struct solist, struct target_so_ops): Fix
1878 indentation.
1879
1880 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1881
1882 * ada-tasks.c (ada_task_info_s): Remove typedef.
1883 (DEF_VEC_O(ada_task_info_s)): Remove.
1884 (struct ada_tasks_inferior_data): Initialize fields.
1885 <task_list>: Make an std::vector.
1886 (get_ada_tasks_inferior_data): Allocate with new.
1887 (ada_get_task_number): Adjust.
1888 (get_task_number_from_id): Likewise.
1889 (valid_task_id): Likewise.
1890 (ada_get_task_info_from_ptid): Likewise.
1891 (iterate_over_live_ada_tasks): Likewise.
1892 (add_ada_task): Likewise.
1893 (read_known_tasks): Likewise.
1894 (ada_build_task_list): Likewise.
1895 (print_ada_task_info): Likewise.
1896 (info_task): Likewise.
1897 (task_command_1): Likewise.
1898
1899 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1900
1901 * ada-lang.c (add_angle_brackets): Return std::string.
1902
1903 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1904
1905 * python/py-threadevent.c (py_get_event_thread): Initialize
1906 pythread.
1907
1908 2018-08-24 Pedro Alves <palves@redhat.com>
1909
1910 * python/py-bpevent.c (create_breakpoint_event_object): Use
1911 copy-initialization.
1912 * python/py-continueevent.c (emit_continue_event): Use
1913 copy-initialization.
1914 * python/py-exitedevent.c (create_exited_event_object): Return a
1915 gdbpy_ref<>.
1916 (emit_exited_event): Use copy-initialization.
1917 * python/py-inferior.c (python_new_inferior)
1918 (python_inferior_deleted, add_thread_object): Use
1919 copy-initialization.
1920 * python/py-infevents.c (create_inferior_call_event_object)
1921 (create_register_changed_event_object)
1922 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1923 (emit_inferior_call_event, emit_memory_changed_event)
1924 (emit_register_changed_event): Use copy-initialization.
1925 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1926 Return a gdbpy_ref<>.
1927 (emit_new_objfile_event): Use copy-initialization.
1928 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1929 (emit_clear_objfiles_event): Use copy-initialization.
1930 * python/py-signalevent.c (create_signal_event_object): Use
1931 copy-initialization.
1932 * python/py-threadevent.c (create_thread_event_object): Use
1933 copy-initialization.
1934
1935 2018-08-24 Pedro Alves <palves@redhat.com>
1936 Simon Marchi <simon.marchi@ericsson.com>
1937
1938 PR gdb/23379
1939 * python/py-continueevent.c: Include "gdbthread.h".
1940 (create_continue_event_object): Add intro comment. Add 'ptid'
1941 parameter. Use it to find thread to pass to
1942 create_thread_event_object.
1943 (emit_continue_event): Pass PTID down to
1944 create_continue_event_object.
1945 * python/py-event.h (py_get_event_thread): Declare.
1946 (create_thread_event_object): Remove default from 'thread'
1947 parameter.
1948 * python/py-stopevent.c (create_stop_event_object): Use
1949 py_get_event_thread.
1950 * python/py-threadevent.c (get_event_thread): Rename to ...
1951 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1952 and use it to find the thread.
1953 (create_thread_event_object): Assert that THREAD isn't null.
1954 Don't find the event thread here.
1955
1956 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1957
1958 * block.h (blockrange, blockranges): New struct declarations.
1959 (struct block): Add new field named `ranges'.
1960 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1961 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1962 macros for accessing ranges in struct block.
1963 (make_blockranges): New declaration.
1964 block.c (make_blockranges): New function.
1965 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1966 for block.
1967 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1968 * blockframe.c (cache_pc_function_block): New static global.
1969 (clear_pc_function_cache): Clear cache_pc_function_block.
1970 (find_pc_partial_function): Move comment to symtab.h. Add
1971 support for non-contiguous blocks.
1972 * cli/cli-cmds.c (block.h): Include.
1973 (print_disassembly): Handle printing of non-contiguous blocks.
1974 (disassemble_current_function): Likewise.
1975 (disassemble_command): Likewise.
1976
1977 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1978 BLOCK_START.
1979 * blockframe.c (get_pc_function_start): Likewise.
1980 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1981 (gcc_symbol_address): Likewise.
1982 * compile/compile-object-run.c (compile_object_run): Likewise.
1983 * compile/compile.c (get_expr_block_and_pc): Likewise.
1984 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1985 (func_addr_to_tail_call_list): Likewise.
1986 * findvar.c (default_read_var_value): Likewise.
1987 * inline-frame.c (inline_frame_this_id): Likewise.
1988 (skip-inline_frames): Likewise.
1989 * infcmd.c (until_next_command): Likewise.
1990 * linespec.c (convert_linespec_to_sals): Likewise.
1991 * parse.c (parse_exp_in_context_1): Likewise.
1992 * printcmd.c (build_address_symbolic): likewise.
1993 (info_address_command): Likewise.
1994 symtab.c (find_function_start_sal): Likewise.
1995 (skip_prologue_sal): Likewise.
1996 (find_function_alias_target): Likewise.
1997 (find_gnu_ifunc): Likewise.
1998 * stack.c (find_frame_funname): Likewise.
1999 * symtab.c (fixup_symbol_section): Likewise.
2000 (find_function_start_sal): Likewise.
2001 (skip_prologue_sal): Likewsie.
2002 (find_function_alias_target): Likewise.
2003 (find_gnu_ifunc): Likewise.
2004 * tracepoint.c (info_scope_command): Likewise.
2005 * value.c (value_fn_field): Likewise.
2006
2007 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2008 in place of find_pc_partial_function.
2009 * blockframe.c (find_function_entry_range_from_pc): New function.
2010 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2011 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2012 for each range in a block.
2013
2014
2015 2018-08-23 Xavier Roirand <roirand@adacore.com>
2016
2017 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2018 incrementation.
2019
2020 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2021
2022 * solib-svr4.c (read_program_headers_from_bfd): Return
2023 gdb::optional<gdb::byte_vector>.
2024 (svr4_exec_displacement): Adjust.
2025
2026 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2027
2028 * solib-svr4.c (read_program_header): Return
2029 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2030 (find_program_interpreter): Return
2031 gdb::optional<gdb::byte_vector>.
2032 (scan_dyntag_auxv): Adjust.
2033 (enable_break): Adjust.
2034 (svr4_exec_displacement): Adjust.
2035
2036 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2037
2038 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2039 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2040
2041 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2042
2043 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2044 string_vprintf.
2045 * guile/scm-utils.c (gdbscm_printf): Likewise.
2046 * serial.c (serial_printf): Likewise.
2047 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2048
2049 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2050
2051 * stack.c (print_frame): Print frame architecture when printing on
2052 an MI output.
2053 * NEWS: Mention new "arch" attribute in frame output.
2054
2055 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2056
2057 * arch/aarch64.h (aarch64_regnum): Update comment.
2058
2059 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2060
2061 * NEWS: Add SVE to 8.2 section.
2062
2063 2018-08-21 Pedro Alves <palves@redhat.com>
2064
2065 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2066 out from gdbscm_parse_function_args.
2067 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2068 gdbscm_parse_function_args_1.
2069
2070 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2071
2072 PR gdb/17816
2073 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2074 operator.
2075
2076 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2077
2078 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2079
2080 2018-08-19 Michael Spang <spang@google.com>
2081
2082 PR gdb/11786
2083 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2084 for PT_TLS segments.
2085
2086 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2087
2088 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2089 dwarf_variable_value.
2090 * dwarf2-frame.c (class dwarf_expr_executor):
2091 Add override for dwarf_variable_value.
2092 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2093 (class symbol_needs_eval_context): Likewise.
2094 (indirect_synthetic_pointer): Add forward declaration.
2095 (sect_variable_value): New function.
2096 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2097 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2098 for DW_OP_GNU_variable_value.
2099
2100 2018-08-16 Tom Tromey <tom@tromey.com>
2101
2102 * top.c (read_command_file): Update.
2103 (command_line_input): Remove "repeat" argument.
2104 * ada-lang.c (get_selections): Update.
2105 * linespec.c (decode_line_2): Update.
2106 * defs.h (command_line_input): Remove argument.
2107 * cli/cli-script.c (read_next_line): Update.
2108 * python/py-gdb-readline.c: Update.
2109
2110 2018-08-17 Tom Tromey <tom@tromey.com>
2111
2112 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2113 command_line_input.
2114
2115 2018-08-15 Tom Tromey <tom@tromey.com>
2116
2117 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2118
2119 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2120
2121 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2122 If used, use find_pc_partial_function to find address range
2123 to disassemble.
2124 * mi/mi-main.c (mi_cmd_list_features): Report
2125 "data-disassemble-a-option" feature.
2126 * NEWS: Mention new -data-disassemble option -a.
2127
2128 2018-08-13 Tom Tromey <tom@tromey.com>
2129
2130 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2131
2132 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2133
2134 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2135 (aarch64_linux_collect_sve_regset): Likewise.
2136 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2137 * regcache.h (regcache_map_entry_size): New function.
2138
2139 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2140
2141 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2142 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2143 (SVE_HEADER_VL_LENGTH): Likewise.
2144 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2145 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2146 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2147 (SVE_HEADER_SIZE_OFFSET): Likewise.
2148 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2149 (SVE_HEADER_VL_OFFSET): Likewise.
2150 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2151 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2152 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2153 (SVE_HEADER_SIZE): Likewise.
2154 (aarch64_linux_core_read_vq): Add function.
2155 (aarch64_linux_core_read_description): Check for SVE section.
2156
2157 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2158
2159 * aarch64-fbsd-tdep.c
2160 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2161 collect_size.
2162 * aarch64-linux-tdep.c
2163 (aarch64_linux_iterate_over_regset_sections): Likewise.
2164 * alpha-linux-tdep.c
2165 (alpha_linux_iterate_over_regset_sections):
2166 * alpha-nbsd-tdep.c
2167 (alphanbsd_iterate_over_regset_sections): Likewise.
2168 * amd64-fbsd-tdep.c
2169 (amd64fbsd_iterate_over_regset_sections): Likewise.
2170 * amd64-linux-tdep.c
2171 (amd64_linux_iterate_over_regset_sections): Likewise.
2172 * arm-bsd-tdep.c
2173 (armbsd_iterate_over_regset_sections): Likewise.
2174 * arm-fbsd-tdep.c
2175 (arm_fbsd_iterate_over_regset_sections): Likewise.
2176 * arm-linux-tdep.c
2177 (arm_linux_iterate_over_regset_sections): Likewise.
2178 * corelow.c (get_core_registers_cb): Likewise.
2179 (core_target::fetch_registers): Likewise.
2180 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2181 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2182 * gdbarch.h (void): Regenerate.
2183 * gdbarch.sh: Add supply_size and collect_size.
2184 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2185 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2186 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2187 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2188 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2189 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2190 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2191 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2192 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2193 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2194 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2195 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2196 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2197 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2198 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2199 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2200 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2201 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2202 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2203 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2204 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2205 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2206 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2207 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2208 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2209 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2210 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2211 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2212 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2213 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2214
2215 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2216
2217 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2218 with string_printf.
2219
2220 2018-08-10 Keith Seitz <keiths@redhat.com>
2221
2222 * compile/compile-c-support.c (add_code_header, add_code_footer):
2223 Move into policy class.
2224 (c_push_user_expression, pop_user_expression_nop)
2225 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2226 (compile_program): New host class.
2227 (c_compile_program): New typedef.
2228 (c_compute_porgram): Use c_compile_program.
2229
2230 2018-08-10 Keith Seitz <keiths@redhat.com>
2231
2232 * compile/compile-internal.h (compile_instance::~compile_instance):
2233 Remove calls to htab_delete.
2234 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2235 * compile.c (compile_instance::compile_instance): Initialize
2236 htab unique pointers.
2237 (compile_instance::get_cached_type, compile_instance::insert_type)
2238 (compile_instance::error_symbol_once): Update for unique_ptr.
2239
2240 2018-08-10 Keith Seitz <keiths@redhat.com>
2241
2242 * compile/compile-c-symbols.c (struct symbol_error)
2243 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2244 (compile_instance::insert_symbol_error)
2245 (compile_instance::error_symbol_once): Move to ...
2246 * compile/compile.c: ... here.
2247
2248 2018-08-10 Keith Seitz <keiths@redhat.com>
2249
2250 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2251 instead of `new_compile_instance'.
2252 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2253 Update description.
2254 If the symbol error map is not initialized, create it.
2255 (generate_c_for_for_one_symbol): Do not check/initialize
2256 the symbol error map.
2257 * compile/compile-c-types.c (compile_c_instance): Make a class.
2258 Update all callers.
2259 (compile_instance::compile_instance): Initialize the type cache.
2260 (get_cached_type): New function.
2261 (insert_type): Update description.
2262 (compile_c_instance::m_default_cflags): Define.
2263 (convert_type): Update description. Use get_cached_type.
2264 (delete_instance): Moved to destructor.
2265 (new_compile_instance): Moved to constructor.
2266 * compile/compile-c.h (compile_c_instance): Make class inheriting
2267 from compile_instance.
2268 <base>: Remove field.
2269 <type_map, symbol_err_map>: Move to base class.
2270 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2271 * compile/compile-internal.h (compile_instance): Make class.
2272 <type_map_t, symbol_err_map_t>: Define.
2273 <fe>: Rename to `m_gcc_fe'.
2274 <scope, block, gcc_target_options>: Add `m_' prefix.
2275 <m_type_map, m_symbol_err_map>: New fields, moved from
2276 compile_c_instance.
2277 <destroy>: Remove.
2278 (convert_type, new_compile_instance): Remove.
2279 * compile/compile.c (cleanup_compile_instance): Remove.
2280 (compile_to_object): Use unique_ptr to eliminate cleanups.
2281 (compile_instance::set_print_callback, compile_instance::version)
2282 (compile_instance::set_verbose)
2283 (compile_instance::set_driver_filename)
2284 (compile_instance::set_triplet_regexp)
2285 (compile_instance::set_arguments)
2286 (compile_instance::set_source_file)
2287 (compile_instance::compile): Define.
2288
2289 2018-08-10 Keith Seitz <keiths@redhat.com>
2290
2291 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2292 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2293 gcc-c-fe.def to define C plugin.
2294 (delete_instance): Delete `c_plugin'.
2295 (new_compile_instance): Initialize `c_plugin'.
2296 * compile/compile-c.h: Include gcc_c_plugin.h.
2297 (struct compile_c_instance) <c_plugin>: New member.
2298 * gcc-c-plugin.h: New file.
2299 Update all callers with API change.
2300
2301 2018-08-10 Keith Seitz <keiths@redhat.com>
2302
2303 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2304 (HFILES_NO_SRCDIR): ... to here.
2305 Add compile-internal.h and compile-c.h.
2306 * compile/compile-c-support.c: Include compile-c.h.
2307 * compile/compile-c-symbols.c: Include compile-c.h.
2308 (generate_c_for_variable_locations): Update comment.
2309 * compile/compile-c-types.c: Include compile-c.h.
2310 * compile/compile-c.h: New file -- moved C language declarations
2311 from other files here.
2312 * compile/compile-internal.h: Do not include hashtab.h or
2313 common/enum-flags.h.
2314 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2315 (gcc_convert_symbol, gcc_symbol_address)
2316 (generate_c_for_variable_locations, c_get_mode_for_size)
2317 (c_get_range_decl_name): Definitions moved to compile-c.h.
2318 * compile/compile-loc2c.c: Include compile-c.h.
2319
2320 2018-08-10 Keith Seitz <keiths@redhat.com>
2321
2322 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2323 (c_symbol_substitution_name): ... this.
2324 Update all callers.
2325
2326 2018-08-10 Keith Seitz <keiths@redhat.com>
2327
2328 * compile/compile-c-support.c (c_compute_program): Use
2329 unique_xmalloc_ptr to eliminate cleanup.
2330 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2331 Return a unique_xmalloc_ptr and eliminate cleanup.
2332 * compile/compile-internal.h (generate_c_for_variable_locations):
2333 Return unique_xmalloc_ptr and update description.
2334
2335 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2336
2337 * corelow.c (core_target::get_core_register_section): Rename
2338 min_size to section_min_size.
2339
2340 2018-08-09 Jim Wilson <jimw@sifive.com>
2341
2342 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2343 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2344 * NEWS: Mention new GNU/Linux RISC-V target.
2345 * configure.host: Add riscv*-*-linux*.
2346 * configure.nat: Add riscv*.
2347 * configure.tgt: Add riscv*-*-linux*.
2348 * riscv-linux-nat.c: New file.
2349 * riscv-linux-tdep.c: New file.
2350
2351 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2352
2353 * infrun.c (resume): Make static, add forward declaration.
2354 (proceed): Update header comment.
2355 * infrun.h (resume): Delete declaration.
2356
2357 2018-08-09 Tom Tromey <tom@tromey.com>
2358
2359 * riscv-tdep.h: Minor formatting fixes.
2360
2361 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2362
2363 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2364 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2365 (test_mkdir_recursive): Likewise.
2366 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2367
2368 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2369
2370 * valarith.c (value_subscripted_rvalue): If an array is not in
2371 memory, and we don't know the upper bound, then we can't know that
2372 the requested element exists or not.
2373
2374 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2375
2376 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2377 (target_options_to_string): Add comment.
2378
2379 2018-08-08 Tom Tromey <tom@tromey.com>
2380
2381 * unittests/scoped_mmap-selftests.c: Check result of "write".
2382
2383 2018-08-08 Jim Wilson <jimw@sifive.com>
2384
2385 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2386 (decode_register_index_short): New.
2387 (decode_j_type_insn, decode_cj_type_insn): New.
2388 (decode_b_type_insn, decode_cb_type_insn): New.
2389 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2390 local xlen. Check xlen when decoding ambiguous compressed insns. In
2391 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2392 is_c_sw_insn instead of is_sw_insn.
2393 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2394 (riscv_software_single_step): New.
2395 * riscv-tdep.h (riscv_software_single_step): Declare.
2396
2397 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2398 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2399
2400 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2401
2402 PR gdb/18050:
2403 * target.c (dispose_inferior): Don't dispose of inferiors that are
2404 already killed.
2405
2406 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2407
2408 * remote.c (remote_target::download_tracepoint): Change char* to
2409 const char*.
2410
2411 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2412
2413 * target.h (target_options_to_string): Return an std::string.
2414 * target.c (str_comma_list_concat_elem): Return void, use
2415 std::string.
2416 (do_option): Likewise.
2417 (target_options_to_string): Return an std::string.
2418 * linux-nat.c (linux_nat_target::wait): Adjust.
2419 * target-debug.h (target_debug_print_options): Adjust.
2420
2421 2018-08-07 Tom Tromey <tom@tromey.com>
2422
2423 * Makefile.in (CPPFLAGS): New variable.
2424 (INTERNAL_CPPFLAGS): Use it.
2425
2426 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2427
2428 * NEWS: Mention the index cache.
2429
2430 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2431
2432 * common/pathstuff.h (get_standard_cache_dir): New.
2433 * common/pathstuff.c (get_standard_cache_dir): New.
2434 * build-id.h (build_id_to_string): New.
2435 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2436 DEBUG_STR_SUFFIX): Move to here.
2437 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2438 DEBUG_STR_SUFFIX): Move from there.
2439 (write_psymtabs_to_index): Make non-static, add basename
2440 parameter. Write to temporary files, rename when done.
2441 (save_gdb_index_command): Adjust call to
2442 write_psymtabs_to_index.
2443 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2444 field.
2445 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2446 (get_gdb_index_contents_from_cache): New.
2447 (get_gdb_index_contents_from_cache_dwz): New.
2448 (dwarf2_initialize_objfile): Read index from cache.
2449 (dwarf2_build_psymtabs): Save to index.
2450 * dwarf-index-cache.h: New file.
2451 * dwarf-index-cache.c: New file.
2452 * dwarf-index-write.h: New file.
2453
2454 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2455
2456 * gnulib/aclocal.m4: Re-generate.
2457 * gnulib/config.in: Re-generate.
2458 * gnulib/configure: Re-generate.
2459 * gnulib/import/Makefile.am: Re-generate.
2460 * gnulib/import/Makefile.in: Re-generate.
2461 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2462 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2463 * gnulib/import/m4/mkdir.m4: New file.
2464 * gnulib/import/mkdir.c: New file.
2465 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2466 module.
2467
2468 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2469
2470 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2471 * common/scoped_mmap.c: New file.
2472 * common/scoped_mmap.h (destroy): New method.
2473 (~scoped_mmap, reset): Use destroy.
2474 (scoped_mmap): New move constructor.
2475 (mmap_file): New declaration.
2476 * unittests/scoped_mmap-selftests.c (test_normal,
2477 test_invalid_filename, run_tests): New functions.
2478 (_initialize_scoped_mmap_selftests): Register selftest.
2479
2480 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2481
2482 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2483 (read_gdb_index_from_buffer): ... this. Remove section
2484 parameter, add buffer parameter.
2485 (get_gdb_index_contents_ftype,
2486 get_gdb_index_contents_dwz_ftype): New typedefs.
2487 (dwarf2_read_gdb_index): Add callback parameters to get the
2488 index contents.
2489 (get_gdb_index_contents_from_section): New.
2490 (dwarf2_initialize_objfile): Update call to
2491 dwarf2_read_gdb_index.
2492
2493 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2494
2495 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2496 (gdb_open_cloexec): Likewise.
2497 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2498 (commandline_from_pid): Likewise.
2499 (linux_xfer_osdata_threads): Likewise.
2500 (linux_xfer_osdata_fds): Likewise.
2501 * ada-lang.c (is_package_name): Likewise.
2502 * auxv.c (procfs_xfer_auxv): Likewise.
2503 * breakpoint.c (print_one_breakpoint_location): Use
2504 uiout::field_fmt.
2505 (print_one_catch_solib): Use string_printf.
2506 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2507 (add_pe_forwarded_sym): Likewise.
2508 * dwarf2read.c (create_type_unit_group): Likewise.
2509 (build_error_marker_type): Likewise.
2510 * infcall.c (get_function_name): Likewise.
2511 * valprint.c (print_converted_chars_to_obstack): Likewise.
2512 * xtensa-tdep.c (xtensa_register_type): Likewise.
2513
2514 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2515
2516 * remote.c (remote_target::download_tracepoint): Fix format
2517 string errors.
2518
2519 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2520
2521 * tracefile.c: Include common/byte-vector.h.
2522 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2523 with trace_regblock_size if needed. Update uses of buf.
2524
2525 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2526
2527 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2528 std::vector<unsigned char>.
2529 * tracepoint.c (collection_list::collection_list): Remove
2530 m_regs_mask initializer from initializer list. Resize
2531 m_regs_mask using the largest remote register number.
2532 (collection_list::add_remote_register): Remove size check on
2533 m_regs_mask. Use at to access element.
2534 (collection_list::stringify): Change type of temp_buf to
2535 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2536 stringify the register mask. Use pack_hex_byte for the register
2537 mask.
2538
2539 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2540
2541 * tracepoint.h (class collection_list) <add_register>: Remove.
2542 <add_remote_register, add_ax_registers, add_local_register>:
2543 Declare.
2544 <add_memrange>: Add scope parameter.
2545 * tracepoint.c (encode_actions_1): Likewise.
2546 (collection_list::add_register): Rename to ...
2547 (collection_list::add_remote_register): ... this. Update
2548 comment.
2549 (collection_list::add_ax_registers, add_local_register): New
2550 methods.
2551 (collection_list::add_memrange): Add scope parameter. Call
2552 add_local_register instead of add_register.
2553 (finalize_tracepoint_aexpr): New function.
2554 (collection_list::collect_symbol): Update calls to add_memrange.
2555 Call add_local_register instead of add_register. Call
2556 add_ax_registers. Call finalize_tracepoint_aexpr.
2557 (encode_actions_1): Get remote regnos for $reg action. Call
2558 add_remote_register, add_ax_registers, and add_local_register.
2559 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2560 (validate_actionline): Call finalize_tracepoint_aexpr.
2561
2562 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2563
2564 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2565 Replace array buf with gdb::char_vector buf, of size
2566 get_remote_packet_size (). Replace references to buf and
2567 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2568 and xsnprintf with snprintf. Raise errors if the buffer is too
2569 small.
2570
2571 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2572
2573 * remote.c (remote_target::download_tracepoint): Fix the has_more
2574 predicate in the QTDP action list iteration.
2575
2576 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2577
2578 * remote.c (remote_target::download_tracepoint): Fix indentation
2579 in for block.
2580
2581 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2582
2583 * proc-api.c (_initialize_proc_api): Remove c, unused.
2584 * procfs.c (procfs_init_inferior): Remove signals, unused.
2585 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2586 unused.
2587
2588 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2589 Andrew Burgess <andrew.burgess@embecosm.com>
2590
2591 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2592 'W_STOPCODE (0)' as this could be ambiguous.
2593
2594 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2595
2596 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2597 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2598 "ai_socktype").
2599
2600 2018-08-02 Tom Tromey <tom@tromey.com>
2601
2602 PR symtab/16842.
2603 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2604 symbols.
2605 (process_structure_scope): Likewise.
2606
2607 2018-08-02 Xavier Roirand <roirand@adacore.com>
2608
2609 PR gdb/22629:
2610 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2611 kill inferior.
2612
2613 2018-08-02 Tom Tromey <tom@tromey.com>
2614
2615 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2616 (darwin_suspend_inferior, darwin_resume_inferior)
2617 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2618 (darwin_check_new_threads): Check result of get_darwin_inferior.
2619
2620 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2621
2622 GDB 8.1.1 released.
2623
2624 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2625
2626 * varobj.c (varobj_get_path_expr_parent): Report an error if
2627 parent is a dynamic varobj.
2628
2629 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2630
2631 * gnulib/aclocal.m4: Re-generate.
2632 * gnulib/config.in: Re-generate.
2633 * gnulib/configure: Re-generate.
2634 * gnulib/import/Makefile.in: Re-generate.
2635 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2636 * gnulib/import/m4/onceonly.m4: Re-generate.
2637
2638 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2639
2640 * target-descriptions.c (struct xml_test_tdesc): New.
2641 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2642 (record_xml_tdesc): Update.
2643 (maintenance_check_xml_descriptions): Update.
2644 * target-descriptions.h (record_xml_tdesc): Update comment.
2645
2646 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2647
2648 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2649 checking array bounds are defined.
2650
2651 2018-07-30 Tom Tromey <tom@tromey.com>
2652
2653 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2654 irreflexivity violation.
2655
2656 2018-07-30 Tom Tromey <tom@tromey.com>
2657
2658 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2659 * value.c (unpack_long): Remove lint code.
2660 * valops.c (value_ind): Remove lint code.
2661 * valarith.c (value_x_binop, value_x_unop, value_equal)
2662 (value_pos): Remove lint code.
2663
2664 2018-07-28 Tom de Vries <tdevries@suse.de>
2665
2666 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2667 with undefined upper bound as <optimized out>.
2668
2669 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2670
2671 * gcore.in: Rename variable "name" to "prefix". Expand
2672 "usage" text.
2673
2674 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2675
2676 * windows-nat.c (windows_nat_target::create_inferior): Update to
2677 call close() in global namespace.
2678
2679 2018-07-26 Tom Tromey <tom@tromey.com>
2680
2681 * dwarf-index-write.c (add_address_entry): Don't add objfile
2682 offsets.
2683 * dbxread.c (find_stab_function): Rename from
2684 find_stab_function_addr. Return a bound_minimal_symbol.
2685 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2686 Don't add objfile offsets.
2687 (end_psymtab): Use raw_text_low, raw_text_high,
2688 MSYMBOL_VALUE_RAW_ADDRESS.
2689 (read_ofile_symtab): Update.
2690 (process_one_symbol): Update.
2691 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2692 offsets.
2693 (dw2_relocate): Remove.
2694 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2695 searching addrmap.
2696 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2697 Update.
2698 (process_psymtab_comp_unit_reader, add_partial_symbol)
2699 (add_partial_subprogram, dwarf2_ranges_read): Update.
2700 (load_partial_dies): Update.
2701 (add_address_entry): Don't add objfile offsets.
2702 (dwarf2_build_include_psymtabs): Update.
2703 (create_addrmap_from_aranges): Don't add objfile offsets.
2704 (dw2_find_pc_sect_compunit_symtab): Update.
2705 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2706 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2707 Update.
2708 (parse_partial_symbols): Don't add objfile offsets. Use
2709 raw_text_low, raw_text_high. Update.
2710 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2711 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2712 or call 'relocate' quick function. Clear psymbol_map.
2713 * psympriv.h (struct partial_symbol) <address>: Add section
2714 offset.
2715 <set_unrelocated_address>: Rename from set_address.
2716 <raw_text_low, raw_text_high>: New methods.
2717 <text_low, text_high>: Add objfile parameter.
2718 (add_psymbol_to_bcache): Add 'section' parameter. Call
2719 set_unrelocated_address.
2720 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2721 (find_pc_psymbol): Update.
2722 (fixup_psymbol_section, relocate_psymtabs): Remove.
2723 (dump_psymtab, psym_functions): Update.
2724 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2725 parameter.
2726 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2727 (start_psymtab_common): Update.
2728 * symfile-debug.c (debug_qf_relocate): Remove.
2729 (debug_sym_quick_functions): Update.
2730 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2731 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2732 Update.
2733
2734 2018-07-26 Tom Tromey <tromey@redhat.com>
2735
2736 * dbxread.c (end_psymtab): Use text_high_valid and
2737 text_low_valid.
2738 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2739 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2740 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2741 Update comment.
2742 <text_low_valid, text_high_valid>: New fields.
2743 <set_text_low, set_text_high>: Update.
2744 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2745
2746 2018-07-26 Tom Tromey <tom@tromey.com>
2747
2748 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2749 Update.
2750 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2751 textlow and texthigh fields.
2752 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2753 Update.
2754 * mdebugread.c (parse_lines, parse_partial_symbols)
2755 (psymtab_to_symtab_1): Update.
2756 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2757 Rename fields. Update comment. Now private.
2758 <text_low, text_high, set_text_low, set_text_high>: New methods.
2759 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2760 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2761 (start_psymtab_common, maintenance_info_psymtabs)
2762 (maintenance_check_psymtabs): Update.
2763 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2764 texthigh fields.
2765 (scan_xcoff_symtab): Update.
2766
2767 2018-07-26 Tom Tromey <tromey@redhat.com>
2768
2769 * psympriv.h (struct partial_symbol) <unrelocated_address,
2770 address, set_address>: New methods.
2771 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2772 (fixup_psymbol_section, relocate_psymtabs): Update.
2773 (print_partial_symbols): Add 'objfile' parameter. Update.
2774 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2775 Update.
2776
2777 2018-07-26 Tom Tromey <tom@tromey.com>
2778
2779 * dwarf-index-write.c (write_psymbols, debug_names::insert)
2780 (debug_names::write_psymbols): Update.
2781 * psympriv.h (struct partial_symbol): Derive from
2782 general_symbol_info.
2783 <obj_section>: New method.
2784 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2785 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2786 (find_pc_sect_psymbol, fixup_psymbol_section)
2787 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2788 (print_partial_symbols, recursively_search_psymtabs)
2789 (compare_psymbols, psymbol_hash, psymbol_compare)
2790 (add_psymbol_to_bcache, maintenance_check_psymtabs)
2791 (psymbol_name_matches, psym_fill_psymbol_map): Update.
2792
2793 2018-07-26 Tom Tromey <tromey@redhat.com>
2794
2795 * dbxread.c (end_psymtab): Remove dead code.
2796
2797 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
2798
2799 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2800 DWARF unwinders are disabled.
2801 * dwarf2-frame.c: Add dwarf2read.h include.
2802 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2803 disabled.
2804 (dwarf2_frame_unwinders_enabled_p): Define.
2805 (show_dwarf_unwinders_enabled_p): New function.
2806 (_initialize_dwarf2_frame): Register switch to control DWARF
2807 unwinder use.
2808 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2809 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2810 (show_dwarf_cmdlist): Remove static keyword.
2811 * dwarf2read.h (set_dwarf_cmdlist): Declare.
2812 (show_dwarf_cmdlist): Declare.
2813 * NEWS: Document new feature.
2814
2815 2018-07-26 Tom de Vries <tdevries@suse.de>
2816
2817 PR breakpoints/23366
2818 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2819
2820 2018-07-26 Tom de Vries <tdevries@suse.de>
2821
2822 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2823 DW_AT_count can't be translated to a dynamic prop.
2824
2825 2018-07-25 Tom de Vries <tdevries@suse.de>
2826
2827 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2828 try/catch.
2829
2830 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
2831
2832 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2833
2834 2018-07-25 Joel Brobecker <brobecker@adacore.com>
2835
2836 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2837
2838 2018-07-24 Keith Seitz <keiths@redhat.comt
2839
2840 PR symtab/23010
2841 * dwarf2read.c (dw2_add_symbol_to_list): New function.
2842 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2843 instead of add_symbol_to_list.
2844 (read_file_scope): Call prepare_one_comp_unit before reading
2845 any other DIEs.
2846
2847 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
2848
2849 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2850
2851 2018-07-24 Tom Tromey <tom@tromey.com>
2852
2853 * utils.c (malloc, realloc, free): Don't declare.
2854 * configure, config.in: Rebuild.
2855 * configure.ac: Don't check for declarations of free, malloc, or
2856 realloc.
2857
2858 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2859
2860 * aarch64-linux-nat.c
2861 (aarch64_linux_nat_target::stopped_data_address): Remove unused
2862 variable.
2863 * arm-linux-nat.c (fetch_regs): Likewise.
2864 (store_regs): Likewise.
2865 (fetch_vfp_regs): Likewise.
2866 (store_vfp_regs): Likewise.
2867 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2868 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2869 (arm_linux_nat_target::insert_watchpoint): Likewise.
2870 (arm_linux_nat_target::remove_watchpoint): Likewise.
2871 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2872 Likewise.
2873 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2874 Likewise.
2875 * ppc-linux-nat.c (fetch_register): Likewise.
2876 (fetch_all_gp_regs): Likewise.
2877 (fetch_ppc_registers): Likewise.
2878 (store_all_gp_regs): Likewise.
2879 (store_ppc_registers): Likewise.
2880 (hwdebug_insert_point): Likewise.
2881 (can_use_watchpoint_cond_accel): Likewise.
2882 * remote-sim.c (gdb_os_write_stdout): Likewise.
2883
2884 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2885 Tom Tromey <tom@tromey.com>
2886
2887 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2888 test for it.
2889 * configure: Rebuild.
2890
2891 2018-07-22 Tom Tromey <tom@tromey.com>
2892
2893 * regformats/regdat.sh: Define xmltarget_${name} inside
2894 #ifndef IN_PROCESS_AGENT.
2895
2896 2018-07-22 Tom Tromey <tom@tromey.com>
2897
2898 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2899
2900 2018-07-22 Tom Tromey <tom@tromey.com>
2901
2902 * symfile.c (reread_symbols): Notify iter, not objfile.
2903
2904 2018-07-22 Tom Tromey <tom@tromey.com>
2905
2906 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2907 Use arch_ops.
2908 (ravenscar_thread_target::prepare_to_store): Likewise.
2909
2910 2018-07-22 Tom Tromey <tom@tromey.com>
2911
2912 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2913 unused variable. Call value_fetch_lazy when needed.
2914 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2915 Remove unused variable. Call value_fetch_lazy when needed.
2916
2917 2018-07-22 Tom Tromey <tom@tromey.com>
2918
2919 * m32c-tdep.c (mark_dma): Return void.
2920 (make_regs): Remove unused declarations.
2921
2922 2018-07-22 Tom Tromey <tom@tromey.com>
2923
2924 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2925 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2926 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2927 bkscm_get_valid_block_smob_arg_unsafe for effect.
2928
2929 2018-07-22 Tom Tromey <tom@tromey.com>
2930
2931 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2932 value_type.
2933
2934 2018-07-22 Tom Tromey <tom@tromey.com>
2935
2936 * windows-nat.c (saved_context): Conditionally define.
2937 * remote.c (remote_target::remote_btrace_maybe_reopen):
2938 Conditionally declare "warned".
2939 * inflow.c (sigquit_ours): Conditionally define.
2940 (new_tty): Move "tty" declaration inside #if.
2941 * guile/guile.c (guile_datadir): Conditionally define.
2942 * charset.c (set_be_le_names): Move some declarations inside #if.
2943 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2944 #if.
2945 (parse_xml_btrace_conf): Likewise.
2946
2947 2018-07-22 Tom Tromey <tom@tromey.com>
2948
2949 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2950
2951 2018-07-22 Tom Tromey <tom@tromey.com>
2952
2953 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2954 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2955 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2956 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2957 * stack.c (frame_apply_level_command): Remove unused variable.
2958 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2959 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2960 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2961 unused variable.
2962 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2963 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2964 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2965 variable.
2966 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2967 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2968 variable.
2969 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2970 Remove unused variable.
2971 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2972 variable.
2973 * common/tdesc.c (print_xml_feature::visit): Remove unused
2974 variable.
2975 * compile/compile-object-load.c (store_regs): Remove unused
2976 variables.
2977 * complaints.c (clear_complaints): Remove unused variable.
2978 * corelow.c (core_target_open): Remove unused variable.
2979 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2980 variable.
2981 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2982 variable.
2983 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2984 variable.
2985 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2986 variable.
2987 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2988 variable.
2989 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2990 variable.
2991 * ia64-tdep.c (examine_prologue): Remove unused variable.
2992 * infcall.c (run_inferior_call): Remove unused variable.
2993 * inferior.c (exit_inferior): Remove unused variable.
2994 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2995 * linespec.c (decode_line_2): Remove unused variable.
2996 * linux-nat.c (super_close): Remove.
2997 * linux-tdep.c (linux_info_proc): Remove unused variable.
2998 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2999 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3000 Remove unused variable.
3001 * parse.c (find_minsym_type_and_address): Remove unused variable.
3002 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3003 variable.
3004 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3005 variable.
3006 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3007 variables.
3008 * record-btrace.c (record_btrace_target::store_registers): Remove
3009 unused variable.
3010 (cmd_show_record_btrace_cpu): Remove unused variable.
3011 * riscv-tdep.c (riscv_register_reggroup_p)
3012 (riscv_push_dummy_call, riscv_return_value): Remove unused
3013 variable.
3014 * rust-exp.y (literal): Remove unused variable.
3015 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3016 unused variable.
3017 <STRUCTOP_ANONYMOUS>: Likewise.
3018 * s390-linux-tdep.c (s390_linux_init_abi_31)
3019 (s390_linux_init_abi_64): Remove unused variable.
3020 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3021 (file_select_thread, net_windows_open, _initialize_ser_windows):
3022 Remove unused variables.
3023 * symtab.c (find_pc_sect_line): Remove unused variable.
3024 * target-memory.c (compute_garbled_blocks): Remove unused
3025 variable.
3026 (target_write_memory_blocks): Remove unused variable.
3027 * target.c (target_stack::unpush): Remove unused variables.
3028 * tracepoint.c (start_tracing, all_tracepoint_actions)
3029 (merge_uploaded_trace_state_variables)
3030 (print_one_static_tracepoint_marker): Remove unused variable.
3031 * unittests/basic_string_view/element_access/char/1.cc (test01):
3032 Remove unused variable.
3033 * windows-nat.c (windows_continue, windows_add_all_dlls)
3034 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3035 Remove unused variables.
3036
3037 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3038
3039 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3040 attr_profile in HAVE_ELF.
3041 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3042 HAVE_ELF.
3043
3044 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3045
3046 * frame.c (frame_register_unwind): Change parameter name.
3047 (frame_unwind_register): Likewise.
3048 (frame_unwind_register_value): Likewise.
3049 (frame_unwind_register_signed): Likewise.
3050 (frame_unwind_register_unsigned): Likewise.
3051 * frame.h (frame_register_unwind): Likewise.
3052 (frame_unwind_register): Likewise.
3053 (frame_unwind_register_value): Likewise.
3054 (frame_unwind_register_signed): Likewise.
3055 (frame_unwind_register_unsigned): Likewise.
3056 (frame_unwind_arch): Likewise.
3057
3058 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3059
3060 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3061 ISA maintenance.
3062
3063 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3064
3065 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3066 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3067 hand.
3068
3069 2018-07-20 Keith Seitz <keiths@redhat.com>
3070
3071 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3072 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3073 m_compunit_symtab, m_language>: Add "m_" prefix.
3074 Update all uses.
3075 * buildsym.c: Update all uses.
3076
3077 2018-07-20 Tom Tromey <tom@tromey.com>
3078
3079 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3080 * buildsym.h (record_line_ftype): Remove typedef.
3081
3082 2018-07-20 Tom Tromey <tom@tromey.com>
3083
3084 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3085 (end_expandable_symtab): Likewise.
3086 (end_symtab_get_static_block): Likewise.
3087 (end_symtab_from_static_block): Likewise.
3088 * buildsym-legacy.c (augment_type_symtab): Remove.
3089 (end_expandable_symtab): Remove.
3090 (end_symtab_get_static_block): Remove.
3091 (end_symtab_from_static_block): Remove.
3092
3093 2018-07-20 Tom Tromey <tom@tromey.com>
3094
3095 * dwarf2read.c: Include buildsym.h.
3096 (struct dwarf2_cu) <builder>: New method.
3097 (fixup_go_packaging): Update.
3098 (process_full_comp_unit, process_full_type_unit): Update. Don't
3099 use scoped_free_pendings.
3100 (using_directives): Add "cu" parameter, remove "language".
3101 (read_import_statement, setup_type_unit_groups, )
3102 (read_func_scope, read_lexical_block_scope)
3103 (dwarf2_record_block_ranges, read_namespace): Update.
3104 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3105 (lnp_state_machine::handle_end_sequence): Update.
3106 (class lnp_state_machine) <m_cu>: New member.
3107 <m_record_line_callback>: Remove.
3108 <m_currently_recording_lines>: New member.
3109 (lnp_state_machine::handle_set_file): Update.
3110 (noop_record_line): Remove.
3111 (dwarf_record_line_p): Add cu parameter.
3112 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3113 (lnp_state_machine::record_line)
3114 (lnp_state_machine::lnp_state_machine)
3115 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3116 (dwarf_decode_lines): Update.
3117 (dwarf2_start_subfile): Add cu parameter.
3118 (dwarf2_start_symtab, new_symbol): Update.
3119 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3120 Remove dwarf2_per_objfile parameter.
3121 (dwarf_decode_macros): Update.
3122
3123 2018-07-20 Tom Tromey <tom@tromey.com>
3124
3125 * stabsread.c (define_symbol): Update.
3126 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3127 * dwarf2read.c (new_symbol): Update.
3128 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3129 * cp-namespace.c: Include buildsym.h.
3130 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3131 * buildsym-legacy.c (get_buildsym_compunit): New function.
3132
3133 2018-07-20 Tom Tromey <tom@tromey.com>
3134
3135 * xcoffread.c: Include buildsym-legacy.h.
3136 * windows-nat.c: Include buildsym-legacy.h.
3137 * stabsread.c: Include buildsym-legacy.h.
3138 * mdebugread.c: Include buildsym-legacy.h.
3139 * buildsym-legacy.h: New file.
3140 * buildsym-legacy.c: New file, from buildsym.c.
3141 * go32-nat.c: Include buildsym-legacy.h.
3142 * dwarf2read.c: Include buildsym-legacy.h.
3143 * dbxread.c: Include buildsym-legacy.h.
3144 * cp-namespace.c: Include buildsym-legacy.h.
3145 * coffread.c: Include buildsym-legacy.h.
3146 * buildsym.h: Move some contents to buildsym-legacy.h.
3147 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3148 buildsym-legacy.c.
3149 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3150
3151 2018-07-20 Tom Tromey <tom@tromey.com>
3152
3153 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3154 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3155 (buildsym_compunit::buildsym_compunit)
3156 (buildsym_compunit::~buildsym_compunit)
3157 (buildsym_compunit::get_macro_table): Define.
3158
3159 2018-07-20 Tom Tromey <tom@tromey.com>
3160
3161 * buildsym.c (reset_symtab_globals): Remove.
3162 (buildsym_compunit::end_symtab_from_static_block): Update.
3163 (buildsym_compunit::augment_type_symtab): Update.
3164 (end_symtab_from_static_block): Call free_buildsym_compunit.
3165 (augment_type_symtab, end_symtab, end_expandable_symtab):
3166 Likewise.
3167
3168 2018-07-20 Tom Tromey <tom@tromey.com>
3169
3170 * arch-utils.c: Do not include buildsym.h.
3171 * mipsread.c: Do not include buildsym.h.
3172 * machoread.c: Do not include buildsym.h.
3173 * elfread.c: Do not include buildsym.h.
3174
3175 2018-07-20 Tom Tromey <tom@tromey.com>
3176
3177 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3178 initialization.
3179 (buildsym_compunit): Add new constructor.
3180 (struct buildsym_compunit) <get_last_source_file, finish_block,
3181 record_block_range, start_subfile, patch_subfile_names,
3182 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3183 set_last_source_start_addr, get_last_source_start_addr,
3184 get_local_using_directives, set_local_using_directives,
3185 get_global_using_directives, outermost_context_p,
3186 get_current_context_stack, get_context_stack_depth,
3187 get_current_subfile, get_local_symbols, get_file_symbols,
3188 get_global_symbols, record_debugformat, record_producer,
3189 push_context, pop_context, end_symtab_get_static_block,
3190 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3191 New public methods.
3192 <record_pending_block, finish_block_internal, make_blockvector,
3193 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3194 private methods.
3195 Update all users.
3196
3197 2018-05-22 Tom Tromey <tom@tromey.com>
3198
3199 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3200 parameter.
3201 (finish_block_internal): Update.
3202
3203 2018-07-20 Tom Tromey <tom@tromey.com>
3204
3205 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3206 parameter.
3207 (finish_block_internal): Update.
3208
3209 2018-07-20 Tom Tromey <tom@tromey.com>
3210
3211 * buildsym.h (EXTERN): Don't define or undef.
3212 * buildsym.c (EXTERN): Don't define.
3213
3214 2018-07-20 Tom Tromey <tom@tromey.com>
3215
3216 * buildsym.c: Remove TODO comment.
3217
3218 2018-07-20 Tom Tromey <tom@tromey.com>
3219
3220 * coffread.c (coff_symtab_read): Update.
3221 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3222 (xcoff_new_init): Update.
3223 * mipsread.c (mipscoff_new_init): Update.
3224 * mdebugread.c (mdebug_build_psymtabs): Update.
3225 * elfread.c (elf_new_init): Update.
3226 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3227 Update.
3228 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3229 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3230 (stabsect_build_psymtabs): Update.
3231 * buildsym.h (buildsym_init): Don't declare.
3232 * buildsym.c: Update comment.
3233 (prepare_for_building): Remove.
3234 (start_symtab, restart_symtab): Update.
3235 (reset_symtab_globals): Update comment.
3236 (buildsym_init): Remove.
3237
3238 2018-07-20 Tom Tromey <tom@tromey.com>
3239
3240 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3241 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3242 (read_enum_type, common_block_start, common_block_end)
3243 (cleanup_undefined_types_1, finish_global_stabs): Update.
3244 * mdebugread.c (psymtab_to_symtab_1): Update.
3245 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3246 (read_lexical_block_scope, new_symbol): Update.
3247 * dbxread.c (process_one_symbol): Update.
3248 * coffread.c (coff_symtab_read, process_coff_symbol)
3249 (coff_read_enum_type): Update.
3250 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3251 declare.
3252 (get_local_symbols, get_file_symbols, get_global_symbols): New
3253 functions.
3254 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3255 m_global_symbols.
3256 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3257 (~scoped_free_pendings): Update.
3258 (finish_block, prepare_for_building, reset_symtab_globals)
3259 (end_symtab_get_static_block, end_symtab_with_blockvector)
3260 (augment_type_symtab, push_context): Update.
3261 (get_local_symbols, get_file_symbols, get_global_symbols): New
3262 functions.
3263 (buildsym_init): Update.
3264
3265 2018-07-20 Tom Tromey <tom@tromey.com>
3266
3267 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3268 (process_full_type_unit): Likewise.
3269 (dwarf2_start_symtab): Set list_in_scope.
3270
3271 2018-07-20 Tom Tromey <tom@tromey.com>
3272
3273 * dwarf2read.c (process_psymtab_comp_unit_reader)
3274 (build_type_psymtabs_reader): Do not set list_in_scope.
3275
3276 2018-07-20 Tom Tromey <tom@tromey.com>
3277
3278 * buildsym.c (free_pendings): Remove.
3279 (add_symbol_to_list, scoped_free_pendings)
3280 (finish_block_internal, buildsym_init): Update.
3281
3282 2018-07-20 Tom Tromey <tom@tromey.com>
3283
3284 * xcoffread.c (read_xcoff_symtab): Update.
3285 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3286 Update.
3287 * dbxread.c (process_one_symbol): Update.
3288 * coffread.c (coff_symtab_read): Update.
3289 * buildsym.h (finish_block): Update.
3290 * buildsym.c (finish_block): Remove "listhead" argument.
3291 (end_symtab_get_static_block): Update.
3292
3293 2018-07-20 Tom Tromey <tom@tromey.com>
3294
3295 * buildsym.h (class scoped_free_pendings): Remove constructor.
3296 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3297 method.
3298 <m_pending_block_obstack, m_pending_blocks>: New members.
3299 (pending_block_obstack, pending_blocks): Remove.
3300 (scoped_free_pendings::scoped_free_pendings): Default.
3301 (~scoped_free_pendings): Update.
3302 (free_pending_blocks): Remove.
3303 (finish_block_internal, record_pending_block, make_blockvector)
3304 (end_symtab_get_static_block, augment_type_symtab, push_context)
3305 (buildsym_init): Update.
3306
3307 2018-07-20 Tom Tromey <tom@tromey.com>
3308
3309 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3310 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3311 members.
3312 (pending_addrmap, pending_addrmap_obstack)
3313 (pending_addrmap_interesting): Remove.
3314 (scoped_free_pendings, record_block_range, make_blockvector)
3315 (prepare_for_building, reset_symtab_globals, buildsym_init):
3316 Update.
3317
3318 2018-07-20 Tom Tromey <tom@tromey.com>
3319
3320 * xcoffread.c (process_linenos): Update.
3321 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3322 * mdebugread.c (psymtab_to_symtab_1): Update.
3323 * dwarf2read.c (setup_type_unit_groups)
3324 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3325 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3326 * dbxread.c (process_one_symbol): Update.
3327 * coffread.c (coff_symtab_read, enter_linenos)
3328 (process_coff_symbol): Update.
3329 * buildsym.h (current_subfile): Don't declare.
3330 (get_current_subfile): Declare.
3331 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3332 member.
3333 (start_subfile, free_buildsym_compunit, push_subfile)
3334 (prepare_for_building, start_symtab): Update.
3335 (get_current_subfile): New function.
3336
3337 2018-07-20 Tom Tromey <tom@tromey.com>
3338
3339 * coffread.c (coff_symtab_read): Update.
3340 * xcoffread.c (read_xcoff_symtab): Update.
3341 * dwarf2read.c (new_symbol): Update.
3342 (read_func_scope, read_lexical_block_scope): Update.
3343 * dbxread.c (process_one_symbol): Update.
3344 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3345 (outermost_context_p): Remove macro.
3346 (outermost_context_p, get_current_context_stack)
3347 (get_context_stack_depth): Declare.
3348 (pop_context): Return struct context_stack.
3349 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3350 member.
3351 (context_stack_size): Remove.
3352 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3353 (prepare_for_building, end_symtab_get_static_block)
3354 (augment_type_symtab, push_context): Update.
3355 (pop_context): Return struct context_stack.
3356 (outermost_context_p, get_current_context_stack)
3357 (get_context_stack_depth): New functions.
3358 (buildsym_init): Update.
3359
3360 2018-07-20 Tom Tromey <tom@tromey.com>
3361
3362 * rust-exp.y: Now a pure parser. Update all rules.
3363 (%union): Move earlier.
3364 (current_parser, work_obstack): Remove globals.
3365 (rust_parser, ~rust_parser): Update.
3366 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3367 lex_character, lex_number, lex_string, lex_identifier,
3368 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3369 convert_name, convert_params_to_expression,
3370 convert_ast_to_expression, ast_basic_type, ast_operation,
3371 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3372 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3373 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3374 ast_array_type, ast_slice_type, ast_reference_type,
3375 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3376 (rust_parse): Update.
3377 (rustyyerror, rustyylex): Add parser parameter.
3378 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3379 (rust_lex_stringish_test, rust_lex_test_sequence)
3380 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3381 (rust_lex_test_push_back, rust_lex_tests): Update.
3382
3383 2018-07-19 Pedro Alves <palves@redhat.com>
3384
3385 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3386 gdb::unique_xmalloc_ptr.
3387 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3388 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3389 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3390 copy-initialization.
3391 * guile/scm-pretty-print.c (ppscm_print_children): Use
3392 gdb::unique_xmalloc_ptr instead of cleanups.
3393 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3394 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3395 gdb::unique_xmalloc_ptr.
3396 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3397 Adjust to use gdb::unique_xmalloc_ptr.
3398 * guile/scm-utils.c (extract_arg): Adjust.
3399 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3400 gdb::unique_xmalloc_ptr instead of a cleanup.
3401
3402 2018-07-19 Tom Tromey <tom@tromey.com>
3403
3404 * utils.c (do_value_free_to_mark)
3405 (make_cleanup_value_free_to_mark): Remove.
3406 * utils.h (make_cleanup_value_free_to_mark): Remove.
3407
3408 2018-07-19 Pedro Alves <palves@redhat.com>
3409
3410 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3411 forwarding reference.
3412
3413 2018-07-18 Pedro Alves <palves@redhat.com>
3414
3415 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3416 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3417 cleanup.
3418
3419 2018-07-18 Pedro Alves <palves@redhat.com>
3420
3421 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3422 exceptions.
3423 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3424 (gdbscm_wrap): New.
3425 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3426 directly instead of a cleanup.
3427 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3428 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3429 (vlscm_binop_gdbthrow): New, factored out from ...
3430 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3431 (vlscm_rich_compare): Use gdbscm_wrap.
3432 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3433 instead of a cleanup.
3434 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3435 cleanup.
3436 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3437 Use xfree directly instead of a cleanup.
3438 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3439 Adjust to use gdbscm_wrap and scoped_value_mark.
3440 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3441 (gdbscm_value_address, gdbscm_value_dereference)
3442 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3443 scoped_value_mark.
3444 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3445 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3446 scoped_value_mark.
3447 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3448 gdbscm_wrap and scoped_value_mark.
3449 (gdbscm_value_to_string): Use xfree directly instead of a
3450 cleanup. Move 'buffer' unique_ptr to TRY scope.
3451 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3452 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3453 scoped_value_mark.
3454 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3455 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3456 scoped_value_mark.
3457 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3458 gdbscm_wrap.
3459
3460 2018-07-18 Tom de Vries <tdevries@suse.de>
3461
3462 * findvar.c (default_read_var_value): Also resolve dynamic type for
3463 LOC_OPTIMIZED_OUT vars.
3464
3465 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3466
3467 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3468 decoding.
3469
3470 2018-07-17 Tom Tromey <tom@tromey.com>
3471
3472 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3473 (compute_enum_list, pascm_set_param_value_x)
3474 (gdbscm_parameter_value): Update.
3475 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3476 (gdbscm_scm_to_host_string): Update.
3477 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3478 Update.
3479 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3480 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3481 * guile/scm-string.c (gdbscm_scm_to_string): Return
3482 unique_xmalloc_ptr.
3483 (gdbscm_scm_to_host_string): Likewise.
3484
3485 2018-07-17 Tom Tromey <tom@tromey.com>
3486
3487 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3488 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3489 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3490 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3491 unique_xmalloc_ptr.
3492
3493 2018-07-17 Tom Tromey <tom@tromey.com>
3494
3495 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3496 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3497 Update.
3498 * guile/scm-cmd.c (cmdscm_function): Update.
3499 * guile/scm-pretty-print.c
3500 (ppscm_print_exception_unless_memory_error): Update.
3501 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3502 Return unique_xmalloc_ptr.
3503
3504 2018-07-17 Tom Tromey <tom@tromey.com>
3505
3506 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3507 Use string_printf.
3508
3509 2018-07-17 Jim Wilson <jimw@sifive.com>
3510
3511 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3512 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3513 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3514 unecessary braces after EF_RISCV_RVC test. Delete call to
3515 set_gdbarch_decr_pc_after_break.
3516
3517 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3518 RISCV_LAST_FP_REGNUM + 1.
3519 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3520
3521 2018-07-17 Tom Tromey <tom@tromey.com>
3522
3523 * configure.ac: Remove --disable-gdbcli.
3524 * configure: Rebuild.
3525 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3526 (SUBDIR_CLI_CFLAGS): Remove.
3527 (SFILES): Use SUBDIR_CLI_SRCS.
3528 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3529
3530 2018-07-17 Tom Tromey <tom@tromey.com>
3531
3532 PR gdb/18624:
3533 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3534
3535 2018-07-16 Jim Wilson <jimw@sifive.com>
3536
3537 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3538
3539 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3540
3541 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3542 variable.
3543 (libunwind_frame_sniffer): Likewise.
3544 (libunwind_frame_prev_register): Likewise.
3545 (libunwind_sigtramp_frame_sniffer): Likewise.
3546 * ia64-tdep.c (ia64_access_reg): Likewise.
3547 (ia64_access_rse_reg): Likewise.
3548 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3549 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3550
3551 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3552
3553 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3554
3555 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3556
3557 * remote-sim.c (gdbsim_target::close,
3558 gdbsim_target::mourn_inferior): Remove unused variables.
3559
3560 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3561
3562 * ia64-tdep.c (ktab_buf): New global.
3563 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3564 (get_kernel_table): Adjust.
3565
3566 2018-07-16 Tom Tromey <tom@tromey.com>
3567
3568 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3569 * dwarf2read.c (using_directives, new_symbol): Use
3570 outermost_context_p.
3571 * dbxread.c (process_one_symbol): Use outermost_context_p.
3572 * coffread.c (coff_symtab_read): Use outermost_context_p.
3573
3574 2018-07-16 Tom Tromey <tom@tromey.com>
3575
3576 * dwarf2read.c (using_directives, read_func_scope)
3577 (read_lexical_block_scope): Update.
3578 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3579 * buildsym.h (local_using_directives, global_using_directives):
3580 Don't declare.
3581 (get_local_using_directives, set_local_using_directives)
3582 (get_global_using_directives): Declare.
3583 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3584 m_global_using_directives>: New members.
3585 (finish_block_internal, prepare_for_building)
3586 (reset_symtab_globals, end_symtab_get_static_block)
3587 (push_context): Update.
3588 (get_local_using_directives, set_local_using_directives)
3589 (get_global_using_directives): New functions.
3590 (buildsym_init): Update.
3591
3592 2018-07-16 Tom Tromey <tom@tromey.com>
3593
3594 * xcoffread.c (xcoff_initial_scan): Don't call
3595 free_pending_blocks.
3596 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3597 * buildsym.h (class scoped_free_pendings): Add constructor.
3598 (free_pending_blocks): Don't declare.
3599 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3600 (free_pending_blocks): Now static.
3601
3602 2018-07-16 Tom Tromey <tom@tromey.com>
3603
3604 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3605 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3606 member.
3607 (struct subfile_stack): Remove.
3608 (subfile_stack): Remove.
3609 (push_subfile, pop_subfile, buildsym_init): Update.
3610
3611 2018-07-16 Tom Tromey <tom@tromey.com>
3612
3613 * buildsym.c (push_subfile): Use gdb_assert.
3614 (pop_subfile): Use gdb_assert.
3615
3616 2018-07-16 Tom Tromey <tom@tromey.com>
3617
3618 * buildsym.h (merge_symbol_lists): Remove.
3619 * buildsym.c (merge_symbol_lists): Remove.
3620
3621 2018-07-16 Tom Tromey <tom@tromey.com>
3622
3623 * stabsread.c (scan_file_globals): Update comment.
3624 * stabsread.h (scan_file_globals): Move from buildsym.h.
3625 * buildsym.h (scan_file_globals): Move to stabsread.h.
3626
3627 2018-07-16 Tom Tromey <tom@tromey.com>
3628
3629 * xcoffread.c (xcoff_new_init): Update.
3630 * mipsread.c (mipscoff_new_init): Update.
3631 * mdebugread.c (mdebug_build_psymtabs): Update.
3632 * elfread.c (elf_new_init): Update.
3633 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3634 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3635 * buildsym.h (buildsym_new_init): Don't declare.
3636 * buildsym.c (buildsym_new_init): Remove.
3637
3638 2018-07-16 Tom Tromey <tom@tromey.com>
3639
3640 * stabsread.h (within_function): Move from buildsym.h.
3641 * stabsread.c (start_stabs): Clear within_function.
3642 * coffread.c (coff_start_symtab): Clear within_function.
3643 * buildsym.h (within_function): Move to stabsread.h.
3644 * buildsym.c (prepare_for_building): Update.
3645
3646 2018-07-16 Tom Tromey <tom@tromey.com>
3647
3648 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3649 * dwarf2read.c (dwarf2_start_symtab): Don't set
3650 processing_gcc_compilation.
3651 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3652
3653 2018-07-16 Tom Tromey <tom@tromey.com>
3654
3655 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3656 (next_symbol_text_func): Move from buildsym.h.
3657 * stabsread.c (hashname): Move from buildsym.c.
3658 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3659 (next_symbol_text_func, hashname): Move to stabsread.h.
3660 * buildsym.c: Don't include bcache.h
3661 (hashname): Move to stasbread.c.
3662
3663 2018-07-16 Tom Tromey <tom@tromey.com>
3664
3665 * buildsym.h (context_stack_size): Don't declare.
3666 * buildsym.c (context_stack_size): New global.
3667
3668 2018-07-16 Tom Tromey <tom@tromey.com>
3669
3670 * dbxread.c (processing_acc_compilation): New global.
3671 * buildsym.h (processing_acc_compilation): Don't declare.
3672
3673 2018-07-16 Tom Tromey <tom@tromey.com>
3674
3675 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3676 * dbxread.c (read_ofile_symtab): Update.
3677 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3678 * buildsym.h (last_source_start_addr): Remove.
3679 (set_last_source_start_addr, get_last_source_start_addr):
3680 Declare.
3681 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3682 parameter.
3683 (struct buildsym_compunit) <m_last_source_start_addr>: New
3684 member.
3685 (prepare_for_building): Remove start_addr parameter.
3686 (start_symtab, restart_symtab, end_symtab_get_static_block)
3687 (end_symtab_with_blockvector): Update.
3688 (set_last_source_start_addr, get_last_source_start_addr): New
3689 functions.
3690
3691 2018-07-16 Tom Tromey <tom@tromey.com>
3692
3693 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3694 member.
3695 (have_line_numbers): Remove.
3696 (record_line, prepare_for_building, end_symtab_get_static_block)
3697 (augment_type_symtab): Update.
3698
3699 2018-07-16 Tom Tromey <tom@tromey.com>
3700
3701 * buildsym.c (~buildsym_compunit): Free the macro table.
3702 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3703 methods.
3704 <m_pending_macros>: New member.
3705 (pending_macros): Remove.
3706 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3707 (reset_symtab_globals, end_symtab_get_static_block)
3708 (end_symtab_with_blockvector, augment_type_symtab)
3709 (buildsym_init): Update.
3710
3711 2018-07-16 Tom Tromey <tom@tromey.com>
3712
3713 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3714 parameter.
3715 (buildsym_compunit::set_last_source_file): New method.
3716 <m_last_source_file>: New member.
3717 (prepare_for_building): Remove "name" parameter.
3718 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3719 (last_source_file): Remove.
3720 (set_last_source_file, get_last_source_file): Update.
3721
3722 2018-07-16 Tom Tromey <tom@tromey.com>
3723
3724 * buildsym.c (prepare_for_building): Add assert.
3725
3726 2018-07-16 Tom Tromey <tom@tromey.com>
3727
3728 * buildsym.c (~buildsym_compunit): Update.
3729 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3730 (start_subfile, patch_subfile_names)
3731 (end_symtab_with_blockvector): Update.
3732
3733 2018-07-16 Tom Tromey <tom@tromey.com>
3734
3735 * buildsym.c (struct buildsym_compunit): Add constructor,
3736 destructor, initializers.
3737 (start_buildsym_compunit): Remove.
3738 (free_buildsym_compunit): Use "delete".
3739 (start_symtab, restart_symtab): Use "new".
3740
3741 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
3742
3743 * symfile.c (set_objfile_default_section_offset): Remove struct
3744 keyword.
3745
3746 2018-07-14 Stafford Horne <shorne@gmail.com>
3747
3748 * (Responsible Maintainers): Add myself as or1k maintainer.
3749
3750 2018-07-13 Tom Tromey <tom@tromey.com>
3751
3752 * symfile.c (set_objfile_default_section_offset): Use extra braces
3753 around initializer.
3754
3755 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3756
3757 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3758 non-branching basr.
3759
3760 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3761
3762 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3763 unittests/cli-utils-selftests.c
3764 * unittests/cli-utils-selftests.c: New file.
3765
3766 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3767
3768 * NEWS: Mention new commands. Mention change to 'thread apply'.
3769
3770 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3771
3772 * thread.c (thr_try_catch_cmd): New function.
3773 (thread_apply_all_command): Handle qcs flags.
3774 (thread_apply_command): Handle qcs flags.
3775 (taas_command): New function.
3776 (tfaas_command): New function.
3777 (_initialize_thread): Update to setup the new commands 'taas
3778 and 'tfaas'. Change doc string for 'thread apply'.
3779
3780 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3781
3782 * stack.c: (trailing_outermost_frame): New function, mostly
3783 extracted from backtrace_command_1.
3784 (leading_innermost_frame): New function.
3785 (backtrace_command_1): Update to call trailing_outermost_frame.
3786 (frame_apply_command_count): New function.
3787 (frame_apply_level_command): New function.
3788 (frame_apply_all_command): New function.
3789 (frame_apply_command): New function.
3790 (faas_command): New function.
3791 (frame_cmd_list): New variable.
3792 (_initialize_stack): Update to setup the new commands 'frame apply'
3793 and 'faas'.
3794
3795 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3796
3797 * cli-utils.c (number_or_range_parser::get_number): Only handle
3798 numbers or convenience var as numbers.
3799 (parse_flags): New function.
3800 (parse_flags_qcs): New function.
3801 (number_or_range_parser::finished): Ensure parsing end is detected
3802 before end of string.
3803 * cli-utils.h (parse_flags): New function.
3804 (parse_flags_qcs): New function.
3805 (number_or_range_parser): Remove m_finished bool.
3806 (number_or_range_parser::skip_range): Set m_in_range to false.
3807
3808 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
3809
3810 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3811 on Windows.
3812
3813 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3814 Jan Kratochvil <jan.kratochvil@redhat.com>
3815 Paul Fertser <fercerpav@gmail.com>
3816 Tsutomu Seki <sekiriki@gmail.com>
3817 Pedro Alves <palves@redhat.com>
3818
3819 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3820 'unittests/parse-connection-spec-selftests.c'.
3821 (COMMON_SFILES): Add 'common/netstuff.c'.
3822 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3823 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3824 * common/netstuff.c: New file.
3825 * common/netstuff.h: New file.
3826 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3827 (wait_for_connect): Update comment. New parameter
3828 'gdb::optional<int> sock' instead of 'struct serial *scb'.
3829 Use 'sock' directly instead of 'scb->fd'.
3830 (try_connect): New function, with code from 'net_open'.
3831 (net_open): Rewrite main loop to deal with multiple
3832 sockets/addresses. Handle IPv6-style hostnames; implement
3833 support for IPv6 connections.
3834 * unittests/parse-connection-spec-selftests.c: New file.
3835
3836 2018-07-11 Pedro Alves <palves@redhat.com>
3837
3838 PR gdb/23377
3839 * remote.c (remote_target::remote_detach_pid): Call
3840 set_current_process.
3841
3842 2018-07-11 Pedro Alves <palves@redhat.com>
3843
3844 * h8300-tdep.c (h8300_gdbarch_init): Remove
3845 set_gdbarch_ecoff_reg_to_regnum calls.
3846
3847 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3848
3849 PR c++/23373
3850 * c-typeprint.c (c_type_print_base_struct_union): Don't print
3851 offsets/sizes for static members of a class/struct.
3852
3853 2018-07-11 Alan Hayward <alan.hayward@arm.com>
3854
3855 * target-descriptions.c (tdesc_register_bitsize): Rename.
3856 * target-descriptions.h (tdesc_register_bitsize): Likewise.
3857 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3858 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3859
3860 2018-07-10 Tom Tromey <tom@tromey.com>
3861
3862 * breakpoint.c (moribund_locations): Now static and a
3863 std::vector.
3864 (breakpoint_init_inferior, moribund_breakpoint_here_p)
3865 (build_bpstat_chain, update_global_location_list)
3866 (breakpoint_retire_moribund): Update.
3867 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
3868 VEC.
3869
3870 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3871
3872 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3873 (riscv_register_reggroup_p): Use new function, remove unneeded
3874 parenthesis.
3875 (riscv_push_dummy_call): Extend assert to compare against xlen or
3876 flen based on register type.
3877
3878 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3879
3880 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3881
3882 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
3883
3884 * remote.c (show_hardware_watchpoint_limit): New function.
3885 (show_hardware_watchpoint_length_limit): New function.
3886 (show_hardware_breakpoint_limit): New function.
3887 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3888 where appropriate, update help text.
3889
3890 2018-07-09 Tom Tromey <tom@tromey.com>
3891
3892 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3893 (CLIBS): Don't mention NAT_CLIBS.
3894
3895 2018-07-09 Tom Tromey <tom@tromey.com>
3896
3897 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3898 (LIBGDB_OBS, clean mostlyclean): Update.
3899 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3900
3901 2018-07-09 Tom Tromey <tom@tromey.com>
3902
3903 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3904 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3905 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3906
3907 2018-07-09 Tom Tromey <tom@tromey.com>
3908
3909 * Makefile.in (ALLDEPFILES): Remove exec.c.
3910 (COMMON_OBS): Remove exec.o.
3911 (COMMON_SFILES): Add exec.c.
3912
3913 2018-07-09 Tom Tromey <tom@tromey.com>
3914
3915 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3916
3917 2018-07-09 Tom Tromey <tom@tromey.com>
3918
3919 * Makefile.in (clean mostlyclean): Remove stamp-version.
3920 (version.c): Depend on stamp-version.
3921 (stamp-version): New rule, from version.c rule.
3922
3923 2018-07-09 Tom Tromey <tom@tromey.com>
3924
3925 * Makefile.in (init.c): Depend on stamp-init.
3926 (stamp-init): New rule, from init.c rule.
3927 (clean mostlyclean): Remove stamp-init.
3928
3929 2018-07-09 Tom Tromey <tom@tromey.com>
3930
3931 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3932 SUBDIR_GCC_COMPILE_SRCS.
3933
3934 2018-07-09 Tom Tromey <tom@tromey.com>
3935
3936 * Makefile.in (init.c): Remove some unused sed rules.
3937
3938 2018-07-09 Tom Tromey <tom@tromey.com>
3939
3940 * Makefile.in (TSOBS): Remove.
3941 (INIT_FILES): Update.
3942 (LIBGDB_OBS): Update.
3943 (COMMON_SFILES): Add inflow.c.
3944 (SFILES): Remove inflow.c.
3945
3946 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3947
3948 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3949
3950 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3951
3952 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3953 get_saveloc_name, is_signal_frame_name, step_name,
3954 init_remote_name, create_addr_space_name,
3955 destroy_addr_space_name, search_unwind_table_name,
3956 find_dyn_list_name): Constify.
3957
3958 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3959
3960 * darwin-nat.c (darwin_pthread_kill): New function.
3961 (darwin_resume_thread): Use darwin_pthread_kill.
3962
3963 2018-07-05 Tom de Vries <tdevries@suse.de>
3964
3965 * macroexp.c (macro_buffer) <operator=>: New member function.
3966
3967 2018-07-04 Tom Tromey <tom@tromey.com>
3968
3969 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3970
3971 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3972
3973 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3974 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3975 * maint.c: Likewise.
3976 * top.c: Likewise.
3977
3978 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3979
3980 * NEWS: Create a new section for the next release branch.
3981 Rename the section of the current branch, now that it has
3982 been cut.
3983
3984 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3985
3986 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3987 * version.in: Bump version to 8.2.50.DATE-git.
3988
3989 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3990 Pedro Alves <palves@redhat.com>
3991
3992 * linux-nat.c (linux_init_ptrace): Rename to ...
3993 (linux_init_ptrace_procfs): ... this. Call
3994 linux_proc_init_warnings.
3995 (linux_nat_target::post_attach)
3996 (linux_nat_target::post_startup_inferior): Adjust.
3997 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3998 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3999
4000 2018-07-04 Tom de Vries <tdevries@suse.de>
4001
4002 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4003 check ...
4004 (read_comp_unit_head): ... here.
4005
4006 2018-07-03 Tom Tromey <tom@tromey.com>
4007
4008 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4009 (stop_tracing, tstatus_command)
4010 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4011 (print_one_static_tracepoint_marker): Update.
4012 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4013 std::vector.
4014 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4015 VEC.
4016 (all_tracepoints, static_tracepoints_here): Return std::vector.
4017
4018 2018-07-03 Tom Tromey <tom@tromey.com>
4019
4020 * common/ptid.c (ptid_equal): Remove.
4021 * common/ptid.h (ptid_equal): Don't declare.
4022 * ada-tasks.c: Update.
4023 * breakpoint.c: Update.
4024 * common/agent.c: Update.
4025 * corelow.c: Update.
4026 * darwin-nat-info.c: Update.
4027 * darwin-nat.c: Update.
4028 * dcache.c: Update.
4029 * dtrace-probe.c: Update.
4030 * dummy-frame.c: Update.
4031 * fbsd-nat.c: Update.
4032 * frame.c: Update.
4033 * gdbthread.h: Update.
4034 * gnu-nat.c: Update.
4035 * go32-nat.c: Update.
4036 * inf-loop.c: Update.
4037 * inf-ptrace.c: Update.
4038 * infcall.c: Update.
4039 * infcmd.c: Update.
4040 * inflow.c: Update.
4041 * infrun.c: Update.
4042 * linux-fork.c: Update.
4043 * linux-nat.c: Update.
4044 * linux-thread-db.c: Update.
4045 * mi/mi-cmd-var.c: Update.
4046 * mi/mi-interp.c: Update.
4047 * mi/mi-main.c: Update.
4048 * nto-procfs.c: Update.
4049 * ppc-linux-tdep.c: Update.
4050 * procfs.c: Update.
4051 * python/py-inferior.c: Update.
4052 * python/py-record-btrace.c: Update.
4053 * python/py-record.c: Update.
4054 * ravenscar-thread.c: Update.
4055 * regcache.c: Update.
4056 * remote-sim.c: Update.
4057 * remote.c: Update.
4058 * sol-thread.c: Update.
4059 * solib.c: Update.
4060 * target.c: Update.
4061 * tui/tui-stack.c: Update.
4062 * varobj.c: Update.
4063 * windows-nat.c: Update.
4064 * windows-tdep.c: Update.
4065
4066 2018-07-03 Tom Tromey <tom@tromey.com>
4067
4068 * common/ptid.c (ptid_match): Remove.
4069 * common/ptid.h (ptid_match): Don't declare.
4070 * fbsd-nat.c: Update.
4071 * infcmd.c: Update.
4072 * infrun.c: Update.
4073 * linux-nat.c: Update.
4074 * record-btrace.c: Update.
4075 * regcache.c: Update.
4076 * remote.c: Update.
4077
4078 2018-07-03 Tom Tromey <tom@tromey.com>
4079
4080 * common/ptid.c (ptid_tid_p): Remove.
4081 * common/ptid.h (ptid_tid_p): Don't declare.
4082 * sol-thread.c: Update.
4083
4084 2018-07-03 Tom Tromey <tom@tromey.com>
4085
4086 * common/ptid.c (ptid_lwp_p): Remove.
4087 * common/ptid.h (ptid_lwp_p): Don't declare.
4088 * fbsd-nat.c: Update.
4089 * linux-nat.c: Update.
4090 * nat/linux-procfs.c: Update.
4091 * nat/x86-linux-dregs.c: Update.
4092 * sol-thread.c: Update.
4093
4094 2018-07-03 Tom Tromey <tom@tromey.com>
4095
4096 * common/ptid.c (ptid_is_pid): Remove.
4097 * common/ptid.h (ptid_is_pid): Don't declare.
4098 * infrun.c: Update.
4099 * linux-nat.c: Update.
4100 * mi/mi-interp.c: Update.
4101 * remote.c: Update.
4102 * thread.c: Update.
4103
4104 2018-07-03 Tom Tromey <tom@tromey.com>
4105
4106 * common/ptid.c (ptid_get_tid): Remove.
4107 * common/ptid.h (ptid_get_tid): Don't declare.
4108 * ada-tasks.c: Update.
4109 * aix-thread.c: Update.
4110 * bsd-uthread.c: Update.
4111 * darwin-nat.c: Update.
4112 * fbsd-nat.c: Update.
4113 * i386-darwin-nat.c: Update.
4114 * infrun.c: Update.
4115 * linux-tdep.c: Update.
4116 * nto-procfs.c: Update.
4117 * ppc-ravenscar-thread.c: Update.
4118 * python/py-infthread.c: Update.
4119 * ravenscar-thread.c: Update.
4120 * sol-thread.c: Update.
4121 * sparc-ravenscar-thread.c: Update.
4122 * windows-nat.c: Update.
4123
4124 2018-07-03 Tom Tromey <tom@tromey.com>
4125
4126 * common/ptid.c (ptid_get_lwp): Remove.
4127 * common/ptid.h (ptid_get_lwp): Don't declare.
4128 * aarch64-linux-nat.c: Update.
4129 * ada-tasks.c: Update.
4130 * aix-thread.c: Update.
4131 * amd64-linux-nat.c: Update.
4132 * arm-linux-nat.c: Update.
4133 * corelow.c: Update.
4134 * fbsd-nat.c: Update.
4135 * fbsd-tdep.c: Update.
4136 * gnu-nat.c: Update.
4137 * i386-cygwin-tdep.c: Update.
4138 * i386-gnu-nat.c: Update.
4139 * i386-linux-nat.c: Update.
4140 * ia64-linux-nat.c: Update.
4141 * inf-ptrace.c: Update.
4142 * infrun.c: Update.
4143 * linux-fork.c: Update.
4144 * linux-nat.c: Update.
4145 * linux-tdep.c: Update.
4146 * linux-thread-db.c: Update.
4147 * mips-linux-nat.c: Update.
4148 * nat/aarch64-linux-hw-point.c: Update.
4149 * nat/aarch64-linux.c: Update.
4150 * nat/linux-btrace.c: Update.
4151 * nat/linux-osdata.c: Update.
4152 * nat/linux-procfs.c: Update.
4153 * nat/x86-linux-dregs.c: Update.
4154 * obsd-nat.c: Update.
4155 * ppc-fbsd-nat.c: Update.
4156 * ppc-linux-nat.c: Update.
4157 * procfs.c: Update.
4158 * python/py-infthread.c: Update.
4159 * ravenscar-thread.c: Update.
4160 * remote.c: Update.
4161 * s390-linux-nat.c: Update.
4162 * sol-thread.c: Update.
4163 * sol2-tdep.c: Update.
4164 * spu-linux-nat.c: Update.
4165 * x86-linux-nat.c: Update.
4166 * xtensa-linux-nat.c: Update.
4167
4168 2018-07-03 Tom Tromey <tom@tromey.com>
4169
4170 * common/ptid.c (ptid_get_pid): Remove.
4171 * common/ptid.h (ptid_get_pid): Don't declare.
4172 * aarch64-linux-nat.c: Update.
4173 * ada-lang.c: Update.
4174 * aix-thread.c: Update.
4175 * alpha-bsd-nat.c: Update.
4176 * amd64-fbsd-nat.c: Update.
4177 * amd64-linux-nat.c: Update.
4178 * arm-linux-nat.c: Update.
4179 * arm-nbsd-nat.c: Update.
4180 * auxv.c: Update.
4181 * break-catch-syscall.c: Update.
4182 * breakpoint.c: Update.
4183 * bsd-uthread.c: Update.
4184 * corelow.c: Update.
4185 * ctf.c: Update.
4186 * darwin-nat.c: Update.
4187 * fbsd-nat.c: Update.
4188 * fbsd-tdep.c: Update.
4189 * gcore.c: Update.
4190 * gnu-nat.c: Update.
4191 * hppa-nbsd-nat.c: Update.
4192 * hppa-obsd-nat.c: Update.
4193 * i386-fbsd-nat.c: Update.
4194 * ia64-linux-nat.c: Update.
4195 * inf-ptrace.c: Update.
4196 * infcmd.c: Update.
4197 * inferior.c: Update.
4198 * inferior.h: Update.
4199 * inflow.c: Update.
4200 * infrun.c: Update.
4201 * linux-fork.c: Update.
4202 * linux-nat.c: Update.
4203 * linux-tdep.c: Update.
4204 * linux-thread-db.c: Update.
4205 * m68k-bsd-nat.c: Update.
4206 * mi/mi-interp.c: Update.
4207 * mi/mi-main.c: Update.
4208 * mips-linux-nat.c: Update.
4209 * mips-nbsd-nat.c: Update.
4210 * mips64-obsd-nat.c: Update.
4211 * nat/aarch64-linux-hw-point.c: Update.
4212 * nat/aarch64-linux.c: Update.
4213 * nat/linux-btrace.c: Update.
4214 * nat/linux-osdata.c: Update.
4215 * nat/linux-procfs.c: Update.
4216 * nat/x86-linux-dregs.c: Update.
4217 * nto-procfs.c: Update.
4218 * obsd-nat.c: Update.
4219 * ppc-linux-nat.c: Update.
4220 * ppc-nbsd-nat.c: Update.
4221 * ppc-obsd-nat.c: Update.
4222 * proc-service.c: Update.
4223 * procfs.c: Update.
4224 * python/py-inferior.c: Update.
4225 * python/py-infthread.c: Update.
4226 * ravenscar-thread.c: Update.
4227 * record.c: Update.
4228 * remote-sim.c: Update.
4229 * remote.c: Update.
4230 * rs6000-nat.c: Update.
4231 * s390-linux-nat.c: Update.
4232 * sh-nbsd-nat.c: Update.
4233 * sol-thread.c: Update.
4234 * sparc-nat.c: Update.
4235 * sparc64-tdep.c: Update.
4236 * spu-linux-nat.c: Update.
4237 * spu-tdep.c: Update.
4238 * target-debug.h: Update.
4239 * target.c: Update.
4240 * thread.c: Update.
4241 * tid-parse.c: Update.
4242 * tracefile-tfile.c: Update.
4243 * vax-bsd-nat.c: Update.
4244 * windows-nat.c: Update.
4245 * x86-linux-nat.c: Update.
4246 * x86-nat.c: Update.
4247
4248 2018-07-03 Tom Tromey <tom@tromey.com>
4249
4250 * common/ptid.c (pid_to_ptid): Remove.
4251 * common/ptid.h (pid_to_ptid): Don't declare.
4252 * aix-thread.c: Update.
4253 * arm-linux-nat.c: Update.
4254 * common/ptid.c: Update.
4255 * common/ptid.h: Update.
4256 * corelow.c: Update.
4257 * ctf.c: Update.
4258 * darwin-nat.c: Update.
4259 * fbsd-nat.c: Update.
4260 * fork-child.c: Update.
4261 * gnu-nat.c: Update.
4262 * go32-nat.c: Update.
4263 * inf-ptrace.c: Update.
4264 * infcmd.c: Update.
4265 * inferior.c: Update.
4266 * infrun.c: Update.
4267 * linux-fork.c: Update.
4268 * linux-nat.c: Update.
4269 * nat/aarch64-linux-hw-point.c: Update.
4270 * nat/fork-inferior.c: Update.
4271 * nat/x86-linux-dregs.c: Update.
4272 * nto-procfs.c: Update.
4273 * obsd-nat.c: Update.
4274 * procfs.c: Update.
4275 * progspace.c: Update.
4276 * remote.c: Update.
4277 * rs6000-nat.c: Update.
4278 * s390-linux-nat.c: Update.
4279 * sol-thread.c: Update.
4280 * spu-linux-nat.c: Update.
4281 * target.c: Update.
4282 * top.c: Update.
4283 * tracefile-tfile.c: Update.
4284 * windows-nat.c: Update.
4285
4286 2018-07-03 Tom Tromey <tom@tromey.com>
4287
4288 * common/ptid.h (ptid_build): Don't declare.
4289 * common/ptid.c (ptid_build): Remove.
4290 * aix-thread.c: Update.
4291 * bsd-kvm.c: Update.
4292 * bsd-uthread.c: Update.
4293 * common/agent.c: Update.
4294 * common/ptid.c: Update.
4295 * common/ptid.h: Update.
4296 * corelow.c: Update.
4297 * darwin-nat.c: Update.
4298 * fbsd-nat.c: Update.
4299 * gnu-nat.c: Update.
4300 * linux-fork.c: Update.
4301 * linux-nat.c: Update.
4302 * linux-thread-db.c: Update.
4303 * nat/linux-osdata.c: Update.
4304 * nat/linux-procfs.c: Update.
4305 * nto-procfs.c: Update.
4306 * obsd-nat.c: Update.
4307 * proc-service.c: Update.
4308 * procfs.c: Update.
4309 * ravenscar-thread.c: Update.
4310 * remote-sim.c: Update.
4311 * remote.c: Update.
4312 * sol-thread.c: Update.
4313 * target.c: Update.
4314 * windows-nat.c: Update.
4315
4316 2018-07-03 Tom Tromey <tom@tromey.com>
4317
4318 * infrun.c (follow_exec): Use exit_inferior_silent.
4319 * inferior.c (exit_inferior_num_silent): Remove.
4320 * inferior.h (exit_inferior_num_silent): Don't declare.
4321
4322 2018-07-03 Tom Tromey <tom@tromey.com>
4323
4324 PR cli/23340:
4325 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4326 inferior_ptid on error.
4327
4328 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4329 Simon Marchi <simon.marchi@polymtl.ca>
4330
4331 PR tdep/8282
4332 * disasm.h (gdb_disassembler): Add
4333 `m_disassembler_options_holder'. member
4334 * disasm.c (get_all_disassembler_options): New function.
4335 (gdb_disassembler::gdb_disassembler): Use it.
4336 (gdb_buffered_insn_length_init_dis): Likewise.
4337 (gdb_buffered_insn_length): Adjust accordingly.
4338 (set_disassembler_options): Handle options with arguments.
4339 (show_disassembler_options_sfunc): Likewise. Add a leading new
4340 line if showing options with descriptions.
4341 (disassembler_options_completer): Adapt to using the
4342 `disasm_options_and_args_t' structure.
4343 * mips-tdep.c (mips_disassembler_options): New variable.
4344 (mips_disassembler_options_o32): Likewise.
4345 (mips_disassembler_options_n32): Likewise.
4346 (mips_disassembler_options_n64): Likewise.
4347 (gdb_print_insn_mips): Don't set `disassembler_options'.
4348 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4349 functions.
4350 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4351 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4352 `gdbarch_disassembler_options_implicit' and
4353 `gdbarch_valid_disassembler_options'.
4354 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4355 `disasm_options_and_args_t' structure.
4356 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4357 method.
4358 (valid_disassembler_options): Switch from `disasm_options_t' to
4359 the `disasm_options_and_args_t' structure.
4360 * NEWS: Document `set disassembler-options' support for the MIPS
4361 target.
4362 * gdbarch.h: Regenerate.
4363 * gdbarch.c: Regenerate.
4364
4365 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4366
4367 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4368
4369 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4370
4371 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4372 parameter in call to amd64_target_description.
4373 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4374 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4375 (amd64fbsd_init_abi): Likewise.
4376 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4377 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4378 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4379 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4380
4381 2018-06-29 Pedro Alves <palves@redhat.com>
4382
4383 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4384 "segments" parameter.
4385 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4386 (_initialize_amd64_tdep): Update call to
4387 amd64_create_target_description.
4388 (amd64_target_description): Add "segments" parameter. Adjust
4389 the implementation to use it.
4390 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4391 call to amd64_create_target_description.
4392 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4393 * gdb/arch/amd64.h (amd64_create_target_description): Add
4394 "segments" register.
4395 * gdb/arch/amd64.c (amd64_create_target_description): Add
4396 "segments" parameter. Call create_feature_i386_64bit_segments
4397 only if SEGMENTS is true.
4398 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4399 call to amd64_create_target_description.
4400
4401 2018-06-29 Pedro Alves <palves@redhat.com>
4402
4403 * thread.c (thread_target_id_str): New, factored out from ...
4404 (print_thread_info_1): ... here. Use it to compute the max
4405 "Target Id" column width.
4406
4407 2018-06-29 Pedro Alves <palves@redhat.com>
4408
4409 * remote.c (remote_target::extra_thread_info): Delete
4410 'display_buf' and 'n' locals. from the cache, regardless of
4411 packet mechanims is in use. Use cache for qThreadExtra and qP
4412 methods too.
4413
4414 2018-06-29 Pedro Alves <palves@redhat.com>
4415
4416 * blockframe.c (find_pc_sect_containing_function): New function.
4417 * breakpoint.c (print_breakpoint_location): Don't call
4418 find_pc_sect_function.
4419 * linespec.c (create_sals_line_offset): Record the location's
4420 symbol in the sal.
4421 * linespec.c (convert_address_location_to_sals): Fill in sal's
4422 symbol with find_pc_sect_containing_function.
4423 * symtab.c (find_function_start_sal): Rename to ...
4424 (find_function_start_sal_1): ... this.
4425 (find_function_start_sal): Reimplement as wrapper around
4426 find_function_start_sal_1, and use
4427 find_pc_sect_containing_function to fill in the sal's symbol.
4428 (find_function_start_sal(symbol*, bool)): Adjust.
4429 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4430 comments.
4431 (find_pc_sect_containing_function): Declare.
4432
4433 2018-06-29 Pedro Alves <palves@redhat.com>
4434
4435 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4436 true if the the location has no symbol.
4437
4438 2018-06-28 Tom Tromey <tom@tromey.com>
4439
4440 * NEWS: Mention --enable-codesign.
4441 * silent-rules.mk (ECHO_SIGN): New variable.
4442 * configure.ac: Add --enable-codesign.
4443 * configure: Rebuild.
4444 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4445 (gdb$(EXEEXT)): Optionally invoke codesign.
4446
4447 2018-06-28 Pedro Alves <palves@redhat.com>
4448
4449 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4450 comments.
4451 (switch_to_thread_no_regs): Adjust comment.
4452 * infcmd.c (stop_pc): Delete.
4453 (post_create_inferior, info_program_command): Replace references
4454 to stop_pc with references to thread_info->suspend.stop_pc.
4455 * inferior.h (stop_pc): Delete declaration.
4456 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4457 (handle_inferior_event_1, handle_signal_stop)
4458 (process_event_stop_test, keep_going_stepped_thread)
4459 (handle_step_into_function, handle_step_into_function_backward)
4460 (print_stop_location): Replace references to stop_pc with
4461 references to thread_info->suspend.stop_pc.
4462 (struct infcall_suspend_state) <stop_pc>: Delete field.
4463 (save_infcall_suspend_state, restore_infcall_suspend_state):
4464 Remove references to inf_stat->stop_pc.
4465 * linux-fork.c (fork_load_infrun_state): Likewise.
4466 * record-btrace.c (record_btrace_set_replay): Likewise.
4467 * record-full.c (record_full_goto_entry): Likewise.
4468 * remote.c (print_one_stopped_thread): Likewise.
4469 * target.c (target_resume): Extend comment.
4470 * thread.c (set_executing_thread): New.
4471 (set_executing): Use it.
4472 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4473 Remove references to stop_pc.
4474
4475 2018-06-28 Pedro Alves <palves@redhat.com>
4476
4477 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4478 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4479
4480 2018-06-28 Tom Tromey <tom@tromey.com>
4481
4482 * coffread.c (coff_symfile_finish): Update.
4483 * xcoffread.c (xcoff_symfile_finish): Update.
4484 * elfread.c (elf_symfile_finish): Update.
4485 * symfile.h (dwarf2_free_objfile): Don't declare.
4486 * dwarf2read.c (_initialize_dwarf2_read): Use
4487 register_objfile_data_with_cleanup.
4488 (dwarf2_free_objfile): Now static. Change signature.
4489
4490 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4491
4492 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4493 option "-o" to add-symbol-file-load to add an offset to each
4494 section's load address.
4495 * symfile.c (set_objfile_default_section_offset): New function.
4496
4497 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4498
4499 * symfile.c (add_symbol_file_command): Make sure that sections
4500 with the same name are sorted in the same order.
4501
4502 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4503
4504 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4505 require the second argument. If omitted, load sections at the
4506 addresses specified in the file.
4507
4508 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4509
4510 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4511 (_initialize_symfile): Add option "-o" to symbol-file to add an
4512 offset to each section of the symbol file.
4513
4514 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4515
4516 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4517
4518 2018-06-27 Tom Tromey <tom@tromey.com>
4519
4520 * stack.c (_initialize_stack): Update "func" help text.
4521
4522 2018-06-27 Tom Tromey <tom@tromey.com>
4523
4524 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4525 std::vector.
4526 (unwind_infopy_str, pyuw_create_unwind_info)
4527 (unwind_infopy_add_saved_register, pyuw_sniffer)
4528 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4529 Update.
4530 (struct saved_reg): Add constructor.
4531 <value>: Now a gdbpy_ref<>.
4532
4533 2018-06-27 Tom Tromey <tom@tromey.com>
4534
4535 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4536
4537 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4538
4539 * gdb-gdb.py.in: Format using autopep8.
4540
4541 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4542
4543 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4544 (type_lookup_function): Recognize CORE_ADDR values.
4545
4546 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4547
4548 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4549 print tag_name.
4550
4551 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4552
4553 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4554 <__lt__>: Add.
4555
4556 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4557
4558 * gdb-gdb.py: Move to...
4559 * gdb-gdb.py.in: ... here.
4560 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4561 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4562 dependencies.
4563 (distclean): Remove gdb-gdb.py when cleaning.
4564 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4565 * configure: Re-generate.
4566
4567 2018-06-27 Pedro Alves <palves@redhat.com>
4568
4569 * proc-service.c (get_ps_regcache): New.
4570 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4571 (ps_lsetfpregs): Use it.
4572
4573 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4574
4575 PR gdb/21695
4576 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4577 (dwarf_decode_lines_1): Adjust.
4578
4579 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4580
4581 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4582 override.
4583 <info_proc>: Likewise.
4584
4585 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4586
4587 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4588 to windows_fetch_one_register, and only handle the case of
4589 fetching one register. Move the code that reloads the context
4590 and iterates over all registers if R is negative to...
4591 (windows_nat_target::fetch_registers): ... here.
4592 (do_windows_store_inferior_registers): Rename to
4593 windows_store_one_register, and only handle the case of storing
4594 one register. Move the code that handles the case where r is
4595 negative to...
4596 (windows_nat_target::store_registers) ... here.
4597
4598 2018-06-26 Tom Tromey <tom@tromey.com>
4599
4600 PR rust/22574:
4601 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4602 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4603 Update.
4604 (rust_internal_print_type): Add podata parameter.
4605 (rust_print_type): Update.
4606
4607 2018-06-26 Tom Tromey <tom@tromey.com>
4608
4609 * typeprint.h (struct print_offset_data) <update, finish,
4610 maybe_print_hole>: New methods.
4611 <indentation>: New constant.
4612 * typeprint.c (print_offset_data::indentation): Define.
4613 (print_offset_data::maybe_print_hole, print_offset_data::update)
4614 (print_offset_data::finish): Move from c-typeprint.c and rename.
4615 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4616 (print_spaces_filtered_with_print_options): Update.
4617 (c_print_type_union_field_offset, maybe_print_hole)
4618 (c_print_type_struct_field_offset): Move to typeprint.c and
4619 rename.
4620 (c_type_print_base_struct_union): Update.
4621
4622 2018-06-25 Pedro Alves <palves@redhat.com>
4623
4624 * gdbthread.h (thread_info_ref, delete_thread)
4625 (delete_thread_silent, first_thread_of_inferior)
4626 (any_thread_of_inferior, switch_to_thread)
4627 (enable_thread_stack_temporaries)
4628 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4629 (get_last_thread_stack_temporary)
4630 (value_in_thread_stack_temporaries, can_access_registers_thread):
4631 Spell out "struct thread_info" instead of just "thread_info".
4632 * inferior.h (notice_new_inferior): Likewise.
4633
4634 2018-06-25 Pedro Alves <palves@redhat.com>
4635
4636 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4637 pass thread_info pointer to delete_thread.
4638 (windows_nat_target::detach): Pass inferior pointer to
4639 detach_inferior.
4640 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4641 delete_thread.
4642 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4643 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4644 and pass a thread_info pointer to delete_thread.
4645 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4646 pass thread_info pointer to delete_thread.
4647 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4648 delete_thread_silent call.
4649 * procfs.c (procfs_target::detach): Pass inferior pointer to
4650 detach_inferior.
4651 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4652 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4653 delete_thread_silent call.
4654 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4655 pass thread_info pointer to delete_thread.
4656 (windows_nat_target::detach): Pass inferior pointer to
4657 delete_inferior.
4658
4659 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4660
4661 * regcache.c (readable_regcache::read_part): Fix asserts.
4662 (reg_buffer::raw_collect_part): New function.
4663 (regcache::write_part): Fix asserts.
4664 (reg_buffer::raw_supply_part): New function.
4665 (regcache::transfer_regset_register): New helper function.
4666 (regcache::transfer_regset): Call new functions.
4667 (regcache_supply_regset): Use gdb_byte*.
4668 (regcache::supply_regset): Likewise.
4669 (regcache_collect_regset): Likewise.
4670 (regcache::collect_regset): Likewise.
4671 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4672 (reg_buffer::raw_supply_part): Likewise.
4673 (regcache::transfer_regset_register): Likewise.
4674 (regcache::transfer_regset): Use gdb_byte*.
4675
4676 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4677
4678 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4679
4680 2018-06-21 Pedro Alves <palves@redhat.com>
4681
4682 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4683 instead of a ptid_t. All callers adjusted.
4684 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4685 adjusted.
4686 (print_ada_task_info, display_current_task_id, task_command_1):
4687 Adjust.
4688 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4689 inferior_thread.
4690 (breakpoint_kind): Adjust.
4691 (remove_breakpoints_pid): Rename to ...
4692 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4693 pointer. All callers adjusted.
4694 (bpstat_clear_actions): Use inferior_thread.
4695 (get_bpstat_thread): New.
4696 (bpstat_do_actions): Use it.
4697 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4698 to take a thread_info pointer. All callers adjusted.
4699 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4700 (breakpoint_re_set_thread): Use inferior_thread.
4701 * breakpoint.h (struct inferior): Forward declare.
4702 (bpstat_stop_status): Update.
4703 (remove_breakpoints_pid): Delete.
4704 (remove_breakpoints_inf): New.
4705 * bsd-uthread.c (bsd_uthread_target::wait)
4706 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4707 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4708 (maint_btrace_packet_history_cmd)
4709 (maint_btrace_clear_packet_history_cmd): Adjust.
4710 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4711 inferior_thread.
4712 * cli/cli-interp.c: Include "inferior.h".
4713 * common/refcounted-object.h (struct
4714 refcounted_object_ref_policy): New.
4715 * compile/compile-object-load.c: Include gdbthread.h.
4716 (store_regs): Use inferior_thread.
4717 * corelow.c (core_target::close): Use current_inferior.
4718 (core_target_open): Adjust to use first_thread_of_inferior and use
4719 the current inferior.
4720 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4721 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4722 <thread>: ... this new field. All references adjusted.
4723 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4724 Take a thread_info pointer instead of a ptid_t.
4725 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4726 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4727 thread_info pointer instead of a ptid_t.
4728 * elfread.c: Include "inferior.h".
4729 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4730 Use inferior_thread.
4731 * eval.c (evaluate_subexp): Likewise.
4732 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4733 inferior_thread.
4734 * gdb_proc_service.h (struct thread_info): Forward declare.
4735 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4736 <thread>: ... this new field. All references adjusted.
4737 * gdbarch.h, gdbarch.c: Regenerate.
4738 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4739 'thread' parameter. All implementations and callers adjusted.
4740 * gdbthread.h (thread_info) <set_running>: New method.
4741 (delete_thread, delete_thread_silent): Take a thread_info pointer
4742 instead of a ptid.
4743 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4744 (first_thread_of_process): Delete, replaced by ...
4745 (first_thread_of_inferior): ... this new function. All callers
4746 adjusted.
4747 (any_live_thread_of_process): Delete, replaced by ...
4748 (any_live_thread_of_inferior): ... this new function. All callers
4749 adjusted.
4750 (switch_to_thread, switch_to_no_thread): Declare.
4751 (is_executing): Delete.
4752 (enable_thread_stack_temporaries): Update comment.
4753 <enable_thread_stack_temporaries>: Take a thread_info pointer
4754 instead of a ptid_t. Incref the thread.
4755 <~enable_thread_stack_temporaries>: Decref the thread.
4756 <m_ptid>: Delete
4757 <m_thr>: New.
4758 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4759 (get_last_thread_stack_temporary)
4760 (value_in_thread_stack_temporaries, can_access_registers_thread):
4761 Take a thread_info pointer instead of a ptid_t. All callers
4762 adjusted.
4763 * infcall.c (get_call_return_value): Use inferior_thread.
4764 (run_inferior_call): Work with thread pointers instead of ptid_t.
4765 (call_function_by_hand_dummy): Work with thread pointers instead
4766 of ptid_t. Use thread_info_ref.
4767 * infcmd.c (proceed_thread_callback): Access thread's state
4768 directly.
4769 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4770 access thread's state directly.
4771 (continue_command): Use inferior_thread.
4772 (info_program_command): Use find_thread_ptid and access thread
4773 state directly.
4774 (proceed_after_attach_callback): Use thread state directly.
4775 (notice_new_inferior): Take a thread_info pointer instead of a
4776 ptid_t. All callers adjusted.
4777 (exit_inferior): Take an inferior pointer instead of a pid. All
4778 callers adjusted.
4779 (exit_inferior_silent): New.
4780 (detach_inferior): Delete.
4781 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4782 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4783 (detach_inferior_command, kill_inferior_command): Use
4784 find_inferior_id instead of valid_gdb_inferior_id and
4785 gdb_inferior_id_to_pid.
4786 (inferior_command): Use inferior and thread pointers.
4787 * inferior.h (struct thread_info): Forward declare.
4788 (notice_new_inferior): Take a thread_info pointer instead of a
4789 ptid_t. All callers adjusted.
4790 (detach_inferior): Delete declaration.
4791 (exit_inferior, exit_inferior_silent): Take an inferior pointer
4792 instead of a pid. All callers adjusted.
4793 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4794 (valid_gdb_inferior_id): Delete.
4795 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4796 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4797 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4798 ...
4799 <inf>: ... this new field.
4800 <step_ptid>: Delete, replaced by ...
4801 <step_thread>: ... this new field.
4802 (get_displaced_stepping_state): Take an inferior pointer instead
4803 of a pid. All callers adjusted.
4804 (displaced_step_in_progress_any_inferior): Adjust.
4805 (displaced_step_in_progress_thread): Take a thread pointer instead
4806 of a ptid_t. All callers adjusted.
4807 (displaced_step_in_progress, add_displaced_stepping_state): Take
4808 an inferior pointer instead of a pid. All callers adjusted.
4809 (get_displaced_step_closure_by_addr): Adjust.
4810 (remove_displaced_stepping_state): Take an inferior pointer
4811 instead of a pid. All callers adjusted.
4812 (displaced_step_prepare_throw, displaced_step_prepare)
4813 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4814 All callers adjusted.
4815 (start_step_over): Adjust.
4816 (infrun_thread_ptid_changed): Remove bit updating ptids in the
4817 displaced step queue.
4818 (do_target_resume): Adjust.
4819 (fetch_inferior_event): Use inferior_thread.
4820 (context_switch, get_inferior_stop_soon): Take an
4821 execution_control_state pointer instead of a ptid_t. All callers
4822 adjusted.
4823 (switch_to_thread_cleanup): Delete.
4824 (stop_all_threads): Use scoped_restore_current_thread.
4825 * inline-frame.c: Include "gdbthread.h".
4826 (inline_state) <inline_state>: Take a thread pointer instead of a
4827 ptid_t. All callers adjusted.
4828 <ptid>: Delete, replaced by ...
4829 <thread>: ... this new field.
4830 (find_inline_frame_state): Take a thread pointer instead of a
4831 ptid_t. All callers adjusted.
4832 (skip_inline_frames, step_into_inline_frame)
4833 (inline_skipped_frames, inline_skipped_symbol): Take a thread
4834 pointer instead of a ptid_t. All callers adjusted.
4835 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4836 (inline_skipped_frames, inline_skipped_symbol): Likewise.
4837 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4838 pointers directly.
4839 * linux-nat.c (get_detach_signal): Likewise.
4840 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4841 (thread_db_notice_clone): Adjust.
4842 (thread_db_find_new_threads_silently)
4843 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4844 a thread pointer instead of a ptid_t. All callers adjusted.
4845 * mi/mi-cmd-var.c: Include "inferior.h".
4846 (mi_cmd_var_update_iter): Update to use thread pointers.
4847 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4848 inferior directly.
4849 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4850 out to ...
4851 (mi_output_running): ... this new function.
4852 (mi_on_resume_1): Adjust to use it.
4853 (mi_user_selected_context_changed): Adjust to use inferior_thread.
4854 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4855 directly.
4856 (interrupt_thread_callback): : Adjust to use thread and inferior
4857 pointers.
4858 * proc-service.c: Include "gdbthread.h".
4859 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4860 * progspace-and-thread.c: Include "inferior.h".
4861 * progspace.c: Include "inferior.h".
4862 * python/py-exitedevent.c (create_exited_event_object): Adjust to
4863 hold a reference to an inferior_object.
4864 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4865 inferior_thread.
4866 * python/py-inferior.c (struct inferior_object): Give the type a
4867 tag name instead of a typedef.
4868 (python_on_normal_stop): No need to check if the current thread is
4869 listed.
4870 (inferior_to_inferior_object): Change return type to
4871 inferior_object. All callers adjusted.
4872 (find_thread_object): Delete, bits factored out to ...
4873 (thread_to_thread_object): ... this new function.
4874 * python/py-infthread.c (create_thread_object): Use
4875 inferior_to_inferior_object.
4876 (thpy_is_stopped): Use thread pointer directly.
4877 (gdbpy_selected_thread): Use inferior_thread.
4878 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4879 field, replaced with ...
4880 <thread>: ... this new field. All users adjusted.
4881 (btpy_insn_or_gap_new): Drop const.
4882 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
4883 callers adjusted.
4884 * python/py-record.c: Include "gdbthread.h".
4885 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4886 a ptid_t. All callers adjusted.
4887 (gdbpy_current_recording): Use inferior_thread.
4888 * python/py-record.h (recpy_record_object) <ptid>: Delete
4889 field, replaced with ...
4890 <thread>: ... this new field. All users adjusted.
4891 (recpy_element_object) <ptid>: Delete
4892 field, replaced with ...
4893 <thread>: ... this new field. All users adjusted.
4894 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4895 a ptid_t. All callers adjusted.
4896 * python/py-threadevent.c: Include "gdbthread.h".
4897 (get_event_thread): Use thread_to_thread_object.
4898 * python/python-internal.h (struct inferior_object): Forward
4899 declare.
4900 (find_thread_object, find_inferior_object): Delete declarations.
4901 (thread_to_thread_object, inferior_to_inferior_object): New
4902 declarations.
4903 * record-btrace.c: Include "inferior.h".
4904 (require_btrace_thread): Use inferior_thread.
4905 (record_btrace_frame_sniffer)
4906 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4907 (get_thread_current_frame): Use scoped_restore_current_thread and
4908 switch_to_thread.
4909 (get_thread_current_frame): Use thread pointer directly.
4910 (record_btrace_replay_at_breakpoint): Use thread's inferior
4911 pointer directly.
4912 * record-full.c: Include "inferior.h".
4913 * regcache.c: Include "gdbthread.h".
4914 (get_thread_arch_regcache): Use the inferior's address space
4915 directly.
4916 (get_thread_regcache, registers_changed_thread): New.
4917 * regcache.h (get_thread_regcache(thread_info *thread)): New
4918 overload.
4919 (registers_changed_thread): New.
4920 (remote_target) <remote_detach_1>: Swap order of parameters.
4921 (remote_add_thread): <remote_add_thread>: Return the new thread.
4922 (get_remote_thread_info(ptid_t)): New overload.
4923 (remote_target::remote_notice_new_inferior): Use thread pointers
4924 directly.
4925 (remote_target::process_initial_stop_replies): Use
4926 thread_info::set_running.
4927 (remote_target::remote_detach_1, remote_target::detach)
4928 (extended_remote_target::detach): Adjust.
4929 * stack.c (frame_show_address): Use inferior_thread.
4930 * target-debug.h (target_debug_print_thread_info_pp): New.
4931 * target-delegates.c: Regenerate.
4932 * target.c (default_thread_address_space): Delete.
4933 (memory_xfer_partial_1): Use current_inferior.
4934 (target_detach): Use current_inferior.
4935 (target_thread_address_space): Delete.
4936 (generic_mourn_inferior): Use current_inferior.
4937 * target.h (struct target_ops) <thread_address_space>: Delete.
4938 (target_thread_address_space): Delete.
4939 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4940 pointers directly.
4941 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4942 thread pointer instead of a ptid_t. Adjust all callers.
4943 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4944 (first_thread_of_process): Delete, replaced by ...
4945 (first_thread_of_inferior): ... this new function. All callers
4946 adjusted.
4947 (any_thread_of_process): Rename to ...
4948 (any_thread_of_inferior): ... this, and take an inferior pointer.
4949 (any_live_thread_of_process): Rename to ...
4950 (any_live_thread_of_inferior): ... this, and take an inferior
4951 pointer.
4952 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4953 (value_in_thread_stack_temporaries)
4954 (get_last_thread_stack_temporary): Take a thread pointer instead
4955 of a ptid_t. Adjust all callers.
4956 (thread_info::set_running): New.
4957 (validate_registers_access): Use inferior_thread.
4958 (can_access_registers_ptid): Rename to ...
4959 (can_access_registers_thread): ... this, and take a thread
4960 pointer.
4961 (print_thread_info_1): Adjust to compare thread pointers instead
4962 of ptids.
4963 (switch_to_no_thread, switch_to_thread): Make extern.
4964 (scoped_restore_current_thread::~scoped_restore_current_thread):
4965 Use m_thread pointer directly.
4966 (scoped_restore_current_thread::scoped_restore_current_thread):
4967 Use inferior_thread.
4968 (thread_command): Use thread pointer directly.
4969 (thread_num_make_value_helper): Use inferior_thread.
4970 * top.c (execute_command): Use inferior_thread.
4971 * tui/tui-interp.c: Include "inferior.h".
4972 * varobj.c (varobj_create): Use inferior_thread.
4973 (value_of_root_1): Use find_thread_global_id instead of
4974 global_thread_id_to_ptid.
4975
4976 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4977
4978 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4979 possible.
4980 (regcache::write_part): Likewise.
4981 (readable_regcache::cooked_read_part): Update comment.
4982 (readable_regcache::cooked_write_part): Likewise.
4983 * regcache.h: (readable_regcache::read_part): Likewise.
4984 (regcache::write_part): Likewise.
4985
4986 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4987 Dirk Schubert <dirk.schubert@arm.com>
4988
4989 * aarch64-linux-nat.c (post_attach): New.
4990 (aarch64_linux_nat_target::post_attach): Override post_attach to
4991 record the number of hardware debug registers.
4992
4993 2018-06-20 Tom Tromey <tom@tromey.com>
4994
4995 * python/py-param.c (add_setshow_generic): Make parameters const.
4996 (parmpy_init): Update.
4997
4998 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4999
5000 * regcache.h (regcache_cooked_read_ftype): Rename to...
5001 (register_read_ftype): ...this, change type to function_view.
5002 (class reg_buffer) <save>: Remove src parameter.
5003 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5004 parameter non-const in first overload. Remove src parameter in
5005 second overload.
5006 * regcache.c (do_cooked_read): Remove.
5007 (readonly_detached_regcache::readonly_detached_regcache): Make
5008 parameter non-const, adjust call to other constructor.
5009 (reg_buffer::save): Remove src parameter.
5010 * frame.c (do_frame_register_read): Remove.
5011 (frame_save_as_regcache): Use lambda function.
5012 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5013 parameter to ppu2spu_data *.
5014 (ppu2spu_sniffer): Use lambda function.
5015
5016 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5017
5018 * record-full.c (record_full_target::insert_breakpoint): Remove
5019 "struct" keyword, add const.
5020
5021 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5022
5023 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5024 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5025 * configure.ac: Remove AC_PREREQ, add missing quoting.
5026 * gnulib/configure.ac: Modernize usage of
5027 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5028 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5029 (AUTOMAKE_VERSION): Bump to 1.15.1.
5030 * configure: Re-generate.
5031 * config.in: Re-generate.
5032 * aclocal.m4: Re-generate.
5033 * gnulib/aclocal.m4: Re-generate.
5034 * gnulib/config.in: Re-generate.
5035 * gnulib/configure: Re-generate.
5036 * gnulib/import/Makefile.in: Re-generate.
5037
5038 2018-06-19 Pedro Alves <palves@redhat.com>
5039
5040 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5041 (lookup_minimal_symbol_by_pc_section): ... here with
5042 gdb_assert_not_reached added.
5043
5044 2018-06-19 Pedro Alves <palves@redhat.com>
5045
5046 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5047 parameter with a block parameter. Compare location's block symbol
5048 with the frame's block instead of addresses.
5049 (skip_inline_frames): Pass the current block instead of the
5050 frame's address. Break out as soon as we determine the frame
5051 should not be skipped.
5052
5053 2018-06-18 Tom Tromey <tom@tromey.com>
5054
5055 * solib-aix.c (solib_aix_get_section_offsets): Return
5056 unique_xmalloc_ptr.
5057 (solib_aix_solib_create_inferior_hook): Update.
5058
5059 2018-06-18 Tom Tromey <tom@tromey.com>
5060
5061 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5062
5063 2018-06-18 Tom Tromey <tom@tromey.com>
5064
5065 * solib-frv.c (frv_relocate_main_executable): Use
5066 unique_xmalloc_ptr.
5067 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5068 unique_xmalloc_ptr.
5069
5070 2018-06-18 Tom Tromey <tom@tromey.com>
5071
5072 * objfiles.h (inhibit_section_map_updates): Update.
5073 (resume_section_map_updates, resume_section_map_updates_cleanup):
5074 Remove.
5075 * solib-svr4.c (svr4_handle_solib_event): Update.
5076 * objfiles.c (inhibit_section_map_updates): Return
5077 scoped_restore_tmpl<int>.
5078 (resume_section_map_updates, resume_section_map_updates_cleanup):
5079 Remove.
5080
5081 2018-06-18 Tom Tromey <tom@tromey.com>
5082
5083 * valprint.h (read_string): Update.
5084 * valprint.c (read_string): Change type of "buffer".
5085 (val_print_string): Update.
5086 * python/py-value.c (valpy_string): Update.
5087 * language.h (struct language_defn) <la_get_string>: Change
5088 type of "buffer".
5089 (default_get_string, c_get_string): Update.
5090 * language.c (default_get_string): Change type of "buffer".
5091 * guile/scm-value.c (gdbscm_value_to_string): Update.
5092 * c-lang.c (c_get_string): Change type of "buffer".
5093
5094 2018-06-18 Tom Tromey <tom@tromey.com>
5095
5096 * ser-mingw.c (struct pipe_state_destroyer): New.
5097 (pipe_state_up): New typedef.
5098 (cleanup_pipe_state): Remove.
5099 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5100
5101 2018-06-18 Tom Tromey <tom@tromey.com>
5102
5103 * rust-lang.h (rust_yyerror): Don't declare.
5104 * rust-lang.c (rust_language_defn): Update.
5105 * rust-exp.y (yyerror): Now static.
5106 * parse.c (parse_exp_in_context_1): Update.
5107 * p-lang.h (p_yyerror): Don't declare.
5108 * p-lang.c (p_language_defn): Update.
5109 * p-exp.y (yyerror): Now static.
5110 * opencl-lang.c (opencl_language_defn): Update.
5111 * objc-lang.c (objc_language_defn): Update.
5112 * m2-lang.h (m2_yyerror): Don't declare.
5113 * m2-lang.c (m2_language_defn): Update.
5114 * m2-exp.y (yyerror): Now static.
5115 * language.h (struct language_defn) <la_error>: Remove.
5116 * language.c (unk_lang_error): Remove.
5117 (unknown_language_defn, auto_language_defn): Remove.
5118 * go-lang.h (go_yyerror): Don't declare.
5119 * go-lang.c (go_language_defn): Update.
5120 * go-exp.y (yyerror): Now static.
5121 * f-lang.h (f_yyerror): Don't declare.
5122 * f-lang.c (f_language_defn): Update.
5123 * f-exp.y (yyerror): Now static.
5124 * d-lang.h (d_yyerror): Don't declare.
5125 * d-lang.c (d_language_defn): Update.
5126 * d-exp.y (yyerror): Now static.
5127 * c-lang.h (c_yyerror): Don't declare.
5128 * c-lang.c (c_language_defn, cplus_language_defn)
5129 (asm_language_defn, minimal_language_defn): Update.
5130 * c-exp.y (yyerror): Now static.
5131 * ada-lang.h (ada_yyerror): Don't declare.
5132 * ada-lang.c (ada_language_defn): Update.
5133 * ada-exp.y (yyerror): Now static.
5134
5135 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5136
5137 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5138 (store_sveregs_to_thread): Likewise.
5139 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5140 (aarch64_linux_store_inferior_registers): Likewise.
5141 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5142 function.
5143 (aarch64_sve_regs_copy_to_regcache): Likewise.
5144 (aarch64_sve_regs_copy_from_regcache): Likewise.
5145 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5146 declaration.
5147 (aarch64_sve_regs_copy_to_regcache): Likewise.
5148 (aarch64_sve_regs_copy_from_regcache): Likewise.
5149 (sve_context): Structure from Linux headers.
5150 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5151 (SVE_SIG_ZREG_SIZE): Likewise.
5152 (SVE_SIG_PREG_SIZE): Likewise.
5153 (SVE_SIG_FFR_SIZE): Likewise.
5154 (SVE_SIG_REGS_OFFSET): Likewise.
5155 (SVE_SIG_ZREGS_OFFSET): Likewise.
5156 (SVE_SIG_ZREG_OFFSET): Likewise.
5157 (SVE_SIG_ZREGS_SIZE): Likewise.
5158 (SVE_SIG_PREGS_OFFSET): Likewise.
5159 (SVE_SIG_PREG_OFFSET): Likewise.
5160 (SVE_SIG_PREGS_SIZE): Likewise.
5161 (SVE_SIG_FFR_OFFSET): Likewise.
5162 (SVE_SIG_REGS_SIZE): Likewise.
5163 (SVE_SIG_CONTEXT_SIZE): Likewise.
5164 (SVE_PT_REGS_MASK): Likewise.
5165 (SVE_PT_REGS_FPSIMD): Likewise.
5166 (SVE_PT_REGS_SVE): Likewise.
5167 (SVE_PT_VL_INHERIT): Likewise.
5168 (SVE_PT_VL_ONEXEC): Likewise.
5169 (SVE_PT_REGS_OFFSET): Likewise.
5170 (SVE_PT_FPSIMD_OFFSET): Likewise.
5171 (SVE_PT_FPSIMD_SIZE): Likewise.
5172 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5173 (SVE_PT_SVE_PREG_SIZE): Likewise.
5174 (SVE_PT_SVE_FFR_SIZE): Likewise.
5175 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5176 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5177 (__SVE_SIG_TO_PT): Likewise.
5178 (SVE_PT_SVE_OFFSET): Likewise.
5179 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5180 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5181 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5182 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5183 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5184 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5185 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5186 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5187 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5188 (SVE_PT_SVE_SIZE): Likewise.
5189 (SVE_PT_SIZE): Likewise.
5190 (HAS_SVE_STATE): New define.
5191
5192 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5193
5194 * nat/aarch64-sve-linux-sigcontext.h: New file.
5195 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5196 new files.
5197 (SVE_VQ_MIN): Likewise.
5198 (SVE_VQ_MAX): Likewise.
5199 (SVE_VL_MIN): Likewise.
5200 (SVE_VL_MAX): Likewise.
5201 (SVE_NUM_ZREGS): Likewise.
5202 (SVE_NUM_PREGS): Likewise.
5203 (sve_vl_valid): Likewise.
5204 (struct user_sve_header): Likewise.
5205
5206 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5207 Richard Bunt <Richard.Bunt@arm.com>
5208
5209 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5210 was requested by GDB.
5211
5212 2018-06-15 Tom de Vries <tdevries@suse.de>
5213
5214 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5215
5216 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5217
5218 * gnulib/update-gnulib.sh: Print expected versions of
5219 autoconf/aclocal.
5220
5221 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5222
5223 * arch-utils.c (default_type_align): Use type_length_units.
5224 * gdbtypes.c (type_align): Use type_length_units.
5225
5226 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5227
5228 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5229 of 'define' command.
5230
5231 2018-06-14 Tom de Vries <tdevries@suse.de>
5232
5233 PR cli/22573
5234 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5235 get_no_prettyformat_print_options.
5236
5237 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5238
5239 * sparc-nat.h: Include target.h.
5240 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5241 <fetch_registers>: Remove this argument in function call.
5242 <store_registers>: Remove this argument in function call, remove
5243 extra semicolon.
5244 <low_forget_process>: Call sparc64_forget_process instead of
5245 sparc_forget_process.
5246
5247 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5248
5249 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5250 (procfs_target::make_corefile_notes): Adjust to new
5251 target_read_alloc return type.
5252
5253 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5254 Stephen Roberts <stephen.roberts@arm.com>
5255
5256 PR gdb/22882
5257 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5258 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5259 Move should_notify_stop local into more inner scope.
5260
5261 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5262 Stephen Roberts <stephen.roberts@arm.com>
5263
5264 PR gdb/22882
5265 * infrun.c (resume_1): Add call to mark_async_event_handler.
5266
5267 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5268
5269 * infrun.c (do_target_wait): Change old version of $pc printed.
5270
5271 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5272
5273 * dwarf2read.c (read_index_from_section): Rename to...
5274 (read_gdb_index_from_section): ... this, update all callers.
5275 (dwarf2_read_index): Rename to...
5276 (dwarf2_read_gdb_index): ... this, update all callers.
5277
5278 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5279
5280 * gdb/hppa-linux-nat.c
5281 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5282 hppa_linux_nat_target::fetch_registers.
5283
5284 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5285
5286 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5287 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5288 (AARCH64_DWARF_SVE_FFR): Likewise.
5289 (AARCH64_DWARF_SVE_P0): Likewise.
5290 (AARCH64_DWARF_SVE_Z0): Likewise.
5291
5292 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5293
5294 * common/common-regcache.h (raw_compare): New function.
5295 * regcache.c (regcache::raw_compare): Likewise.
5296 * regcache.h (regcache::raw_compare): New declaration.
5297
5298 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5299
5300 * common/common-regcache.h (reg_buffer_common): New structure.
5301 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5302 (reg_buffer::raw_supply): Likewise.
5303 (reg_buffer::raw_supply_integer): Likewise.
5304 (reg_buffer::raw_supply_zeroed): Likewise.
5305 (reg_buffer::raw_collect): Likewise.
5306 (reg_buffer::raw_collect_integer): Likewise.
5307 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5308 (reg_buffer::raw_supply): Likewise.
5309 (reg_buffer::raw_supply_integer): Likewise.
5310 (reg_buffer::raw_supply_zeroed): Likewise.
5311 (reg_buffer::raw_collect): Likewise.
5312 (reg_buffer::raw_collect_integer): Likewise.
5313
5314 2018-06-10 Tom Tromey <tom@tromey.com>
5315
5316 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5317 (class remote_state) <stop_reply_queue>: Now std::vector.
5318 (remote_state::~remote_state)
5319 (remote_target::stop_reply_queue_length): Update.
5320 (struct queue_iter_param, remove_child_of_pending_fork)
5321 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5322 (check_pending_event_prevents_wildcard_vcont_callback)
5323 (remove_stop_reply_for_inferior)
5324 (remove_stop_reply_of_remote_state)
5325 (remote_notif_remove_once_on_match)
5326 (stop_reply_match_ptid_and_ws)
5327 (remote_kill_child_of_pending_fork): Remove.
5328 (remote_target::remove_new_fork_children)
5329 (remote_target::check_pending_events_prevent_wildcard_vcont)
5330 (remote_target::discard_pending_stop_replies)
5331 (remote_target::discard_pending_stop_replies_in_queue)
5332 (remote_target::remote_notif_remove_queued_reply)
5333 (remote_target::queued_stop_reply)
5334 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5335 (remote_target::wait, remote_target::kill_new_fork_children)
5336 (remote_target::async): Update.
5337
5338 2018-06-10 Tom Tromey <tom@tromey.com>
5339
5340 * record-full.c (record_full_arch_list_cleanups): Remove.
5341 (record_full_message): Use try/catch.
5342 (record_full_wait_cleanups): Remove.
5343 (record_full_wait_1): Use try/catch.
5344 (record_full_restore): Likewise.
5345
5346 2018-06-10 Tom Tromey <tom@tromey.com>
5347
5348 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5349 declare VEC. Add constructor.
5350 <in_target_beneath>: Now bool.
5351 (record_full_breakpoints): Now a std::vector, static.
5352 (record_full_sync_record_breakpoints)
5353 (record_full_init_record_breakpoints)
5354 (record_full_target::insert_breakpoint)
5355 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5356
5357 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5358
5359 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5360 * serial.c (serial_interface_lookup): Remove struct keyword.
5361
5362 2018-06-10 Tom Tromey <tom@tromey.com>
5363
5364 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5365 method.
5366 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5367 a method.
5368 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5369 method.
5370 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5371 "beneath" as a method.
5372 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5373 Use "beneath" as a method.
5374
5375 2018-06-10 Tom Tromey <tom@tromey.com>
5376
5377 * tracefile.c (struct trace_file_writer_deleter): New.
5378 <operator()>: Rename from trace_file_writer_xfree.
5379 (trace_file_writer_up): New typedef.
5380 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5381
5382 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5383
5384 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5385 <m_registers, m_register_status>: Change type to
5386 std::unique_ptr.
5387 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5388 XCNEWVEC.
5389
5390 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5391
5392 * common/common-regcache.h (enum register_status): Add
5393 underlying type "signed char".
5394 * regcache.h (reg_buffer) <m_register_status>: Change type to
5395 register_status *.
5396 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5397 register_status instead of signed char.
5398 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5399 (reg_buffer::get_register_status): Remove cast.
5400 (readable_regcache::raw_read): Remove cast.
5401 (readable_regcache::cooked_read): Remove cast.
5402
5403 2018-06-09 Tom Tromey <tom@tromey.com>
5404
5405 * source.c (reverse_search_command, forward_search_command): Use
5406 scoped_fd.
5407
5408 2018-06-09 Tom Tromey <tom@tromey.com>
5409
5410 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5411 (serial_ops_list): Now static, std::vector.
5412 (serial_interface_lookup, serial_add_interface): Update.
5413
5414 2018-06-09 Tom Tromey <tom@tromey.com>
5415
5416 * dwarf2read.c (process_cu_includes): Update.
5417 (process_full_comp_unit): Update.
5418 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5419 std::vector.
5420
5421 2018-06-08 Paul Koning <paul_koning@dell.com>
5422
5423 PR gdb/23252
5424
5425 * python/python.c (do_start_initialization):
5426 Avoid call to internal Python API.
5427 (init__gdb_module): New function.
5428
5429 2018-06-08 Gary Benson <gbenson@redhat.com>
5430
5431 * linux-thread-db.c (valprint.h): New include.
5432 (struct check_thread_db_info): New structure.
5433 (check_thread_db_on_load, tdb_testinfo): New static globals.
5434 (check_thread_db, check_thread_db_callback): New functions.
5435 (try_thread_db_load_1): Run integrity checks if requested.
5436 (maintenance_check_libthread_db): New function.
5437 (_initialize_thread_db): Register "maint check libthread-db"
5438 and "maint set/show check-libthread-db".
5439 * NEWS: Mention the above new commands.
5440
5441 2018-06-08 Tom Tromey <tom@tromey.com>
5442
5443 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5444 now a method.
5445
5446 2018-06-08 Tom Tromey <tom@tromey.com>
5447
5448 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5449
5450 2018-06-08 Tom Tromey <tom@tromey.com>
5451
5452 * common/btrace-common.h (struct btrace_data): Add constructor,
5453 destructor, move assignment operator.
5454 <empty, clear, fini>: New methods.
5455 <format>: Initialize.
5456 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5457 (btrace_data_empty): Don't declare.
5458 * common/btrace-common.c (btrace_data_init): Remove.
5459 (btrace_data::fini): Rename from btrace_data_fini.
5460 (btrace_data::empty): Rename from btrace_data_empty.
5461 (btrace_data::clear): Rename from btrace_data_clear. Return
5462 bool.
5463 * btrace.h (make_cleanup_btrace_data): Don't declare.
5464 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5465 (parse_xml_btrace): Update.
5466 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5467 (maint_btrace_clear_packet_history_cmd): Update.
5468
5469 2018-06-07 Pedro Alves <palves@redhat.com>
5470
5471 * target.h (target_ops) <beneath>: Now a method. All references
5472 updated.
5473 (class target_stack): New.
5474 * target.c (g_target_stack): New.
5475 (g_current_top_target): Delete.
5476 (current_top_target): Get the top target out of g_target_stack.
5477 (target_stack::push, target_stack::unpush): New.
5478 (push_target, unpush_target): Reimplement.
5479 (target_is_pushed): Reimplement in terms of g_target_stack.
5480 (target_ops::beneath, target_stack::find_beneath): New.
5481
5482 2018-06-07 Pedro Alves <palves@redhat.com>
5483
5484 * target.h (find_target_beneath): Delete declaration.
5485 * target.c (find_target_beneath): Delete definition.
5486 * aix-thread.c: All callers of find_target_beneath adjusted to
5487 call target_ops::beneath instead.
5488 * bsd-uthread.c: Likewise.
5489 * linux-thread-db.c: Likewise.
5490 * ravenscar-thread.c: Likewise.
5491 * sol-thread.c: Likewise.
5492 * spu-multiarch.c: Likewise.
5493
5494 2018-06-07 Pedro Alves <palves@redhat.com>
5495
5496 * target.h (target_ops) <beneath>: Now a method. All references
5497 updated.
5498 (target_ops) <m_beneath>: New.
5499 * target.c (target_ops::beneath): New.
5500 * corelow.c: Adjust all references to target_ops::beneath.
5501 * linux-thread-db.c: Likewise.
5502 * make-target-delegates: Likewise.
5503 * record-btrace.c: Likewise.
5504 * record-full.c: Likewise.
5505 * remote.c: Likewise.
5506 * target.c: Likewise.
5507 * target-delegates.c: Regenerate.
5508
5509 2018-06-07 Pedro Alves <palves@redhat.com>
5510
5511 * target.h (target_stack): Delete.
5512 (current_top_target): Declare function.
5513 * target.c (target_stack): Delete.
5514 (g_current_top_target): New.
5515 (current_top_target): New function.
5516 * auxv.c: Use current_top_target instead of target_stack
5517 throughout.
5518 * avr-tdep.c: Likewise.
5519 * breakpoint.c: Likewise.
5520 * corefile.c: Likewise.
5521 * elfread.c: Likewise.
5522 * eval.c: Likewise.
5523 * exceptions.c: Likewise.
5524 * frame.c: Likewise.
5525 * gdbarch-selftests.c: Likewise.
5526 * gnu-v3-abi.c: Likewise.
5527 * ia64-tdep.c: Likewise.
5528 * ia64-vms-tdep.c: Likewise.
5529 * infcall.c: Likewise.
5530 * infcmd.c: Likewise.
5531 * infrun.c: Likewise.
5532 * linespec.c: Likewise.
5533 * linux-tdep.c: Likewise.
5534 * minsyms.c: Likewise.
5535 * ppc-linux-nat.c: Likewise.
5536 * ppc-linux-tdep.c: Likewise.
5537 * procfs.c: Likewise.
5538 * regcache.c: Likewise.
5539 * remote.c: Likewise.
5540 * rs6000-tdep.c: Likewise.
5541 * s390-linux-nat.c: Likewise.
5542 * s390-tdep.c: Likewise.
5543 * solib-aix.c: Likewise.
5544 * solib-darwin.c: Likewise.
5545 * solib-dsbt.c: Likewise.
5546 * solib-spu.c: Likewise.
5547 * solib-svr4.c: Likewise.
5548 * solib-target.c: Likewise.
5549 * sparc-tdep.c: Likewise.
5550 * sparc64-tdep.c: Likewise.
5551 * spu-tdep.c: Likewise.
5552 * symfile.c: Likewise.
5553 * symtab.c: Likewise.
5554 * target-descriptions.c: Likewise.
5555 * target-memory.c: Likewise.
5556 * target.c: Likewise.
5557 * target.h: Likewise.
5558 * tracefile-tfile.c: Likewise.
5559 * tracepoint.c: Likewise.
5560 * valops.c: Likewise.
5561 * valprint.c: Likewise.
5562 * value.c: Likewise.
5563 * windows-tdep.c: Likewise.
5564 * mi/mi-main.c: Likewise.
5565
5566 2018-06-07 Tom Tromey <tom@tromey.com>
5567
5568 * valprint.h (build_address_symbolic): Declare.
5569 * printcmd.c (print_address_symbolic): Update.
5570 (build_address_symbolic): Change "name" and "filename" to
5571 std::string.
5572 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5573 Update.
5574 * defs.h (build_address_symbolic): Remove declaration.
5575
5576 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5577
5578 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5579 (aarch64_vnv_type): Add function.
5580 (aarch64_pseudo_register_name): Add V regs for SVE.
5581 (aarch64_pseudo_register_type): Likewise.
5582 (aarch64_pseudo_register_reggroup_p): Likewise.
5583 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5584 (aarch64_pseudo_read_value): Add V regs for SVE.
5585 (aarch64_pseudo_write_2): Use V0 offset for SVE
5586 (aarch64_pseudo_write): Add V regs for SVE.
5587 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5588
5589 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5590
5591 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5592 (sve_vl_from_vq): Likewise.
5593
5594 2018-06-05 Tom Tromey <tom@tromey.com>
5595
5596 * cli/cli-cmds.c (show_version): Update.
5597 * top.c (print_gdb_version): Add "interactive" parameter.
5598 Update.
5599 * main.c (captured_main_1): Update.
5600 * top.h (print_gdb_version): Add "interactive" parameter and a
5601 comment.
5602
5603 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5604
5605 * common/enum-flags.h: Add trailing semicolon to example in
5606 comment.
5607
5608 2018-06-05 Tom Tromey <tom@tromey.com>
5609
5610 PR cli/12326:
5611 * NEWS: Add entry about pager.
5612 * utils.c (pagination_disabled_for_command): New global.
5613 (prompt_for_continue): Allow "c" response to prompt.
5614 (reinitialize_more_filter): Clear
5615 pagination_disabled_for_command.
5616 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5617
5618 2018-06-04 Tom Tromey <tom@tromey.com>
5619
5620 * ada-lang.h (ada_lookup_symbol_list): Update.
5621 * ada-lang.c (resolve_subexp): Update.
5622 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5623 parameter.
5624 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5625 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5626 results parameter to std::vector.
5627 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5628 Update.
5629 * ada-exp.y (block_lookup): Update.
5630 (select_possible_type_sym): Change type of syms. Remove nsyms
5631 parameter.
5632 (write_var_or_type, write_name_assoc): Update.
5633
5634 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5635
5636 * windows-nat.c (windows_nat_target::xfer_partial): Return
5637 TARGET_XFER_E_IO if we need to delegate to the target beneath
5638 but BENEATH is NULL.
5639
5640 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5641
5642 * Makefile.in (config.status): Add configure.nat as a
5643 dependency.
5644
5645 2018-06-04 Tom Tromey <tom@tromey.com>
5646
5647 * cp-name-parser.y (cpname_state): Add method declarations.
5648 (HANDLE_QUAL): Update.
5649 (cpname_state::d_grab, cpname_state::fill_comp)
5650 (cpname_state::make_operator, cpname_state::make_dtor)
5651 (cpname_state::make_builtin_type, cpname_state::make_name)
5652 (cpname_state::d_qualify, cpname_state::d_int_type)
5653 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5654 (%union): Move earlier.
5655
5656 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5657
5658 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5659
5660 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5661
5662 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5663 (aarch64_pseudo_write_1): Likewise.
5664 (aarch64_pseudo_read_value): Use helper.
5665 (aarch64_pseudo_write): Likewise.
5666
5667 2018-06-04 Pedro Alves <palves@redhat.com>
5668
5669 * darwin-nat.c (darwin_ops): Delete.
5670 (darwin_attach_pid): Use get_native_target.
5671
5672 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5673
5674 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5675 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5676
5677 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5678
5679 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5680 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5681 (aarch64_gdbarch_init): Check for SVE.
5682 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5683
5684 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5685
5686 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5687 * aarch64-tdep.h (aarch64_read_description): Likewise.
5688 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5689 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5690 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5691 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5692 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5693
5694 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
5695
5696 * value.c (value_fetch_lazy_bitfield): New.
5697 (value_fetch_lazy_memory): New.
5698 (value_fetch_lazy_register): New.
5699 (value_fetch_lazy): Factor out to smaller functions.
5700
5701 2018-06-01 Tom Tromey <tom@tromey.com>
5702
5703 * cp-name-parser.y (backslashable, represented): Now const.
5704
5705 2018-06-01 Tom Tromey <tom@tromey.com>
5706
5707 * cp-name-parser.y: Include parser-defs.h.
5708 (parser_fprintf): Remove declaration.
5709
5710 2018-06-01 Tom Tromey <tom@tromey.com>
5711
5712 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5713 %parse-param.
5714 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5715 (global_result): Remove globals.
5716 (struct cpname_state): New.
5717 (yyparse): Don't declare.
5718 (yylex, yyerror): Move declarations after %union.
5719 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5720 (make_name): Add state parameter.
5721 Update all callers.
5722 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5723 parameter.
5724 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5725 Update.
5726 (yylex): Add lvalp, state parameters.
5727 (yyerror): Add state parameter.
5728 (cp_demangled_name_to_comp): Update.
5729
5730 2018-06-01 Tom Tromey <tom@tromey.com>
5731
5732 * cp-name-parser.y (parser_fprintf): Declare.
5733 (GDB_YY_REMAP_PREFIX): Define.
5734 Include yy-remap.h. Don't redefine yy* identifiers.
5735
5736 2018-06-01 Tom Tromey <tom@tromey.com>
5737
5738 * python/py-type.c (typy_legacy_template_argument): Update.
5739 * cp-support.h (cp_demangled_name_to_comp): Update.
5740 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5741 parameter to be a "std::string *".
5742 (main): Update.
5743
5744 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
5745
5746 * ada-lex.l: Include "diagnostics.h" instead of
5747 "common/diagnostics.h".
5748 * unittests/environ-selftests.c: Likewise.
5749 * common/diagnostics.h: Moved to ../include.
5750
5751 2018-06-01 Joel Brobecker <brobecker@adacore.com>
5752
5753 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5754 to language_mode_manual while calling breakpoint_re_set_one.
5755
5756 2018-06-01 Tom Tromey <tom@tromey.com>
5757
5758 * valops.c (value_cast_structs, destructor_name_p): Update.
5759 * symtab.c (gdb_mangle_name): Update.
5760 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5761 Update.
5762 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5763 (pascal_object_print_value_fields, pascal_object_print_value):
5764 Update.
5765 * p-typeprint.c (pascal_type_print_derivation_info): Update.
5766 * linespec.c (find_methods): Update.
5767 * gdbtypes.h (type_name_no_tag): Remove.
5768 (type_name_or_error): Rename from type_name_no_tag_or_error.
5769 * gdbtypes.c (type_name_no_tag): Remove.
5770 (type_name_or_error): Rename from type_name_no_tag_or_error.
5771 (lookup_struct_elt_type, check_typedef): Update.
5772 * expprint.c (print_subexp_standard): Update.
5773 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5774 * d-namespace.c (d_lookup_nested_symbol): Update.
5775 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5776 (cp_print_class_member): Update.
5777 * cp-namespace.c (cp_lookup_nested_symbol): Update.
5778 * completer.c (add_struct_fields): Update.
5779 * c-typeprint.c (cp_type_print_derivation_info)
5780 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5781 Update.
5782 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5783 (ada_prefer_type, ada_is_exception_sym): Update.
5784
5785 2018-06-01 Tom Tromey <tom@tromey.com>
5786
5787 * valops.c (enum_constant_from_type, value_namespace_elt)
5788 (value_maybe_namespace_elt): Update.
5789 * valarith.c (find_size_for_pointer_math): Update.
5790 * target-descriptions.c (make_gdb_type): Update.
5791 * symmisc.c (print_symbol): Update.
5792 * stabsread.c (define_symbol, read_type)
5793 (complain_about_struct_wipeout, add_undefined_type)
5794 (cleanup_undefined_types_1): Update.
5795 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5796 (rust_range_type_p, val_print_struct, rust_print_struct_def)
5797 (rust_internal_print_type, rust_composite_type)
5798 (rust_evaluate_funcall, rust_evaluate_subexp)
5799 (rust_inclusive_range_type_p): Update.
5800 * python/py-type.c (typy_get_tag): Update.
5801 * p-typeprint.c (pascal_type_print_base): Update.
5802 * mdebugread.c (parse_symbol, parse_type): Update.
5803 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5804 Update.
5805 * guile/scm-type.c (gdbscm_type_tag): Update.
5806 * go-lang.c (sixg_string_p): Update.
5807 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5808 Update.
5809 * gdbtypes.h (struct main_type) <tag_name>: Remove.
5810 (TYPE_TAG_NAME): Remove.
5811 * gdbtypes.c (type_name_no_tag): Simplify.
5812 (check_typedef, check_types_equal, recursive_dump_type)
5813 (copy_type_recursive, arch_composite_type): Update.
5814 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
5815 in summary mode when needed.
5816 * eval.c (evaluate_funcall): Update.
5817 * dwarf2read.c (fixup_go_packaging, read_structure_type)
5818 (process_structure_scope, read_enumeration_type)
5819 (read_namespace_type, read_module_type, determine_prefix): Update.
5820 * cp-support.c (inspect_type): Update.
5821 * coffread.c (process_coff_symbol, decode_base_type): Update.
5822 * c-varobj.c (c_is_path_expr_parent): Update.
5823 * c-typeprint.c (c_type_print_base_struct_union): Update.
5824 (c_type_print_base_1): Update. Print struct/class/union/enum in
5825 summary when using C language.
5826 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5827 (gen_maybe_namespace_elt): Update.
5828 * ada-lang.c (ada_type_name): Simplify.
5829 (empty_record, ada_template_to_fixed_record_type_1)
5830 (template_to_static_fixed_type)
5831 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5832
5833 2018-06-01 Tom Tromey <tom@tromey.com>
5834
5835 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5836 c_print_type.
5837 * c-typeprint.c (c_print_type_1): Add "language" parameter.
5838 (c_print_type): Update.
5839 (c_print_type): New overload.
5840 (c_type_print_varspec_prefix, c_type_print_args)
5841 (c_type_print_varspec_suffix, c_print_type_no_offsets)
5842 (c_type_print_base_struct_union, c_type_print_base_1)
5843 (cp_type_print_method_args): Add "language" parameter.
5844 (c_type_print_base): Update.
5845 * c-lang.h (c_print_type): Add new overload.
5846
5847 2018-06-01 Tom Tromey <tom@tromey.com>
5848
5849 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5850 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5851
5852 2018-06-01 Alan Hayward <alan.hayward@arm.com>
5853
5854 * aarch64-tdep.c (aarch64_sve_register_names): New const
5855 var.
5856 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5857 (AARCH64_SVE_Z_REGS_NUM): New define.
5858 (AARCH64_SVE_P_REGS_NUM): Likewise.
5859 (AARCH64_SVE_NUM_REGS): Likewise.
5860
5861 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5862
5863 * nat/linux-ptrace.h [__alpha__]
5864 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5865 definitions.
5866
5867 2018-05-31 Maciej W. Rozycki <macro@mips.com>
5868
5869 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5870 the endianness selected.
5871 * NEWS: Document `set endian auto' mode operation update.
5872
5873 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5874
5875 * Makefile.in: Add new header.
5876 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5877 (sve_vl_from_vg): Likewise.
5878 (sve_vq_from_vl): Likewise.
5879 (sve_vl_from_vq): Likewise.
5880 (sve_vq_from_vg): Likewise.
5881 (sve_vg_from_vq): Likewise.
5882 * configure.nat: Add new c file.
5883 * nat/aarch64-sve-linux-ptrace.c: New file.
5884 * nat/aarch64-sve-linux-ptrace.h: New file.
5885
5886 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5887
5888 * aarch64-linux-nat.c (aarch64_linux_read_description):
5889 Add parmeter zero.
5890 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5891 Likewise.
5892 * aarch64-tdep.c (tdesc_aarch64_list): Add.
5893 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5894 (aarch64_gdbarch_init): Add parmeter zero.
5895 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5896 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5897 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5898 parmeter.
5899 * doc/gdb.texinfo: Describe SVE feature
5900 * features/aarch64-sve.c: New file.
5901
5902 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5903
5904 PR gdb/23210
5905 * gdbarch.sh (significant_addr_bit): Default to zero when
5906 not set by target architecture.
5907 * gdbarch.c: Re-generated.
5908 * utils.c (address_significant): Update.
5909
5910 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5911
5912 * stack.c (func_command): Remove trailing newline in call to error.
5913
5914 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5915
5916 * regcache.h (regcache_raw_collect): Remove, update callers to
5917 use regcache::raw_collect.
5918 * regcache.c (regcache_raw_collect): Remove.
5919
5920 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5921
5922 * regcache.h (regcache_raw_supply): Remove, update callers to
5923 use detached_regcache::raw_supply.
5924 * regcache.c (regcache_raw_supply): Remove.
5925
5926 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5927
5928 * regcache.h (regcache_cooked_write_part): Remove, update
5929 callers to use regcache::cooked_write_part.
5930 * regcache.c (regcache_cooked_write_part): Remove.
5931
5932 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5933
5934 * regcache.h (regcache_cooked_read_part): Remove, update callers
5935 to use readable_regcache::cooked_read_part.
5936 * regcache.c (regcache_cooked_read_part): Remove.
5937
5938 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5939
5940 * regcache.h (regcache_cooked_read_value): Remove, update
5941 callers to use readable_regcache::cooked_read_value.
5942 * regcache.c (regcache_cooked_read_value): Remove.
5943
5944 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5945
5946 * regcache.h (regcache_cooked_write): Remove, update callers to
5947 use regcache::cooked_write.
5948 * regcache.c (regcache_cooked_write): Remove.
5949
5950 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5951
5952 * regcache.h (regcache_invalidate): Remove, update callers to
5953 use detached_regcache::invalidate instead.
5954 * regcache.c (regcache_invalidate): Remove.
5955
5956 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5957
5958 * regcache.h (regcache_raw_write_part): Remove, update callers
5959 to use regcache::raw_write_part instead.
5960 * regcache.c (regcache_raw_write_part): Remove.
5961
5962 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5963
5964 * regcache.h (regcache_raw_read_part): Remove, update callers to
5965 use readable_regcache::raw_read_part instead.
5966 * regcache.c (regcache_raw_read_part): Remove.
5967
5968 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5969
5970 * regcache.h (regcache_cooked_read): Remove, update callers to
5971 use readable_regcache::cooked_read instead.
5972 * regcache.c (regcache_cooked_read): Remove.
5973
5974 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5975
5976 * regcache.h (regcache_raw_write): Remove, update callers to use
5977 regcache::raw_write instead.
5978 * regcache.c (regcache_raw_write): Remove.
5979
5980 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5981
5982 * regcache.h (regcache_raw_read): Remove, update callers to use
5983 readable_regcache::raw_read instead.
5984 * regcache.c (regcache_raw_read): Remove.
5985
5986 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5987
5988 * regcache.h (regcache_raw_update): Remove, update callers to
5989 use readable_regcache::raw_update instead.
5990 * regcache.c (regcache_raw_update): Remove.
5991
5992 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5993
5994 * regcache.h (regcache_register_status): Remove, update callers
5995 to use reg_buffer::get_register_status directly instead.
5996 * regcache.c (regcache_register_status): Remove.
5997
5998 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5999
6000 * regcache.h (regcache_get_ptid): Remove, update all callers to
6001 call regcache::ptid instead.
6002 * regcache.c (regcache_get_ptid): Remove.
6003
6004 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6005
6006 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6007
6008 2018-05-30 Pedro Alves <palves@redhat.com>
6009
6010 * common/common-exceptions.h (exception_rethrow): Use
6011 ATTRIBUTE_NORETURN.
6012
6013 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6014
6015 * breakpoint.c (print_solib_event, check_status_catch_solib):
6016 Remove struct keyword in range-based for loops.
6017 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6018 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6019 Likewise.
6020 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6021 Likewise.
6022 * symfile.c (addr_info_make_relative): Likewise.
6023 * thread.c (value_in_thread_stack_temporaries): Likewise.
6024
6025 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6026
6027 PR gdb/16841
6028 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6029 aggregate type to get its real type before accessing it.
6030
6031 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6032
6033 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6034 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6035 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6036 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6037 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6038 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6039 * printcmd.c (info_address_command): Likewise.
6040
6041 2018-05-29 Tom Tromey <tom@tromey.com>
6042
6043 * windows-nat.c (handle_exception): Update fall-through comment.
6044
6045 2018-05-29 Tom Tromey <tom@tromey.com>
6046
6047 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6048 (struct program_space) <added_solibs>: Now a std::vector.
6049 * breakpoint.c (print_solib_event): Update.
6050 (check_status_catch_solib): Update.
6051 * progspace.c (clear_program_space_solib_cache): Update.
6052 * solib.c (update_solib_list): Update.
6053
6054 2018-05-29 Tom Tromey <tom@tromey.com>
6055
6056 * python/py-type.c (typy_richcompare): Update.
6057 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6058 * gdbtypes.h (types_deeply_equal): Return bool.
6059 (types_equal): Likewise.
6060 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6061 declare VEC.
6062 (check_types_equal): Change worklist to std::vector. Return
6063 bool.
6064 (struct type_equality_entry): Add constructor.
6065 (compare_maybe_null_strings): Return bool.
6066 (check_types_worklist): Return bool. Change worklist to
6067 std::vector.
6068 (types_deeply_equal): Use std::vector.
6069 (types_equal): Return bool.
6070 (compare_maybe_null_strings): Simplify.
6071
6072 2018-05-29 Tom Tromey <tom@tromey.com>
6073
6074 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6075
6076 2018-05-29 Tom Tromey <tom@tromey.com>
6077
6078 * objc-lang.h: Don't include cp-support.h.
6079 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6080 declare VEC.
6081
6082 2018-05-27 Tom Tromey <tom@tromey.com>
6083
6084 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6085
6086 2018-05-25 Tom Tromey <tom@tromey.com>
6087
6088 * value.c (value::location): Initialize.
6089
6090 2018-05-25 Tom Tromey <tom@tromey.com>
6091
6092 * dbxread.c (init_bincl_list): Remove.
6093 (bincl_list): Now a std::vector.
6094 (bincls_allocated, next_bincl): Remove.
6095 (free_bincl_list, do_free_bincl_list_cleanup)
6096 (make_cleanup_free_bincl_list): Remove.
6097 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6098 unique_xmalloc_ptr.
6099 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6100 (struct header_file_location): Add constructor.
6101 (add_bincl_to_list): Remove.
6102
6103 2018-05-25 Tom Tromey <tom@tromey.com>
6104
6105 * tui/tui.c (tui_enable): Update.
6106 * mi/mi-interp.c (mi_interp::init): Update.
6107 * interps.h (class interp) <name>: New method.
6108 <m_name>: Rename from name.
6109 (~scoped_restore_interp): Update.
6110 * interps.c (interp::interp): Update.
6111 (interp_add, interp_set, interp_lookup_existing)
6112 (current_interp_named_p): Update.
6113
6114 2018-05-25 Tom Tromey <tom@tromey.com>
6115
6116 * interps.c (interp_name): Remove.
6117 * mi/mi-interp.c (mi_interp::init): Update.
6118 * interps.h (interp_name): Remove.
6119 (~scoped_restore_interp): Update.
6120 * tui/tui.c (tui_enable): Update.
6121
6122 2018-05-25 Tom Tromey <tom@tromey.com>
6123
6124 * utils.c (fputs_maybe_filtered): Update.
6125 * linespec.c (decode_line_full): Update.
6126 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6127 (mi_print_breakpoint_for_event, mi_solib_loaded)
6128 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6129 (mi_user_selected_context_changed): Update.
6130 * mi/mi-main.c (mi_execute_command): Update.
6131 * cli/cli-script.c (execute_control_command): Update.
6132 * python/python.c (execute_gdb_command): Update.
6133 * solib.c (info_sharedlibrary_command): Update.
6134 * interps.c (interp_ui_out): Remove.
6135 * interps.h (interp_ui_out): Remove.
6136
6137 2018-05-25 Tom Tromey <tom@tromey.com>
6138
6139 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6140 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6141 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6142
6143 2018-05-25 Tom Tromey <tom@tromey.com>
6144
6145 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6146 * interps.c (interp_exec): Use scoped_restore.
6147
6148 2018-05-25 Tom Tromey <tom@tromey.com>
6149
6150 * remote.c (remote_target::remote_file_get): Use
6151 gdb::byte_vector.
6152 (remote_target::remote_file_put): Likewise.
6153
6154 2018-05-25 Tom Tromey <tom@tromey.com>
6155
6156 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6157 a std::string.
6158 (get_pe_section_index, add_pe_exported_sym): Update.
6159 (read_pe_exported_syms): Use gdb::def_vector.
6160
6161 2018-05-25 Tom Tromey <tom@tromey.com>
6162
6163 * frame.c (remove_prev_frame): Remove.
6164 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6165
6166 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6167
6168 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6169 Remove prototypes.
6170 * mips-linux-nat.c (supply_fpregset): Always call
6171 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6172 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6173 `mips_fill_fpregset'.
6174 * mips-linux-tdep.c (mips_supply_fpregset)
6175 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6176 (mips_fill_fpregset_wrapper): Remove functions.
6177 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6178 (mips_linux_fpregset): Remove variable.
6179 (mips_linux_iterate_over_regset_sections): Use
6180 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6181 (mips_linux_o32_sigframe_init): Remove comment.
6182
6183 2018-05-25 Pedro Alves <palves@redhat.com>
6184
6185 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6186 (struct readahead_cache, struct packet_reg, struct
6187 remote_arch_state, class remote_state): Move higher up in the
6188 file.
6189 (remote_target::m_remote_state): Now an object instead of a pointer.
6190 (remote_target::get_remote_state): Adjust.
6191
6192 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6193
6194 * stack.c (select_and_print_frame): Delete.
6195 (struct function_bounds): Move struct within function.
6196 (func_command): Most content moved into new function
6197 find_frame_for_function, use new function, print result, add
6198 function comment.
6199 (find_frame_for_function): New function, now returns a result.
6200
6201 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6202
6203 * stack.c (iterate_over_block_arg_vars): Fix comment.
6204 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6205
6206 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6207
6208 PR gdb/23203
6209 * frame.c
6210 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6211 Define.
6212 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6213 Define.
6214 * frame.h (class scoped_restore_selected_frame): New class.
6215 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6216 of any exception, use scoped_restore_selected_frame to restore the
6217 frame instead.
6218
6219 2018-05-24 Pedro Alves <palves@redhat.com>
6220
6221 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6222 override.
6223
6224 2018-05-23 Tom Tromey <tom@tromey.com>
6225
6226 * complaints.c (struct complaints): Remove.
6227 (symfile_complaint_book): Remove.
6228 (series): New global.
6229 (complaint_internal): Update.
6230 (clear_complaints): Update.
6231
6232 2018-05-23 Tom Tromey <tom@tromey.com>
6233
6234 * complaints.c (counters): New global.
6235 (struct complain): Remove.
6236 (struct complaints) <root>: Remove.
6237 (complaint_sentinel): Remove.
6238 (symfile_complaint_book): Update.
6239 (find_complaint) Remove.
6240 (complaint_internal, clear_complaints): Update.
6241
6242 2018-05-23 Tom Tromey <tom@tromey.com>
6243
6244 * complaints.c (struct complain) <file, line>: Remove.
6245 (find_complaint): Remove file, line parameters.
6246 (complaint_internal): Update.
6247
6248 2018-05-23 Tom Tromey <tom@tromey.com>
6249
6250 * complaints.c (vcomplaint): Remove.
6251 (complaint_internal) Merge in contents of vcomplaint.
6252
6253 2018-05-23 Tom Tromey <tom@tromey.com>
6254
6255 * complaints.c (struct complaints) <explanation>: Remove.
6256 (symfile_explanations): Remove.
6257 (symfile_complaint_book): Update.
6258 (vcomplaint): Update.
6259 (struct explanation): Remove.
6260
6261 2018-05-23 Tom Tromey <tom@tromey.com>
6262
6263 * complaints.c (symfile_complaints): Remove.
6264 (complaint_internal): Remove "complaints" parameter.
6265 (clear_complaints, vcomplaint): Remove "c" parameter.
6266 (get_complaints): Remove.
6267 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6268 (dwarf2_debug_line_missing_file_complaint)
6269 (dwarf2_debug_line_missing_end_sequence_complaint)
6270 (dwarf2_complex_location_expr_complaint)
6271 (dwarf2_const_value_length_mismatch_complaint)
6272 (dwarf2_section_buffer_overflow_complaint)
6273 (dwarf2_macro_malformed_definition_complaint)
6274 (dwarf2_invalid_attrib_class_complaint)
6275 (create_addrmap_from_index, dw2_symtab_iter_next)
6276 (dw2_expand_marked_cus)
6277 (dw2_debug_names_iterator::find_vec_in_debug_names)
6278 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6279 (create_debug_type_hash_table, init_cutu_and_read_dies)
6280 (partial_die_parent_scope, add_partial_enumeration)
6281 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6282 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6283 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6284 (create_cus_hash_table, create_dwp_hash_table)
6285 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6286 (dwarf2_rnglists_process, dwarf2_ranges_process)
6287 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6288 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6289 (handle_struct_member_die, process_structure_scope)
6290 (read_array_type, read_common_block, read_module_type)
6291 (read_tag_pointer_type, read_typedef, read_base_type)
6292 (read_subrange_type, load_partial_dies, partial_die_info::read)
6293 (partial_die_info::read, partial_die_info::read)
6294 (partial_die_info::read, read_checked_initial_length_and_offset)
6295 (dwarf2_string_attr, read_formatted_entries)
6296 (dwarf_decode_line_header)
6297 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6298 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6299 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6300 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6301 (get_signatured_type, get_DW_AT_signature_type)
6302 (decode_locdesc, file_file_name, consume_improper_spaces)
6303 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6304 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6305 (dwarf2_symbol_mark_computed, set_die_type)
6306 (read_attribute_value): Update.
6307 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6308 Update.
6309 * dbxread.c (unknown_symtype_complaint)
6310 (lbrac_mismatch_complaint, repeated_header_complaint)
6311 (set_namestring, function_outside_compilation_unit_complaint)
6312 (read_dbx_symtab, process_one_symbol): Update.
6313 * gdbtypes.c (stub_noname_complaint): Update.
6314 * windows-nat.c (handle_unload_dll): Update.
6315 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6316 (decode_base_type): Update.
6317 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6318 (eb_complaint, record_include_begin, record_include_end)
6319 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6320 (process_xcoff_symbol, read_symbol)
6321 (function_outside_compilation_unit_complaint)
6322 (scan_xcoff_symtab): Update.
6323 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6324 * buildsym.c (finish_block_internal, make_blockvector)
6325 (end_symtab_get_static_block, augment_type_symtab): Update.
6326 * dtrace-probe.c (dtrace_process_dof)
6327 (dtrace_static_probe_ops::get_probes): Update.
6328 * complaints.h (struct complaint): Don't declare.
6329 (symfile_complaints): Remove.
6330 (complaint_internal): Remove "complaints" parameter.
6331 (complaint): Likewise.
6332 (clear_complaints): Likewise.
6333 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6334 (reread_symbols): Update.
6335 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6336 (dwarf2_frame_cache, decode_frame_entry): Update.
6337 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6338 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6339 (info_selectors_command): Update.
6340 * macrotab.c (macro_include, check_for_redefinition)
6341 (macro_undef): Update.
6342 * objfiles.c (filter_overlapping_sections): Update.
6343 * stabsread.c (invalid_cpp_abbrev_complaint)
6344 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6345 (define_symbol, error_type, read_type, rs6000_builtin_type)
6346 (stabs_method_name_from_physname, read_member_functions)
6347 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6348 (attach_fields_to_type, complain_about_struct_wipeout)
6349 (read_range_type, read_args, common_block_start)
6350 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6351 Update.
6352 * mdebugread.c (index_complaint, unknown_ext_complaint)
6353 (basic_type_complaint, bad_tag_guess_complaint)
6354 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6355 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6356 (parse_procedure, parse_lines)
6357 (function_outside_compilation_unit_complaint)
6358 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6359 (bad_tag_guess_complaint, reg_value_complaint): Update.
6360 * cp-support.c (demangled_name_complaint): Update.
6361 * macroscope.c (sal_macro_scope): Update.
6362 * dwarf-index-write.c (class debug_names): Update.
6363
6364 2018-05-23 Tom Tromey <tom@tromey.com>
6365
6366 * complaints.c (clear_complaints): Remove "noisy" parameter.
6367 * complaints.h (clear_complaints): Update.
6368 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6369 (reread_symbols): Update.
6370
6371 2018-05-23 Tom Tromey <tom@tromey.com>
6372
6373 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6374 SUBSEQUENT_MESSAGE.
6375 (vcomplaint, clear_complaints): Update.
6376 (symfile_explanations): Remove some messages.
6377
6378 2018-05-23 Tom Tromey <tom@tromey.com>
6379
6380 * complaints.c (internal_complaint): Remove.
6381 * complaints.h (internal_complaint): Remove.
6382
6383 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6384
6385 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6386
6387 2018-05-22 Pedro Alves <palves@redhat.com>
6388
6389 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6390 (remote_fileio_badfd, remote_fileio_return_errno)
6391 (remote_fileio_return_success, remote_fileio_func_open)
6392 (remote_fileio_func_open, remote_fileio_func_close)
6393 (remote_fileio_func_read, remote_fileio_func_write)
6394 (remote_fileio_func_lseek, remote_fileio_func_rename)
6395 (remote_fileio_func_unlink, remote_fileio_func_stat)
6396 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6397 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6398 remote_target parameter.
6399 (remote_fio_func_map) <func>: Add remote_target parameter.
6400 (do_remote_fileio_request, remote_fileio_request):
6401 * remote-fileio.h (remote_fileio_request):
6402 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6403 remote_target parameter.
6404 (remote_notif_process, handle_notification): Adjust to pass down
6405 the remote.
6406 (remote_notif_state_allocate): Add remote_target parameter. Save
6407 it.
6408 * remote-notif.h (struct remote_target): Forward declare.
6409 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6410 remote_target parameter.
6411 (struct remote_notif_state) <remote>: New field.
6412 (remote_notif_ack, remote_notif_parse): Add remote_target
6413 parameter.
6414 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6415 remote_target parameter.
6416 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6417 (threads_listing_context, rmt_thread_action, protocol_feature)
6418 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6419 (packet_result, struct threads_listing_context, remote_state):
6420 Move definitions and declarations higher up.
6421 (remote_target) <~remote_target>: Declare.
6422 (remote_download_command_source, remote_file_put, remote_file_get)
6423 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6424 (remote_hostio_pread_vFile, remote_hostio_send_command)
6425 (remote_hostio_set_filesystem, remote_hostio_open)
6426 (remote_hostio_close, remote_hostio_unlink, remote_state)
6427 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6428 (get_memory_write_packet_size, get_memory_read_packet_size)
6429 (append_pending_thread_resumptions, remote_detach_1)
6430 (append_resumption, remote_resume_with_vcont)
6431 (add_current_inferior_and_thread, wait_ns, wait_as)
6432 (process_stop_reply, remote_notice_new_inferior)
6433 (process_initial_stop_replies, remote_add_thread)
6434 (btrace_sync_conf, remote_btrace_maybe_reopen)
6435 (remove_new_fork_children, kill_new_fork_children)
6436 (discard_pending_stop_replies, stop_reply_queue_length)
6437 (check_pending_events_prevent_wildcard_vcont)
6438 (discard_pending_stop_replies_in_queue, stop_reply)
6439 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6440 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6441 (remote_interrupt_as, remote_interrupt_ns)
6442 (remote_get_noisy_reply, remote_query_attached)
6443 (remote_add_inferior, remote_current_thread, get_current_thread)
6444 (set_thread, set_general_thread, set_continue_thread)
6445 (set_general_process, write_ptid)
6446 (remote_unpack_thread_info_response, remote_get_threadinfo)
6447 (parse_threadlist_response, remote_get_threadlist)
6448 (remote_threadlist_iterator, remote_get_threads_with_ql)
6449 (remote_get_threads_with_qxfer)
6450 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6451 (get_offsets, remote_check_symbols, remote_supported_packet)
6452 (remote_query_supported, remote_packet_size)
6453 (remote_serial_quit_handler, remote_detach_pid)
6454 (remote_vcont_probe, remote_resume_with_hc)
6455 (send_interrupt_sequence, interrupt_query)
6456 (remote_notif_get_pending_events, fetch_register_using_p)
6457 (send_g_packet, process_g_packet, fetch_registers_using_g)
6458 (store_register_using_P, store_registers_using_G)
6459 (set_remote_traceframe, check_binary_download)
6460 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6461 (remote_xfer_live_readonly_partial, remote_read_bytes)
6462 (remote_send_printf, remote_flash_write, readchar)
6463 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6464 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6465 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6466 (extended_remote_disable_randomization, extended_remote_run)
6467 (send_environment_packet, extended_remote_environment_support)
6468 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6469 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6470 (packet_command): Now methods of ...
6471 (remote_target): ... this class.
6472 (m_remote_state) <remote_target>: New field.
6473 (struct remote_state) <stop_reply_queue,
6474 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6475 fields.
6476 (remote_state::remote_state): Allocate stop_reply_queue.
6477 (remote_state): Delete global.
6478 (get_remote_state_raw): Delete.
6479 (remote_target::get_remote_state): Allocate m_remote_state on
6480 demand.
6481 (get_current_remote_target): New.
6482 (remote_ops, extended_remote_ops): Delete.
6483 (wait_forever_enabled_p, remote_async_inferior_event_token):
6484 Delete, moved to struct remote_state.
6485 (remote_target::close): Delete self. Destruction bits split to
6486 ...
6487 (remote_target::~remote_target): ... this.
6488 (show_memory_packet_size): Adjust to use
6489 get_current_remote_target.
6490 (struct protocol_feature) <func>: Add remote_target parameter.
6491 All callers adjusted.
6492 (curr_quit_handler_target): New.
6493 (remote_serial_quit_handler): Reimplement.
6494 (remote_target::open_1): Adjust to use get_current_remote_target.
6495 Heap-allocate remote_target/extended_remote_target instances.
6496 (vcont_builder::vcont_builder): Add remote_target parameter, and
6497 save it in m_remote. All callers adjusted.
6498 (vcont_builder::m_remote): New field.
6499 (vcont_builder::restart, vcont_builder::flush)
6500 (vcont_builder::push_action): Use it.
6501 (remote_target::commit_resume): Use it.
6502 (struct queue_iter_param) <remote>: New field.
6503 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6504 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6505 (check_pending_event_prevents_wildcard_vcont_callback)
6506 (remote_target::check_pending_events_prevent_wildcard_vcont)
6507 (remote_target::discard_pending_stop_replies)
6508 (remote_target::discard_pending_stop_replies_in_queue)
6509 (remote_target::remote_notif_remove_queued_reply): Fill in
6510 'remote' field.
6511 (remote_notif_get_pending_events): New.
6512 (remote_target::readchar, remote_target::remote_serial_write):
6513 Save/restore curr_quit_handler_target.
6514 (putpkt): New.
6515 (kill_new_fork_children): Fill in 'remote' field.
6516 (packet_command): Use get_current_remote_target, defer to
6517 remote_target method of same name.
6518 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6519 parameter, and save it in m_remote. All callers adjusted.
6520 (scoped_remote_fd::release): Use m_remote.
6521 (scoped_remote_fd::m_remote): New field.
6522 (remote_file_put, remote_file_get, remote_file_delete): Use
6523 get_current_remote_target, defer to remote_target method of same
6524 name.
6525 (remote_btrace_reset): Add remote_state paremeter. Update all
6526 callers.
6527 (remote_async_inferior_event_handler). Pass down 'data'.
6528 (remote_new_objfile): Use get_current_remote_target.
6529 (remote_target::vcont_r_supported): New.
6530 (set_range_stepping): Use get_current_remote_target and
6531 remote_target::vcont_r_supported.
6532 (_initialize_remote): Don't allocate 'remote_state' and
6533 'stop_reply_queue' globals.
6534 * remote.h (struct remote_target): Forward declare.
6535 (getpkt, putpkt, remote_notif_get_pending_events): Add
6536 'remote_target' parameter.
6537
6538 2018-05-22 Pedro Alves <palves@redhat.com>
6539
6540 * remote.c (vcont_builder): Now a class. Make all data members
6541 private.
6542 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6543 Declare methods.
6544 (vcont_builder_restart): Rename to ...
6545 (vcont_builder::restart): ... this.
6546 (vcont_builder_flush): Rename to ...
6547 (vcont_builder::flush): ... this.
6548 (vcont_builder_push_action): Rename to ...
6549 (vcont_builder::push_action): ... this.
6550 (remote_target::commit_resume): Adjust.
6551
6552 2018-05-22 Pedro Alves <palves@redhat.com>
6553
6554 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6555 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6556 (get_fixed_memory_packet_size): New.
6557 (get_memory_packet_size): Use it.
6558 (set_memory_packet_size): Don't override the config size with
6559 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6560 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6561 Don't refer to get_memory_packet_size if not connected to a remote
6562 target. Show "(default)" if configured size is 0.
6563
6564 2018-05-22 Pedro Alves <palves@redhat.com>
6565
6566 * remote.c (remote_target::mourn_inferior): Move
6567 discard_pending_stop_replies call here from ...
6568 (_initialize_remote): ... here.
6569
6570 2018-05-22 Pedro Alves <palves@redhat.com>
6571
6572 * remote.c (compare_section_command): Remove set_general_process
6573 call.
6574
6575 2018-05-22 Pedro Alves <palves@redhat.com>
6576
6577 * remote.c (struct packet_reg, struct remote_arch_state):
6578 Move higher up in the file.
6579 (remote_state) <m_arch_states>: Store remote_arch_state values
6580 instead of remote_arch_state pointers.
6581 (remote_state::get_remote_arch_state): Adjust.
6582
6583 2018-05-22 Pedro Alves <palves@redhat.com>
6584
6585 * remote.c: Include <unordered_map>.
6586 (remote_state): Now a class.
6587 (remote_state) <get_remote_arch_state>: Declare method.
6588 <get_remote_arch_state>: New field.
6589 (remote_arch_state) <remote_arch_state>: Declare ctor.
6590 <regs>: Now a unique_ptr.
6591 (remote_gdbarch_data_handle): Delete.
6592 (get_remote_arch_state): Delete.
6593 (remote_state::get_remote_arch_state): New.
6594 (get_remote_state): Adjust to call remote_state's
6595 get_remote_arch_state method.
6596 (init_remote_state): Delete, bits factored out to ...
6597 (remote_arch_state::remote_arch_state): ... this new method.
6598 (get_remote_packet_size, get_memory_packet_size)
6599 (process_g_packet, remote_target::fetch_registers)
6600 (remote_target::prepare_to_store, store_registers_using_G)
6601 (remote_target::store_registers, remote_target::get_trace_status):
6602 Adjust to call remote_state's method.
6603 (_initialize_remote): Remove reference to
6604 remote_gdbarch_data_handle.
6605
6606 2018-05-22 Pedro Alves <palves@redhat.com>
6607
6608 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6609 pread>: New method declarations.
6610 (remote_target::open_1): Adjust.
6611 (readahead_cache_invalidate): Rename to ...
6612 (readahead_cache::invalidate): ... this, and adjust to be a class
6613 method.
6614 (readahead_cache_invalidate_fd): Rename to ...
6615 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6616 class method.
6617 (remote_hostio_pwrite): Adjust.
6618 (remote_hostio_pread_from_cache): Rename to ...
6619 (readahead_cache::pread): ... this, and adjust to be a class
6620 method.
6621 (remote_hostio_close): Adjust.
6622
6623 2018-05-22 Pedro Alves <palves@redhat.com>
6624
6625 * remote.c (remote_hostio_close_cleanup): Delete.
6626 (class scoped_remote_fd): New.
6627 (remote_file_put, remote_file_get): Use it.
6628
6629 2018-05-22 Pedro Alves <palves@redhat.com>
6630
6631 (struct vCont_action_support): Use bool and initialize all fields.
6632 (struct readahead_cache): Initialize all fields.
6633 (remote_state): Use bool and initialize all fields.
6634 (remote_state::remote_state, remote_state::~remote_state): New.
6635 (new_remote_state): Delete.
6636 (_initialize_remote): Use new to allocate remote_state.
6637
6638 2018-05-22 Pedro Alves <palves@redhat.com>
6639 張俊芝 <zjz@zjz.name>
6640
6641 PR gdb/22973
6642 * c-exp.y: Include "c-support.h".
6643 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6644 of tolower. Use c_ident_is_alpha to scan names.
6645 * c-lang.c: Include "c-support.h".
6646 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6647 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6648 * c-support.h: New file, with bits factored out from ...
6649 * cp-name-parser.y: ... this file.
6650 Include "c-support.h".
6651 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6652 c-support.h and renamed.
6653 (symbol_end, yylex): Adjust.
6654
6655 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6656
6657 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6658 parameter type to CORE_ADDR.
6659 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6660 parameter type in declaration to CORE_ADDR.
6661 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6662 target_auxv_search to get AT_HWCAP and use the result to get the
6663 target description.
6664 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6665 to CORE_ADDR. Remove the cast of the return value to unsigned
6666 long. Fix error predicate of target_auxv_search.
6667 (ppc_linux_nat_target::read_description): Change the type of the
6668 hwcap variable to CORE_ADDR.
6669
6670 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6671
6672 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6673 if the size of fpscr is larger than 32 bits.
6674
6675 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6676
6677 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6678 (ppc32_linux_vsxregmap): New global.
6679 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6680 regcache_supply_regset, and regcache_collect_regset.
6681 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6682 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6683 (fetch_vsx_register, store_vsx_register): Remove.
6684 (fetch_vsx_registers): Add regno parameter. Get regset using
6685 ppc_linux_vsxregset. Use regset to supply registers.
6686 (store_vsx_registers): Add regno parameter. Get regset using
6687 ppc_linux_vsxregset. Use regset to collect registers.
6688 (fetch_register): Call fetch_vsx_registers instead of
6689 fetch_vsx_register.
6690 (store_register): Call store_vsx_registers instead of
6691 store_vsx_register.
6692 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6693 new regno parameter.
6694 (store_ppc_registers): Call store_vsx_registers with -1 for the
6695 new regno parameter.
6696 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6697 (ppc_collect_vsxregset): Remove.
6698
6699 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6700
6701 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6702 offset fields.
6703 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6704 for vector register offset fields.
6705 (ppc64_fbsd_reg_offsets): Likewise.
6706 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6707 to vector register offset fields.
6708 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6709 to vector register offset fields.
6710 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6711 vector register offset fields.
6712 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6713 initializers for vector register offset fields.
6714 (rs6000_aix64_reg_offsets): Likewise.
6715 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6716 (ppc_supply_vrregset): Remove.
6717 (ppc_collect_vrregset): Remove.
6718 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6719 (ppc_linux_vrregset) : New function.
6720 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6721 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6722 (ppc32_linux_vrregset): Remove.
6723 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6724 and use result instead of ppc32_linux_vrregset.
6725 (ppc32_linux_reg_offsets): Remove initializers for vector register
6726 offset fields.
6727 (ppc64_linux_reg_offsets): Likewise.
6728 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6729 * ppc-linux-nat.c: Include regset.h.
6730 (gdb_vrregset_t): Adjust comment to account for little-endian
6731 mode.
6732 (supply_vrregset, fill_vrregset): Remove.
6733 (fetch_altivec_register, store_altivec_register): Remove.
6734 (fetch_altivec_registers): Add regno parameter. Get regset using
6735 ppc_linux_vrregset. Use regset to supply registers.
6736 (store_altivec_registers): Add regno parameter. Get regset using
6737 ppc_linux_vrregset. Use regset to collect registers.
6738 (fetch_register): Call fetch_altivec_registers instead of
6739 fetch_altivec_register.
6740 (store_register): Call store_altivec_registers instead of
6741 store_altivec_register.
6742 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6743 the new regno parameter.
6744 (store_ppc_registers): Call store_altivec_registers with -1 for
6745 the new regno parameter.
6746
6747 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6748
6749 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6750 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6751 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6752 (gdb_vrregset_t): Change array type size to
6753 PPC_LINUX_SIZEOF_VRREGSET.
6754 (gdb_vsxregset_t): Change array type size to
6755 PPC_LINUX_SIZEOF_VSXREGSET.
6756 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6757 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6758 PPC_LINUX_SIZEOF_VSXREGSET.
6759
6760 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6761
6762 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6763 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6764 nat/ppc-linux.c.
6765 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6766 ppc_linux_target_wordsize with tid.
6767 (ppc_linux_nat_target::read_description): Call ppc_linux_target
6768 wordsize with tid.
6769 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6770 (ppc64_64bit_inferior_p): Add static and inline specifiers.
6771 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6772 tid parameter. Remove static specifier.
6773 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6774 (ppc_linux_target_wordsize): New declaration.
6775
6776 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6777
6778 * arch/ppc-linux-common.c: New file.
6779 * arch/ppc-linux-common.h: New file.
6780 * arch/ppc-linux-tdesc.h: New file.
6781 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6782 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6783 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6784 arch/ppc-linux-tdesc.h.
6785 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6786 arch/ppc-linux-tdesc.h.
6787 (ppc_linux_nat_target::read_description): Remove target
6788 description matching code. Fill a ppc_linux_features struct and
6789 call ppc_linux_match_description with it. Move comment about ISA
6790 2.05 to ppc-linux-common.c.
6791 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6792 arch/ppc-linux-tdesc.h.
6793 (ppc_linux_core_read_description): Remove target description
6794 matching code. Fill a ppc_linux_features struct and call
6795 ppc_linux_match_description with it.
6796 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6797 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6798 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6799 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6800 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6801 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6802 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6803 (tdesc_powerpc_e500l): Remove.
6804
6805 2018-05-22 Joel Brobecker <brobecker@adacore.com>
6806
6807 * ada-lang.c (catch_assert_command): Pass empty string instead
6808 of NULL for excep_string argument.
6809
6810 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6811
6812 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6813 the width of the requested register exceeds the width of the
6814 `ptrace' data type.
6815
6816 2018-05-21 Tom Tromey <tom@tromey.com>
6817
6818 * printcmd.c (output_command): Remove.
6819 (output_command_const): Rename to output_command.
6820 * valprint.h (output_command): Rename from output_command_const.
6821 * tracepoint.c (trace_dump_actions): Call output_command.
6822
6823 2018-05-21 Tom Tromey <tom@tromey.com>
6824
6825 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6826 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6827 * ada-lang.h (create_ada_exception_catchpoint): Update.
6828 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6829 std::string.
6830 (create_excep_cond_exprs, ~ada_catchpoint)
6831 (should_stop_exception, print_one_exception)
6832 (print_mention_exception, print_recreate_exception): Update.
6833 (ada_get_next_arg): Remove.
6834 (catch_ada_exception_command_split): Use std::string. Change type
6835 of "excep_string", "cond_string".
6836 (catch_ada_exception_command): Update.
6837 (create_ada_exception_catchpoint): Change type of excep_string.
6838 (ada_exception_sal): Remove excep_string parameter.
6839 (~ada_catchpoint): Remove.
6840
6841 2018-05-21 Tom Tromey <tom@tromey.com>
6842
6843 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6844 cleanup.
6845
6846 2018-05-21 Tom Tromey <tom@tromey.com>
6847
6848 * ada-lang.c (ada_exception_message_1, ada_exception_message):
6849 Return unique_xmalloc_ptr.
6850 (print_it_exception): Update.
6851
6852 2018-05-21 Tom Tromey <tom@tromey.com>
6853
6854 * tracepoint.c (trace_dump_actions): Use std::string.
6855
6856 2018-05-21 Tom Tromey <tom@tromey.com>
6857
6858 * symfile.c (reread_symbols): Use std::string for original_name.
6859
6860 2018-05-21 Tom Tromey <tom@tromey.com>
6861
6862 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6863 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
6864 constructor.
6865
6866 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
6867
6868 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6869 instance to...
6870 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6871 * objfiles.c (get_objfile_bfd_data): Allocate
6872 objfile_per_bfd_storage with obstack_new when allocating on
6873 obstack.
6874
6875 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6876
6877 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6878 OBSTACK_ZALLOC.
6879 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6880 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6881 * mdebugread.c (mdebug_build_psymtabs): Likewise.
6882 (add_pending): Likewise.
6883 (parse_symbol): Likewise.
6884 (parse_partial_symbols): Likewise.
6885 (psymtab_to_symtab_1): Likewise.
6886 (new_psymtab): Likewise.
6887 (elfmdebug_build_psymtabs): Likewise.
6888 * minsyms.c (terminate_minimal_symbol_table): Likewise.
6889 * objfiles.c (get_objfile_bfd_data): Likewise.
6890 (objfile_register_static_link): Likewise.
6891 * psymtab.c (allocate_psymtab): Likewise.
6892 * stabsread.c (read_member_functions): Likewise.
6893 * xcoffread.c (xcoff_end_psymtab): Likewise.
6894
6895 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6896
6897 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6898 compiler supports std::is_trivially_constructible.
6899 * common/poison.h: Include obstack.h.
6900 (IsMallocable): Define to is_trivially_constructible if the
6901 compiler supports it, define to true_type otherwise.
6902 (xobnew): New.
6903 (XOBNEW): Redefine.
6904 (xobnewvec): New.
6905 (XOBNEWVEC): Redefine.
6906 * gdb_obstack.h (obstack_zalloc): New.
6907 (OBSTACK_ZALLOC): Redefine.
6908 (obstack_calloc): New.
6909 (OBSTACK_CALLOC): Redefine.
6910 (obstack_new): New.
6911 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6912 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6913 gdbarch.c.
6914 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6915 obstack_calloc/obstack_zalloc.
6916 (gdbarch_obstack_zalloc): Remove.
6917 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6918
6919 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6920
6921 * stack.c (backtrace_command_1): Remove useless variable int i.
6922
6923 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6924
6925 * stack.c (print_frame_info): Fix comment.
6926
6927 2018-05-18 Tom Tromey <tom@tromey.com>
6928
6929 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6930 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6931 (~dwarf2_per_objfile): Update
6932 (dwarf2_get_dwz_file): Use new.
6933 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6934 unique_ptr.
6935
6936 2018-05-18 Tom Tromey <tom@tromey.com>
6937
6938 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6939 unique_ptr.
6940 * dwarf2read.c (struct dwp_file): Add constructor and
6941 initializers.
6942 (open_and_init_dwp_file): Return a unique_ptr.
6943 (dwarf2_per_objfile, create_dwp_hash_table)
6944 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6945 (lookup_dwo_unit_in_dwp): Update.
6946 (open_and_init_dwp_file, get_dwp_file): Update.
6947
6948 2018-05-18 Tom Tromey <tom@tromey.com>
6949
6950 * dwarf2read.c (dwarf2_per_objfile): Update.
6951 (struct mapped_index): Add initializers.
6952 (dwarf2_read_index): Use new.
6953 (dw2_symtab_iter_init): Update.
6954 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6955 unique_ptr.
6956
6957 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6958
6959 * dwarf2read.c (mapped_index) <total_size>: Remove.
6960
6961 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6962
6963 * unittests/format_pieces-selftests.c (test_format_specifier):
6964 Add ARI comments.
6965
6966 2018-05-18 Tom Tromey <tom@tromey.com>
6967
6968 * c-typeprint.c (maybe_print_hole): New function.
6969 (c_print_type_struct_field_offset): Update.
6970 (c_type_print_base_struct_union): Call maybe_print_hole.
6971
6972 2018-05-17 Keith Seitz <keiths@redhat.com>
6973
6974 * breakpoint.c (build_bpstat_chain): New function, moved from
6975 bpstat_stop_status.
6976 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6977 If no stop chain is passed, call build_bpstat_chain to build it.
6978 * breakpoint.h (build_bpstat_chain): Declare.
6979 (bpstat_stop_status): Move documentation here from breakpoint.c.
6980 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6981 build the stop chain and pass it to skip_inline_frames.
6982 Pass this stop chain to bpstat_stop_status.
6983 * inline-frame.c: Include breakpoint.h.
6984 (stopped_by_user_bp_inline_frame): New function.
6985 (skip_inline_frames): Add parameter `stop_chain'.
6986 Move documention to inline-frame.h.
6987 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6988 whether the frame should be elided.
6989 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6990 Add moved documentation and update for new parameter.
6991
6992 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6993
6994 PR cli/14975
6995 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6996 unittests/format_pieces-selftests.c.
6997 * common/format.h (format_piece) <operator==>: New.
6998 (format_pieces) <operator[]>: Remove.
6999 * common/format.c (format_pieces::format_pieces): Handle \e.
7000 * unittests/format_pieces-selftests.c: New.
7001
7002 2018-05-17 Tom Tromey <tom@tromey.com>
7003
7004 PR symtab/23010:
7005 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7006 (dw2_instantiate_symtab): Add skip_partial parameter.
7007 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7008 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7009 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7010 (dw2_expand_symtabs_matching_one)
7011 (dw2_find_pc_sect_compunit_symtab)
7012 (dw2_debug_names_lookup_symbol)
7013 (dw2_debug_names_expand_symtabs_for_function): Update.
7014 (init_cutu_and_read_dies): Add skip_partial parameter.
7015 (process_psymtab_comp_unit, build_type_psymtabs_1)
7016 (process_skeletonless_type_unit, load_partial_comp_unit)
7017 (psymtab_to_symtab_1): Update.
7018 (load_full_comp_unit): Add skip_partial parameter.
7019 (process_imported_unit_die, dwarf2_read_addr_index)
7020 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7021 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7022 (read_signatured_type): Update.
7023
7024 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7025
7026 * value.c (release_value): Remove unused variable.
7027 (record_latest_value): Likewise.
7028 (access_value_history): Likewise.
7029 (preserve_values): Likewise.
7030
7031 2018-05-17 Tom Tromey <tom@tromey.com>
7032
7033 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7034 Initialize.
7035
7036 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7037
7038 PR gdb/22286
7039 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7040 Also handle registers whose width is not a multiple of
7041 PTRACE_TYPE_RET.
7042 (linux_nat_trad_target::store_register): Likewise.
7043
7044 2018-05-16 Tom Tromey <tom@tromey.com>
7045
7046 * gdbcore.h (core_bfd): Redefine.
7047 * corelow.c (core_target::close): Update.
7048 (core_target_open): Update.
7049 * progspace.h (struct program_space) <cbfd>: Now a
7050 gdb_bfd_ref_ptr.
7051
7052 2018-05-16 Tom Tromey <tom@tromey.com>
7053
7054 PR cli/19551:
7055 * symfile-add-flags.h (enum symfile_add_flags)
7056 <SYMFILE_NOT_FILENAME>: New constant.
7057 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7058 objfile name from BFD.
7059 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7060 * minidebug.c (find_separate_debug_file_in_section): Put
7061 ".gnu_debugdata" into BFD's file name.
7062
7063 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7064
7065 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7066 Remove.
7067
7068 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7069
7070 PR binutils/21446
7071 * aarch64-tdep.c (aarch64_analyze_prologue,
7072 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7073 Indicate not interested in errors.
7074
7075 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7076
7077 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7078 Supply the MIPS_ZERO_REGNUM register.
7079
7080 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7081
7082 * mips-tdep.c (mask_address_var): Make variable static.
7083
7084 2018-05-14 Tom Tromey <tom@tromey.com>
7085
7086 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7087
7088 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7089
7090 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7091 FXSAVE_ADDR for the mxcsr register.
7092
7093 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7094
7095 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7096
7097 2018-05-11 Pedro Alves <palves@redhat.com>
7098
7099 * corelow.c (core_target) <core_target>: No longer inline.
7100 Initialize m_core_gdbarch, m_core_vec and build the section table
7101 here.
7102 <~core_target>: New.
7103 <core_gdbarch, get_core_register_section>: New methods.
7104 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7105 factored out from ...
7106 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7107 (core_ops): Delete.
7108 (sniff_core_bfd): Add gdbarch parameter.
7109 (core_close): Delete, merged into ...
7110 (core_target::close): ... here. Delete self.
7111 (core_close_cleanup): Delete.
7112 (core_target_open): Allocate a core_target on the heap. Use a
7113 unique_ptr instead of a cleanup. Bits moved into the core_target
7114 ctor. Adjust to use core_target methods instead of globals.
7115 (get_core_register_section): Rename to ...
7116 (core_target::get_core_register_section): ... this and adjust.
7117 (struct get_core_registers_cb_data): New.
7118 (get_core_registers_cb): Use it. Use bool.
7119 (core_target::fetch_registers, core_target::files_info)
7120 (core_target::xfer_partial, core_target::read_description)
7121 (core_target::pid_to, core_target::thread_name): Adjust to
7122 reference class fields instead of globals.
7123 * target.h (struct target_ops_deleter, target_ops_up): New.
7124
7125 2018-05-11 Pedro Alves <palves@redhat.com>
7126
7127 * corefile.c (core_file_command): Move to corelow.c.
7128 * corelow.c (the_core_target): Delete.
7129 (core_file_command): Moved from corefile.c. Check exec_bfd
7130 instead of the_core_target. Use target_detach instead of calling
7131 into the_core_target directly.
7132 (maybe_say_no_core_file_now): New.
7133 (core_target::detach): Use it.
7134 (_initialize_corelow): Remove references to the_core_target.
7135 * gdbcore.h (the_core_target): Delete.
7136
7137 2018-05-11 Tom Tromey <tromey@redhat.com>
7138 Pedro Alves <palves@redhat.com>
7139
7140 * corefile.c (core_bfd): Remove.
7141 * gdbcore.h (core_bfd): Now a macro.
7142 * progspace.h (struct program_space) <cbfd>: New field.
7143
7144 2018-05-11 Tom Tromey <tom@tromey.com>
7145
7146 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7147 gdb::def_vector.
7148
7149 2018-05-10 Tom Tromey <tom@tromey.com>
7150
7151 * configure: Rebuild.
7152 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7153
7154 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7155
7156 PR server/23158:
7157 * regformats/regdat.sh: Adjust script, following the addition
7158 of the new expedite_regs parameter to init_target_desc.
7159
7160 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7161
7162 PR gdb/23127
7163 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7164 set_gdbarch_significant_addr_bit.
7165 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7166 set_gdbarch_significant_addr_bit.
7167 * utils.c (address_significant): Update to sign extend addr.
7168
7169 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7170
7171 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7172 (xtensa_linux_init_abi): Limit tdep->num_regs by
7173 tdep->num_nopriv_regs.
7174 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7175 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7176 not initialized.
7177
7178 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7179
7180 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7181
7182 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7183
7184 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7185 (I387_MXCSR_INIT_VAL): New constant.
7186 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7187 buffer if it was supplied by the inferior.
7188 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7189 (i387_xsave_get_clear_bv): New function.
7190 (i387_supply_xsave): Only read x87 control registers from the
7191 xsave buffer if the feature is enabled, and the state will have
7192 been written, otherwise, provide a suitable default.
7193 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7194 including x87 control registers. Update control registers if they
7195 have changed from the default value, and mark features as enabled
7196 as required.
7197 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7198
7199 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7200
7201 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7202
7203 2018-05-07 Tom Tromey <tom@tromey.com>
7204
7205 * configure: Rebuild.
7206 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7207
7208 2018-05-07 Tom Tromey <tom@tromey.com>
7209
7210 PR tdep/20362:
7211 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7212 bit. Use correct value for VDIV.
7213
7214 2018-05-04 Tom Tromey <tom@tromey.com>
7215
7216 * configure: Rebuild.
7217 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7218
7219 2018-05-04 Tom Tromey <tom@tromey.com>
7220
7221 * linux-record.c (record_linux_system_call) <case
7222 RECORD_SYS_RECVFROM>: Add "break".
7223
7224 2018-05-04 Tom Tromey <tom@tromey.com>
7225
7226 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7227 Add missing "break".
7228 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7229 Add missing "break".
7230
7231 2018-05-04 Tom Tromey <tom@tromey.com>
7232
7233 * rs6000-tdep.c (ppc_process_record_op4)
7234 (ppc_process_record_op63): Add fall-through comment.
7235
7236 2018-05-04 Tom Tromey <tom@tromey.com>
7237
7238 * i386-tdep.c (i386_process_record): Add fall-through comment.
7239
7240 2018-05-04 Tom Tromey <tom@tromey.com>
7241
7242 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7243 comment.
7244
7245 2018-05-04 Tom Tromey <tom@tromey.com>
7246
7247 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7248 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7249 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7250 comment.
7251 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7252 comment.
7253 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7254 comment.
7255
7256 2018-05-04 Tom Tromey <tom@tromey.com>
7257
7258 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7259
7260 2018-05-04 Tom Tromey <tom@tromey.com>
7261
7262 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7263 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7264 * symfile.c (section_is_mapped): Fix fall-through comment.
7265 * stabsread.c (define_symbol, read_member_functions): Fix
7266 fall-through comment.
7267 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7268 comment.
7269 * remote.c (remote_wait_as): Fix fall-through comment.
7270 * p-exp.y (yylex): Fix fall-through comment.
7271 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7272 comment.
7273 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7274 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7275 * jv-exp.y (yylex): Fix fall-through comment.
7276 * go-exp.y (lex_one_token): Fix fall-through comment.
7277 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7278 fall-through comment.
7279 * f-exp.y (yylex): Fix fall-through comment.
7280 * dwarf2read.c (process_die): Fix fall-through comments.
7281 * dbxread.c (process_one_symbol): Fix fall-through comment.
7282 * d-exp.y (lex_one_token): Fix fall-through comment.
7283 * cp-name-parser.y (yylex): Fix fall-through comment.
7284 * coffread.c (coff_symtab_read): Fix fall-through comment.
7285 * c-exp.y (lex_one_token): Fix fall-through comment.
7286 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7287 comment.
7288 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7289 comment.
7290
7291 2018-05-04 Tom Tromey <tom@tromey.com>
7292
7293 PR python/22730:
7294 * NEWS: Mention gdb.execute change.
7295 * gdbcmd.h (execute_control_command): Don't declare.
7296 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7297 execute_control_commands, execute_control_commands_to_string.
7298 * cli/cli-script.h (execute_control_commands)
7299 (execute_control_commands_to_string): Declare.
7300 (execute_control_command): Add from_tty parameter.
7301 * cli/cli-script.c (execute_control_commands)
7302 (execute_control_commands_to_string): New functions.
7303 (execute_user_command): Use execute_control_commands.
7304 (execute_control_command_1): Add "from_tty" parameter. Update.
7305 (execute_control_command): Likewise.
7306
7307 2018-05-04 Tom Tromey <tom@tromey.com>
7308
7309 PR python/22731:
7310 * NEWS: Mention that breakpoint commands are writable.
7311 * python/py-breakpoint.c (bppy_set_commands): New function.
7312 (breakpoint_object_getset) <"commands">: Use it.
7313
7314 2018-05-04 Tom Tromey <tom@tromey.com>
7315
7316 * tracepoint.c (actions_command): Update.
7317 * mi/mi-cmd-break.c (mi_command_line_array)
7318 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7319 (mi_read_next_line): Remove.
7320 (mi_cmd_break_commands): Update.
7321 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7322 function_view.
7323 * cli/cli-script.c (get_command_line): Update.
7324 (process_next_line): Use function_view. Constify.
7325 (recurse_read_control_structure, read_command_lines)
7326 (read_command_lines_1): Change argument types to function_view.
7327 (do_define_command, document_command): Update.
7328 * breakpoint.h (check_tracepoint_command): Don't declare.
7329 * breakpoint.c (check_tracepoint_command): Remove.
7330 (commands_command_1, create_tracepoint_from_upload): Update.
7331
7332 2018-05-04 Tom Tromey <tom@tromey.com>
7333
7334 PR gdb/11750:
7335 * cli/cli-script.h (enum command_control_type) <define_control>:
7336 New constant.
7337 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7338 (build_command_line, execute_control_command_1)
7339 (process_next_line): Likewise.
7340 (do_define_command): New function, extracted from define_command.
7341 (define_command): Use it.
7342
7343 2018-05-04 Tom Tromey <tom@tromey.com>
7344
7345 * tracepoint.c (actions_command): Update.
7346 * cli/cli-script.h (read_command_lines): Update.
7347 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7348 (MAX_TMPBUF): Remove define.
7349 (define_command): Use string_printf.
7350 (document_command): Likewise.
7351 * breakpoint.c (commands_command_1): Update.
7352
7353 2018-05-04 Tom Tromey <tom@tromey.com>
7354
7355 * top.c (execute_command): Update.
7356 * cli/cli-script.h (print_command_lines): Now varargs.
7357 * cli/cli-script.c (print_command_lines): Now varargs.
7358 (execute_control_command_1) <case while_control, case if_control>:
7359 Update.
7360
7361 2018-05-04 Tom Tromey <tom@tromey.com>
7362
7363 * tracepoint.c (all_tracepoint_actions): Rename from
7364 all_tracepoint_actions_and_cleanup. Change return type.
7365 (actions_command, encode_actions_1, encode_actions)
7366 (trace_dump_actions, tdump_command): Update.
7367 * remote.c (remote_download_command_source): Update.
7368 * python/python.c (gdbpy_eval_from_control_command)
7369 (python_command, python_interactive_command): Update.
7370 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7371 * guile/guile.c (guile_command)
7372 (gdbscm_eval_from_control_command, guile_command): Update.
7373 * compile/compile.c (compile_code_command)
7374 (compile_print_command, compile_to_object): Update.
7375 * cli/cli-script.h (struct command_lines_deleter): New.
7376 (counted_command_line): New typedef.
7377 (struct command_line): Add constructor, destructor.
7378 <body_list>: Remove.
7379 <body_list_0, body_list_1>: New members.
7380 (command_line_up): Remove typedef.
7381 (read_command_lines, read_command_lines_1, get_command_line):
7382 Update.
7383 (copy_command_lines): Don't declare.
7384 * cli/cli-script.c (build_command_line): Use "new".
7385 (get_command_line): Return counted_command_line.
7386 (print_command_lines, execute_user_command)
7387 (execute_control_command_1, while_command, if_command): Update.
7388 (realloc_body_list): Remove.
7389 (process_next_line, recurse_read_control_structure): Update.
7390 (read_command_lines, read_command_lines_1): Return counted_command_line.
7391 (free_command_lines): Use "delete".
7392 (copy_command_lines): Remove.
7393 (define_command, document_command, show_user_1): Update.
7394 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7395 a counted_command_line.
7396 * breakpoint.h (counted_command_line): Remove typedef.
7397 (breakpoint_set_commands): Update.
7398 * breakpoint.c (check_no_tracepoint_commands)
7399 (validate_commands_for_breakpoint): Update.
7400 (breakpoint_set_commands): Change commands to be a
7401 counted_command_line.
7402 (commands_command_1, update_dprintf_command_list)
7403 (create_tracepoint_from_upload): Update.
7404
7405 2018-05-04 Tom Tromey <tom@tromey.com>
7406
7407 * cli/cli-decode.h (cmd_list_element): New constructor.
7408 (~cmd_list_element): New destructor.
7409 (struct cmd_list_element): Add initializers.
7410 * cli/cli-decode.c (do_add_cmd): Use "new".
7411 (delete_cmd): Use "delete".
7412
7413 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7414 Pedro Alves <palves@redhat.com>
7415
7416 PR breakpoints/19806 and support for PR external/20207.
7417 * NEWS: Mention Aarch64 watchpoint improvements.
7418 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7419 watchpoints and PR external/20207 watchpoints.
7420 * nat/aarch64-linux-hw-point.c
7421 (kernel_supports_any_contiguous_range): New.
7422 (aarch64_watchpoint_offset): New.
7423 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7424 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7425 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7426 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7427 next_addr_orig_p. Support PR external/20207 watchpoints.
7428 (aarch64_downgrade_regs): New.
7429 (aarch64_dr_state_insert_one_point): New parameters offset and
7430 addr_orig.
7431 (aarch64_dr_state_remove_one_point): Likewise.
7432 (aarch64_handle_breakpoint): Update caller.
7433 (aarch64_handle_aligned_watchpoint): Likewise.
7434 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7435 aligned_offset.
7436 (aarch64_linux_set_debug_regs): Remove const from state. Call
7437 aarch64_downgrade_regs.
7438 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7439 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7440 (DR_CONTROL_MASK): ... this.
7441 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7442 (unsigned int aarch64_watchpoint_offset): New prototype.
7443 (aarch64_linux_set_debug_regs): Remove const from state.
7444 * utils.c (align_up, align_down): Move to ...
7445 * common/common-utils.c (align_up, align_down): ... here.
7446 * utils.h (align_up, align_down): Move to ...
7447 * common/common-utils.h (align_up, align_down): ... here.
7448
7449 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7450
7451 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7452 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7453 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7454 Re-implement to match the ABI as summarized in GCC's
7455 gcc/config/sparc/sparc.c. All callers updated.
7456 (sparc32_store_arguments): Remove assertion.
7457
7458 2018-05-04 Tom Tromey <tom@tromey.com>
7459
7460 * printcmd.c: Don't include tui.h.
7461 (decode_format): Use skip_spaces.
7462
7463 2018-05-04 Tom Tromey <tom@tromey.com>
7464
7465 PR gdb/22619:
7466 * printcmd.c (last_count): New global.
7467 (x_command): Use saved count when repeating.
7468
7469 2018-05-04 Tom Tromey <tom@tromey.com>
7470
7471 * nto-procfs.c (do_closedir_cleanup): Remove.
7472 (procfs_pidlist): Use gdb_dir_up.
7473 * procfs.c (do_closedir_cleanup): Remove.
7474 (proc_update_threads): Use gdb_dir_up.
7475 * common/filestuff.h (struct gdb_dir_deleter): New.
7476 (gdb_dir_up): New typedef.
7477
7478 2018-05-04 Tom Tromey <tom@tromey.com>
7479
7480 * ada-lang.c (print_mention_exception): Use std::string.
7481
7482 2018-05-04 Tom Tromey <tom@tromey.com>
7483
7484 * ada-lang.c (create_excep_cond_exprs): Update.
7485 (ada_exception_catchpoint_cond_string): Use std::string.
7486
7487 2018-05-04 Tom Tromey <tom@tromey.com>
7488
7489 * ada-lang.c (xget_renaming_scope): Return std::string.
7490 (old_renaming_is_invisible): Update.
7491
7492 2018-05-04 Tom Tromey <tom@tromey.com>
7493
7494 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7495 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7496
7497 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7498
7499 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7500
7501 2018-05-04 Tom Tromey <tom@tromey.com>
7502
7503 * remote.c (remote_query_supported_append): Change type.
7504 (remote_check_symbols): Update.
7505
7506 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7507
7508 PR gdb/11420
7509 * configure.ac: Prepend libpython.
7510 * python/python-config.py: Likewise.
7511 * configure: Regenerate.
7512
7513 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7514
7515 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7516
7517 2018-05-03 Pedro Alves <palves@redhat.com>
7518
7519 * s390-linux-nat.c
7520 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7521 override. Write 'true' instead of '1'.
7522 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7523 declaration.
7524
7525 2018-05-02 Pedro Alves <palves@redhat.com>
7526
7527 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7528 add_inf_child_target.
7529 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7530 add_inf_child_target.
7531 * aix-thread.c (aix_thread_target_info): New.
7532 (aix_thread_target) <shortname, longname, doc>: Delete.
7533 <info>: New.
7534 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7535 add_inf_child_target.
7536 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7537 add_inf_child_target.
7538 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7539 add_inf_child_target.
7540 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7541 add_inf_child_target.
7542 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7543 add_inf_child_target.
7544 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7545 add_inf_child_target.
7546 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7547 add_inf_child_target.
7548 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7549 add_inf_child_target.
7550 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7551 add_inf_child_target.
7552 * bfd-target.c (target_bfd_target_info): New.
7553 (target_bfd) <shortname, longname, doc>: Delete.
7554 <info>: New.
7555 * bsd-kvm.c (bsd_kvm_target_info): New.
7556 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7557 <info>: New.
7558 (bsd_kvm_target::open): Rename to ...
7559 (bsd_kvm_target_open): ... this. Adjust.
7560 * bsd-uthread.c (bsd_uthread_target_info): New.
7561 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7562 <info>: New.
7563 * corefile.c (core_file_command): Adjust.
7564 * corelow.c (core_target_info): New.
7565 (core_target) <shortname, longname, doc>: Delete.
7566 <info>: New.
7567 (core_target::open): Rename to ...
7568 (core_target_open): ... this. Adjust.
7569 * ctf.c (ctf_target_info): New.
7570 (ctf_target) <shortname, longname, doc>: Delete.
7571 <info>: New.
7572 (ctf_target::open): Rename to ...
7573 (ctf_target_open): ... this.
7574 (_initialize_ctf): Adjust.
7575 * exec.c (exec_target_info): New.
7576 (exec_target) <shortname, longname, doc>: Delete.
7577 <info>: New.
7578 (exec_target::open): Rename to ...
7579 (exec_target_open): ... this.
7580 * gdbcore.h (core_target_open): Declare.
7581 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7582 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7583 add_inf_child_target.
7584 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7585 add_inf_child_target.
7586 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7587 add_inf_child_target.
7588 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7589 add_inf_child_target.
7590 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7591 add_inf_child_target.
7592 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7593 add_inf_child_target.
7594 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7595 add_inf_child_target.
7596 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7597 add_inf_child_target.
7598 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7599 add_inf_child_target.
7600 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7601 add_inf_child_target.
7602 * inf-child.c (inf_child_target_info): New.
7603 (inf_child_target::info): New.
7604 (inf_child_open_target): Remove 'target' parameter. Use
7605 get_native_target instead.
7606 (inf_child_target::open): Delete.
7607 (add_inf_child_target): New.
7608 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7609 Delete.
7610 <info>: New.
7611 (add_inf_child_target): Declare.
7612 (inf_child_open_target): Declare.
7613 * linux-thread-db.c (thread_db_target_info): New.
7614 (thread_db_target) <shortname, longname, doc>: Delete.
7615 <info>: New.
7616 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7617 add_inf_child_target.
7618 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7619 add_inf_child_target.
7620 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7621 add_inf_child_target.
7622 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7623 add_inf_child_target.
7624 * make-target-delegates (print_class): Adjust.
7625 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7626 add_inf_child_target.
7627 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7628 add_inf_child_target.
7629 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7630 add_inf_child_target.
7631 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7632 add_inf_child_target.
7633 * nto-procfs.c (nto_native_target_info): New.
7634 (nto_procfs_target_native) <shortname, longname, doc>:
7635 Delete.
7636 <info>: New.
7637 (nto_procfs_target_info): New.
7638 (nto_procfs_target_procfs) <shortname, longname, doc>:
7639 Delete.
7640 <info>: New.
7641 (init_procfs_targets): Adjust.
7642 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7643 add_inf_child_target.
7644 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7645 add_inf_child_target.
7646 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7647 add_inf_child_target.
7648 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7649 add_inf_child_target.
7650 * ravenscar-thread.c (ravenscar_target_info): New.
7651 (ravenscar_thread_target) <shortname, longname, doc>:
7652 Delete.
7653 <info>: New.
7654 * record-btrace.c (record_btrace_target_info):
7655 (record_btrace_target) <shortname, longname, doc>: Delete.
7656 <info>: New.
7657 (record_btrace_target::open): Rename to ...
7658 (record_btrace_target_open): ... this. Adjust.
7659 * record-full.c (record_longname, record_doc): New.
7660 (record_full_base_target) <shortname, longname, doc>: Delete.
7661 <info>: New.
7662 (record_full_target_info): New.
7663 (record_full_target): <shortname>: Delete.
7664 <info>: New.
7665 (record_full_core_open_1, record_full_open_1): Update comments.
7666 (record_full_base_target::open): Rename to ...
7667 (record_full_open): ... this.
7668 (cmd_record_full_restore): Update.
7669 (_initialize_record_full): Update.
7670 * remote-sim.c (remote_sim_target_info): New.
7671 (gdbsim_target) <shortname, longname, doc>: Delete.
7672 <info>: New.
7673 (gdbsim_target::open): Rename to ...
7674 (gdbsim_target_open): ... this.
7675 (_initialize_remote_sim): Adjust.
7676 * remote.c (remote_doc): New.
7677 (remote_target_info): New.
7678 (remote_target) <shortname, longname, doc>: Delete.
7679 <info>: New.
7680 (extended_remote_target_info): New.
7681 (extended_remote_target) <shortname, longname, doc>: Delete.
7682 <info>: New.
7683 (remote_target::open_1): Make static. Adjust.
7684 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7685 * s390-linux-nat.c (_initialize_s390_nat): Use
7686 add_inf_child_target.
7687 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7688 add_inf_child_target.
7689 * sol-thread.c (thread_db_target_info): New.
7690 (sol_thread_target) <shortname, longname, doc>: Delete.
7691 <info>: New.
7692 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7693 add_inf_child_target.
7694 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7695 add_inf_child_target.
7696 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7697 add_inf_child_target.
7698 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7699 add_inf_child_target.
7700 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7701 add_inf_child_target.
7702 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7703 add_inf_child_target.
7704 * spu-linux-nat.c (_initialize_spu_nat): Use
7705 add_inf_child_target.
7706 * spu-multiarch.c (spu_multiarch_target_info): New.
7707 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7708 <info>: New.
7709 * target-delegates.c: Regenerate.
7710 * target.c: Include <unordered_map>.
7711 (target_ops_p): Delete.
7712 (DEF_VEC_P(target_ops_p)): Delete.
7713 (target_factories): New.
7714 (test_target_info): New.
7715 (test_target_ops::info): New.
7716 (open_target): Adjust to use target_factories.
7717 (add_target_with_completer): Rename to ...
7718 (add_target): ... this. Change prototype. Register target_info
7719 and open callback in target_factories. Register target_info in
7720 command context instead of target_ops.
7721 (add_target): Delete old implementation.
7722 (add_deprecated_target_alias): Change prototype. Adjust.
7723 (the_native_target): New.
7724 (set_native_target, get_native_target): New.
7725 (find_default_run_target): Use the_native_target.
7726 (find_attach_target, find_run_target): Simplify.
7727 (target_ops::open): Delete.
7728 (dummy_target_info): New.
7729 (dummy_target::shortname, dummy_target::longname)
7730 (dummy_target::doc): Delete.
7731 (dummy_target::info): New.
7732 (debug_target::shortname, debug_target::longname)
7733 (debug_target::doc): Delete.
7734 (debug_target::info): New.
7735 * target.h (struct target_info): New.
7736 (target_ops::~target_ops): Add comment.
7737 (target_ops::info): New.
7738 (target_ops::shortname, target_ops::longname, target_ops::doc): No
7739 longer virtual. Implement in terms of target_info.
7740 (set_native_target, get_native_target): Declare.
7741 (target_open_ftype): New.
7742 (add_target, add_target_with_completer)
7743 (add_deprecated_target_alias): Change prototype.
7744 (test_target) <shortname, longname, doc>: Delete.
7745 <info>: New.
7746 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7747 add_inf_child_target.
7748 * tracefile-tfile.c (tfile_target_info): New.
7749 (tfile_target) <shortname, longname, doc>: Delete.
7750 <info>: New.
7751 (tfile_target::open): Rename to ...
7752 (tfile_target_open): ... this.
7753 (_initialize_tracefile_tfile): Adjust.
7754 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7755 add_inf_child_target.
7756 * windows-nat.c (_initialize_windows_nat): Use
7757 add_inf_child_target.
7758 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7759 add_inf_child_target.
7760
7761 2018-05-02 Pedro Alves <palves@redhat.com>
7762
7763 * linux-nat.h (linux_nat_target) <low_new_thread,
7764 low_delete_thread, low_new_fork, low_forget_process,
7765 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7766 New virtual methods.
7767 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7768 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7769 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7770 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7771 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7772 Delete.
7773 * linux-fork.c (delete_fork): Adjust to call low method.
7774 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7775 (linux_nat_new_fork, linux_nat_forget_process_hook)
7776 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7777 (linux_nat_status_is_event):
7778 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7779 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7780 to call low method.
7781 (sigtrap_is_event): Rename to ...
7782 (linux_nat_target::low_status_is_event): ... this.
7783 (linux_nat_set_status_is_event): Delete.
7784 (save_stop_reason, linux_nat_wait_1)
7785 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7786 low methods.
7787 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7788 (linux_nat_set_new_fork, linux_nat_set_forget_process)
7789 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7790 (linux_nat_set_prepare_to_resume): Delete.
7791 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7792 low virtual methods.
7793 * amd64-linux-nat.c: Likewise.
7794 * arm-linux-nat.c: Likewise.
7795 * i386-linux-nat.c: Likewise.
7796 * ia64-linux-nat.c: Likewise.
7797 * mips-linux-nat.c: Likewise.
7798 * ppc-linux-nat.c: Likewise.
7799 * s390-linux-nat.c: Likewise.
7800 * sparc64-linux-nat.c: Likewise.
7801 * x86-linux-nat.c: Likewise.
7802 * x86-linux-nat.h: Include "nat/x86-linux.h".
7803 (x86_linux_nat_target) <low_new_fork, low_forget_process,
7804 low_prepare_to_resume, low_new_thread, low_delete_thread>:
7805 Override methods.
7806
7807 2018-05-02 Pedro Alves <palves@redhat.com>
7808
7809 * target.h (target_ops)
7810 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7811 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7812 stopped_by_watchpoint, have_continuable_watchpoint,
7813 stopped_data_address, watchpoint_addr_within_range,
7814 can_accel_watchpoint_condition, can_run, thread_alive,
7815 has_all_memory, has_memory, has_stack, has_registers,
7816 has_execution, can_async_p, is_async_p, supports_non_stop,
7817 always_non_stop_p, can_execute_reverse, supports_multi_process,
7818 supports_enable_disable_tracepoint,
7819 supports_disable_randomization, supports_string_tracing,
7820 supports_evaluation_of_breakpoint_conditions,
7821 can_run_breakpoint_commands, filesystem_is_local,
7822 can_download_tracepoint, get_trace_state_variable_value,
7823 set_trace_notes, get_tib_address, use_agent, can_use_agent,
7824 record_is_replaying, record_will_replay,
7825 augmented_libraries_svr4_read>: Adjust to return bool.
7826 * aarch64-linux-nat.c: All implementations adjusted.
7827 * aix-thread.c: All implementations adjusted.
7828 * arm-linux-nat.c: All implementations adjusted.
7829 * breakpoint.c: All implementations adjusted.
7830 * bsd-kvm.c: All implementations adjusted.
7831 * bsd-uthread.c: All implementations adjusted.
7832 * corelow.c: All implementations adjusted.
7833 * ctf.c: All implementations adjusted.
7834 * darwin-nat.c: All implementations adjusted.
7835 * darwin-nat.h: All implementations adjusted.
7836 * exec.c: All implementations adjusted.
7837 * fbsd-nat.c: All implementations adjusted.
7838 * fbsd-nat.h: All implementations adjusted.
7839 * gnu-nat.c: All implementations adjusted.
7840 * gnu-nat.h: All implementations adjusted.
7841 * go32-nat.c: All implementations adjusted.
7842 * ia64-linux-nat.c: All implementations adjusted.
7843 * inf-child.c: All implementations adjusted.
7844 * inf-child.h: All implementations adjusted.
7845 * inf-ptrace.c: All implementations adjusted.
7846 * inf-ptrace.h: All implementations adjusted.
7847 * linux-nat.c: All implementations adjusted.
7848 * linux-nat.h: All implementations adjusted.
7849 * mips-linux-nat.c: All implementations adjusted.
7850 * nto-procfs.c: All implementations adjusted.
7851 * ppc-linux-nat.c: All implementations adjusted.
7852 * procfs.c: All implementations adjusted.
7853 * ravenscar-thread.c: All implementations adjusted.
7854 * record-btrace.c: All implementations adjusted.
7855 * record-full.c: All implementations adjusted.
7856 * remote-sim.c: All implementations adjusted.
7857 * remote.c: All implementations adjusted.
7858 * s390-linux-nat.c: All implementations adjusted.
7859 * sol-thread.c: All implementations adjusted.
7860 * spu-multiarch.c: All implementations adjusted.
7861 * target-delegates.c: All implementations adjusted.
7862 * target.c: All implementations adjusted.
7863 * target.h: All implementations adjusted.
7864 * tracefile-tfile.c: All implementations adjusted.
7865 * tracefile.c: All implementations adjusted.
7866 * tracefile.h: All implementations adjusted.
7867 * windows-nat.c: All implementations adjusted.
7868 * x86-linux-nat.h: All implementations adjusted.
7869 * x86-nat.h: All implementations adjusted.
7870
7871 2018-05-02 Pedro Alves <palves@redhat.com>
7872
7873 * make-target-delegates (scan_target_h): Don't trim lines here.
7874 Replace sequences of tabs and/or whitespace with a single
7875 whitespace.
7876 (top level, parsing methods): Trim each line before processing it
7877 here.
7878
7879 2018-05-02 Pedro Alves <palves@redhat.com>
7880 John Baldwin <jhb@freebsd.org>
7881
7882 * target.h (enum strata) <debug_stratum>: New.
7883 (struct target_ops) <all delegation methods>: Replace by C++
7884 virtual methods, and drop "to_" prefix. All references updated
7885 throughout.
7886 <to_shortname, to_longname, to_doc, to_data,
7887 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7888 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7889 virtual methods. All references updated throughout.
7890 <can_attach, supports_terminal_ours, can_create_inferior,
7891 get_thread_control_capabilities, attach_no_wait>: New
7892 virtual methods.
7893 <insert_breakpoint, remove_breakpoint>: Now
7894 TARGET_DEFAULT_NORETURN methods.
7895 <info_proc>: Now returns bool.
7896 <to_magic>: Delete.
7897 (OPS_MAGIC): Delete.
7898 (current_target): Delete. All references replaced by references
7899 to ...
7900 (target_stack): ... this. New.
7901 (target_shortname, target_longname): Adjust.
7902 (target_can_run): Now a function declaration.
7903 (default_child_has_all_memory, default_child_has_memory)
7904 (default_child_has_stack, default_child_has_registers)
7905 (default_child_has_execution): Remove target_ops parameter.
7906 (complete_target_initialization): Delete.
7907 (memory_breakpoint_target): New template class.
7908 (test_target_ops): Refactor as a C++ class with virtual methods.
7909 * make-target-delegates (NAME_PART): Tighten.
7910 (POINTER_PART, CP_SYMBOL): New.
7911 (SIMPLE_RETURN_PART): Reimplement.
7912 (VEC_RETURN_PART): Expect less.
7913 (RETURN_PART, VIRTUAL_PART): New.
7914 (METHOD): Adjust to C++ virtual methods.
7915 (scan_target_h): Remove reference to C99.
7916 (dname): Output "target_ops::" prefix.
7917 (write_function_header): Adjust to output a C++ class method.
7918 (write_declaration): New.
7919 (write_delegator): Adjust to output a C++ class method.
7920 (tdname): Output "dummy_target::" prefix.
7921 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7922 method.
7923 (tdefault_names, debug_names): Delete.
7924 (return_types, tdefaults, styles, argtypes_array): New.
7925 (top level): All methods are delegators.
7926 (print_class): New.
7927 (top level): Print dummy_target and debug_target classes.
7928 * target-delegates.c: Regenerate.
7929 * target-debug.h (target_debug_print_enum_info_proc_what)
7930 (target_debug_print_thread_control_capabilities)
7931 (target_debug_print_thread_info_p): New.
7932 * target.c (dummy_target): Delete.
7933 (the_dummy_target, the_debug_target): New.
7934 (target_stack): Now extern.
7935 (set_targetdebug): Push/unpush debug target.
7936 (default_child_has_all_memory, default_child_has_memory)
7937 (default_child_has_stack, default_child_has_registers)
7938 (default_child_has_execution): Remove target_ops parameter.
7939 (complete_target_initialization): Delete.
7940 (add_target_with_completer): No longer call
7941 complete_target_initialization.
7942 (target_supports_terminal_ours): Use regular delegation.
7943 (update_current_target): Delete.
7944 (push_target): No longer check magic number. Don't call
7945 update_current_target.
7946 (unpush_target): Don't call update_current_target.
7947 (target_is_pushed): No longer check magic number.
7948 (target_require_runnable): Skip for all stratums over
7949 process_stratum.
7950 (target_ops::info_proc): New.
7951 (target_info_proc): Use find_target_at and
7952 find_default_run_target.
7953 (target_supports_disable_randomization): Use regular delegation.
7954 (target_get_osdata): Use find_target_at.
7955 (target_ops::open, target_ops::close, target_ops::can_attach)
7956 (target_ops::attach, target_ops::can_create_inferior)
7957 (target_ops::create_inferior, target_ops::can_run)
7958 (target_can_run): New.
7959 (default_fileio_target): Use regular delegation.
7960 (target_ops::fileio_open, target_ops::fileio_pwrite)
7961 (target_ops::fileio_pread, target_ops::fileio_fstat)
7962 (target_ops::fileio_close, target_ops::fileio_unlink)
7963 (target_ops::fileio_readlink): New.
7964 (target_fileio_open_1, target_fileio_unlink)
7965 (target_fileio_readlink): Always call the target method. Handle
7966 FILEIO_ENOSYS.
7967 (return_zero, return_zero_has_execution): Delete.
7968 (init_dummy_target): Delete.
7969 (dummy_target::dummy_target, dummy_target::shortname)
7970 (dummy_target::longname, dummy_target::doc)
7971 (debug_target::debug_target, debug_target::shortname)
7972 (debug_target::longname, debug_target::doc): New.
7973 (target_supports_delete_record): Use regular delegation.
7974 (setup_target_debug): Delete.
7975 (maintenance_print_target_stack): Skip debug_stratum.
7976 (initialize_targets): Instantiate the_dummy_target and
7977 the_debug_target.
7978 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7979 use target_stack.
7980 (target_auxv_search, fprint_target_auxv): Adjust.
7981 (info_auxv_command): Adjust to use target_stack.
7982 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7983 * exceptions.c (print_flush): Handle a NULL target_stack.
7984 * regcache.c (target_ops_no_register): Refactor as class with
7985 virtual methods.
7986
7987 * exec.c (exec_target): New class.
7988 (exec_ops): Now an exec_target.
7989 (exec_open, exec_close_1, exec_get_section_table)
7990 (exec_xfer_partial, exec_files_info, exec_has_memory)
7991 (exec_make_note_section): Refactor as exec_target methods.
7992 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7993 Delete.
7994 (exec_target::find_memory_regions): New.
7995 (_initialize_exec): Don't call init_exec_ops.
7996 * gdbcore.h (exec_file_clear): Delete.
7997
7998 * corefile.c (core_target): Delete.
7999 (core_file_command): Adjust.
8000 * corelow.c (core_target): New class.
8001 (the_core_target): New.
8002 (core_close): Remove target_ops parameter.
8003 (core_close_cleanup): Adjust.
8004 (core_target::close): New.
8005 (core_open, core_detach, get_core_registers, core_files_info)
8006 (core_xfer_partial, core_thread_alive, core_read_description)
8007 (core_pid_to_str, core_thread_name, core_has_memory)
8008 (core_has_stack, core_has_registers, core_info_proc): Rework as
8009 core_target methods.
8010 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8011 (_initialize_corelow): Initialize the_core_target.
8012 * gdbcore.h (core_target): Delete.
8013 (the_core_target): New.
8014
8015 * ctf.c: (ctf_target): New class.
8016 (ctf_ops): Now a ctf_target.
8017 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8018 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8019 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8020 methods.
8021 (init_ctf_ops): Delete.
8022 (_initialize_ctf): Don't call it.
8023 * tracefile-tfile.c (tfile_target): New class.
8024 (tfile_ops): Now a tfile_target.
8025 (tfile_open, tfile_close, tfile_files_info)
8026 (tfile_get_tracepoint_status, tfile_trace_find)
8027 (tfile_fetch_registers, tfile_xfer_partial)
8028 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8029 Refactor as tfile_target methods.
8030 (tfile_xfer_partial_features): Remove target_ops parameter.
8031 (init_tfile_ops): Delete.
8032 (_initialize_tracefile_tfile): Don't call it.
8033 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8034 (tracefile_has_stack, tracefile_has_registers)
8035 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8036 tracefile_target methods.
8037 (init_tracefile_ops): Delete.
8038 (tracefile_target::tracefile_target): New.
8039 * tracefile.h: Include "target.h".
8040 (tracefile_target): New class.
8041 (init_tracefile_ops): Delete.
8042
8043 * spu-multiarch.c (spu_multiarch_target): New class.
8044 (spu_ops): Now a spu_multiarch_target.
8045 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8046 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8047 (spu_search_memory, spu_mourn_inferior): Refactor as
8048 spu_multiarch_target methods.
8049 (init_spu_ops): Delete.
8050 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8051 complete_target_initialization.
8052
8053 * ravenscar-thread.c (ravenscar_thread_target): New class.
8054 (ravenscar_ops): Now a ravenscar_thread_target.
8055 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8056 (ravenscar_thread_alive, ravenscar_pid_to_str)
8057 (ravenscar_fetch_registers, ravenscar_store_registers)
8058 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8059 (ravenscar_stopped_by_hw_breakpoint)
8060 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8061 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8062 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8063 methods.
8064 (init_ravenscar_thread_ops): Delete.
8065 (_initialize_ravenscar): Remove references to
8066 init_ravenscar_thread_ops and complete_target_initialization.
8067
8068 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8069 (bsd_uthread_target): New class.
8070 (bsd_uthread_ops): Now a bsd_uthread_target.
8071 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8072 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8073 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8074 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8075 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8076 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8077 (bsd_uthread_target): Delete function.
8078 (_initialize_bsd_uthread): Remove reference to
8079 complete_target_initialization.
8080
8081 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8082 (target_bfd): ... this new class.
8083 (target_bfd_xfer_partial, target_bfd_get_section_table)
8084 (target_bfd_close): Refactor as target_bfd methods.
8085 (target_bfd::~target_bfd): New.
8086 (target_bfd_reopen): Adjust.
8087 (target_bfd::close): New.
8088
8089 * record-btrace.c (record_btrace_target): New class.
8090 (record_btrace_ops): Now a record_btrace_target.
8091 (record_btrace_open, record_btrace_stop_recording)
8092 (record_btrace_disconnect, record_btrace_close)
8093 (record_btrace_async, record_btrace_info)
8094 (record_btrace_insn_history, record_btrace_insn_history_range)
8095 (record_btrace_insn_history_from, record_btrace_call_history)
8096 (record_btrace_call_history_range)
8097 (record_btrace_call_history_from, record_btrace_record_method)
8098 (record_btrace_is_replaying, record_btrace_will_replay)
8099 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8100 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8101 (record_btrace_store_registers, record_btrace_prepare_to_store)
8102 (record_btrace_to_get_unwinder)
8103 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8104 (record_btrace_commit_resume, record_btrace_wait)
8105 (record_btrace_stop, record_btrace_can_execute_reverse)
8106 (record_btrace_stopped_by_sw_breakpoint)
8107 (record_btrace_supports_stopped_by_sw_breakpoint)
8108 (record_btrace_stopped_by_hw_breakpoint)
8109 (record_btrace_supports_stopped_by_hw_breakpoint)
8110 (record_btrace_update_thread_list, record_btrace_thread_alive)
8111 (record_btrace_goto_begin, record_btrace_goto_end)
8112 (record_btrace_goto, record_btrace_stop_replaying_all)
8113 (record_btrace_execution_direction)
8114 (record_btrace_prepare_to_generate_core)
8115 (record_btrace_done_generating_core): Refactor as
8116 record_btrace_target methods.
8117 (init_record_btrace_ops): Delete.
8118 (_initialize_record_btrace): Remove reference to
8119 init_record_btrace_ops.
8120 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8121 the execution_direction global.
8122 (record_full_base_target, record_full_target)
8123 (record_full_core_target): New classes.
8124 (record_full_ops): Now a record_full_target.
8125 (record_full_core_ops): Now a record_full_core_target.
8126 (record_full_target::detach, record_full_target::disconnect)
8127 (record_full_core_target::disconnect)
8128 (record_full_target::mourn_inferior, record_full_target::kill):
8129 New.
8130 (record_full_open, record_full_close, record_full_async): Refactor
8131 as methods of the record_full_base_target class.
8132 (record_full_resume, record_full_commit_resume): Refactor
8133 as methods of the record_full_target class.
8134 (record_full_wait, record_full_stopped_by_watchpoint)
8135 (record_full_stopped_data_address)
8136 (record_full_stopped_by_sw_breakpoint)
8137 (record_full_supports_stopped_by_sw_breakpoint)
8138 (record_full_stopped_by_hw_breakpoint)
8139 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8140 methods of the record_full_base_target class.
8141 (record_full_store_registers, record_full_xfer_partial)
8142 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8143 Refactor as methods of the record_full_target class.
8144 (record_full_can_execute_reverse, record_full_get_bookmark)
8145 (record_full_goto_bookmark, record_full_execution_direction)
8146 (record_full_record_method, record_full_info, record_full_delete)
8147 (record_full_is_replaying, record_full_will_replay)
8148 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8149 (record_full_stop_replaying): Refactor as methods of the
8150 record_full_base_target class.
8151 (record_full_core_resume, record_full_core_kill)
8152 (record_full_core_fetch_registers)
8153 (record_full_core_prepare_to_store)
8154 (record_full_core_store_registers, record_full_core_xfer_partial)
8155 (record_full_core_insert_breakpoint)
8156 (record_full_core_remove_breakpoint)
8157 (record_full_core_has_execution): Refactor
8158 as methods of the record_full_core_target class.
8159 (record_full_base_target::supports_delete_record): New.
8160 (init_record_full_ops): Delete.
8161 (init_record_full_core_ops): Delete.
8162 (record_full_save): Refactor as method of the
8163 record_full_base_target class.
8164 (_initialize_record_full): Remove references to
8165 init_record_full_ops and init_record_full_core_ops.
8166
8167 * remote.c (remote_target, extended_remote_target): New classes.
8168 (remote_ops): Now a remote_target.
8169 (extended_remote_ops): Now an extended_remote_target.
8170 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8171 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8172 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8173 (remote_pass_signals, remote_set_syscall_catchpoint)
8174 (remote_program_signals, )
8175 (remote_thread_always_alive): Remove target_ops parameter.
8176 (remote_thread_alive, remote_thread_name)
8177 (remote_update_thread_list, remote_threads_extra_info)
8178 (remote_static_tracepoint_marker_at)
8179 (remote_static_tracepoint_markers_by_strid)
8180 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8181 (remote_open): Refactor as methods of remote_target.
8182 (extended_remote_open, extended_remote_detach)
8183 (extended_remote_attach, extended_remote_post_attach):
8184 (extended_remote_supports_disable_randomization)
8185 (extended_remote_create_inferior): : Refactor as method of
8186 extended_remote_target.
8187 (remote_set_permissions, remote_open_1, remote_detach)
8188 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8189 (remote_resume, remote_commit_resume, remote_stop)
8190 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8191 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8192 (remote_prepare_to_store, remote_store_registers)
8193 (remote_flash_erase, remote_flash_done, remote_files_info)
8194 (remote_kill, remote_mourn, remote_insert_breakpoint)
8195 (remote_remove_breakpoint, remote_insert_watchpoint)
8196 (remote_watchpoint_addr_within_range)
8197 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8198 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8199 (remote_supports_stopped_by_sw_breakpoint)
8200 (remote_stopped_by_hw_breakpoint)
8201 (remote_supports_stopped_by_hw_breakpoint)
8202 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8203 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8204 (remote_verify_memory): Refactor as methods of remote_target.
8205 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8206 parameter.
8207 (remote_xfer_partial, remote_get_memory_xfer_limit)
8208 (remote_search_memory, remote_rcmd, remote_memory_map)
8209 (remote_pid_to_str, remote_get_thread_local_address)
8210 (remote_get_tib_address, remote_read_description): Refactor as
8211 methods of remote_target.
8212 (remote_target::fileio_open, remote_target::fileio_pwrite)
8213 (remote_target::fileio_pread, remote_target::fileio_close): New.
8214 (remote_hostio_readlink, remote_hostio_fstat)
8215 (remote_filesystem_is_local, remote_can_execute_reverse)
8216 (remote_supports_non_stop, remote_supports_disable_randomization)
8217 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8218 (remote_supports_enable_disable_tracepoint)
8219 (remote_supports_string_tracing)
8220 (remote_can_run_breakpoint_commands, remote_trace_init)
8221 (remote_download_tracepoint, remote_can_download_tracepoint)
8222 (remote_download_trace_state_variable, remote_enable_tracepoint)
8223 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8224 (remote_trace_start, remote_get_trace_status)
8225 (remote_get_tracepoint_status, remote_trace_stop)
8226 (remote_trace_find, remote_get_trace_state_variable_value)
8227 (remote_save_trace_data, remote_get_raw_trace_data)
8228 (remote_set_disconnected_tracing, remote_core_of_thread)
8229 (remote_set_circular_trace_buffer, remote_traceframe_info)
8230 (remote_get_min_fast_tracepoint_insn_len)
8231 (remote_set_trace_buffer_size, remote_set_trace_notes)
8232 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8233 (remote_disable_btrace, remote_teardown_btrace)
8234 (remote_read_btrace, remote_btrace_conf)
8235 (remote_augmented_libraries_svr4_read, remote_load)
8236 (remote_pid_to_exec_file, remote_can_do_single_step)
8237 (remote_execution_direction, remote_thread_handle_to_thread_info):
8238 Refactor as methods of remote_target.
8239 (init_remote_ops, init_extended_remote_ops): Delete.
8240 (remote_can_async_p, remote_is_async_p, remote_async)
8241 (remote_thread_events, remote_upload_tracepoints)
8242 (remote_upload_trace_state_variables): Refactor as methods of
8243 remote_target.
8244 (_initialize_remote): Remove references to init_remote_ops and
8245 init_extended_remote_ops.
8246
8247 * remote-sim.c (gdbsim_target): New class.
8248 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8249 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8250 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8251 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8252 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8253 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8254 Refactor as methods of gdbsim_target.
8255 (gdbsim_ops): Now a gdbsim_target.
8256 (init_gdbsim_ops): Delete.
8257 (gdbsim_cntrl_c): Adjust.
8258 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8259
8260 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8261 (the_amd64_linux_nat_target): New.
8262 (amd64_linux_fetch_inferior_registers)
8263 (amd64_linux_store_inferior_registers): Refactor as methods of
8264 amd64_linux_nat_target.
8265 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8266 * i386-linux-nat.c: Don't include "linux-nat.h".
8267 (i386_linux_nat_target): New class.
8268 (the_i386_linux_nat_target): New.
8269 (i386_linux_fetch_inferior_registers)
8270 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8271 as methods of i386_linux_nat_target.
8272 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8273 * inf-child.c (inf_child_ops): Delete.
8274 (inf_child_fetch_inferior_registers)
8275 (inf_child_store_inferior_registers): Delete.
8276 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8277 methods of inf_child_target.
8278 (inf_child_target::supports_terminal_ours)
8279 (inf_child_target::terminal_init)
8280 (inf_child_target::terminal_inferior)
8281 (inf_child_target::terminal_ours_for_output)
8282 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8283 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8284 New.
8285 (inf_child_open, inf_child_disconnect, inf_child_close)
8286 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8287 (inf_child_post_startup_inferior, inf_child_can_run)
8288 (inf_child_pid_to_exec_file): Refactor as methods of
8289 inf_child_target.
8290 (inf_child_follow_fork): Delete.
8291 (inf_child_target::can_create_inferior)
8292 (inf_child_target::can_attach): New.
8293 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8294 (inf_child_target::has_stack, inf_child_target::has_registers)
8295 (inf_child_target::has_execution): New.
8296 (inf_child_fileio_open, inf_child_fileio_pwrite)
8297 (inf_child_fileio_pread, inf_child_fileio_fstat)
8298 (inf_child_fileio_close, inf_child_fileio_unlink)
8299 (inf_child_fileio_readlink, inf_child_use_agent)
8300 (inf_child_can_use_agent): Refactor as methods of
8301 inf_child_target.
8302 (return_zero, inf_child_target): Delete.
8303 (inf_child_target::inf_child_target): New.
8304 * inf-child.h: Include "target.h".
8305 (inf_child_target): Delete function prototype.
8306 (inf_child_target): New class.
8307 (inf_child_open_target, inf_child_mourn_inferior)
8308 (inf_child_maybe_unpush_target): Delete.
8309 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8310 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8311 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8312 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8313 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8314 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8315 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8316 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8317 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8318 methods of inf_ptrace_target.
8319 (inf_ptrace_target): Delete function.
8320 * inf-ptrace.h: Include "inf-child.h".
8321 (inf_ptrace_target): Delete function declaration.
8322 (inf_ptrace_target): New class.
8323 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8324 * linux-nat.c (linux_target): New.
8325 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8326 (linux_nat_target::~linux_nat_target): New.
8327 (linux_child_post_attach, linux_child_post_startup_inferior)
8328 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8329 (linux_child_remove_fork_catchpoint)
8330 (linux_child_insert_vfork_catchpoint)
8331 (linux_child_remove_vfork_catchpoint)
8332 (linux_child_insert_exec_catchpoint)
8333 (linux_child_remove_exec_catchpoint)
8334 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8335 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8336 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8337 (linux_nat_stopped_data_address)
8338 (linux_nat_stopped_by_sw_breakpoint)
8339 (linux_nat_supports_stopped_by_sw_breakpoint)
8340 (linux_nat_stopped_by_hw_breakpoint)
8341 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8342 (linux_nat_kill, linux_nat_mourn_inferior)
8343 (linux_nat_xfer_partial, linux_nat_thread_alive)
8344 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8345 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8346 (linux_child_static_tracepoint_markers_by_strid)
8347 (linux_nat_is_async_p, linux_nat_can_async_p)
8348 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8349 (linux_nat_supports_multi_process)
8350 (linux_nat_supports_disable_randomization, linux_nat_async)
8351 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8352 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8353 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8354 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8355 methods of linux_nat_target.
8356 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8357 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8358 parameter.
8359 (check_stopped_by_watchpoint): Adjust.
8360 (linux_xfer_partial): Delete.
8361 (linux_target_install_ops, linux_target, linux_nat_add_target):
8362 Delete.
8363 (linux_nat_target::linux_nat_target): New.
8364 * linux-nat.h: Include "inf-ptrace.h".
8365 (linux_nat_target): New.
8366 (linux_target, linux_target_install_ops, linux_nat_add_target):
8367 Delete function declarations.
8368 (linux_target): Declare global.
8369 * linux-thread-db.c (thread_db_target): New.
8370 (thread_db_target::thread_db_target): New.
8371 (thread_db_ops): Delete.
8372 (the_thread_db_target): New.
8373 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8374 (thread_db_update_thread_list, thread_db_pid_to_str)
8375 (thread_db_extra_thread_info)
8376 (thread_db_thread_handle_to_thread_info)
8377 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8378 (thread_db_resume): Refactor as methods of thread_db_target.
8379 (init_thread_db_ops): Delete.
8380 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8381 * x86-linux-nat.c: Don't include "linux-nat.h".
8382 (super_post_startup_inferior): Delete.
8383 (x86_linux_nat_target::~x86_linux_nat_target): New.
8384 (x86_linux_child_post_startup_inferior)
8385 (x86_linux_read_description, x86_linux_enable_btrace)
8386 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8387 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8388 methods of x86_linux_nat_target.
8389 (x86_linux_create_target): Delete. Bits folded ...
8390 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8391 pointer.
8392 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8393 (x86_linux_nat_target): New class.
8394 (x86_linux_create_target): Delete.
8395 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8396 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8397 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8398 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8399 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8400 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8401 make extern.
8402 (x86_use_watchpoints): Delete.
8403 * x86-nat.h: Include "breakpoint.h" and "target.h".
8404 (x86_use_watchpoints): Delete.
8405 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8406 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8407 (x86_insert_watchpoint, x86_remove_watchpoint)
8408 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8409 (x86_stopped_by_hw_breakpoint): New declarations.
8410 (x86_nat_target): New template class.
8411
8412 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8413 (the_ppc_linux_nat_target): New.
8414 (ppc_linux_fetch_inferior_registers)
8415 (ppc_linux_can_use_hw_breakpoint)
8416 (ppc_linux_region_ok_for_hw_watchpoint)
8417 (ppc_linux_ranged_break_num_registers)
8418 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8419 (ppc_linux_insert_mask_watchpoint)
8420 (ppc_linux_remove_mask_watchpoint)
8421 (ppc_linux_can_accel_watchpoint_condition)
8422 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8423 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8424 (ppc_linux_watchpoint_addr_within_range)
8425 (ppc_linux_masked_watch_num_registers)
8426 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8427 (ppc_linux_read_description): Refactor as methods of
8428 ppc_linux_nat_target.
8429 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8430
8431 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8432 (procfs_target): New class.
8433 (the_procfs_target): New.
8434 (procfs_target): Delete function.
8435 (procfs_auxv_parse, procfs_attach, procfs_detach)
8436 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8437 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8438 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8439 (procfs_create_inferior, procfs_update_thread_list)
8440 (procfs_thread_alive, procfs_pid_to_str)
8441 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8442 (procfs_stopped_data_address, procfs_insert_watchpoint)
8443 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8444 (proc_find_memory_regions, procfs_info_proc)
8445 (procfs_make_note_section): Refactor as methods of procfs_target.
8446 (_initialize_procfs): Adjust.
8447 * sol-thread.c (sol_thread_target): New class.
8448 (sol_thread_ops): Now a sol_thread_target.
8449 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8450 (sol_thread_fetch_registers, sol_thread_store_registers)
8451 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8452 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8453 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8454 (init_sol_thread_ops): Delete.
8455 (_initialize_sol_thread): Adjust. Remove references to
8456 init_sol_thread_ops and complete_target_initialization.
8457
8458 * windows-nat.c (windows_nat_target): New class.
8459 (windows_fetch_inferior_registers)
8460 (windows_store_inferior_registers, windows_resume, windows_wait)
8461 (windows_attach, windows_detach, windows_pid_to_exec_file)
8462 (windows_files_info, windows_create_inferior)
8463 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8464 (windows_close, windows_pid_to_str, windows_xfer_partial)
8465 (windows_get_tib_address, windows_get_ada_task_ptid)
8466 (windows_thread_name, windows_thread_alive): Refactor as
8467 windows_nat_target methods.
8468 (do_initial_windows_stuff): Adjust.
8469 (windows_target): Delete function.
8470 (_initialize_windows_nat): Adjust.
8471
8472 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8473 (darwin_mourn_inferior, darwin_kill_inferior)
8474 (darwin_create_inferior, darwin_attach, darwin_detach)
8475 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8476 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8477 (darwin_supports_multi_process): Refactor as darwin_nat_target
8478 methods.
8479 (darwin_resume_to, darwin_files_info): Delete.
8480 (_initialize_darwin_inferior): Rename to ...
8481 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8482 * darwin-nat.h: Include "inf-child.h".
8483 (darwin_nat_target): New class.
8484 (darwin_complete_target): Delete.
8485 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8486 (darwin_target): New.
8487 (i386_darwin_fetch_inferior_registers)
8488 (i386_darwin_store_inferior_registers): Refactor as methods of
8489 darwin_nat_target.
8490 (darwin_complete_target): Delete, with ...
8491 (_initialize_i386_darwin_nat): ... bits factored out here.
8492
8493 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8494 (the_alpha_linux_nat_target): New.
8495 (alpha_linux_register_u_offset): Refactor as
8496 alpha_linux_nat_target method.
8497 (_initialize_alpha_linux_nat): Adjust.
8498 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8499 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8500 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8501 methods of linux_nat_trad_target.
8502 (linux_trad_target): Delete.
8503 * linux-nat-trad.h (linux_trad_target): Delete function.
8504 (linux_nat_trad_target): New class.
8505 * mips-linux-nat.c (mips_linux_nat_target): New class.
8506 (super_fetch_registers, super_store_registers, super_close):
8507 Delete.
8508 (the_mips_linux_nat_target): New.
8509 (mips64_linux_regsets_fetch_registers)
8510 (mips64_linux_regsets_store_registers)
8511 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8512 (mips_linux_register_u_offset, mips_linux_read_description)
8513 (mips_linux_can_use_hw_breakpoint)
8514 (mips_linux_stopped_by_watchpoint)
8515 (mips_linux_stopped_data_address)
8516 (mips_linux_region_ok_for_hw_watchpoint)
8517 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8518 (mips_linux_close): Refactor as methods of mips_linux_nat.
8519 (_initialize_mips_linux_nat): Adjust to C++ification.
8520
8521 * aix-thread.c (aix_thread_target): New class.
8522 (aix_thread_ops): Now an aix_thread_target.
8523 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8524 (aix_thread_fetch_registers, aix_thread_store_registers)
8525 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8526 (aix_thread_thread_alive, aix_thread_pid_to_str)
8527 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8528 Refactor as methods of aix_thread_target.
8529 (init_aix_thread_ops): Delete.
8530 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8531 and complete_target_initialization.
8532 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8533 (rs6000_nat_target): New class.
8534 (the_rs6000_nat_target): New.
8535 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8536 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8537 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8538 (super_create_inferior): Delete.
8539 (_initialize_rs6000_nat): Adjust to C++ification.
8540
8541 * arm-linux-nat.c (arm_linux_nat_target): New class.
8542 (the_arm_linux_nat_target): New.
8543 (arm_linux_fetch_inferior_registers)
8544 (arm_linux_store_inferior_registers, arm_linux_read_description)
8545 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8546 (arm_linux_remove_hw_breakpoint)
8547 (arm_linux_region_ok_for_hw_watchpoint)
8548 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8549 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8550 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8551 arm_linux_nat_target.
8552 (_initialize_arm_linux_nat): Adjust to C++ification.
8553
8554 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8555 (the_aarch64_linux_nat_target): New.
8556 (aarch64_linux_fetch_inferior_registers)
8557 (aarch64_linux_store_inferior_registers)
8558 (aarch64_linux_child_post_startup_inferior)
8559 (aarch64_linux_read_description)
8560 (aarch64_linux_can_use_hw_breakpoint)
8561 (aarch64_linux_insert_hw_breakpoint)
8562 (aarch64_linux_remove_hw_breakpoint)
8563 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8564 (aarch64_linux_region_ok_for_hw_watchpoint)
8565 (aarch64_linux_stopped_data_address)
8566 (aarch64_linux_stopped_by_watchpoint)
8567 (aarch64_linux_watchpoint_addr_within_range)
8568 (aarch64_linux_can_do_single_step): Refactor as methods of
8569 aarch64_linux_nat_target.
8570 (super_post_startup_inferior): Delete.
8571 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8572
8573 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8574 (the_hppa_linux_nat_target): New.
8575 (hppa_linux_fetch_inferior_registers)
8576 (hppa_linux_store_inferior_registers): Refactor as methods of
8577 hppa_linux_nat_target.
8578 (_initialize_hppa_linux_nat): Adjust to C++ification.
8579
8580 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8581 (the_ia64_linux_nat_target): New.
8582 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8583 (ia64_linux_stopped_data_address)
8584 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8585 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8586 ia64_linux_nat_target methods.
8587 (super_xfer_partial): Delete.
8588 (_initialize_ia64_linux_nat): Adjust to C++ification.
8589
8590 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8591 (the_m32r_linux_nat_target): New.
8592 (m32r_linux_fetch_inferior_registers)
8593 (m32r_linux_store_inferior_registers): Refactor as
8594 m32r_linux_nat_target methods.
8595 (_initialize_m32r_linux_nat): Adjust to C++ification.
8596
8597 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8598 (the_m68k_linux_nat_target): New.
8599 (m68k_linux_fetch_inferior_registers)
8600 (m68k_linux_store_inferior_registers): Refactor as
8601 m68k_linux_nat_target methods.
8602 (_initialize_m68k_linux_nat): Adjust to C++ification.
8603
8604 * s390-linux-nat.c (s390_linux_nat_target): New class.
8605 (the_s390_linux_nat_target): New.
8606 (s390_linux_fetch_inferior_registers)
8607 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8608 (s390_insert_watchpoint, s390_remove_watchpoint)
8609 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8610 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8611 (s390_auxv_parse, s390_read_description): Refactor as methods of
8612 s390_linux_nat_target.
8613 (_initialize_s390_nat): Adjust to C++ification.
8614
8615 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8616 (the_sparc_linux_nat_target): New.
8617 (_initialize_sparc_linux_nat): Adjust to C++ification.
8618 * sparc-nat.c (sparc_fetch_inferior_registers)
8619 (sparc_store_inferior_registers): Remove target_ops parameter.
8620 * sparc-nat.h (sparc_fetch_inferior_registers)
8621 (sparc_store_inferior_registers): Remove target_ops parameter.
8622 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8623 (the_sparc64_linux_nat_target): New.
8624 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8625
8626 * spu-linux-nat.c (spu_linux_nat_target): New class.
8627 (the_spu_linux_nat_target): New.
8628 (spu_child_post_startup_inferior, spu_child_post_attach)
8629 (spu_child_wait, spu_fetch_inferior_registers)
8630 (spu_store_inferior_registers, spu_xfer_partial)
8631 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8632 methods.
8633 (_initialize_spu_nat): Adjust to C++ification.
8634
8635 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8636 (the_tilegx_linux_nat_target): New.
8637 (fetch_inferior_registers, store_inferior_registers):
8638 Refactor as methods.
8639 (_initialize_tile_linux_nat): Adjust to C++ification.
8640
8641 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8642 (the_xtensa_linux_nat_target): New.
8643 (xtensa_linux_fetch_inferior_registers)
8644 (xtensa_linux_store_inferior_registers): Refactor as
8645 xtensa_linux_nat_target methods.
8646 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8647
8648 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8649 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8650 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8651 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8652 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8653 (fbsd_stopped_by_sw_breakpoint)
8654 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8655 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8656 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8657 (fbsd_post_startup_inferior, fbsd_post_attach)
8658 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8659 (fbsd_set_syscall_catchpoint)
8660 (super_xfer_partial, super_resume, super_wait)
8661 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8662 (fbsd_handle_debug_trap): Remove target_ops parameter.
8663 (fbsd_nat_add_target): Delete.
8664 * fbsd-nat.h: Include "inf-ptrace.h".
8665 (fbsd_nat_add_target): Delete.
8666 (USE_SIGTRAP_SIGINFO): Define.
8667 (fbsd_nat_target): New class.
8668
8669 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8670 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8671 (amd64bsd_target): Delete.
8672 * amd64-bsd-nat.h: New file.
8673 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8674 "x86-bsd-nat.h".
8675 (amd64_fbsd_nat_target): New class.
8676 (the_amd64_fbsd_nat_target): New.
8677 (amd64fbsd_read_description): Refactor as method of
8678 amd64_fbsd_nat_target.
8679 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8680 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8681 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8682 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8683 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8684 (i386bsd_target): Delete.
8685 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8686 (i386bsd_fetch_inferior_registers)
8687 (i386bsd_store_inferior_registers): Declare.
8688 (i386_bsd_nat_target): New class.
8689 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8690 (the_i386_fbsd_nat_target): New.
8691 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8692 i386_fbsd_nat_target methods.
8693 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8694 (_initialize_i386fbsd_nat): Adjust to C++ification.
8695 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8696 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8697 (_initialize_x86_bsd_nat): Adjust to C++ification.
8698 * x86-bsd-nat.h: Include "x86-nat.h".
8699 (x86bsd_target): Delete declaration.
8700 (x86bsd_nat_target): New class.
8701
8702 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8703 (the_aarch64_fbsd_nat_target): New.
8704 (aarch64_fbsd_fetch_inferior_registers)
8705 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8706 aarch64_fbsd_nat_target.
8707 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8708 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8709 (the_alpha_bsd_nat_target): New.
8710 (alphabsd_fetch_inferior_registers)
8711 (alphabsd_store_inferior_registers): Refactor as
8712 alpha_bsd_nat_target methods.
8713 (_initialize_alphabsd_nat): Refactor as methods of
8714 alpha_bsd_nat_target.
8715 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8716 (the_amd64_nbsd_nat_target): New.
8717 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8718 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8719 (the_amd64_obsd_nat_target): New.
8720 (_initialize_amd64obsd_nat): Adjust to C++ification.
8721 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8722 (the_arm_fbsd_nat_target): New.
8723 (arm_fbsd_fetch_inferior_registers)
8724 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8725 (_initialize_arm_fbsd_nat): Refactor as methods of
8726 arm_fbsd_nat_target.
8727 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8728 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8729 (the_arm_netbsd_nat_target): New.
8730 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8731 arm_netbsd_nat_target.
8732 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8733 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8734 (the_hppa_nbsd_nat_target): New.
8735 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8736 hppa_nbsd_nat_target methods.
8737 (_initialize_hppanbsd_nat): Adjust to C++ification.
8738 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8739 (the_hppa_obsd_nat_target): New.
8740 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8741 methods of hppa_obsd_nat_target.
8742 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
8743 add_target.
8744 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8745 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
8746 add_target.
8747 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8748 (_initialize_i386obsd_nat): Use add_target.
8749 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8750 (the_m68k_bsd_nat_target): New.
8751 (m68kbsd_fetch_inferior_registers)
8752 (m68kbsd_store_inferior_registers): Refactor as methods of
8753 m68k_bsd_nat_target.
8754 (_initialize_m68kbsd_nat): Adjust to C++ification.
8755 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8756 (the_mips_fbsd_nat_target): New.
8757 (mips_fbsd_fetch_inferior_registers)
8758 (mips_fbsd_store_inferior_registers): Refactor as methods of
8759 mips_fbsd_nat_target.
8760 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
8761 add_target.
8762 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8763 (the_mips_nbsd_nat_target): New.
8764 (mipsnbsd_fetch_inferior_registers)
8765 (mipsnbsd_store_inferior_registers): Refactor as methods of
8766 mips_nbsd_nat_target.
8767 (_initialize_mipsnbsd_nat): Adjust to C++ification.
8768 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8769 (the_mips64_obsd_nat_target): New.
8770 (mips64obsd_fetch_inferior_registers)
8771 (mips64obsd_store_inferior_registers): Refactor as methods of
8772 mips64_obsd_nat_target.
8773 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
8774 add_target.
8775 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8776 nbsd_nat_target.
8777 * nbsd-nat.h: Include "inf-ptrace.h".
8778 (nbsd_nat_target): New class.
8779 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8780 (obsd_wait): Refactor as methods of obsd_nat_target.
8781 (obsd_add_target): Delete.
8782 * obsd-nat.h: Include "inf-ptrace.h".
8783 (obsd_nat_target): New class.
8784 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8785 (the_ppc_fbsd_nat_target): New.
8786 (ppcfbsd_fetch_inferior_registers)
8787 (ppcfbsd_store_inferior_registers): Refactor as methods of
8788 ppc_fbsd_nat_target.
8789 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
8790 add_target.
8791 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8792 (the_ppc_nbsd_nat_target): New.
8793 (ppcnbsd_fetch_inferior_registers)
8794 (ppcnbsd_store_inferior_registers): Refactor as methods of
8795 ppc_nbsd_nat_target.
8796 (_initialize_ppcnbsd_nat): Adjust to C++ification.
8797 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8798 (the_ppc_obsd_nat_target): New.
8799 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8800 methods of ppc_obsd_nat_target.
8801 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
8802 add_target.
8803 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8804 (the_sh_nbsd_nat_target): New.
8805 (shnbsd_fetch_inferior_registers)
8806 (shnbsd_store_inferior_registers): Refactor as methods of
8807 sh_nbsd_nat_target.
8808 (_initialize_shnbsd_nat): Adjust to C++ification.
8809 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8810 (inf_ptrace_xfer_partial): Delete.
8811 (sparc_xfer_partial, sparc_target): Delete.
8812 * sparc-nat.h (sparc_fetch_inferior_registers)
8813 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8814 (sparc_target): Delete function declaration.
8815 (sparc_target): New template class.
8816 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8817 (_initialize_sparcnbsd_nat): Adjust to C++ification.
8818 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8819 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
8820 add_target.
8821 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8822 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8823 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8824 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
8825 add_target.
8826 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8827 (the_vax_bsd_nat_target): New.
8828 (vaxbsd_fetch_inferior_registers)
8829 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8830 methods.
8831 (_initialize_vaxbsd_nat): Adjust to C++ification.
8832
8833 * bsd-kvm.c (bsd_kvm_target): New class.
8834 (bsd_kvm_ops): Now a bsd_kvm_target.
8835 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8836 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8837 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8838 bsd_kvm_target.
8839 (bsd_kvm_return_one): Delete.
8840 (bsd_kvm_add_target): Adjust to C++ification.
8841
8842 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8843 (nto_procfs_target_procfs): New classes.
8844 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8845 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8846 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8847 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8848 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8849 (procfs_remove_hw_breakpoint, procfs_resume)
8850 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8851 (procfs_kill_inferior, procfs_store_registers)
8852 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8853 as methods of nto_procfs_target.
8854 (nto_procfs_ops): Now an nto_procfs_target_procfs.
8855 (nto_native_ops): Delete.
8856 (procfs_open, procfs_native_open): Delete.
8857 (nto_native_ops): Now an nto_procfs_target_native.
8858 (init_procfs_targets): Adjust to C++ification.
8859 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8860 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8861 Refactor as methods of nto_procfs_target.
8862
8863 * go32-nat.c (go32_nat_target): New class.
8864 (the_go32_nat_target): New.
8865 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8866 (go32_store_registers, go32_xfer_partial, go32_files_info)
8867 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8868 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8869 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8870 (go32_pid_to_str): Refactor as methods of go32_nat_target.
8871 (go32_target): Delete.
8872 (_initialize_go32_nat): Adjust to C++ification.
8873
8874 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8875 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8876 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8877 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8878 gnu_nat_target.
8879 (gnu_target): Delete.
8880 * gnu-nat.h (gnu_target): Delete.
8881 (gnu_nat_target): New class.
8882 * i386-gnu-nat.c (gnu_base_target): New.
8883 (i386_gnu_nat_target): New class.
8884 (the_i386_gnu_nat_target): New.
8885 (_initialize_i386gnu_nat): Adjust to C++ification.
8886
8887 2018-05-02 Pedro Alves <palves@redhat.com>
8888
8889 * bfd-target.c (target_bfd_xclose): Rename to ...
8890 (target_bfd_close): ... this.
8891 (target_bfd_reopen): Adjust.
8892 * target.c (target_close): Remove references to to_xclose.
8893 * target.h (target_ops::to_xclose): Delete.
8894 (target_ops::to_close): Update comments.
8895
8896 2018-05-02 Pedro Alves <palves@redhat.com>
8897
8898 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8899 "linux-nat.h".
8900 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8901 * inf-ptrace.c (inf_ptrace_register_u_offset)
8902 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8903 (inf_ptrace_store_register, inf_ptrace_store_registers)
8904 (inf_ptrace_trad_target): Move to ...
8905 * linux-nat-trad.c: ... this new file.
8906 * linux-nat-trad.h: New file.
8907 * linux-nat.c (linux_target_install_ops): Make extern.
8908 (linux_trad_target): Delete.
8909 * linux-nat.h (linux_trad_target): Delete declaration.
8910 (linux_target_install_ops): Declare.
8911 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8912 "linux-nat.h".
8913
8914 2018-05-02 Pedro Alves <palves@redhat.com>
8915
8916 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8917 procfs_target/add_target here.
8918 * procfs.c (procfs_target): Make static.
8919 (_initialize_procfs): Call add_target here.
8920 * procfs.h (struct target_ops): Remove forward declaration.
8921 (procfs_target): Remove declaration.
8922 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8923
8924 2018-05-02 Pedro Alves <palves@redhat.com>
8925
8926 * procfs.c (procfs_stopped_by_watchpoint)
8927 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8928 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8929 Forward declare.
8930 (procfs_use_watchpoints): Delete, move contents...
8931 (procfs_target): ... here.
8932 * procfs.h (procfs_use_watchpoints): Delete declaration.
8933 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8934 procfs_use_watchpoints.
8935 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8936 procfs_use_watchpoints.
8937
8938 2018-05-02 Tom Tromey <tom@tromey.com>
8939
8940 PR python/20084:
8941 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8942 and var_zuinteger_unlimited.
8943 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8944 and PARAM_ZUINTEGER_UNLIMITED.
8945 (set_parameter_value): Handle var_zuinteger and
8946 var_zuinteger_unlimited.
8947 (add_setshow_generic): Likewise.
8948 (parmpy_init): Likewise.
8949
8950 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8951
8952 PR rust/23124
8953 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8954 pointer is not null before dereferencing it.
8955
8956 2018-04-30 Tom Tromey <tom@tromey.com>
8957
8958 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8959 is_mi_like_p.
8960
8961 2018-04-30 Tom Tromey <tom@tromey.com>
8962
8963 * breakpoint.c (mention): Remove use of is_mi_like_p.
8964 (print_mention_ranged_breakpoint): Likewise.
8965 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8966 of is_mi_like_p.
8967
8968 2018-04-30 Tom Tromey <tom@tromey.com>
8969
8970 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8971
8972 2018-04-30 Tom Tromey <tom@tromey.com>
8973
8974 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8975 (info_spu_event_command): Remove some uses of is_mi_like_p.
8976
8977 2018-04-30 Tom Tromey <tom@tromey.com>
8978
8979 * python/py-framefilter.c (py_print_single_arg)
8980 (enumerate_locals, py_print_args, py_print_frame): Remove some
8981 uses of is_mi_like_p.
8982
8983 2018-04-30 Tom Tromey <tom@tromey.com>
8984
8985 * ui-out.c: Update.
8986 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8987 * ui-out.h (ui_out::is_mi_like_p): Now const.
8988 (ui_out::do_is_mi_like_p): Now const.
8989 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8990
8991 2018-04-30 Tom Tromey <tom@tromey.com>
8992
8993 * varobj.c (varobj_set_visualizer): Use new_reference.
8994 * python/python.c (gdbpy_decode_line): Use new_reference.
8995 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8996 new_reference.
8997
8998 2018-04-30 Tom Tromey <tom@tromey.com>
8999
9000 * varobj.c (install_new_value): Use new_reference.
9001 * value.h (value_incref): Return void. Swap intro comment with
9002 value_decref.
9003 * value.c (set_value_parent): Use new_reference.
9004 (value_incref): Return void. Update intro comment.
9005 (release_value): Use new_reference.
9006 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9007
9008 2018-04-30 Tom Tromey <tom@tromey.com>
9009
9010 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9011 * gdb_bfd.h (new_bfd_ref): Remove.
9012 (gdb_bfd_open): Update comment.
9013 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9014 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9015 (gdb_bfd_fdopenr): Use new_reference.
9016 * exec.c (exec_file_attach): Use new_reference.
9017
9018 2018-04-30 Tom Tromey <tom@tromey.com>
9019
9020 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9021 method.
9022
9023 2018-04-30 Tom Tromey <tom@tromey.com>
9024
9025 * jit.c (jit_read_code_entry): Use type_align.
9026 * i386-tdep.c (i386_gdbarch_init): Don't call
9027 set_gdbarch_long_long_align_bit.
9028 * gdbarch.sh: Remove long_long_align_bit.
9029 * gdbarch.c, gdbarch.h: Rebuild.
9030 * arc-tdep.c (arc_type_align): New function.
9031 (arc_gdbarch_init): Use arc_type_align. Don't call
9032 set_gdbarch_long_long_align_bit.
9033
9034 2018-04-30 Tom Tromey <tom@tromey.com>
9035
9036 * rust-lang.c (rust_type_alignment): Remove.
9037 (rust_composite_type): Use type_align.
9038
9039 2018-04-30 Tom Tromey <tom@tromey.com>
9040
9041 * NEWS: Mention Type.align.
9042 * python/py-type.c (typy_get_alignof): New function.
9043 (type_object_getset): Add "alignof".
9044
9045 2018-04-30 Tom Tromey <tom@tromey.com>
9046
9047 PR exp/17095:
9048 * NEWS: Update.
9049 * std-operator.def (UNOP_ALIGNOF): New operator.
9050 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9051 New.
9052 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9053 * c-lang.c (c_op_print_tab): Add alignof.
9054 * c-exp.y (ALIGNOF): New token.
9055 (exp): Add "ALIGNOF" production.
9056 (ident_tokens): Add _Alignof and alignof.
9057
9058 2018-04-30 Tom Tromey <tom@tromey.com>
9059
9060 * i386-tdep.c (i386_type_align): New function.
9061 (i386_gdbarch_init): Update.
9062 * gdbarch.sh (type_align): New method.
9063 * gdbarch.c, gdbarch.h: Rebuild.
9064 * arch-utils.h (default_type_align): Declare.
9065 * arch-utils.c (default_type_align): New function.
9066 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9067 (struct type) <align_log2>: New field.
9068 <instance_flags>: Now a bitfield.
9069 (TYPE_RAW_ALIGN): New macro.
9070 (type_align, type_raw_align, set_type_align): Declare.
9071 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9072 functions.
9073 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9074 (get_alignment, maybe_set_alignment): New functions.
9075 (read_structure_type, read_enumeration_type, read_array_type)
9076 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9077 (read_subrange_type, read_base_type): Set type alignment.
9078
9079 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9080
9081 * dwarf2read.c (read_index_from_section): Use bool.
9082
9083 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9084
9085 PR gdb/22950
9086 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9087 with #ifdef.
9088
9089 2018-04-29 John Reiser <jreiser@BitWagon.com>
9090
9091 PR build/22873
9092 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9093 last step, and do it atomically.
9094
9095 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9096
9097 * compile/compile-c-types.c (convert_int, convert_float):
9098 Update for C FE v1.
9099
9100 2018-04-27 Tom Tromey <tom@tromey.com>
9101
9102 PR rust/22545:
9103 * rust-lang.c (rust_inclusive_range_type_p): New function.
9104 (rust_range): Handle inclusive ranges.
9105 (rust_compute_range): Likewise.
9106 * rust-exp.y (struct rust_op) <inclusive>: New field.
9107 (DOTDOTEQ): New constant.
9108 (range_expr): Add "..=" productions.
9109 (operator_tokens): Add "..=" token.
9110 (ast_range): Add "inclusive" parameter.
9111 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9112 ranges.
9113 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9114 bounds values.
9115 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9116 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9117 Update comments.
9118 * expprint.c (print_subexp_standard): Handle new bounds values.
9119 (dump_subexp_body_standard): Likewise.
9120
9121 2018-04-27 Tom Tromey <tom@tromey.com>
9122
9123 * configure: Rebuild.
9124 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9125 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9126 "OVERRIDE".
9127 (class symbol_needs_eval_context): Likewise.
9128 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9129 (mock_mapped_index::symbol_name_at): Use "override". Remove
9130 "virtual".
9131 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9132 "override".
9133 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9134 * aarch64-tdep.c (instruction_reader::read): Use "override".
9135 (instruction_reader_test::read): Likewise.
9136 * arm-tdep.c (instruction_reader::read): Use "override".
9137 (instruction_reader_thumb::read): Likewise.
9138
9139 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9140
9141 PR remote/9665
9142 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9143 instead of remote_send.
9144 (remote_send): Remove.
9145
9146 2018-04-26 Pedro Alves <palves@redhat.com>
9147
9148 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9149 find_function_start_sal instead of find_pc_line.
9150
9151 2018-04-26 Pedro Alves <palves@redhat.com>
9152
9153 * breakpoint.c (set_breakpoint_location_function): Handle
9154 mst_data_gnu_ifunc.
9155 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9156 * elfread.c (elf_symtab_read): Give data symbols with
9157 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9158 (elf_rel_plt_read): Update comment.
9159 * linespec.c (convert_linespec_to_sals): Handle
9160 mst_data_gnu_ifunc.
9161 (minsym_found): Handle mst_data_gnu_ifunc.
9162 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9163 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9164 * parse.c (find_minsym_type_and_address): Handle
9165 mst_data_gnu_ifunc.
9166 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9167 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9168 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9169 comment.
9170 <mst_data_gnu_ifunc>: New enumerator.
9171
9172 2018-04-26 Pedro Alves <palves@redhat.com>
9173
9174 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9175 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9176 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9177 Handle it.
9178 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9179 (lookup_minimal_symbol_by_pc): Adjust.
9180 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9181 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9182 * minsyms.h (lookup_msym_prefer): New enum.
9183 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9184 parameter by a lookup_msym_prefer parameter.
9185
9186 2018-04-26 Pedro Alves <palves@redhat.com>
9187
9188 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9189 ends in "@plt" instead of looking at the symbol's section.
9190
9191 2018-04-26 Pedro Alves <palves@redhat.com>
9192
9193 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9194 all references.
9195 (find_pc_partial_function_gnu_ifunc): Rename to ...
9196 (find_pc_partial_function): ... this, and remove references to
9197 'is_gnu_ifunc_p'.
9198 (find_pc_partial_function): Delete old implementation.
9199 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9200
9201 2018-04-26 Pedro Alves <palves@redhat.com>
9202
9203 * linespec.c (struct bound_minimal_symbol_search_key): New.
9204 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9205 skip first line if we found a GNU ifunc minimal symbol by name.
9206 (compare_msymbols): Change parameters to work with a destructured
9207 lhs minsym.
9208 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9209 functions.
9210
9211 2018-04-26 Pedro Alves <palves@redhat.com>
9212
9213 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9214 ifunc targets here. Instead, if we have an ifunc minsym, use its
9215 address/name.
9216 (add_location_to_breakpoint): Store the minsym and the objfile in
9217 the breakpoint location.
9218 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9219 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9220 Record the minsym in the sal.
9221 * symtab.h (symtab_and_line) <msymbol>: New field.
9222
9223 2018-04-26 Pedro Alves <palves@redhat.com>
9224
9225 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9226 unless we actually resolved the ifunc.
9227
9228 2018-04-26 Pedro Alves <palves@redhat.com>
9229
9230 * c-exp.y (variable production): Prefer ifunc minsyms over
9231 regular function symbols.
9232 * symtab.c (find_gnu_ifunc): New function.
9233 * minsyms.h (lookup_msym_prefer): New enum.
9234 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9235 parameter by a lookup_msym_prefer parameter.
9236 * symtab.h (find_gnu_ifunc): New declaration.
9237
9238 2018-04-26 Pedro Alves <palves@redhat.com>
9239
9240 * blockframe.c (find_gnu_ifunc_target_type): New function.
9241 (find_function_type): New.
9242 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9243 return a value with a memory address.
9244 (eval_call): For calls to GNU ifunc functions, try to find the
9245 type of the target function from the type that the resolver
9246 returns.
9247 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9248 symbols.
9249 * infcall.c (find_function_return_type): Delete.
9250 (find_function_addr): Add 'function_type' parameter. For calls to
9251 GNU ifunc functions, try to find the type of the target function
9252 from the type that the resolver returns, and return it via
9253 FUNCTION_TYPE.
9254 (call_function_by_hand_dummy): Adjust to use the function type
9255 returned by find_function_addr.
9256 (find_function_addr): Add 'function_type' parameter and move
9257 description here.
9258 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9259 declarations.
9260
9261 2018-04-26 Pedro Alves <palves@redhat.com>
9262
9263 * c-exp.y (variable production): Skip finding an alias for ifunc
9264 symbols.
9265
9266 2018-04-26 Pedro Alves <palves@redhat.com>
9267
9268 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9269
9270 2018-04-25 Pedro Alves <palves@redhat.com>
9271
9272 * infcmd.c (kill_command): Print the pid as string, not the whole
9273 thread's ptid. Add comment. s/has been killed/killed/ in output
9274 message.
9275 * remote.c (remote_detach_1): Print the pid as string, not the
9276 whole thread's ptid.
9277
9278 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9279 Sergio Durigan Junior <sergiodj@redhat.com>
9280 Pedro Alves <palves@redhat.com>
9281
9282 * infcmd.c (kill_command): Print message when inferior has
9283 been killed.
9284 * inferior.c (print_inferior_events): Remove 'static'. Set as
9285 '1'.
9286 (add_inferior): Improve message printed when
9287 'print_inferior_events' is on.
9288 (exit_inferior): Remove message printed when
9289 'print_inferior_events' is on.
9290 (detach_inferior): Improve message printed when
9291 'print_inferior_events' is on.
9292 (initialize_inferiors): Use 'add_inferior_silent' to set
9293 'current_inferior_'.
9294 * inferior.h (print_inferior_events): Declare here as
9295 'extern'.
9296 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9297 '[Detaching...]' messages when 'print_inferior_events' is on.
9298 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9299 as prefix/suffix for messages. Remove periods. Fix erroneous
9300 'Detaching after fork from child...', replace it by '... from
9301 parent...'.
9302 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9303 prefix/suffix when printing 'Detaching...' messages. Print
9304 them when 'print_inferior_events' is on.
9305 * remote.c (remote_detach_1): Print message when detaching
9306 from inferior and '!is_fork_parent'.
9307
9308 2018-04-24 Tom Tromey <tom@tromey.com>
9309
9310 * cli-out.h: Reindent.
9311
9312 2018-04-24 Tom Tromey <tom@tromey.com>
9313
9314 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9315 (cli_ui_out::do_field_string): Use fputs_filtered.
9316 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9317
9318 2018-04-23 Tom Tromey <tom@tromey.com>
9319
9320 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9321 gdb::unique_xmalloc_ptr.
9322
9323 2018-04-23 Tom Tromey <tom@tromey.com>
9324
9325 * configure: Rebuild.
9326
9327 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9328
9329 PR gdb/23095
9330 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9331 prepare_for_testing. Set normal_bp to r_debug_state if target
9332 is bsd.
9333
9334 2018-04-21 Pedro Alves <palves@redhat.com>
9335 Rajendra SY <rajendra.sy@gmail.com>
9336
9337 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9338 * remote.c (extended_remote_attach): In all-stop mode, mark the
9339 thread as executing.
9340
9341 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9342
9343 * thread.c (thread_apply_all_command): Fix comment.
9344 (thread_command): Fix comment.
9345
9346 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9347
9348 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9349 parameter.
9350 * features/aarch64-core.c (create_feature_aarch64_core):
9351 Regenerate.
9352 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9353 Likewise.
9354 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9355 Likewise.
9356 * features/i386/32bit-avx512.c
9357 (create_feature_i386_32bit_avx512): Likewise.
9358 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9359 Likewise.
9360 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9361 Likewise.
9362 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9363 Likewise.
9364 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9365 Likewise.
9366 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9367 Likewise.
9368 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9369 Likewise.
9370 * features/i386/64bit-avx512.c
9371 (create_feature_i386_64bit_avx512): Likewise.
9372 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9373 Likewise.
9374 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9375 Likewise.
9376 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9377 Likewise.
9378 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9379 Likewise.
9380 * features/i386/64bit-segments.c
9381 (create_feature_i386_64bit_segments): Likewise.
9382 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9383 Likewise.
9384 * features/i386/x32-core.c
9385 (create_feature_i386_x32_core): Likewise.
9386 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9387 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9388 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9389 * target-descriptions.c: In generated code, don't pass xml
9390 filename.
9391
9392 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9393
9394 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9395 (print_xml_feature::visit_post): Likewise.
9396 (print_xml_feature::visit): Likewise.
9397 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9398 (print_xml_feature): Add new class.
9399 * regformats/regdat.sh: Null xmltarget on feature targets.
9400 * target-descriptions.c (struct target_desc): Add xmltarget.
9401 (maintenance_check_tdesc_xml_convert): Add unittest function.
9402 (tdesc_get_features_xml): Add function to get xml.
9403 (maintenance_check_xml_descriptions): Test xml generation.
9404 * xml-tdesc.c (string_read_description_xml): Add function.
9405 * xml-tdesc.h (string_read_description_xml): Add declaration.
9406
9407 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9408
9409 * features/Makefile: Add feature marker to targets with new style
9410 target descriptions.
9411 * regformats/aarch64.dat: Regenerate.
9412 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9413 * regformats/i386/amd64-avx-linux.dat: Likewise.
9414 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9415 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9416 * regformats/i386/amd64-linux.dat: Likewise.
9417 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9418 * regformats/i386/amd64.dat: Likewise.
9419 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9420 * regformats/i386/i386-avx-linux.dat: Likewise.
9421 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9422 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9423 * regformats/i386/i386-linux.dat: Likewise.
9424 * regformats/i386/i386-mmx-linux.dat: Likewise.
9425 * regformats/i386/i386-mpx-linux.dat: Likewise.
9426 * regformats/i386/i386.dat: Likewise.
9427 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9428 * regformats/i386/x32-avx-linux.dat: Likewise.
9429 * regformats/i386/x32-linux.dat: Likewise.
9430 * regformats/tic6x-c62x-linux.dat: Likewise.
9431 * regformats/tic6x-c64x-linux.dat: Likewise.
9432 * regformats/tic6x-c64xp-linux.dat: Likewise.
9433 * regformats/regdat.sh: Parse feature marker.
9434
9435 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9436
9437 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9438 (tdesc_osabi_name): Likewise.
9439 * target-descriptions.c (tdesc_architecture_name): Add new
9440 function.
9441 (tdesc_osabi_name): Likewise.
9442
9443 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9444
9445 * common/tdesc.c (tdesc_predefined_type): Move to here.
9446 (tdesc_named_type): Likewise.
9447 (tdesc_create_vector): Likewise.
9448 (tdesc_create_struct): Likewise.
9449 (tdesc_set_struct_size): Likewise.
9450 (tdesc_create_union): Likewise.
9451 (tdesc_create_flags): Likewise.
9452 (tdesc_create_enum): Likewise.
9453 (tdesc_add_field): Likewise.
9454 (tdesc_add_typed_bitfield): Likewise.
9455 (tdesc_add_bitfield): Likewise.
9456 (tdesc_add_flag): Likewise.
9457 (tdesc_add_enum_value): Likewise.
9458 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9459 (struct tdesc_type_vector): Likewise.
9460 (struct tdesc_type_field): Likewise.
9461 (struct tdesc_type_with_fields): Likewise.
9462 (tdesc_create_enum): Add declaration.
9463 (tdesc_add_typed_bitfield): Likewise.
9464 (tdesc_add_enum_value): Likewise.
9465 * target-descriptions.c (tdesc_type_field): Move from here.
9466 (tdesc_type_builtin): Likewise.
9467 (tdesc_type_vector): Likewise.
9468 (tdesc_type_with_fields): Likewise.
9469 (tdesc_predefined_types): Likewise.
9470 (tdesc_named_type): Likewise.
9471 (tdesc_create_vector): Likewise.
9472 (tdesc_create_struct): Likewise.
9473 (tdesc_set_struct_size): Likewise.
9474 (tdesc_create_union): Likewise.
9475 (tdesc_create_flags): Likewise.
9476 (tdesc_create_enum): Likewise.
9477 (tdesc_add_field): Likewise.
9478 (tdesc_add_typed_bitfield): Likewise.
9479 (tdesc_add_bitfield): Likewise.
9480 (tdesc_add_flag): Likewise.
9481 (tdesc_add_enum_value): Likewise.
9482 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9483 (tdesc_add_typed_bitfield): Likewise.
9484 (tdesc_add_enum_value): Likewise.
9485
9486 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9487
9488 * common/tdesc.c (tdesc_feature::accept): Move to here.
9489 (tdesc_feature::operator==): Likewise.
9490 (tdesc_create_reg): Likewise.
9491 * common/tdesc.h (tdesc_type_kind): Likewise.
9492 (struct tdesc_type): Likewise.
9493 (struct tdesc_feature): Likewise.
9494 * regformats/regdat.sh: Create a feature.
9495 * target-descriptions.c (tdesc_type_kind): Move from here.
9496 (tdesc_type): Likewise.
9497 (tdesc_type_up): Likewise.
9498 (tdesc_feature): Likewise.
9499 (tdesc_create_reg): Likewise.
9500
9501 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9502
9503 * Makefile.in: Add arch/tdesc.c
9504 * common/tdesc.c: New file.
9505 * common/tdesc.h (tdesc_element_visitor): Move to here.
9506 (tdesc_element): Likewise.
9507 (tdesc_reg): Likewise.
9508 (tdesc_reg_up): Likewise.
9509 * regformats/regdef.h (reg): Add offset to constructors.
9510 * target-descriptions.c (tdesc_element_visitor): Move from here.
9511 (tdesc_element): Likewise.
9512 (tdesc_reg): Likewise.
9513 (tdesc_reg_up): Likewise.
9514
9515 2018-04-17 Tom Tromey <tom@tromey.com>
9516
9517 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9518 discriminant field.
9519
9520 2018-04-17 Tom Tromey <tom@tromey.com>
9521
9522 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9523
9524 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9525
9526 * symtab.c (print_symbol_info): Skip printing filename and line
9527 number when `last' is NULL.
9528 (symtab_symbol_info): Use empty string instead of NULL for first
9529 invocation of print_symbol_info.
9530 (rbreak_command): Pass NULL to `last' parameter of
9531 print_symbol_info.
9532
9533 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9534
9535 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9536 instead of nullptr.
9537
9538 2018-04-16 Pedro Alves <palves@redhat.com>
9539
9540 * MAINTAINERS (sh): Remove.
9541 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9542 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9543 (ALLDEPFILES): Remove sh64-tdep.c.
9544 * NEWS: Mentions that support for SH-5/SH64 is removed.
9545 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9546 (sh*-*-openbsd*): Ditto.
9547 (sh64-*-elf*): Remove.
9548 (sh*): Remove.
9549 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9550 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9551 * sh-tdep.c: No longer include "sh64-tdep.h".
9552 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9553 * sh64-tdep.c, sh64-tdep.h: Remove files.
9554
9555 2018-04-16 Pedro Alves <palves@redhat.com>
9556
9557 * MAINTAINERS: Remove m88k.
9558 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9559 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9560 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9561 * NEWS: Mention that support for m88k was removed.
9562 * configure.host (m88*-*-*): Remove support.
9563 * configure.nat (m88k-*-*): Remove support.
9564 * configure.tgt (m88*-*-openbsd*): Remove.
9565 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9566
9567 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9568
9569 * configure.tgt (x86_tobjs): New variable.
9570 (amd64_tobjs, i386_tobjs): Use it.
9571
9572 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9573
9574 * symtab.c (print_symbol_info): Precede the symbol definition by
9575 the line number when available.
9576 * NEWS: Advertise this enhancement.
9577
9578 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9579
9580 * NEWS (New options): announce set/show record btrace cpu.
9581 * btrace.c: Include record-btrace.h.
9582 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9583 the vendor is unknown.
9584 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9585 Maybe overwrite the btrace configuration's cpu.
9586 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9587 (btrace_fetch): Add cpu parameter. Update callers.
9588 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9589 Maybe overwrite the btrace configuration's cpu. Skip enabling
9590 errata workarounds if the vendor is unknown.
9591 * python/py-record-btrace.c: Include record-btrace.h.
9592 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9593 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9594 * record-btrace.c (record_btrace_cpu_state_kind): New.
9595 (record_btrace_cpu): New.
9596 (set_record_btrace_cpu_cmdlist): New.
9597 (record_btrace_get_cpu): New.
9598 (require_btrace_thread, record_btrace_info)
9599 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9600 (cmd_set_record_btrace_cpu_none): New.
9601 (cmd_set_record_btrace_cpu_auto): New.
9602 (cmd_set_record_btrace_cpu): New.
9603 (cmd_show_record_btrace_cpu): New.
9604 (_initialize_record_btrace): Initialize set/show record btrace cpu
9605 commands.
9606 * record-btrace.h (record_btrace_get_cpu): New.
9607
9608 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9609
9610 * record.c (set_record_command): Fix typo in message.
9611
9612 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9613
9614 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9615
9616 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9617
9618 * infrun.c (process_event_stop_test): Call
9619 gdbarch_in_indirect_branch_thunk.
9620 * gdbarch.sh (in_indirect_branch_thunk): New.
9621 * gdbarch.c: Regenerated.
9622 * gdbarch.h: Regenerated.
9623 * x86-tdep.h: New.
9624 * x86-tdep.c: New.
9625 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9626 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9627 (ALLDEPFILES): Add x86-tdep.c.
9628 * arch-utils.h (default_in_indirect_branch_thunk): New.
9629 * arch-utils.c (default_in_indirect_branch_thunk): New.
9630 * i386-tdep: Include x86-tdep.h.
9631 (i386_in_indirect_branch_thunk): New.
9632 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9633 function.
9634 * amd64-tdep: Include x86-tdep.h.
9635 (amd64_in_indirect_branch_thunk): New.
9636 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9637
9638 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9639
9640 PR gdb/23053
9641 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9642 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9643 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9644 regression.
9645
9646 2018-04-12 Tom Tromey <tom@tromey.com>
9647
9648 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9649 (rust_evaluate_subexp): Likewise.
9650
9651 2018-04-12 Pedro Alves <palves@redhat.com>
9652
9653 * procfs.c (procfs_detach): Make forward declaration's prototype
9654 match definition's protototype.
9655 (proc_get_LDT_entry): Remove stale do_cleanups call.
9656
9657 2018-04-12 Pedro Alves <palves@redhat.com>
9658
9659 * target.h (target_ops::to_has_exited): Delete.
9660 (target_has_exited): Delete.
9661 * target-delegates.c: Regenerate.
9662
9663 2018-04-11 Pedro Alves <palves@redhat.com>
9664
9665 * target.c (fileio_fh_t::t): Add comment.
9666 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9667 (target_fileio_close): Handle a NULL target.
9668 (invalidate_fileio_fh): New.
9669 (target_close): Call it.
9670 * remote.c (remote_hostio_send_command): No longer check whether
9671 remote_desc is open.
9672
9673 2018-04-11 Pedro Alves <palves@redhat.com>
9674
9675 * target.c (fileio_fh_t): Make it a named struct instead of a
9676 typedef.
9677 (fileio_fh_t::is_closed): New method.
9678 (DEF_VEC_O (fileio_fh_t)): Remove.
9679 (fileio_fhandles): Now a std::vector.
9680 (is_closed_fileio_fh): Delete.
9681 (acquire_fileio_fd): Adjust. Rename parameters.
9682 (release_fileio_fd): Adjust.
9683 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9684 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9685 (target_fileio_close): Adjust.
9686
9687 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
9688
9689 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9690 index.
9691
9692 2018-04-10 Pedro Alves <palves@redhat.com>
9693
9694 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9695 (scoped_finish_thread_state): New class.
9696 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9697 cleanup.
9698 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9699 (fetch_inferior_event, normal_stop): Likewise.
9700 * thread.c (finish_thread_state_cleanup): Delete.
9701
9702 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9703 Pedro Alves <palves@redhat.com>
9704
9705 * value.c: Include "selftest.h" and "common/array-view.h".
9706 (struct range) <operator ==>: New.
9707 (test_ranges_contain): New.
9708 (check_ranges_vector): New.
9709 (test_insert_into_bit_range_vector): New.
9710 (_initialize_values): Register selftests.
9711 * common/array-view.h (operator==, operator!=): New.
9712
9713 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9714
9715 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9716 an iterator.
9717 * inline-frame.c: Include <algorithm>.
9718 (struct inline_state): Add constructor.
9719 (inline_state_s): Remove.
9720 (DEF_VEC_O(inline_state_s)): Remove.
9721 (inline_states): Change type to std::vector.
9722 (find_inline_frame_state): Adjust to std::vector.
9723 (allocate_inline_frame_state): Remove.
9724 (clear_inline_frame_state): Adjust to std::vector.
9725 (skip_inline_frames): Adjust to std::vector.
9726
9727 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9728
9729 * tracepoint.h (struct trace_state_variable): Add constructor.
9730 <name>: Change type to std::string.
9731 * tracepoint.c (tsv_s): Remove.
9732 (DEF_VEC_O(tsv_s)): Remove.
9733 (tvariables): Change to std::vector.
9734 (create_trace_state_variable): Adjust to std::vector.
9735 (find_trace_state_variable): Likewise.
9736 (find_trace_state_variable_by_number): Likewise.
9737 (delete_trace_state_variable): Likewise.
9738 (trace_variable_command): Adjust to std::string.
9739 (delete_trace_variable_command): Likewise.
9740 (tvariables_info_1): Adjust to std::vector.
9741 (save_trace_state_variables): Likewise.
9742 (start_tracing): Likewise.
9743 (merge_uploaded_trace_state_variables): Adjust to std::vector
9744 and std::string.
9745 * target.h (struct target_ops)
9746 <to_download_trace_state_variable>: Pass reference to
9747 trace_state_variable.
9748 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9749 * target-delegates.c: Re-generate.
9750 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9751 (mi_tsv_deleted): Likewise.
9752 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9753 * remote.c (remote_download_trace_state_variable): Change
9754 pointer to reference and adjust.
9755 * make-target-delegates (parse_argtypes): Handle references.
9756 (write_function_header): Likewise.
9757 (munge_type): Likewise.
9758
9759 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9760
9761 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9762 string_view-selftests.c.
9763 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9764 testsuite.
9765 * unittests/basic_string_view/cons/char/1.cc: Likewise.
9766 * unittests/basic_string_view/cons/char/2.cc: Likewise.
9767 * unittests/basic_string_view/cons/char/3.cc: Likewise.
9768 * unittests/basic_string_view/element_access/char/1.cc:
9769 Likewise.
9770 * unittests/basic_string_view/element_access/char/empty.cc:
9771 Likewise.
9772 * unittests/basic_string_view/element_access/char/front_back.cc:
9773 Likewise.
9774 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9775 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9776 Likewise.
9777 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9778 Likewise.
9779 * unittests/basic_string_view/modifiers/swap/char/1.cc:
9780 Likewise.
9781 * unittests/basic_string_view/operations/compare/char/1.cc:
9782 Likewise.
9783 * unittests/basic_string_view/operations/compare/char/13650.cc:
9784 Likewise.
9785 * unittests/basic_string_view/operations/copy/char/1.cc:
9786 Likewise.
9787 * unittests/basic_string_view/operations/data/char/1.cc:
9788 Likewise.
9789 * unittests/basic_string_view/operations/find/char/1.cc:
9790 Likewise.
9791 * unittests/basic_string_view/operations/find/char/2.cc:
9792 Likewise.
9793 * unittests/basic_string_view/operations/find/char/3.cc:
9794 Likewise.
9795 * unittests/basic_string_view/operations/find/char/4.cc:
9796 Likewise.
9797 * unittests/basic_string_view/operations/rfind/char/1.cc:
9798 Likewise.
9799 * unittests/basic_string_view/operations/rfind/char/2.cc:
9800 Likewise.
9801 * unittests/basic_string_view/operations/rfind/char/3.cc:
9802 Likewise.
9803 * unittests/basic_string_view/operations/substr/char/1.cc:
9804 Likewise.
9805 * unittests/basic_string_view/operators/char/2.cc: Likewise.
9806 * unittests/string_view-selftests.c: New file.
9807
9808 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9809
9810 * unittests/basic_string_view/capacity/1.cc: New file.
9811 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9812 * unittests/basic_string_view/cons/char/1.cc: New file.
9813 * unittests/basic_string_view/cons/char/2.cc: New file.
9814 * unittests/basic_string_view/cons/char/3.cc: New file.
9815 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9816 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9817 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9818 * unittests/basic_string_view/element_access/char/1.cc: New file.
9819 * unittests/basic_string_view/element_access/char/2.cc: New file.
9820 * unittests/basic_string_view/element_access/char/empty.cc: New file.
9821 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9822 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9823 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9824 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9825 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9826 * unittests/basic_string_view/include.cc: New file.
9827 * unittests/basic_string_view/inserters/char/1.cc: New file.
9828 * unittests/basic_string_view/inserters/char/2.cc: New file.
9829 * unittests/basic_string_view/inserters/char/3.cc: New file.
9830 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9831 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9832 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9833 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9834 * unittests/basic_string_view/literals/types.cc: New file.
9835 * unittests/basic_string_view/literals/values.cc: New file.
9836 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9837 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9838 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9839 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9840 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9841 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9842 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9843 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9844 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9845 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9846 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9847 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9848 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9849 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9850 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9851 * unittests/basic_string_view/operations/data/char/1.cc: New file.
9852 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9853 * unittests/basic_string_view/operations/find/char/1.cc: New file.
9854 * unittests/basic_string_view/operations/find/char/2.cc: New file.
9855 * unittests/basic_string_view/operations/find/char/3.cc: New file.
9856 * unittests/basic_string_view/operations/find/char/4.cc: New file.
9857 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9858 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9859 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9860 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9861 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9862 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9863 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9864 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9865 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9866 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9867 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9868 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9869 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9870 * unittests/basic_string_view/operators/char/2.cc: New file.
9871 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9872 * unittests/basic_string_view/range_access/char/1.cc: New file.
9873 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9874 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9875 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9876 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9877 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9878 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9879 * unittests/basic_string_view/requirements/typedefs.cc: New file.
9880 * unittests/basic_string_view/typedefs.cc: New file.
9881 * unittests/basic_string_view/types/1.cc: New file.
9882
9883 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9884
9885 * common/gdb_string_view.h: Remove libstdc++ implementation
9886 details, adjust to gdb reality.
9887 * common/gdb_string_view.tcc: Likewise.
9888 * cli/cli-script.c (struct string_view): Remove.
9889 (user_args) <m_args>: Change element type to gdb::string_view.
9890 (user_args::insert_args): Adjust.
9891
9892 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9893
9894 * common/gdb_string_view.h: New file.
9895 * common/gdb_string_view.tcc: New file.
9896
9897 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9898
9899 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9900 * configure: Re-generate.
9901
9902 2018-04-09 Pedro Alves <palves@redhat.com>
9903
9904 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9905 (set_target_gdbarch): Call
9906 gdb::observers::architecture_changed.notify instead of
9907 observer_notify_architecture_changed.
9908
9909 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9910
9911 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9912 (do_restore_current_traceframe_cleanup): Remove.
9913 (restore_current_traceframe_cleanup_dtor): Remove.
9914 (make_cleanup_restore_current_traceframe): Remove.
9915 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9916 New.
9917 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9918 * infrun.c (fetch_inferior_event): Use
9919 scoped_restore_current_traceframe.
9920
9921 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9922
9923 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9924 Remove.
9925 <n_allocated_type_units>: Remove.
9926 <all_type_units>: Change to std::vector.
9927 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9928 to std::vector change.
9929 (dwarf2_per_objfile::get_cutu): Likewise.
9930 (dwarf2_per_objfile::get_tu): Likewise.
9931 (create_signatured_type_table_from_index): Likewise.
9932 (create_signatured_type_table_from_debug_names): Likewise.
9933 (dw2_symtab_iter_next): Likewise.
9934 (dw2_print_stats): Likewise.
9935 (dw2_expand_all_symtabs): Likewise.
9936 (dw2_expand_marked_cus): Likewise.
9937 (dw2_debug_names_iterator::next): Likewise.
9938 (dwarf2_initialize_objfile): Likewise.
9939 (add_signatured_type_cu_to_table): Likewise.
9940 (create_all_type_units): Likewise.
9941 (add_type_unit): Likewise.
9942 (struct tu_abbrev_offset): Add constructor.
9943 (build_type_psymtabs_1): Adjust to std::vector change.
9944 (print_tu_stats): Likewise.
9945 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9946 (write_debug_names): Likewise.
9947
9948 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9949
9950 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9951 Make an std::vector.
9952 <n_comp_units>: Remove.
9953 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9954 to std::vector change.
9955 (dwarf2_per_objfile::get_cutu): Likewise.
9956 (dwarf2_per_objfile::get_cu): Likewise.
9957 (create_cus_from_index): Likewise.
9958 (create_addrmap_from_index): Likewise.
9959 (create_addrmap_from_aranges): Likewise.
9960 (dwarf2_read_index): Likewise.
9961 (dw2_find_last_source_symtab): Likewise.
9962 (dw2_map_symtabs_matching_filename): Likewise.
9963 (dw2_symtab_iter_next): Likewise.
9964 (dw2_print_stats): Likewise.
9965 (dw2_expand_all_symtabs): Likewise.
9966 (dw2_expand_symtabs_with_fullname): Likewise.
9967 (dw2_expand_marked_cus): Likewise.
9968 (dw2_map_symbol_filenames): Likewise.
9969 (create_cus_from_debug_names): Likewise.
9970 (dwarf2_read_debug_names): Likewise.
9971 (dw2_debug_names_iterator::next): Likewise.
9972 (dwarf2_initialize_objfile): Likewise.
9973 (set_partial_user): Likewise.
9974 (dwarf2_build_psymtabs_hard): Likewise.
9975 (read_comp_units_from_section): Remove arguments, adjust to
9976 std::vector change.
9977 (create_all_comp_units): Adjust to std::vector and
9978 read_comp_units_from_section changes.
9979 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9980 change.
9981 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9982 (psyms_seen_size): Likewise.
9983 (write_gdbindex): Likewise.
9984 (write_debug_names): Likewise.
9985
9986 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9987
9988 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9989 with dwarf2_per_objfile.
9990 (create_cus_from_index): Likewise.
9991 (create_signatured_type_table_from_index): Likewise.
9992 (dwarf2_read_index): Likewise.
9993 (dwarf2_initialize_objfile): Likewise.
9994 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9995 per_cu rather than get_dwarf2_per_objfile.
9996
9997 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9998
9999 * dwarf2read.h (struct signatured_type): Forward declare.
10000 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10001 New methods.
10002 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10003 (dw2_get_cutu): ...this.
10004 (dwarf2_per_objfile::get_cu): Rename from...
10005 (dw2_get_cu): ...this.
10006 (dwarf2_per_objfile::get_tu): New.
10007 (create_addrmap_from_index): Adjust.
10008 (create_addrmap_from_aranges): Adjust.
10009 (dw2_find_last_source_symtab): Adjust.
10010 (dw2_map_symtabs_matching_filename): Adjust.
10011 (dw2_symtab_iter_next): Adjust.
10012 (dw2_print_stats): Adjust.
10013 (dw2_expand_all_symtabs): Adjust.
10014 (dw2_expand_symtabs_with_fullname): Adjust.
10015 (dw2_expand_marked_cus): Adjust.
10016 (dw_expand_symtabs_matching_file_matcher): Adjust.
10017 (dw2_map_symbol_filenames): Adjust.
10018 (dw2_debug_names_iterator::next): Adjust.
10019 (dwarf2_initialize_objfile): Adjust.
10020 (set_partial_user): Adjust.
10021 (dwarf2_build_psymtabs_hard): Adjust.
10022
10023 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10024
10025 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10026 Remove unused variables.
10027 (dw2_map_symtabs_matching_filename): Likewise.
10028 (dwarf2_record_block_ranges): Likewise.
10029 (dwarf2_read_addr_index): Likewise.
10030 (follow_die_offset): Likewise.
10031
10032 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10033
10034 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10035 to symbol_file_add_main.
10036
10037 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10038
10039 PR mi/22299
10040 * mi/mi-console.c (do_fputc_async_safe): New.
10041 (mi_console_file::write_async_safe): New.
10042 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10043 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10044 New.
10045 * ui-file.c (ui_file::putstrn): Adjust call to
10046 fputstrn_unfiltered.
10047 * utils.c (printchar): Replace do_fputs and do_fprintf
10048 parameters by do_fputc.
10049 (fputstr_filtered): Adjust call to printchar.
10050 (fputstr_unfiltered): Likewise.
10051 (fputstrn_filtered): Likewise.
10052 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10053 printchar.
10054 * utils.h (do_fputc_ftype): New typedef.
10055 (fputstrn_unfiltered): Add do_fputc parameter.
10056
10057 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10058
10059 * regformats/i386/i386-avx.dat: Remove.
10060
10061 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10062
10063 PR gdb/22979
10064 * amd64-tdep.c (amd64_none_init_abi): New function.
10065 (amd64_x32_none_init_abi): New function.
10066 (_initialize_amd64_tdep): Register handlers for x86-64 and
10067 x64_32 with GDB_OSABI_NONE.
10068 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10069 GDB_OSABI_NONE osabi.
10070
10071 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10072
10073 PR gdb/22980
10074 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10075 GDB_OSABI_NONE.
10076 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10077 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10078
10079 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10080
10081 * common/byte-vector.h (char_vector): New type.
10082 * target.h (target_read_alloc): Return
10083 gdb::optional<byte_vector>.
10084 (target_read_stralloc): Return gdb::optional<char_vector>.
10085 (target_get_osdata): Return gdb::optional<char_vector>.
10086 * target.c (target_read_alloc_1): Templatize. Replacement
10087 manual memory management with vector.
10088 (target_read_alloc): Change return type, adjust.
10089 (target_read_stralloc): Change return type, adjust.
10090 (target_get_osdata): Change return type, adjust.
10091 * auxv.c (struct auxv_info) <length>: Remove.
10092 <data>: Change type to gdb::optional<byte_vector>.
10093 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10094 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10095 (target_auxv_search): Adjust.
10096 (fprint_target_auxv): Adjust.
10097 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10098 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10099 (linux_make_corefile_notes): Adjust.
10100 * osdata.c (get_osdata): Adjust.
10101 * remote.c (remote_get_threads_with_qxfer): Adjust.
10102 (remote_memory_map): Adjust.
10103 (remote_traceframe_info): Adjust.
10104 (btrace_read_config): Adjust.
10105 (remote_read_btrace): Adjust.
10106 (remote_pid_to_exec_file): Adjust.
10107 * solib-aix.c (solib_aix_get_library_list): Adjust.
10108 * solib-dsbt.c (decode_loadmap): Don't free buf.
10109 (dsbt_get_initial_loadmaps): Adjust.
10110 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10111 * solib-target.c (solib_target_current_sos): Adjust.
10112 * tracepoint.c (sdata_make_value): Adjust.
10113 * xml-support.c (xinclude_start_include): Adjust.
10114 (xml_fetch_content_from_file): Adjust.
10115 * xml-support.h (xml_fetch_another): Change return type.
10116 (xml_fetch_content_from_file): Change return type.
10117 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10118 * xml-tdesc.c (file_read_description_xml): Adjust.
10119 (fetch_available_features_from_target): Change return type.
10120 (target_fetch_description_xml): Adjust.
10121 (target_read_description_xml): Adjust.
10122
10123 2018-04-06 Tom Tromey <tom@tromey.com>
10124
10125 * value.c (~value): Update.
10126 (struct value) <contents>: Now unique_xmalloc_ptr.
10127 (value_contents_bits_eq, allocate_value_contents)
10128 (value_contents_raw, value_contents_all_raw)
10129 (value_contents_for_printing, value_contents_for_printing_const)
10130 (set_value_enclosing_type): Update.
10131
10132 2018-04-06 Tom Tromey <tom@tromey.com>
10133
10134 * value.c (range_s): Remove typedef, VEC.
10135 (struct range): Add operator<.
10136 (range_lessthan): Remove.
10137 (ranges_contain): Change type.
10138 (~value): Update.
10139 (struct value) <unavailable, optimized_out>: Now std::vector.
10140 (value_entirely_available)
10141 (value_entirely_covered_by_range_vector)
10142 (value_entirely_unavailable, value_entirely_optimized_out):
10143 Update.
10144 (insert_into_bit_range_vector): Change argument type.
10145 (find_first_range_overlap): Likewise.
10146 (struct ranges_and_idx, value_contents_bits_eq)
10147 (require_not_optimized_out, require_available): Update.
10148 (ranges_copy_adjusted): Change argument types.
10149 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10150
10151 2018-04-06 Tom Tromey <tom@tromey.com>
10152
10153 * value.c (~value): Update.
10154 (struct value) <parent>: Now a value_ref_ptr.
10155 (value_parent, set_value_parent, value_address, value_copy):
10156 Update.
10157
10158 2018-04-06 Tom Tromey <tom@tromey.com>
10159
10160 * value.c (struct value): Add constructor, destructor, and member
10161 initializers.
10162 (allocate_value_lazy, value_decref): Update.
10163
10164 2018-04-06 Tom Tromey <tom@tromey.com>
10165
10166 * value.c (struct value) <released, next>: Remove.
10167 (all_values): Now a std::vector.
10168 (allocate_value_lazy): Update.
10169 (value_next): Remove.
10170 (value_mark, value_free_to_mark, release_value)
10171 (value_release_to_mark): Update.
10172
10173 2018-04-06 Tom Tromey <tom@tromey.com>
10174
10175 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10176 (free_value_chain): Remove.
10177 * value.c (free_value_chain): Remove.
10178 (value_release_to_mark): Return a std::vector.
10179 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10180 std::vector.
10181 (check_condition): Update.
10182 * eval.c (fetch_subexp_value): Change "val_chain" to a
10183 std::vector.
10184 * breakpoint.c (update_watchpoint): Update.
10185 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10186
10187 2018-04-06 Tom Tromey <tom@tromey.com>
10188
10189 * value.h (free_all_values): Remove.
10190 * value.c (free_all_values): Remove.
10191
10192 2018-04-06 Tom Tromey <tom@tromey.com>
10193
10194 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10195 (value_history_chain, value_history_count): Remove.
10196 (value_history): New global.
10197 (record_latest_value, access_value_history, show_values)
10198 (preserve_values): Update.
10199
10200 2018-04-06 Tom Tromey <tom@tromey.com>
10201
10202 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10203 * varobj.c (varobj_set_display_format, varobj_set_value)
10204 (install_default_visualizer, construct_visualizer)
10205 (install_new_value, ~varobj, varobj_get_value_type)
10206 (my_value_of_variable, varobj_editable_p): Update.
10207 * c-varobj.c (c_describe_child, c_value_of_variable)
10208 (cplus_number_of_children, cplus_describe_child): Update.
10209 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10210 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10211 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10212
10213 2018-04-06 Tom Tromey <tom@tromey.com>
10214
10215 * printcmd.c (last_examine_address): Change type to
10216 value_ref_ptr.
10217 (do_examine, x_command): Update.
10218
10219 2018-04-06 Tom Tromey <tom@tromey.com>
10220
10221 * value.c (release_value): Update.
10222 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10223 (struct bpstats) <val>: Now a value_ref_ptr.
10224 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10225 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10226 (~watchpoint, print_it_watchpoint, watch_command_1)
10227 (invalidate_bp_value_on_memory_change): Update.
10228
10229 2018-04-06 Tom Tromey <tom@tromey.com>
10230
10231 * varobj.c (varobj_clear_saved_item)
10232 (update_dynamic_varobj_children, install_new_value, ~varobj):
10233 Update.
10234 * value.h (value_incref): Move declaration earlier.
10235 (value_decref): Rename from value_free.
10236 (struct value_ref_policy): New.
10237 (value_ref_ptr): New typedef.
10238 (struct value_deleter): Remove.
10239 (gdb_value_up): Remove typedef.
10240 (release_value): Change return type.
10241 (release_value_or_incref): Remove.
10242 * value.c (set_value_parent): Update.
10243 (value_incref): Change return type.
10244 (value_decref): Rename from value_free.
10245 (value_free_to_mark, free_all_values, free_value_chain): Update.
10246 (release_value): Return value_ref_ptr.
10247 (release_value_or_incref): Remove.
10248 (record_latest_value, set_internalvar, clear_internalvar):
10249 Update.
10250 * stack.c (info_frame_command): Don't call value_free.
10251 * python/py-value.c (valpy_dealloc, valpy_new)
10252 (value_to_value_object): Update.
10253 * printcmd.c (do_examine): Update.
10254 * opencl-lang.c (lval_func_free_closure): Update.
10255 * mi/mi-main.c (register_changed_p): Don't call value_free.
10256 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10257 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10258 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10259 value_free.
10260 * guile/scm-value.c (vlscm_free_value_smob)
10261 (vlscm_scm_from_value): Update.
10262 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10263 (frame_unwind_register_unsigned, get_frame_register_bytes)
10264 (put_frame_register_bytes): Don't call value_free.
10265 * findvar.c (address_from_register): Don't call value_free.
10266 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10267 * dwarf2loc.c (entry_data_value_free_closure)
10268 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10269 (dwarf2_evaluate_loc_desc_full): Update.
10270 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10271 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10272 (~watchpoint, watch_command_1)
10273 (invalidate_bp_value_on_memory_change): Update.
10274 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10275
10276 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10277
10278 PR gdb/23022
10279 * warning.m4: Add -Wno-error=deprecated-register.
10280 * configure: Re-generate.
10281
10282 2018-04-05 Tom Tromey <tom@tromey.com>
10283
10284 * linespec.h: Remove include of "vec.h".
10285
10286 2018-04-05 Tom Tromey <tom@tromey.com>
10287
10288 * linespec.c (typep): Remove typedef.
10289 (find_methods, find_superclass_methods): Take a std::vector.
10290 (find_method): Use std::vector.
10291
10292 2018-04-05 Tom Tromey <tom@tromey.com>
10293
10294 * utils.c (compare_strings): Remove.
10295 * utils.h (compare_strings): Remove.
10296 * objc-lang.h (find_imps): Update.
10297 * objc-lang.c (find_methods): Take a std::vector.
10298 (uniquify_strings, find_imps): Likewise.
10299 * linespec.c (find_methods): Take a std::vector.
10300 (decode_objc): Use std::vector.
10301 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10302 a std::vector.
10303 (find_method, find_function_symbols): Use std::vector.
10304
10305 2018-04-05 Tom Tromey <tom@tromey.com>
10306
10307 * completer.c (completion_tracker::completion_tracker): Remove
10308 cast.
10309 (completion_tracker::discard_completions): Likewise.
10310 * breakpoint.c (ambiguous_names_p): Remove cast.
10311 * ada-lang.c (_initialize_ada_language): Remove cast.
10312 * utils.h (streq): Update.
10313 (streq_hash): Add new declaration.
10314 * utils.c (streq): Return bool.
10315 (streq_hash): New function.
10316
10317 2018-04-05 Tom Tromey <tom@tromey.com>
10318
10319 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10320 Remove a string copy.
10321
10322 2018-04-05 Tom Tromey <tom@tromey.com>
10323
10324 * linespec.c (filter_results): Use std::vector.
10325 (decode_line_2, decode_line_full): Update.
10326
10327 2018-04-05 Tom Tromey <tom@tromey.com>
10328
10329 * linespec.c (canonical_to_fullform): Return std::string.
10330 (filter_results): Update.
10331 (struct decode_line_2_item): Add constructor.
10332 <fullform, displayform>: Now std::string.
10333 (decode_line_2_compare_items): Now a std::sort comparator.
10334 (decode_line_2): Update.
10335
10336 2018-04-05 Tom Tromey <tom@tromey.com>
10337
10338 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10339 (unexpected_linespec_error): Update.
10340 (linespec_parse_basic, parse_linespec): Update.
10341
10342 2018-04-05 Tom Tromey <tom@tromey.com>
10343
10344 * linespec.c (linespec_parse_basic): Reindent.
10345
10346 2018-04-05 Tom Tromey <tom@tromey.com>
10347
10348 * minsyms.h (iterate_over_minimal_symbols): Update.
10349 * minsyms.c (iterate_over_minimal_symbols): Take a
10350 gdb::function_view.
10351 * linespec.c (struct collect_minsyms): Remove.
10352 (compare_msyms): Now a std::sort comparator.
10353 (add_minsym): Add parameters.
10354 (search_minsyms_for_name): Update. Use std::vector.
10355
10356 2018-04-03 Tom Tromey <tom@tromey.com>
10357
10358 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10359 gdb::byte_vector.
10360
10361 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10362
10363 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10364
10365 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10366
10367 PR gdb/16959
10368 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10369 printing static type.
10370
10371 2018-04-01 Tom Tromey <tom@tromey.com>
10372
10373 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10374 (rs6000_xfer_shared_libraries): Update.
10375
10376 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10377
10378 * common/gdb_vecs.h (char_ptr): Remove.
10379 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10380
10381 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10382
10383 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10384 with std::vector.
10385 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10386
10387 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10388
10389 * tracepoint.h (struct uploaded_tp): Initialize fields.
10390 <actions, step_actions, cmd_strings>: Change type to
10391 std::vector<char *>.
10392 * tracepoint.c (get_uploaded_tp): Allocate with new.
10393 (free_uploaded_tps): Free with delete.
10394 (parse_tracepoint_definition): Adjust to std::vector change.
10395 * breakpoint.c (read_uploaded_action): Likewise.
10396 (create_tracepoint_from_upload): Likewise.
10397 * ctf.c (ctf_write_uploaded_tp): Likewise.
10398 (SET_ARRAY_FIELD): Likewise.
10399 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10400
10401 2018-03-30 Tom Tromey <tom@tromey.com>
10402
10403 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10404 std::unique_ptr.
10405 (svr4_keep_data_in_core): Update.
10406 (svr4_read_so_list): Update.
10407
10408 2018-03-30 Tom Tromey <tom@tromey.com>
10409
10410 * windows-nat.c (handle_output_debug_string, handle_exception):
10411 Update.
10412 * target.h (target_read_string): Update.
10413 * target.c (target_read_string): Change "string" to
10414 unique_xmalloc_ptr.
10415 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10416 Update.
10417 * solib-frv.c (frv_current_sos): Update.
10418 * solib-dsbt.c (dsbt_current_sos): Update.
10419 * solib-darwin.c (darwin_current_sos): Update.
10420 * linux-thread-db.c (inferior_has_bug): Update.
10421 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10422 Update. Remove alloca.
10423 * ada-lang.c (ada_main_name): Update.
10424
10425 2018-03-30 Tom Tromey <tom@tromey.com>
10426
10427 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10428 (struct dwo_file_deleter): New.
10429 (dwo_file_up): New typedef.
10430 (open_and_init_dwo_file): Use dwo_file_up.
10431 (free_dwo_file_cleanup): Remove.
10432
10433 2018-03-30 Tom Tromey <tom@tromey.com>
10434
10435 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10436 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10437
10438 2018-03-30 Tom Tromey <tom@tromey.com>
10439
10440 * dwarf2read.c (class free_cached_comp_units): New class.
10441 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10442 (free_cached_comp_units): Remove function.
10443
10444 2018-03-30 Tom Tromey <tom@tromey.com>
10445
10446 * utils.h (make_cleanup_unpush_target): Remove.
10447 * inf-ptrace.c (struct target_unpusher): New.
10448 (target_unpush_up) New typedef.
10449 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10450 target_unpush_up.
10451 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10452
10453 2018-03-27 Tom Tromey <tom@tromey.com>
10454
10455 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10456
10457 2018-03-27 Pedro Alves <palves@redhat.com>
10458 Tom Tromey <tom@tromey.com>
10459
10460 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10461 destructor. Now a class.
10462 (gdb_readline_wrapper_cleanup): Remove function.
10463 (gdb_readline_wrapper): Remove cleanups.
10464
10465 2018-03-27 Tom Tromey <tom@tromey.com>
10466
10467 * typeprint.h (struct type_print_options) <local_typedefs,
10468 global_typedefs>: Remove "struct" keyword.
10469 (class typedef_hash_table): New class.
10470 (recursively_update_typedef_hash, add_template_parameters)
10471 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10472 (find_typedef_in_hash): Don't declare.
10473 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10474 (typedef_hash_table::recursively_update): Rename from
10475 recursively_update_typedef_hash. Now a member.
10476 (typedef_hash_table::add_template_parameters): Rename from
10477 add_template_parameters. Now a member.
10478 (typedef_hash_table::typedef_hash_table): Now a constructor;
10479 rename from create_typedef_hash.
10480 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10481 rename from free_typedef_hash.
10482 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10483 (do_free_global_table): Remove.
10484 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10485 from copy_type_recursive.
10486 (create_global_typedef_table): Remove.
10487 (typedef_hash_table::find_global_typedef): Now a member of
10488 typedef_hash_table.
10489 (typedef_hash_table::find_typedef): Rename from
10490 find_typedef_in_hash; now a member.
10491 (whatis_exp): Update.
10492 * extension.h (struct ext_lang_type_printers): Add constructor and
10493 destructor.
10494 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10495 declare.
10496 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10497 Now a constructor; rename from start_ext_lang_type_printers.
10498 (ext_lang_type_printers): Now a destructor; rename from
10499 free_ext_lang_type_printers.
10500 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10501 Update.
10502 (c_type_print_base_struct_union): Update. Remove cleanups.
10503
10504 2018-03-27 Tom Tromey <tom@tromey.com>
10505
10506 * dwarf-index-write.c: Include <cmath>.
10507
10508 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10509
10510 * NEWS: Add entry describing new "set|show varsize-limit" command.
10511 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10512 command.
10513 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10514 "set variable".
10515
10516 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10517
10518 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10519 dwarf-index-write.c
10520 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10521 * dwarf-index-common.c: New file.
10522 * dwarf-index-common.h: New file.
10523 * dwarf-index-write.c: New file.
10524 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10525 (struct dwarf2_section_info): Move from here.
10526 (dwarf2_section_info_def): Likewise.
10527 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10528 (offset_type): Likewise.
10529 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10530 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10531 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10532 (byte_swap): Likewise.
10533 (MAYBE_SWAP): Likewise.
10534 (dwarf2_per_cu_ptr): Likewise.
10535 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10536 (struct tu_stats): Likewise.
10537 (struct dwarf2_per_objfile): Likewise.
10538 (struct dwarf2_per_cu_data): Likewise.
10539 (struct signatured_type): Likewise.
10540 (sig_type_ptr): Likewise.
10541 (DEF_VEC_P (sig_type_ptr)): Likewise.
10542 (INDEX4_SUFFIX): Likewise.
10543 (INDEX5_SUFFIX): Likewise.
10544 (DEBUG_STR_SUFFIX): Likewise.
10545 (dwarf2_read_section): Make non-static.
10546 (mapped_index_string_hash): Move from here.
10547 (dwarf5_djb_hash): Likewise.
10548 (file_write): Likewise.
10549 (class data_buf): Likewise.
10550 (struct symtab_index_entry): Likewise.
10551 (struct mapped_symtab): Likewise.
10552 (find_slot): Likewise.
10553 (hash_expand): Likewise.
10554 (add_index_entry): Likewise.
10555 (uniquify_cu_indices): Likewise.
10556 (class c_str_view): Likewise.
10557 (class c_str_view_hasher): Likewise.
10558 (class vector_hasher): Likewise.
10559 (write_hash_table): Likewise.
10560 (psym_index_map): Likewise.
10561 (struct addrmap_index_data): Likewise.
10562 (add_address_entry): Likewise.
10563 (add_address_entry_worker): Likewise.
10564 (write_address_map): Likewise.
10565 (symbol_kind): Likewise.
10566 (write_psymbols): Likewise.
10567 (struct signatured_type_index_data): Likewise.
10568 (write_one_signatured_type): Likewise.
10569 (recursively_count_psymbols): Likewise.
10570 (recursively_write_psymbols): Likewise.
10571 (class debug_names): Likewise.
10572 (check_dwarf64_offsets): Likewise.
10573 (psyms_seen_size): Likewise.
10574 (write_gdbindex): Likewise.
10575 (write_debug_names): Likewise.
10576 (assert_file_size): Likewise.
10577 (write_psymtabs_to_index): Likewise.
10578 (save_gdb_index_command): Likewise.
10579 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10580 command.
10581 * dwarf2read.h: New file.
10582
10583 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10584
10585 PR gdb/22670
10586 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10587 symbol name if the CU's language stores symbol names in linkage
10588 format.
10589 * language.h (struct language_defn)
10590 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10591 all instances of this struct.
10592
10593 2018-03-26 Tom Tromey <tom@tromey.com>
10594
10595 * stack.c (backtrace_command_1): Remove verbose code.
10596
10597 2018-03-26 Tom Tromey <tom@tromey.com>
10598
10599 * python/py-framefilter.c (py_print_type): Don't catch
10600 exceptions. Return void.
10601 (py_print_value): Likewise.
10602 (py_print_single_arg): Likewise.
10603 (enumerate_args): Don't catch exceptions.
10604 (py_print_args): Likewise.
10605 (py_print_frame): Likewise.
10606 (gdbpy_apply_frame_filter): Catch exceptions here.
10607
10608 2018-03-26 Tom Tromey <tom@tromey.com>
10609
10610 * stack.c (_initialize_stack): Remove trailing newlines from help
10611 text. Add "Usage" line to "backtrace" help.
10612
10613 2018-03-26 Tom Tromey <tom@tromey.com>
10614
10615 PR python/16486:
10616 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10617
10618 2018-03-26 Tom Tromey <tom@tromey.com>
10619
10620 * python/py-framefilter.c (py_print_single_arg): Return
10621 EXT_LANG_BT_ERROR from catch.
10622
10623 2018-03-26 Tom Tromey <tom@tromey.com>
10624
10625 PR backtrace/15584:
10626 * stack.c (backtrace_command_1): Move some code into no-filters
10627 "if".
10628
10629 2018-03-26 Tom Tromey <tom@tromey.com>
10630
10631 * python/py-framefilter.c (throw_quit_or_print_exception): New
10632 function.
10633 (gdbpy_apply_frame_filter): Use it.
10634
10635 2018-03-26 Tom Tromey <tom@tromey.com>
10636
10637 PR cli/17716:
10638 * python/py-framefilter.c (py_print_type, py_print_value)
10639 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10640 RETURN_MASK_ERROR.
10641
10642 2018-03-26 Tom Tromey <tom@tromey.com>
10643
10644 * python/py-framefilter.c (enumerate_args): Use
10645 gdb::unique_xmalloc_ptr.
10646
10647 2018-03-26 Tom Tromey <tom@tromey.com>
10648
10649 * python/py-framefilter.c (py_print_frame): Return
10650 EXT_LANG_BT_OK.
10651 (gdbpy_apply_frame_filter): Update comment.
10652 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10653 Remove.
10654 <EXT_LANG_BT_NO_FILTERS>: Change value.
10655
10656 2018-03-26 Tom Tromey <tom@tromey.com>
10657
10658 PR backtrace/15582:
10659 * stack.c (backtrace_command): Parse "hide" argument.
10660 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10661 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10662 constant.
10663
10664 2018-03-26 Tom Tromey <tom@tromey.com>
10665
10666 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10667 add "flags".
10668 (backtrace_command): Remove "fulltrace", add "flags".
10669
10670 2018-03-26 Tom Tromey <tom@tromey.com>
10671
10672 * stack.c (backtrace_command): Rewrite command line parsing.
10673
10674 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10675
10676 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10677
10678 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10679
10680 * filename-seen-cache.h: Add include guard.
10681
10682 2018-03-26 Keith Seitz <keiths@redhat.com>
10683
10684 * symfile.c (place_section): Remove "struct" from section_addr_info
10685 in comment.
10686 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10687 "struct" keyword from section_addr_info.
10688
10689 2018-03-26 Alan Hayward <alan.hayward@arm.com>
10690
10691 * regformats/regdef.h (reg): Add constructors.
10692
10693 2018-03-25 Pedro Alves <palves@redhat.com>
10694
10695 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10696 if then/else bodies in var_func_name extraction.
10697
10698 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
10699
10700 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10701 lookup_minimal_symbol() to find symbol entry.
10702 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10703
10704 2018-03-23 Keith Seitz <keiths@redhat.com>
10705
10706 PR c++/22968
10707 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10708 nested type definitions for C++, too.
10709
10710 2018-03-23 Tom Tromey <tom@tromey.com>
10711
10712 * machoread.c (struct oso_el): Add a constructor. Don't define as
10713 a typedef.
10714 (macho_register_oso): Remove.
10715 (macho_symtab_read): Take a std::vector.
10716 (oso_el_compare_name): Now a std::sort comparator.
10717 (macho_symfile_read_all_oso): Take a std::vector.
10718 (macho_symfile_read): Use std::vector. Remove cleanups.
10719
10720 2018-03-22 Tom Tromey <tom@tromey.com>
10721
10722 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10723 (record_full_goto_bookmark): Use std::string.
10724
10725 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10726
10727 PR tdep/18295
10728 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10729 a single mask.
10730
10731 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10732
10733 * rs6000-tdep.c (store_insn_p): New function.
10734 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10735 and cr_reg to their unshifted values. Use store_insn_p to
10736 match LR saves using either R1 or fdata->alloca_reg. Use
10737 store_insn_p to match CR saves. Set alloca_reg_offset
10738 when alloca_reg and framep are set. Remove lr_reg shift
10739 when assigning to fdata->lr_register.
10740
10741 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
10742
10743 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10744 command line args instead of emitting a warning.
10745
10746 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10747
10748 * tracepoint.h (struct static_tracepoint_marker): Initialize
10749 fields, define default constructor, move constructor and move
10750 assignment, disable the rest.
10751 <str_id, extra>: Make std::string.
10752 (release_static_tracepoint_marker): Remove.
10753 (free_current_marker): Remove.
10754 * tracepoint.c (free_current_marker): Remove.
10755 (parse_static_tracepoint_marker_definition): Adjust to
10756 std::string, use new hex2str overload.
10757 (release_static_tracepoint_marker): Remove.
10758 (print_one_static_tracepoint_marker): Get marker by reference
10759 and adjust to std::string.
10760 (info_static_tracepoint_markers_command): Adjust to std::vector
10761 changes
10762 * target.h (static_tracepoint_marker_p): Remove typedef.
10763 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10764 (struct target_ops) <to_static_tracepoint_marker_at>: Return
10765 bool.
10766 <to_static_tracepoint_markers_by_strid>: Return std::vector.
10767 * target-debug.h
10768 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10769 (target_debug_print_std_vector_static_tracepoint_marker): New.
10770 (target_debug_print_struct_static_tracepoint_marker_p): Rename
10771 to...
10772 (target_debug_print_static_tracepoint_marker_p): ... this.
10773 * target-delegates.c: Re-generate.
10774 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10775 Make std::string.
10776 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10777 (decode_static_tracepoint_spec): Adjust to std::vector.
10778 (tracepoint_print_one_detail): Adjust to std::string.
10779 (strace_marker_decode_location): Adjust to std::string.
10780 (update_static_tracepoint): Adjust to std::string, remove call
10781 to release_static_tracepoint_marker.
10782 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10783 Adjust to std::vector.
10784 * remote.c (remote_static_tracepoint_marker_at): Return bool.
10785 (remote_static_tracepoint_markers_by_strid): Adjust to
10786 std::vector.
10787 * common/rsp-low.h (hex2str): New overload with explicit count
10788 of bytes.
10789 * common/rsp-low.c (hex2str): New overload with explicit count
10790 of bytes.
10791 * unittests/rsp-low-selftests.c (test_hex2str): New function.
10792 (_initialize_rsp_low_selftests): Add test_hex2str test.
10793 * unittests/tracepoint-selftests.c
10794 (test_parse_static_tracepoint_marker_definition): Adjust to
10795 std::string.
10796
10797 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10798
10799 * tracepoint.c (parse_static_tracepoint_marker_definition):
10800 Consider case where the definition is followed by more
10801 definitions.
10802 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10803 tracepoint-selftests.c.
10804 * unittests/tracepoint-selftests.c: New.
10805
10806 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10807
10808 * MAINTAINERS (Write After Approval): Add Pedro Franco de
10809 Carvalho.
10810
10811 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10812
10813 * symtab.c (find_pc_sect_line): fixed indentation.
10814
10815 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10816
10817 * symtab.c (find_pc_sect_line): now uses binary search.
10818
10819 2018-03-19 Tom Tromey <tom@tromey.com>
10820
10821 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10822 "IDENT" production.
10823
10824 2018-03-19 Pedro Alves <palves@redhat.com>
10825 Tom Tromey <tom@tromey.com>
10826
10827 * unittests/observable-selftests.c: New file.
10828 * common/observable.h: New file.
10829 * observable.h: New file.
10830 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10831 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10832 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10833 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10834 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10835 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10836 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10837 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10838 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10839 python/py-breakpoint.c, python/py-finishbreakpoint.c,
10840 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10841 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10842 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10843 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10844 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10845 tui/tui-interp.c, valops.c: Update all users.
10846 * tui/tui-hooks.c (tui_bp_created_observer)
10847 (tui_bp_deleted_observer, tui_bp_modified_observer)
10848 (tui_inferior_exit_observer, tui_before_prompt_observer)
10849 (tui_normal_stop_observer, tui_register_changed_observer):
10850 Remove.
10851 (tui_observers_token): New global.
10852 (attach_or_detach, tui_attach_detach_observers): New functions.
10853 (tui_install_hooks, tui_remove_hooks): Use
10854 tui_attach_detach_observers.
10855 * record-btrace.c (record_btrace_thread_observer): Remove.
10856 (record_btrace_thread_observer_token): New global.
10857 * observer.sh: Remove.
10858 * observer.c: Rename to observable.c.
10859 * observable.c (namespace gdb_observers): Define new objects.
10860 (observer_debug): Move into gdb_observers namespace.
10861 (struct observer, struct observer_list, xalloc_observer_list_node)
10862 (xfree_observer_list_node, generic_observer_attach)
10863 (generic_observer_detach, generic_observer_notify): Remove.
10864 (_initialize_observer): Update.
10865 Don't include observer.inc.
10866 * Makefile.in (generated_files): Remove observer.h, observer.inc.
10867 (clean mostlyclean): Likewise.
10868 (observer.h, observer.inc): Remove targets.
10869 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10870 (COMMON_SFILES): Use observable.c, not observer.c.
10871 * .gitignore: Remove observer.h.
10872
10873 2018-03-18 Tom Tromey <tom@tromey.com>
10874
10875 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10876 gdb::def_vector.
10877 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10878
10879 2018-03-17 Tom Tromey <tom@tromey.com>
10880
10881 * auto-load.c (auto_load_objfile_script_1): Use std::string.
10882
10883 2018-03-17 Tom Tromey <tom@tromey.com>
10884
10885 * target.c (class scoped_target_fd): New.
10886 (target_fileio_close_cleanup): Remove.
10887 (target_fileio_read_alloc_1): Use scoped_target_fd.
10888
10889 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
10890
10891 * silent-rules.mk: New.
10892 * Makefile.in: Include silent-rules.mk
10893 (srcdir, VPATH, top_srcdir): Move up.
10894 (COMPILE): Add ECHO_CXX.
10895 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10896 (init.c): Add ECHO_INIT_C.
10897 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10898 (version.c): Add ECHO_GEN.
10899 (printcmd.o): Add ECHO_CXX.
10900 (target-float.o): Add ECHO_CXX.
10901 (ada-exp.o): Add ECHO_CXX.
10902 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10903 (insight$(EXEEXT)): Add ECHO_CXXLD.
10904 * gnulib/configure.ac: Add AM_SILENT_RULES.
10905 * gnulib/aclocal.m4: Re-generate.
10906 * gnulib/configure: Re-generate.
10907 * gnulib/import/Makefile.in: Re-generate.
10908
10909 2018-03-16 Tom Tromey <tom@tromey.com>
10910
10911 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10912 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10913 * utils.c (do_free_section_addr_info)
10914 (make_cleanup_free_section_addr_info): Remove.
10915 * symfile.h (struct other_sections): Add constructor.
10916 (struct section_addr_info): Remove.
10917 (section_addr_info): New typedef.
10918 (struct sym_fns) <sym_offsets>: Change type of parameter.
10919 (build_section_addr_info_from_objfile)
10920 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10921 (default_symfile_offsets, symbol_file_add)
10922 (symbol_file_add_from_bfd)
10923 (build_section_addr_info_from_section_table): Update.
10924 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10925 * symfile.c (alloc_section_addr_info): Remove.
10926 (build_section_addr_info_from_section_table): Change return type.
10927 Update.
10928 (build_section_addr_info_from_bfd)
10929 (build_section_addr_info_from_objfile): Likewise.
10930 (free_section_addr_info): Remove.
10931 (relative_addr_info_to_section_offsets): Change type of "addrs".
10932 (addrs_section_compar): Now a std::sort comparator.
10933 (addrs_section_sort): Change return type.
10934 (addr_info_make_relative): Change type of "addrs". Update.
10935 (default_symfile_offsets, syms_from_objfile_1)
10936 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10937 (symbol_file_add_separate): Update.
10938 (symbol_file_add): Change type of "addrs". Update.
10939 (add_symbol_file_command): Update. Remove cleanups.
10940 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10941 cleanups.
10942 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10943 * solib.c (solib_read_symbols): Update.
10944 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10945 * machoread.c (macho_symfile_offsets): Update.
10946 * jit.c (jit_bfd_try_read_symtab): Update.
10947
10948 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10949
10950 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10951 unittests/utils-selftests.c.
10952 * unittests/utils-selftests.c: New file.
10953
10954 2018-03-14 Tom Tromey <tom@tromey.com>
10955
10956 PR cli/14977:
10957 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10958 for NULL.
10959
10960 2018-03-14 Tom Tromey <tom@tromey.com>
10961
10962 PR cli/19918:
10963 * printcmd.c (printf_pointer): Allow "-" in format.
10964
10965 2018-03-14 Tom Tromey <tom@tromey.com>
10966
10967 * printcmd.c (_initialize_printcmd): Add usage to printf.
10968
10969 2018-03-14 Yao Qi <qiyao@sourceware.org>
10970
10971 * MAINTAINERS: Update my email address.
10972
10973 2018-03-13 Tom Tromey <tom@tromey.com>
10974
10975 * machoread.c (macho_check_dsym): Change filenamep to a
10976 std::string*.
10977 (macho_symfile_read): Update.
10978 * symfile.c (load_command): Use std::string.
10979
10980 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10981
10982 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10983 to error message string.
10984 (riscv_register_name): Use xsnprintf instead of sprintf.
10985 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10986 internal_error.
10987 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10988 error.
10989 (riscv_push_dummy_call): Likewise.
10990
10991 2018-03-12 Tom Tromey <tom@tromey.com>
10992
10993 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10994 Use gdb::byte_vector.
10995 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10996
10997 2018-03-12 Yao Qi <yao.qi@linaro.org>
10998
10999 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11000 parameter type to readable_regcache.
11001 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11002 the declaration.
11003
11004 2018-03-11 Tom Tromey <tom@tromey.com>
11005
11006 * dwarf2read.c (struct nextfield): Add initializers.
11007 (struct nextfnfield): Remove.
11008 (struct fnfieldlist): Add initializers. Remove "length" and
11009 "head", use std::vector.
11010 (struct decl_field_list): Remove.
11011 (struct field_info): Add initializers.
11012 <fields, baseclasses>: Now std::vector.
11013 <nbaseclasses, nfnfields, typedef_field_list_count,
11014 nested_types_list_count>: Remove.
11015 (dwarf2_add_field, dwarf2_add_type_defn)
11016 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11017 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11018 (process_structure_scope): Update.
11019
11020 2018-03-11 Tom Tromey <tom@tromey.com>
11021
11022 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11023 for use by std::sort.
11024 (build_type_psymtabs_1): Use std::vector.
11025
11026 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11027
11028 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11029 and LIBMPFR in the printed configuration.
11030
11031 2018-03-08 Tom Tromey <tom@tromey.com>
11032
11033 * source.c (get_filename_and_charpos): Use scoped_fd.
11034 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11035 (procfs_pidlist): Likewise.
11036 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11037 (iterate_over_mappings): Likewise.
11038
11039 2018-03-08 Tom Tromey <tom@tromey.com>
11040
11041 * infcall.c (struct call_return_meta_info)
11042 <stack_temporaries_enabled>: Remove.
11043 (get_call_return_value, call_function_by_hand_dummy): Update.
11044 * thread.c (disable_thread_stack_temporaries): Remove.
11045 (enable_thread_stack_temporaries): Remove.
11046 (thread_stack_temporaries_enabled_p): Return bool.
11047 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11048 (get_last_thread_stack_temporary): Update.
11049 * eval.c (evaluate_subexp): Update.
11050 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11051 class, not a function.
11052 (value_ptr, value_vec): Remove typedefs.
11053 (class thread_info) <stack_temporaries_enabled>: Now bool.
11054 <stack_temporaries>: Now a std::vector.
11055 (thread_stack_temporaries_enabled_p)
11056 (value_in_thread_stack_temporaries): Return bool.
11057
11058 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11059
11060 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11061 (getpkt_or_notif_sane_1): Likewise.
11062
11063 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11064
11065 * build-id.c (build_id_to_debug_bfd): Use std::string.
11066
11067 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11068
11069 * build-id.c (find_separate_debug_file_by_buildid): Return
11070 std::string.
11071 * build-id.h (find_separate_debug_file_by_buildid): Return
11072 std::string.
11073 * coffread.c (coff_symfile_read): Adjust to std::string.
11074 * elfread.c (elf_symfile_read): Adjust to std::string.
11075 * symfile.c (separate_debug_file_exists): Change parameter to
11076 std::string.
11077 (find_separate_debug_file): Return std::string.
11078 (find_separate_debug_file_by_debuglink): Return std::string.
11079 * symfile.h (find_separate_debug_file_by_debuglink): Return
11080 std::string.
11081
11082 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11083
11084 * common/xml-utils.c (xml_escape_text): Move code to...
11085 (xml_escape_text_append): ... this new function.
11086 * common/xml-utils.h (xml_escape_text_append): New declaration.
11087 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11088 New function.
11089 (_initialize_xml_utils): register test_xml_escape_text_append as
11090 a selftest.
11091
11092 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11093
11094 * defs.h: Remove MAX_REGISTER_SIZE.
11095 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11096 asserts.
11097 * python/py-unwind.c (pyuw_sniffer): Likewise.
11098
11099 2018-03-07 Tom Tromey <tom@tromey.com>
11100
11101 * linux-tdep.c (linux_info_proc): Update.
11102 * target.h (struct target_ops) <to_fileio_readlink>: Return
11103 optional<string>.
11104 (target_fileio_readlink): Return optional<string>.
11105 * remote.c (remote_hostio_readlink): Return optional<string>.
11106 * inf-child.c (inf_child_fileio_readlink): Return
11107 optional<string>.
11108 * target.c (target_fileio_readlink): Return optional<string>.
11109
11110 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11111
11112 * regcache.c (cooked_read_test): Add riscv to the list of
11113 architectures that have a save_reggroup.
11114
11115 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11116
11117 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11118 value is not a dynamic class object.
11119
11120 2018-03-06 Tom Tromey <tom@tromey.com>
11121
11122 * rust-exp.y: Formatting fixes.
11123
11124 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11125
11126 * riscv-tdep.c (riscv_register_name): Remove target description
11127 support.
11128 (riscv_gdbarch_init): Remove target description check.
11129
11130 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11131
11132 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11133 comment.
11134 * riscv-tdep.h: Likewise.
11135
11136 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11137
11138 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11139 (riscv_pseudo_register_write): Delete.
11140 (riscv_gdbarch_init): Remove all use of pseudo registers.
11141
11142 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11143
11144 * record-btrace.c (btrace_print_lines): Replace cleanup
11145 parameter with RAII equivalents.
11146 (btrace_insn_history): Replace cleanup with RAII equivalents.
11147 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11148 make_cleanup_ui_out_tuple_begin_end): Remove.
11149 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11150 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11151 make_cleanup_ui_out_list_begin_end): Remove.
11152
11153 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11154
11155 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11156 parameter types to std::vector. Use bool.
11157 (record_btrace_wait): Replace VEC(tp_t) with
11158 std::vector<thread_info *>.
11159 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11160
11161 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11162
11163 * record-btrace.c (record_btrace_disable_callback): Remove.
11164 (struct scoped_btrace_disable): New.
11165 (record_btrace_open): Use scoped_btrace_disable.
11166
11167 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11168
11169 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11170 reading values from registers.
11171
11172 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11173
11174 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11175 where appropriate.
11176
11177 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11178
11179 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11180 change parameter type. Use GDB's print functions, and use
11181 core_addr_to_string where appropriate.
11182 (riscv_push_dummy_call): Use core_addr_to_string where
11183 appropriate, update call to riscv_print_arg_location, and reindent
11184 a few lines.
11185 (riscv_return_value): Update call to riscv_print_arg_location.
11186
11187 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11188 Tim Newsome <tim@sifive.com>
11189 Albert Ou <a0u@eecs.berkeley.edu>
11190 Darius Rad <darius@bluespec.com>
11191
11192 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11193 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11194 (ALLDEPFILES): Add riscv-tdep.c
11195 * configure.tgt: Add riscv support.
11196 * riscv-tdep.c: New file.
11197 * riscv-tdep.h: New file.
11198 * NEWS: Mention new target.
11199 * MAINTAINERS: Add entry for riscv.
11200
11201 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11202
11203 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11204 fields within aggregates.
11205
11206 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11207
11208 * record-btrace.c (btrace_print_lines): Change type of flags to
11209 gdb_disassembly_flags.
11210
11211 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11212
11213 * fbsd-nat.c: Include "inf-ptrace.h".
11214 (USE_SIGTRAP_SIGINFO): Conditionally define.
11215 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11216 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11217 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11218 function.
11219 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11220 Likewise.
11221 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11222 Likewise.
11223 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11224 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11225 "supports_stopped_by_hw_breakpoint" target methods.
11226
11227 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11228
11229 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11230 * fbsd-nat.c (debug_fbsd_nat): New variable.
11231 (show_fbsd_nat_debug): New function.
11232 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11233 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11234
11235 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11236
11237 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11238 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11239 prototype.
11240 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11241 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11242 method.
11243
11244 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11245
11246 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11247 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11248
11249 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11250
11251 * charset.c (struct charset_vector): New.
11252 (charsets): Change type to charset_vector.
11253 (find_charset_names): Adjust.
11254 (add_one): Adjust.
11255 (_initialize_charset): Adjust.
11256
11257 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11258
11259 * progspace.h (struct program_space) <deleted_solibs>: Change
11260 type to std::vector<std::string>.
11261 * progspace.c (clear_program_space_solib_cache): Adjust.
11262 * breakpoint.c (print_solib_event): Adjust.
11263 (check_status_catch_solib): Adjust.
11264 * solib.c (update_solib_list): Adjust.
11265 * ui-out.h (class ui_out) <field_string>: New overload.
11266 * ui-out.c (ui_out::field_string): New overload.
11267
11268 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11269
11270 * progspace.h (struct program_space): Add constructor and
11271 destructor, initialize fields.
11272 (add_program_space): Remove.
11273 * progspace.c (add_program_space): Rename to...
11274 (program_space::program_space): ... this.
11275 (release_program_space): Rename to...
11276 (program_space::~program_space): ... this.
11277 (delete_program_space): Use delete to delete program_space.
11278 (initialize_progspace): Use new to allocate program_space.
11279 * inferior.c (add_inferior_with_spaces): Likewise.
11280 (clone_inferior_command): Likewise.
11281 * infrun.c (follow_fork_inferior): Likewise.
11282 (handle_vfork_child_exec_or_exit): Likewise.
11283
11284 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11285
11286 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11287 (delim_string_to_char_ptr_vec): Return std::vector of
11288 gdb::unique_xmalloc_ptr.
11289 (dirnames_to_char_ptr_vec_append): Take std::vector of
11290 gdb::unique_xmalloc_ptr.
11291 (dirnames_to_char_ptr_vec): Return std::vector of
11292 gdb::unique_xmalloc_ptr.
11293 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11294 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11295 (delim_string_to_char_ptr_vec): Return an std::vector of
11296 gdb::unique_xmalloc_ptr, adjust the code.
11297 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11298 gdb::unique_xmalloc_ptr, adjust the code.
11299 (dirnames_to_char_ptr_vec): Return an std::vector of
11300 gdb::unique_xmalloc_ptr, adjust the code.
11301 * auto-load.c (auto_load_safe_path_vec): Change type to
11302 std::vector of gdb::unique_xmalloc_ptr.
11303 (auto_load_expand_dir_vars): Return an std::vector of
11304 gdb::unique_xmalloc_ptr, adjust the code.
11305 (auto_load_safe_path_vec_update): Adjust.
11306 (filename_is_in_auto_load_safe_path_vec): Adjust.
11307 (auto_load_objfile_script_1): Adjust.
11308 * build-id.c (build_id_to_debug_bfd): Adjust.
11309 * linux-thread-db.c (thread_db_load_search): Adjust.
11310 * source.c (add_path): Adjust.
11311 (openp): Adjust.
11312 * symfile.c (find_separate_debug_file): Adjust.
11313 * utils.c (do_free_char_ptr_vec): Remove.
11314 (make_cleanup_free_char_ptr_vec): Remove.
11315
11316 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11317
11318 PR gdb/22907
11319 * common/pathstuff.c: Conditionally include "<windows.h>".
11320
11321 2018-03-01 Georg Sauthoff <mail@georg.so>
11322
11323 PR gdb/22888
11324 * gcore.in: Quote variables and switch interpreter to bash.
11325
11326 2018-03-01 Tom Tromey <tom@tromey.com>
11327
11328 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11329 assertion. Add assertion for discriminant_index.
11330 (quirk_rust_enum): Use correct base type name in univariant case.
11331
11332 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11333
11334 * record.c (get_call_history_modifiers): Return a
11335 record_print_flags.
11336 (cmd_record_call_history): Adjust.
11337 * record-btrace.c (record_btrace_call_history): Adjust.
11338 (record_btrace_call_history_range): Adjust.
11339 (record_btrace_call_history_from): Adjust.
11340 * target-debug.h (target_debug_print_record_print_flags): New.
11341 * target-delegates.c: Re-generate.
11342 * target.c (target_call_history): Change flags type.
11343 (target_call_history_from): Likewise.
11344 (target_call_history_range): Likewise.
11345 * target.h (struct target_ops) <target_call_history>: Likewise.
11346 (target_call_history_from): Likewise.
11347 (target_call_history_range): Likewise.
11348
11349 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11350 Simon Marchi <simon.marchi@polymtl.ca>
11351
11352 * common/common-utils.c: Include "sys/stat.h".
11353 (is_regular_file): Move here from "source.c"; change return
11354 type to "bool".
11355 * common/common-utils.h (is_regular_file): New prototype.
11356 * common/pathstuff.c (contains_dir_separator): New function.
11357 * common/pathstuff.h (contains_dir_separator): New prototype.
11358 * source.c: Don't include "sys/stat.h".
11359 (is_regular_file): Move to "common/common-utils.c".
11360
11361 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11362
11363 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11364 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11365 * auto-load.c: Include "common/pathstuff.h".
11366 * common/common-def.h (current_directory): Move here.
11367 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11368 function.
11369 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11370 prototype.
11371 * common/pathstuff.c: New file.
11372 * common/pathstuff.h: New file.
11373 * compile/compile.c: Include "common/pathstuff.h".
11374 * defs.h (current_directory): Move to "common/common-defs.h".
11375 * dwarf2read.c: Include "common/pathstuff.h".
11376 * exec.c: Likewise.
11377 * guile/scm-safe-call.c: Likewise.
11378 * linux-thread-db.c: Likewise.
11379 * main.c: Likewise.
11380 * nto-tdep.c: Likewise.
11381 * objfiles.c: Likewise.
11382 * source.c: Likewise.
11383 * symtab.c: Likewise.
11384 * utils.c: Include "common/pathstuff.h".
11385 (gdb_realpath): Move to "common/pathstuff.c".
11386 (gdb_realpath_keepfile): Likewise.
11387 (gdb_abspath): Likewise.
11388 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11389 (gdb_realpath_keepfile): Likewise.
11390 (gdb_abspath): Likewise.
11391
11392 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11393
11394 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11395 wildcard process pid for super_resume for kernels with a
11396 specific bug.
11397
11398 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11399
11400 * compile/compile.c (get_args): Add additional comments
11401 explaining function.
11402
11403 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11404 Tom Tromey <tom@tromey.com>
11405
11406 * target.h (memory_write_request_s): Remove typedef. Don't define
11407 VEC.
11408 (target_write_memory_blocks): Change argument to std::vector.
11409 (struct memory_write_request): Add constructor.
11410 * target-memory.c (compare_block_starting_address): Return bool.
11411 Change argument types.
11412 (claim_memory): Change arguments to use std::vector.
11413 (split_regular_and_flash_blocks, blocks_to_erase)
11414 (compute_garbled_blocks): Likewise.
11415 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11416 (target_write_memory_blocks): Change argument to std::vector.
11417 * symfile.c (struct load_section_data): Add constructor and
11418 destructor. Use std::vector for "requests".
11419 (struct load_progress_data): Add initializers.
11420 (load_section_callback): Update. Use "new".
11421 (clear_memory_write_data): Remove.
11422 (generic_load): Update.
11423
11424 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11425
11426 * arch/aarch64.h: Use common/tdesc.h.
11427
11428 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11429
11430 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11431 architecture with a 64-bit ABI.
11432
11433 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11434
11435 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11436 ahead of target description loading.
11437
11438 2018-02-26 Tom Tromey <tom@tromey.com>
11439
11440 * stack.c (backtrace_command_1): Update.
11441 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11442 of "flags".
11443 * python/py-framefilter.c (py_print_frame)
11444 (gdbpy_apply_frame_filter): Change type of "flags".
11445 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11446 of "flags".
11447 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11448 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11449 * extension.h (enum frame_filter_flag): Rename from
11450 frame_filter_flags.
11451 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11452 (apply_ext_lang_frame_filter): Change type of "flags".
11453 * extension.c (apply_ext_lang_frame_filter): Change type of
11454 "flags".
11455 * extension-priv.h (struct extension_language_ops)
11456 <apply_frame_filter>: Change type of "flags".
11457
11458 2018-02-26 Tom Tromey <tom@tromey.com>
11459
11460 PR python/16497:
11461 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11462 off-by-one in py_end computation.
11463 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11464 PRINT_MORE_FRAMES.
11465 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11466 constant.
11467
11468 2018-02-26 Tom Tromey <tom@tromey.com>
11469
11470 * dwarf2read.c (struct variant_field): New.
11471 (struct nextfield) <variant>: New field.
11472 (dwarf2_add_field): Handle DW_TAG_variant_part.
11473 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11474 discriminated union.
11475 (read_structure_type): Handle DW_TAG_variant_part.
11476 (handle_struct_member_die): New function, extracted from
11477 process_structure_scope. Handle DW_TAG_variant.
11478 (process_structure_scope): Handle discriminated unions. Call
11479 handle_struct_member_die.
11480
11481 2018-02-26 Tom Tromey <tom@tromey.com>
11482
11483 * rust-lang.h (rust_last_path_segment): Declare.
11484 * rust-lang.c (rust_last_path_segment): Now public. Change
11485 contract.
11486 (struct disr_info): Remove.
11487 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11488 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11489 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11490 (rust_enum_p, rust_enum_variant): New function.
11491 (rust_underscore_fields): Remove "offset" parameter.
11492 (rust_print_enum): New function.
11493 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11494 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11495 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11496 enums.
11497 (rust_internal_print_type): New function, from rust_print_type.
11498 Remove enum code.
11499 (rust_print_type): Call rust_internal_print_type.
11500 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11501 Update enum handling.
11502 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11503 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11504 (rust_union_quirks): New functions.
11505 (process_full_comp_unit, process_full_type_unit): Call
11506 rust_union_quirks.
11507 (process_structure_scope): Update rust_unions if necessary.
11508
11509 2018-02-26 Tom Tromey <tom@tromey.com>
11510
11511 * value.h (value_union_variant): Declare.
11512 * valops.c (value_union_variant): New function.
11513 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11514 (struct discriminant_info): New.
11515 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11516 enumerator.
11517 (struct main_type) <flag_discriminated_union>: New field.
11518
11519 2018-02-26 Tom Tromey <tom@tromey.com>
11520
11521 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11522 unittests/unpack-selftests.c.
11523 * unittests/unpack-selftests.c: New file.
11524 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11525
11526 2018-02-26 Yao Qi <yao.qi@linaro.org>
11527
11528 * dwarf2read.c (struct partial_die_info) <read>: New method.
11529 (read_partial_die): Remove the declaration.
11530 (load_partial_dies): Update.
11531 (partial_die_info::partial_die_info):
11532 (read_partial_die): Change it to partial_die_info::read.
11533
11534 2018-02-26 Yao Qi <yao.qi@linaro.org>
11535
11536 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11537 (fixup_partial_die): Remove declaration.
11538 (scan_partial_symbols): Update.
11539 (partial_die_parent_scope): Likewise.
11540 (partial_die_full_name): Likewise.
11541 (fixup_partial_die): Change it to partial_die_info::fixup.
11542
11543 2018-02-26 Yao Qi <yao.qi@linaro.org>
11544
11545 * dwarf2read.c (read_partial_die): Update the declaration.
11546 (load_partial_dies): Caller update.
11547 (read_partial_die): Remove one argument abbrev_len.
11548
11549 2018-02-26 Yao Qi <yao.qi@linaro.org>
11550
11551 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11552 assignment operator.
11553 (load_partial_dies): Use ctor and copy ctor.
11554 (read_partial_die): Update.
11555 (dwarf2_cu::find_partial_die): Use ctor.
11556
11557 2018-02-26 Yao Qi <yao.qi@linaro.org>
11558
11559 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11560 (find_partial_die_in_comp_unit): Change it to
11561 dwarf2_cu::find_partial_die.
11562 (find_partial_die): Update.
11563
11564 2018-02-26 Yao Qi <yao.qi@linaro.org>
11565
11566 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11567 is NULL.
11568
11569 2018-02-26 Yao Qi <yao.qi@linaro.org>
11570
11571 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11572
11573 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11574
11575 * arch/amd64.h: Use common/tdesc.h.
11576 * arch/i386.c: Likewise.
11577 * arch/i386.h: Likewise.
11578 * arch/tic6x.c: Likewise.
11579 * arch/tdesc.h: Move file from here...
11580 * common/tdesc.h: ...to here.
11581 * features/aarch64-core.c: Regenerate.
11582 * features/aarch64-fpu.c: Regenerate.
11583 * features/i386/32bit-avx.c: Regenerate.
11584 * features/i386/32bit-avx512.c: Regenerate.
11585 * features/i386/32bit-core.c: Regenerate.
11586 * features/i386/32bit-linux.c: Regenerate.
11587 * features/i386/32bit-mpx.c: Regenerate.
11588 * features/i386/32bit-pkeys.c: Regenerate.
11589 * features/i386/32bit-sse.c: Regenerate.
11590 * features/i386/64bit-avx.c: Regenerate.
11591 * features/i386/64bit-avx512.c: Regenerate.
11592 * features/i386/64bit-core.c: Regenerate.
11593 * features/i386/64bit-linux.c: Regenerate.
11594 * features/i386/64bit-mpx.c: Regenerate.
11595 * features/i386/64bit-pkeys.c: Regenerate.
11596 * features/i386/64bit-segments.c: Regenerate.
11597 * features/i386/64bit-sse.c: Regenerate.
11598 * features/i386/x32-core.c: Regenerate.
11599 * features/tic6x-c6xp.c: Regenerate.
11600 * features/tic6x-core.c: Regenerate.
11601 * features/tic6x-gp.c: Regenerate.
11602 * target-descriptions.c: Use common/tdesc.h.
11603 * target-descriptions.h: Likewise.
11604
11605 2018-02-24 Tom Tromey <tom@tromey.com>
11606
11607 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11608 (try_thread_db_load_from_dir, thread_db_load_search): Use
11609 std::string.
11610 (info_auto_load_libthread_db_compare): Return bool. Change
11611 argument types.
11612 (info_auto_load_libthread_db): Use std::vector, std::string.
11613 Remove cleanups.
11614
11615 2018-02-24 Tom Tromey <tom@tromey.com>
11616
11617 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11618 std::string.
11619 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11620 std::string*.
11621 * gdbarch.c: Rebuild.
11622 * gdbarch.h: Rebuild.
11623 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11624 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11625 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11626 std::string*.
11627
11628 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11629
11630 * gdbtypes.h (sect_offset): Change type to uint64_t.
11631 (sect_offset_str): New function.
11632 * dwarf2read.c (create_addrmap_from_aranges): Use
11633 sect_offset_str.
11634 (error_check_comp_unit_head): Likewise.
11635 (create_debug_type_hash_table): Likewise.
11636 (read_cutu_die_from_dwo): Likewise.
11637 (init_cutu_and_read_dies): Likewise.
11638 (init_cutu_and_read_dies_no_follow): Likewise.
11639 (process_psymtab_comp_unit_reader): Likewise.
11640 (partial_die_parent_scope): Likewise.
11641 (peek_die_abbrev): Likewise.
11642 (process_queue): Likewise.
11643 (dwarf2_physname): Likewise.
11644 (read_namespace_alias): Likewise.
11645 (read_import_statement): Likewise.
11646 (create_dwo_cu_reader): Likewise.
11647 (create_cus_hash_table): Likewise.
11648 (lookup_dwo_cutu): Likewise.
11649 (inherit_abstract_dies): Likewise.
11650 (read_func_scope): Likewise.
11651 (read_call_site_scope): Likewise.
11652 (dwarf2_add_member_fn): Likewise.
11653 (read_common_block): Likewise.
11654 (read_module_type): Likewise.
11655 (read_typedef): Likewise.
11656 (read_subrange_type): Likewise.
11657 (load_partial_dies): Likewise.
11658 (read_partial_die): Likewise.
11659 (find_partial_die): Likewise.
11660 (read_str_index): Likewise.
11661 (dwarf2_string_attr): Likewise.
11662 (build_error_marker_type): Likewise.
11663 (lookup_die_type): Likewise.
11664 (dump_die_shallow): Likewise.
11665 (follow_die_ref): Likewise.
11666 (dwarf2_fetch_die_loc_sect_off): Likewise.
11667 (dwarf2_fetch_constant_bytes): Likewise.
11668 (follow_die_sig): Likewise.
11669 (get_signatured_type): Likewise.
11670 (get_DW_AT_signature_type): Likewise.
11671 (dwarf2_find_containing_comp_unit): Likewise.
11672 (set_die_type): Likewise.
11673
11674 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11675
11676 * arch/aarch64.c: Include "common-defs.h".
11677 * arch/amd64.c: Likewise.
11678 * arch/i386.c: Likewise.
11679
11680 2018-02-21 Tom Tromey <tom@tromey.com>
11681
11682 * value.h: (extract_field_op): Update.
11683 * eval.c (extract_field_op): Return a const char *.
11684 * expression.h (parse_expression_for_completion): Update.
11685 * completer.c (complete_expression): Update.
11686 (add_struct_fields): Make fieldname const.
11687 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11688 (mark_completion_tag, parse_exp_in_context_1): Update.
11689 (parse_expression_for_completion): Change "name" to
11690 unique_xmalloc_ptr*.
11691
11692 2018-02-21 Tom Tromey <tom@tromey.com>
11693
11694 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11695
11696 2018-02-21 Yao Qi <yao.qi@linaro.org>
11697
11698 * avr-tdep.c (avr_read_pc): Change parameter type to
11699 readable_regcache.
11700 * gdbarch.sh (read_pc): Likewise.
11701 * gdbarch.c: Re-generated.
11702 * gdbarch.h: Re-generated.
11703 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11704 readable_regcache.
11705 * ia64-tdep.c (ia64_read_pc): Likewise.
11706 * mips-tdep.c (mips_read_pc): Likewise.
11707 * spu-tdep.c (spu_read_pc): Likewise.
11708
11709 2018-02-21 Yao Qi <yao.qi@linaro.org>
11710
11711 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11712 * regcache-dump.c: New file.
11713 * regcache.c: Move register_dump to regcache-dump.c.
11714 (maintenance_print_registers): Likewise.
11715 (maintenance_print_raw_registers): Likewise.
11716 (maintenance_print_cooked_registers): Likewise.
11717 (maintenance_print_register_groups): Likewise.
11718 (maintenance_print_remote_registers): Likewise.
11719 (_initialize_regcache): Likewise.
11720 * regcache.h (register_dump): Moved from regcache.c.
11721
11722 2018-02-21 Yao Qi <yao.qi@linaro.org>
11723
11724 * regcache.c (regcache::regcache): Update.
11725 (regcache::invalidate): Move it to detached_regcache::invalidate.
11726 (get_thread_arch_aspace_regcache): Update.
11727 (regcache::raw_update): Update.
11728 (regcache::cooked_read): Remove some code.
11729 (regcache::cooked_read_value): Likewise.
11730 (regcache::raw_write): Remove assert on m_readonly_p.
11731 (regcache::raw_supply_integer): Move it to
11732 detached_regcache::raw_supply_integer.
11733 (regcache::raw_supply_zeroed): Likewise.
11734 * regcache.h (detached_regcache) <raw_supply_integer>: New
11735 declaration.
11736 <raw_supply_zeroed, invalidate>: Likewise.
11737 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11738 <invalidate>: Likewise.
11739 <m_readonly_p>: Removed.
11740
11741 2018-02-21 Yao Qi <yao.qi@linaro.org>
11742
11743 * infcmd.c (get_return_value): Let stop_regs point to
11744 get_current_regcache.
11745 * regcache.c (regcache::regcache): Remove.
11746 (register_dump_reg_buffer): New class.
11747 (regcache_print): Adjust.
11748 * regcache.h (regcache): Remove constructors.
11749
11750 2018-02-21 Yao Qi <yao.qi@linaro.org>
11751
11752 * regcache.c (class register_dump): New class.
11753 (register_dump_regcache, register_dump_none): New class.
11754 (register_dump_remote, register_dump_groups): New class.
11755 (regcache_print): Update.
11756 * regcache.h (regcache_dump_what): Move it to regcache.c.
11757 (regcache) <dump>: Remove.
11758
11759 2018-02-21 Yao Qi <yao.qi@linaro.org>
11760
11761 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11762 reg_buffer_rw *.
11763 (jit_unwind_reg_set_impl): Call raw_supply.
11764 (jit_frame_sniffer): Use reg_buffer_rw.
11765 * record-full.c (record_full_core_regbuf): Change its type.
11766 (record_full_core_open_1): Use reg_buffer_rw.
11767 (record_full_close): Likewise.
11768 (record_full_core_fetch_registers): Use regcache->raw_supply.
11769 (record_full_core_store_registers): Likewise.
11770 * regcache.c (regcache::get_register_status): Move it to
11771 reg_buffer.
11772 (regcache_raw_set_cached_value): Remove.
11773 (regcache::raw_set_cached_value): Remove.
11774 (regcache::raw_write): Call raw_supply.
11775 (regcache::raw_supply): Move it to reg_buffer_rw.
11776 * regcache.h (regcache_raw_set_cached_value): Remove.
11777 (reg_buffer_rw): New class.
11778
11779 2018-02-21 Yao Qi <yao.qi@linaro.org>
11780
11781 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11782 readonly_detached_regcache.
11783 (dummy_frame_prev_register): Use regcache->cooked_read.
11784 * frame.c (frame_save_as_regcache): Change return type.
11785 (frame_pop): Update.
11786 * frame.h (frame_save_as_regcache): Update declaration.
11787 * inferior.h (get_infcall_suspend_state_regcache): Update
11788 declaration.
11789 * infrun.c (infcall_suspend_state) <registers>: use
11790 readonly_detached_regcache.
11791 (save_infcall_suspend_state): Don't use regcache_dup.
11792 (get_infcall_suspend_state_regcache): Change return type.
11793 * linux-fork.c (struct fork_info) <savedregs>: Change to
11794 readonly_detached_regcache.
11795 <pc>: New field.
11796 (fork_save_infrun_state): Don't use regcache_dup.
11797 (info_checkpoints_command): Adjust.
11798 * mi/mi-main.c (register_changed_p): Update declaration.
11799 (mi_cmd_data_list_changed_registers): Use
11800 readonly_detached_regcache.
11801 (register_changed_p): Change parameter type to
11802 readonly_detached_regcache.
11803 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11804 readonly_detached_regcache.
11805 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11806 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11807 New.
11808 (regcache::save): Move it to reg_buffer.
11809 (regcache::restore): Change parameter type.
11810 (regcache_dup): Remove.
11811 * regcache.h (reg_buffer) <save>: New method.
11812 (readonly_detached_regcache): New class.
11813 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11814 readonly_detached_regcache.
11815 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11816
11817 2018-02-21 Yao Qi <yao.qi@linaro.org>
11818
11819 * frame.c (frame_save_as_regcache): Use regcache method save.
11820 (frame_pop): Use regcache method restore.
11821 * infrun.c (restore_infcall_suspend_state): Likewise.
11822 * linux-fork.c (fork_load_infrun_state): Likewise.
11823 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11824 save.
11825 * regcache.c (regcache_save): Remove.
11826 (regcache::restore): More asserts.
11827 (regcache_cpy): Remove.
11828 * regcache.h (regcache_save): Remove the declaration.
11829 (regcache::restore): Move from private to public.
11830 Remove the friend declaration of regcache_cpy.
11831 (regcache_cpy): Remove declaration.
11832
11833 2018-02-21 Yao Qi <yao.qi@linaro.org>
11834
11835 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11836 parameter type to 'readable_regcache *'.
11837 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11838 * arm-tdep.c (arm_neon_quad_read): Likewise.
11839 (arm_pseudo_read): Likewise.
11840 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11841 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11842 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11843 * gdbarch.c: Re-generated.
11844 * gdbarch.h: Re-generated.
11845 * gdbarch.sh (pseudo_register_read): Change parameter type to
11846 'readable_regcache *'.
11847 (pseudo_register_read_value): Likewise.
11848 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11849 (h8300_pseudo_register_read): Likewise.
11850 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11851 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11852 (i386_pseudo_register_read_into_value): Likewise.
11853 (i386_pseudo_register_read_value): Likewise.
11854 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11855 declaration.
11856 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11857 * m32c-tdep.c (m32c_raw_read): Likewise.
11858 (m32c_read_flg): Likewise.
11859 (m32c_banked_register): Likewise.
11860 (m32c_banked_read): Likewise.
11861 (m32c_sb_read): Likewise.
11862 (m32c_part_read): Likewise.
11863 (m32c_cat_read): Likewise.
11864 (m32c_r3r2r1r0_read): Likewise.
11865 (m32c_pseudo_register_read): Likewise.
11866 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11867 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11868 (mep_pseudo_cr64_read): Likewise.
11869 (mep_pseudo_register_read): Likewise.
11870 * mips-tdep.c (mips_pseudo_register_read): Likewise.
11871 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11872 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11873 * regcache.c (regcache::raw_read): Move it to readable_regcache.
11874 (regcache::cooked_read): Likewise.
11875 (regcache::cooked_read_value): Likewise.
11876 (regcache_cooked_read_signed):
11877 (regcache::cooked_read): Likewise.
11878 * regcache.h (readable_regcache): New class.
11879 (regcache): Inherit readable_regcache. Move some methods to
11880 readable_regcache.
11881 * rl78-tdep.c (rl78_pseudo_register_read): Change
11882 parameter type to 'readable_regcache *'.
11883 * rs6000-tdep.c (do_regcache_raw_read): Remove.
11884 (e500_pseudo_register_read): Change parameter type to
11885 'readable_regcache *'.
11886 (dfp_pseudo_register_read): Likewise.
11887 (vsx_pseudo_register_read): Likewise.
11888 (efpr_pseudo_register_read): Likewise.
11889 * s390-tdep.c (s390_pseudo_register_read): Likewise.
11890 * sh-tdep.c (sh_pseudo_register_read): Likewise.
11891 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11892 (sh64_pseudo_register_read): Likewise.
11893 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11894 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11895 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11896 (spu_pseudo_register_read): Likewise.
11897 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11898 (xtensa_pseudo_register_read): Likewise.
11899
11900 2018-02-21 Yao Qi <yao.qi@linaro.org>
11901
11902 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11903 (regcache::arch): Move it to reg_buffer::arch.
11904 (regcache::register_buffer): Likewise.
11905 (regcache::assert_regnum): Likewise.
11906 (regcache::num_raw_registers): Likewise.
11907 * regcache.h (reg_buffer): New class.
11908 (regcache): Inherit reg_buffer.
11909
11910 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11911
11912 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11913 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11914
11915 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11916
11917 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11918
11919 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11920
11921 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11922 (SFILES): Remove common/*.c files.
11923 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11924 * common/common.host: Add common reference.
11925 * configure.ac: Likewise.
11926 * configure: Regenerate.
11927
11928 2018-02-16 Yao Qi <yao.qi@linaro.org>
11929
11930 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11931 (block_initialize_namespace): Use new.
11932 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11933 (dwarf2_free_objfile): Use delete.
11934 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11935 (copy_type_recursive): Use new.
11936 * gdb_obstack.h (allocate_on_obstack): New.
11937
11938 2018-02-15 Yao Qi <yao.qi@linaro.org>
11939
11940 PR gdb/22849
11941 * inferior.c (exit_inferior_1): Reset inf->control.
11942
11943 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11944
11945 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11946 declaration.
11947
11948 2018-02-14 Pedro Alves <palves@redhat.com>
11949
11950 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11951 frame_cleanup_after_sniffer on exception.
11952
11953 2018-02-14 Tom Tromey <tom@tromey.com>
11954
11955 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11956 const.
11957 (solib_bfd_open): Make pathname const.
11958 * solib.c (solib_bfd_open): Make pathname const.
11959 * solib-spu.c (spu_bfd_fopen): Make name const.
11960 (spu_bfd_open): Make pathname const.
11961 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11962 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11963
11964 2018-02-14 Tom Tromey <tom@tromey.com>
11965
11966 * symfile.c (symfile_bfd_open): Update.
11967 * source.h (openp, source_full_path_of, find_and_open_source):
11968 Change argument type to unique_xmalloc_ptr.
11969 * source.c (openp): Take a unique_xmalloc_ptr.
11970 (source_full_path_of, find_and_open_source): Likewise.
11971 (open_source_file, symtab_to_fullname): Update.
11972 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11973 unique_xmalloc_ptr.
11974 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11975 (exec_file_find): Update.
11976 * psymtab.c (psymtab_to_fullname): Update.
11977 * nto-tdep.h (nto_find_and_open_solib): Update.
11978 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11979 unique_xmalloc_ptr.
11980 * exec.c (exec_file_attach): Update.
11981 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11982 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11983
11984 2018-02-14 Tom Tromey <tom@tromey.com>
11985
11986 * solib.c: Include source.h.
11987 * nto-tdep.c: Include source.h.
11988 * mi/mi-cmd-env.c: Include source.h.
11989 * infcmd.c: Include source.h.
11990 * exec.c: Include source.h.
11991 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11992 (add_path, directory_switch, source_path, init_source_path): Move
11993 declarations...
11994 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11995 (add_path, directory_switch, source_path, init_source_path):
11996 ...here.
11997
11998 2018-02-14 Tom Tromey <tom@tromey.com>
11999
12000 * solist.h (exec_file_find, solib_find): Return
12001 unique_xmalloc_ptr.
12002 (solib_bfd_fopen): Take a const char *.
12003 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12004 (exec_file_find, solib_find): Likewise.
12005 (solib_bfd_fopen): Do not take ownership of "pathname".
12006 (solib_bfd_open): Use unique_xmalloc_ptr.
12007 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12008 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12009 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12010 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12011
12012 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12013
12014 * ada-lang.c (name_match_type_from_name): Remove reference to
12015 ada_name_for_lookup in function's documentation.
12016 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12017
12018 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12019
12020 * defs.h (enum openp_flags): New enum.
12021 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12022 Move to enum openp_flags.
12023 (openp_flags): New enum flags.
12024 (openp): Change parameter type to openp_flags.
12025 * source.c (openp): Change parameter type to openp_flags.
12026 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12027 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12028
12029 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12030
12031 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12032 per-command.
12033
12034 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12035
12036 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12037 into...
12038 (class dwarf2_queue_guard): ...the destructor of this new class.
12039 (dw2_do_instantiate_symtab): Create instance of the new class
12040 dwarf2_queue_guard, remove cleanup.
12041
12042 2018-02-09 Tom Tromey <tom@tromey.com>
12043
12044 * source.c (find_source_lines): Don't reference past the end of
12045 the vector.
12046
12047 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12048
12049 * remote.c (remote_btrace_maybe_reopen): Change error message.
12050 * btrace.c (btrace_enable): Likewise.
12051 (parse_xml_btrace): Likewise.
12052 (parse_xml_btrace_conf): Likewise.
12053
12054 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12055
12056 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12057 (linux_enable_pt, linux_enable_bts): Call
12058 diagnose_perf_event_open_fail.
12059
12060 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12061
12062 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12063 Remove parameter and change return type. Update callers. Move it.
12064 (linux_enable_bts, linux_enable_pt): Improve error message.
12065 (linux_enable_pt): Remove zero buffer size check.
12066 (linux_enable_btrace): Improve error messages. Remove NULL return
12067 check.
12068
12069 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12070
12071 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12072 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12073 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12074 (linux_supports_pt, linux_supports_btrace): Remove.
12075 (linux_enable_bts): Call cpu_supports_bts.
12076 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12077 * remote.c (remote_supports_btrace): Remove.
12078 (init_remote_ops): Remove remote_supports_btrace.
12079 * target-delegates.c: Regenerated.
12080 * target.c (target_supports_btrace): Remove.
12081 * target.h (target_ops) <to_supports_btrace>: Remove
12082 (target_supports_btrace): Remove.
12083 * x86-linux-nat.c (x86_linux_create_target): Remove
12084 linux_supports_btrace.
12085
12086 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12087
12088 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12089 btrace failed.
12090 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12091 exception and use message in own exception.
12092
12093 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12094
12095 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12096 (perf_event_pt_event_type): Use gdb_file_up.
12097 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12098 scoped_fd, and scoped_mmap.
12099
12100 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12101
12102 * common/scoped_mmap.h: New.
12103 * unittests/scoped_mmap-selftest.c: New.
12104 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12105 unittests/scoped_mmap-selftest.c.
12106
12107 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12108
12109 * common/scoped_fd.h: New.
12110 * unittests/scoped_fd-selftest.c: New.
12111 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12112 unittests/scoped_fd-selftest.c.
12113
12114 2018-02-09 Tom Tromey <tom@tromey.com>
12115
12116 * auto-load.c (auto_load_section_scripts): Use
12117 gdb::unique_xmalloc_ptr.
12118
12119 2018-02-09 Tom Tromey <tom@tromey.com>
12120
12121 * auto-load.c (execute_script_contents): Use std::string.
12122
12123 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12124
12125 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12126 Python function, rather than a new command.
12127
12128 2018-02-08 Tom Tromey <tom@tromey.com>
12129
12130 * solib.c (solib_find_1): Use std::string.
12131 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12132
12133 2018-02-08 Tom Tromey <tom@tromey.com>
12134
12135 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12136
12137 2018-02-08 Tom Tromey <tom@tromey.com>
12138
12139 * source.c (find_source_lines): Use gdb::def_vector.
12140
12141 2018-02-08 Tom Tromey <tom@tromey.com>
12142
12143 * macrocmd.c (struct temporary_macro_definition): New.
12144 (macro_define_command): Use temporary_macro_definition. Remove
12145 cleanups.
12146 (free_macro_definition_ptr): Remove.
12147
12148 2018-02-08 Tom Tromey <tom@tromey.com>
12149
12150 * macroexp.c (maybe_expand): Use std::string.
12151
12152 2018-02-08 Tom Tromey <tom@tromey.com>
12153
12154 * macroexp.c (struct macro_buffer): Add initializers for some
12155 members.
12156 (init_buffer, init_shared_buffer, free_buffer)
12157 (free_buffer_return_text): Remove.
12158 (macro_buffer): New constructors.
12159 (~macro_buffer): New destructor.
12160 (macro_buffer::set_shared): New method.
12161 (macro_buffer::resize_buffer, macro_buffer::appendc)
12162 (macro_buffer::appendmem): Now methods, not free functions.
12163 (set_token, append_tokens_without_splicing, stringify)
12164 (macro_stringify): Update.
12165 (gather_arguments): Change return type. Remove argc_p argument,
12166 add args_ptr argument. Use std::vector.
12167 (substitute_args): Remove argc argument. Accept std::vector.
12168 (expand): Update. Use std::vector.
12169 (scan, macro_expand, macro_expand_next): Update.
12170
12171 2018-02-08 Tom Tromey <tom@tromey.com>
12172
12173 * symtab.c (default_collect_symbol_completion_matches_break_on):
12174 Use unique_xmalloc_ptr.
12175 * macroscope.h: (sal_macro_scope, user_macro_scope)
12176 (default_macro_scope): Return unique_xmalloc_ptr.
12177 * macroscope.c (sal_macro_scope, user_macro_scope)
12178 (default_macro_scope): Return unique_xmalloc_ptr.
12179 * macroexp.h (macro_expand, macro_expand_once): Return
12180 unique_xmalloc_ptr.
12181 * macroexp.c (macro_expand, macro_expand_once): Return
12182 unique_xmalloc_ptr.
12183 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12184 (info_macro_command, info_macros_command): Use
12185 unique_xmalloc_ptr.
12186 * compile/compile-c-support.c (write_macro_definitions): Use
12187 unique_xmalloc_ptr.
12188 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12189
12190 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12191
12192 * value.c (value_static_field): Assign field type instead of
12193 containing type when returning an optimized out value.
12194
12195 2018-02-06 Yao Qi <yao.qi@linaro.org>
12196
12197 * ft32-tdep.c (ft32_read_pc): Remove.
12198 (ft32_write_pc): Remove.
12199 (ft32_gdbarch_init): Update.
12200 * m32r-tdep.c (m32r_read_pc): Remove.
12201 (m32r_gdbarch_init): Update.
12202 * mep-tdep.c (mep_read_pc): Remove.
12203 (mep_gdbarch_init): Update.
12204 * microblaze-tdep.c (microblaze_write_pc): Remove.
12205 (microblaze_gdbarch_init): Update.
12206 * mn10300-tdep.c (mn10300_read_pc): Remove.
12207 (mn10300_write_pc): Remove.
12208 (mn10300_gdbarch_init): Update.
12209 * moxie-tdep.c (moxie_read_pc): Remove.
12210 (moxie_write_pc): Remove.
12211 (moxie_gdbarch_init): Update.
12212
12213 2018-02-06 Yao Qi <yao.qi@linaro.org>
12214
12215 * expprint.c (print_subexp_standard): Handle
12216 OP_F77_UNDETERMINED_ARGLIST.
12217 (dump_subexp_body_standard): Likewise.
12218
12219 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12220
12221 * target-descriptions.c (tdesc_element_visitor) Add empty
12222 implementations.
12223 (tdesc_type): Move make_gdb_type from here.
12224 (tdesc_type_builtin): Likewise.
12225 (tdesc_type_vector): Likewise.
12226 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12227 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12228 (make_gdb_type_union): Likewise.
12229 (make_gdb_type_flags): Likewise.
12230 (make_gdb_type_enum): Likewise.
12231 (make_gdb_type): New function.
12232 (tdesc_register_type): Use static make_gdb_type.
12233
12234 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12235
12236 * infcmd.c (default_print_one_register_info): Align natural-format
12237 column values consistently one under another.
12238 (pad_to_column): New function.
12239
12240 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12241
12242 * dwarf2read.c (dwarf2_physname): Move commment.
12243
12244 2018-02-01 Leszek Swirski <leszeks@google.com>
12245
12246 * varobj.c (varobj_formatted_print_options): Allow recursive
12247 pretty printing if pretty printing is enabled.
12248
12249 2018-02-01 Leszek Swirski <leszeks@google.com>
12250
12251 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12252 names after a structop as a filename.
12253
12254 2018-02-01 Yao Qi <yao.qi@linaro.org>
12255
12256 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12257 (arm_record_coproc_data_proc): Likewise.
12258
12259 2018-02-01 Yao Qi <yao.qi@linaro.org>
12260
12261 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12262
12263 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12264
12265 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12266 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12267
12268 2018-01-31 Pedro Alves <palves@redhat.com>
12269
12270 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12271 * inflow.c (child_terminal_save_inferior): Wrap reference to
12272 tcgetpgrp in HAVE_TERMIOS_H.
12273 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12274 _WIN32.
12275 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12276 always iterate over all inferiors.
12277 (gdbsim_cntrl_c): Adjust.
12278 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12279
12280 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12281
12282 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12283 index type is objfile-owned if the element type is as well.
12284
12285 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12286
12287 GDB 8.1 released.
12288
12289 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12290
12291 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12292 "features/s390x-linux64.c".
12293 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12294 s390_linux32 and s390x_linux64.
12295 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12296 default tdesc.
12297 * s390-tdep.c: Include "features/s390-linux32.c" and
12298 "features/s390x-linux64.c".
12299 (s390_tdesc_valid): Add check for tdesc_has_registers.
12300 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12301 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12302 tdesc_s390x_linux64.
12303 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12304 tdesc_s390x_linux64 to...
12305 * s390-tdep.h: ...here.
12306
12307 2018-01-30 Pedro Alves <palves@redhat.com>
12308
12309 PR gdb/13211
12310 * config.in, configure: Regenerate.
12311 * configure.ac: Check for getpgid.
12312 * go32-nat.c (go32_pass_ctrlc): New.
12313 (go32_target): Install it.
12314 * inf-child.c (inf_child_target): Install
12315 child_terminal_save_inferior, child_pass_ctrlc and
12316 child_interrupt.
12317 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12318 (inf_ptrace_target): No longer install it.
12319 * infcmd.c (interrupt_target_1): Adjust.
12320 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12321 (child_interrupt): Declare.
12322 (inferior::terminal_state): New.
12323 * inflow.c (struct terminal_info): Update comments.
12324 (inferior_process_group): Delete.
12325 (terminal_is_ours): Delete.
12326 (gdb_tty_state): New.
12327 (child_terminal_init): Adjust.
12328 (is_gdb_terminal, sharing_input_terminal_1)
12329 (sharing_input_terminal): New functions.
12330 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12331 Set the process's actual process group in the foreground if
12332 possible. Handle is_ours_for_output/is_ours distinction. Don't
12333 mark terminal as the inferior's if not sharing GDB's terminal.
12334 Don't check attach_flag.
12335 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12336 pass down a target_terminal_state.
12337 (child_terminal_save_inferior): New, factored out from ...
12338 (child_terminal_ours_1): ... this. Handle
12339 target_terminal_state::is_ours_for_output.
12340 (child_interrupt, child_pass_ctrlc): New.
12341 (inflow_inferior_exit): Clear the inferior's terminal_state.
12342 (copy_terminal_info): Copy the inferior's terminal state.
12343 (_initialize_inflow): Remove reference to terminal_is_ours.
12344 * inflow.h (inferior_process_group): Delete.
12345 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12346 * procfs.c (procfs_target): Don't install procfs_interrupt.
12347 (procfs_interrupt): Delete.
12348 * remote.c (remote_serial_quit_handler): Adjust.
12349 (remote_interrupt): Remove ptid parameter. Adjust.
12350 * target-delegates.c: Regenerate.
12351 * target.c: Include "terminal.h".
12352 (target_terminal::terminal_state): Rename to ...
12353 (target_terminal::m_terminal_state): ... this.
12354 (target_terminal::init): Adjust.
12355 (target_terminal::inferior): Adjust to per-inferior
12356 terminal_state.
12357 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12358 (target_terminal::ours, target_terminal::ours_for_output): Use
12359 target_terminal_is_ours_kind.
12360 (target_interrupt): Remove ptid parameter. Adjust.
12361 (default_target_pass_ctrlc): Adjust.
12362 * target.h (target_ops::to_terminal_save_inferior): New field.
12363 (target_ops::to_interrupt): Remove ptid_t parameter.
12364 (target_interrupt): Remove ptid_t parameter. Update comment.
12365 (target_pass_ctrlc): Update comment.
12366 * target/target.h (target_terminal_state): New scoped enum,
12367 factored out of ...
12368 (target_terminal::terminal_state): ... here.
12369 (target_terminal::inferior): Update comments.
12370 (target_terminal::restore_inferior): New.
12371 (target_terminal::is_inferior, target_terminal::is_ours)
12372 (target_terminal::is_ours_for_output): Adjust.
12373 (target_terminal::scoped_restore_terminal_state): Adjust to
12374 rename, and call restore_inferior() instead of inferior().
12375 (target_terminal::scoped_restore_terminal_state::m_state): Change
12376 type.
12377 (target_terminal::terminal_state): Rename to ...
12378 (target_terminal::m_terminal_state): ... this and change type.
12379
12380 2018-01-30 Pedro Alves <palves@redhat.com>
12381
12382 * linux-nat.c (wait_for_signal): New function.
12383 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12384 directly.
12385 (async_terminal_is_ours)
12386 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12387 (linux_nat_add_target): Don't override
12388 to_terminal_inferior/to_terminal_ours.
12389
12390 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12391
12392 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12393
12394 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12395
12396 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12397 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12398 dwarf2_per_objfile_free here.
12399 (dwarf2_per_objfile_free): Remove.
12400 (_initialize_dwarf2_read): Don't register
12401 dwarf2_per_objfile_free as a registry cleanup.
12402
12403 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12404
12405 Avoid compilation errors in MinGW native builds
12406
12407 The error is triggered by including python-internal.h, and the
12408 error message is:
12409
12410 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12411 from build-gnulib/import/math.h:27,
12412 from d:/usr/Python26/include/pyport.h:235,
12413 from d:/usr/Python26/include/Python.h:58,
12414 from python/python-internal.h:94,
12415 from python/py-arch.c:24:
12416 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12417 using ::hypot;
12418 ^~~~~
12419
12420 This happens because Python headers define 'hypot' to expand t
12421 '_hypot' in the Windows builds.
12422 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12423 'hypoth'. This avoids a compilation error.
12424
12425 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12426
12427 * MAINTAINERS (Write After Approval): Fix ordering.
12428
12429 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12430
12431 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12432
12433 2018-01-26 Alan Modra <amodra@gmail.com>
12434
12435 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12436 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12437 Remove nop. Make const. Comment.
12438 (powerpc32_plt_stub_so_2): New.
12439 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12440 Correct count. Update uses.
12441 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12442 Move common code reading PLT entry word. Correct
12443 powerpc32_plt_stub PLT address calculation.
12444 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12445 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12446 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12447 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12448 (ppc64_standard_linkage8): Likewise.
12449 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12450 Correct insns description.
12451 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12452
12453 2018-01-24 Pedro Alves <palves@redhat.com>
12454
12455 GCC PR libstdc++/83906
12456 * gdbtypes.c (operator==(const dynamic_prop &,
12457 const dynamic_prop &)): New.
12458 (operator==(const range_bounds &, const range_bounds &)): New.
12459 (check_types_equal): Use them instead of memcmp.
12460 * gdbtypes.h (operator==(const dynamic_prop &,
12461 const dynamic_prop &)): Declare.
12462 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12463 (operator==(const range_bounds &, const range_bounds &)): Declare.
12464 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12465
12466 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12467
12468 * s390-linux-tdep.c (s390_record_address_mask)
12469 (s390_record_calc_disp_common, s390_record_calc_disp)
12470 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12471 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12472 (s390_process_record): Move to s390-tdep.c.
12473 (s390_linux_init_abi_any): Adjust.
12474 * s390-tdep.c (s390_record_address_mask)
12475 (s390_record_calc_disp_common, s390_record_calc_disp)
12476 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12477 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12478 (s390_process_record): Moved from s390-linux-tdep.c
12479 (s390_gdbarch_init): Adjust.
12480
12481 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12482
12483 * s390-linux-nat.c (s390-tdep.h): New include.
12484 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12485 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12486 (ALLDEPFILES): Add s390-tdep.c.
12487 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12488 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12489 * s390-tdep.h: ...this. New file.
12490 * s390-linux-tdep.c (s390-tdep.h): New include.
12491 (_initialize_s390_tdep): Rename to...
12492 (_initialize_s390_linux_tdep): ...this and adjust.
12493 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12494 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12495 s390-tdep.h.
12496 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12497 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12498 (s390_is_partial_instruction, s390_software_single_step)
12499 (is_non_branch_ril, s390_displaced_step_copy_insn)
12500 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12501 (s390_prologue_data, s390_addr, s390_store, s390_load)
12502 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12503 (s390_register_call_saved, s390_guess_tracepoint_registers)
12504 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12505 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12506 (s390_pseudo_register_name, s390_pseudo_register_type)
12507 (s390_pseudo_register_read, s390_pseudo_register_write)
12508 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12509 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12510 (s390_addr_bits_remove, s390_address_class_type_flags)
12511 (s390_address_class_type_flags_to_name)
12512 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12513 (s390_function_arg_float, s390_function_arg_vector)
12514 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12515 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12516 (s390_frame_align, s390_register_return_value, s390_return_value)
12517 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12518 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12519 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12520 (s390_trad_frame_prev_register, s390_unwind_cache)
12521 (s390_prologue_frame_unwind_cache)
12522 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12523 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12524 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12525 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12526 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12527 (s390_frame_base_address, s390_local_base_address)
12528 (s390_frame_base, s390_gcc_target_options)
12529 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12530 (s390_validate_reg_range, s390_tdesc_valid)
12531 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12532 * s390-tdep.c: ...this. New file.
12533
12534 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12535
12536 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12537 (s390_process_record, s390_gdbarch_tdep_alloc)
12538 (s390_linux_init_abi_any): Use/set new hook.
12539
12540 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12541
12542 * s390-linux-tdep.c (osabi.h): New include.
12543 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12544 (s390_linux_init_abi_any): New functions.
12545 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12546
12547 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12548
12549 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12550 tdesc_has_registers check
12551
12552 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12553
12554 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12555 (s390_validate_reg_range): New macro.
12556 (s390_gdbarch_init): Adjust.
12557
12558 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12559
12560 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12561 (s390_gdbarch_tdep_alloc): Adjust.
12562 (s390_gdbarch_init): Adjust.
12563
12564 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12565
12566 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12567 <have_tdb>: Change type to bool.
12568 (s390_gdbarch_tdep_alloc): Adjust.
12569 (s390_gdbarch_init): Adjust.
12570
12571 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12572
12573 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12574 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12575 (s390_gdbarch_tdep_alloc): New function.
12576 (s390_gdbarch_init): Allocate tdep at start and use its fields
12577 instead of separate variables.
12578
12579 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12580
12581 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12582 when looking for cached gdbarch and add comment for remaining.
12583
12584 2018-01-22 Pedro Alves <palves@redhat.com>
12585 Sergio Durigan Junior <sergiodj@redhat.com>
12586
12587 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12588 case.
12589
12590 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12591
12592 * MAINTAINERS: Update my company e-mail address.
12593
12594 2018-01-22 Yao Qi <yao.qi@linaro.org>
12595
12596 * regcache.c (cooked_write_test): New function.
12597 (_initialize_regcache): Register the test.
12598
12599 2018-01-22 Yao Qi <yao.qi@linaro.org>
12600
12601 * ia64-tdep.c (ia64_pseudo_register_read): Call
12602 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12603 * m32c-tdep.c (m32c_cat_read): Likewise.
12604 (m32c_r3r2r1r0_read): Likewise.
12605 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12606 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12607
12608 2018-01-22 Yao Qi <yao.qi@linaro.org>
12609
12610 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12611 method raw_read instead of regcache_raw_read.
12612 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12613 * arm-tdep.c (arm_neon_quad_read): Likewise.
12614 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12615 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12616 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12617 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12618 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12619 (i386_pseudo_register_read_into_value): Likewise.
12620 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12621 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12622 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12623 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12624 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12625 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12626 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12627 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12628 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12629
12630 2018-01-22 Yao Qi <yao.qi@linaro.org>
12631
12632 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12633 * configure.tgt: Remove target mt.
12634 * mt-tdep.c: Remove.
12635 * regcache.c (cooked_read_test): Remove the check for mt.
12636
12637 2018-01-22 Yao Qi <yao.qi@linaro.org>
12638
12639 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12640 instead of gdbarch_pseudo_register_read_value.
12641
12642 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12643
12644 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12645 language is Ada.
12646
12647 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12648
12649 * linespec.c (create_sals_line_offset): Remove code that preserved
12650 the symtab_and_line's line number.
12651
12652 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12653
12654 * varobj.c (varobj_create): Don't set valid_block when creating a
12655 floating varobj.
12656
12657 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12658
12659 * varobj.c (varobj_create): Remove out of date comment.
12660
12661 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12662
12663 PR mi/20395
12664 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12665 updating innermost block.
12666 * parse.c (innermost_block_tracker::update): Take extra type
12667 parameter, and check types match before updating innermost block.
12668 (write_dollar_variable): Update innermost block for registers.
12669 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12670 (innermost_block_tracker::innermost_block_tracker): Initialise
12671 m_types member.
12672 (innermost_block_tracker::reset): Take type parameter.
12673 (innermost_block_tracker::update): Take type parameter, and pass
12674 type through as needed.
12675 (innermost_block_tracker::m_types): New member.
12676 * varobj.c (varobj_create): Pass type when reseting innermost
12677 block.
12678
12679 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12680
12681 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12682 * ada-lang.c (resolve_subexp): Likewise.
12683 * breakpoint.c (set_breakpoint_condition) Likewise.
12684 (watch_command_1) Likewise.
12685 * c-exp.y (variable): Likewise.
12686 * d-exp.y (PrimaryExpression): Likewise.
12687 * f-exp.y (variable): Likewise.
12688 * go-exp.y (variable): Likewise.
12689 * m2-exp.y (variable): Likewise.
12690 * objfiles.c (objfile::~objfile): Likewise.
12691 * p-exp.y (variable): Likewise.
12692 * parse.c (innermost_block): Change type.
12693 * parser-defs.h (class innermost_block_tracker): New.
12694 (innermost_block): Change to innermost_block_tracker.
12695 * printcmd.c (display_command): Switch to innermost_block API.
12696 (do_one_display): Likewise.
12697 * rust-exp.y (do_one_display): Likewise.
12698 * symfile.c (clear_symtab_users): Likewise.
12699 * varobj.c (varobj_create): Switch to innermost_block API, replace
12700 use of innermost_block with block stored on varobj object.
12701
12702 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12703
12704 * expression.h (innermost_block): Remove declaration.
12705 * varobj.c: Add 'parser-defs.h' include.
12706
12707 2018-01-19 Tom Tromey <tom@tromey.com>
12708
12709 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12710 symbols in the static and global blocks.
12711
12712 2018-01-19 James Clarke <jrtc27@jrtc27.com>
12713
12714 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12715 gdb_ptrace.h, and move including gdb_wait.h ...
12716 * nat/linux-ptrace.h: ... to here.
12717
12718 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12719
12720 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12721 inf_ptrace_detach_success.
12722 (inf_ptrace_detach_success): Add inferior parameter, use it
12723 instead of inferior_ptid, pass it to detach_inferior.
12724 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12725 parameter.
12726 * inferior.c (detach_inferior): Add overload that takes an
12727 inferior object.
12728 * inferior.h (detach_inferior): Likewise.
12729 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12730 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12731 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12732
12733 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12734
12735 * target.h (struct target_ops) <to_detach>: Add inferior
12736 parameter.
12737 (target_detach): Likewise.
12738 * target.c (dispose_inferior): Pass inferior down.
12739 (target_detach): Pass inferior down. Assert that it is equal to
12740 the current inferior.
12741 * aix-thread.c (aix_thread_detach): Pass inferior down.
12742 * corefile.c (core_file_command): Pass current_inferior() down.
12743 * corelow.c (core_detach): Add inferior parameter.
12744 * darwin-nat.c (darwin_detach): Likewise.
12745 * gnu-nat.c (gnu_detach): Likewise.
12746 * inf-ptrace.c (inf_ptrace_detach): Likewise.
12747 * infcmd.c (detach_command): Pass current_inferior() down to
12748 target_detach.
12749 * infrun.c (follow_fork_inferior): Pass parent_inf to
12750 target_detach.
12751 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12752 target_detach.
12753 * linux-nat.c (linux_nat_detach): Add inferior parameter.
12754 * linux-thread-db.c (thread_db_detach): Likewise.
12755 * nto-procfs.c (procfs_detach): Likewise.
12756 * procfs.c (procfs_detach): Likewise.
12757 * record.c (record_detach): Likewise.
12758 * record.h (struct inferior): Forward-declare.
12759 (record_detach): Add inferior parameter.
12760 * remote-sim.c (gdbsim_detach): Likewise.
12761 * remote.c (remote_detach_1): Likewise.
12762 (remote_detach): Likewise.
12763 (extended_remote_detach): Likewise.
12764 * sol-thread.c (sol_thread_detach): Likewise.
12765 * target-debug.h (target_debug_print_inferior_p): New macro.
12766 * target-delegates.c: Re-generate.
12767 * top.c (kill_or_detach): Pass inferior down to target_detach.
12768 * windows-nat.c (windows_detach): Add inferior parameter.
12769
12770 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12771
12772 * target.h (struct target_ops) <to_detach>: Remove args
12773 parameter.
12774 (target_detach): Likewise.
12775 * target.c (dispose_inferior): Adjust.
12776 (target_detach): Remove args parameter, adjust.
12777 * aix-thread.c (aix_thread_detach): Adjust.
12778 * corefile.c (core_file_command): Adjust.
12779 * corelow.c (core_detach): Adjust.
12780 * darwin-nat.c (darwin_detach): Adjust.
12781 * gnu-nat.c (gnu_detach): Adjust.
12782 * inf-ptrace.c (inf_ptrace_detach): Adjust.
12783 * infcmd.c (detach_command): Adjust
12784 * infrun.c (follow_fork_inferior): Adjust.
12785 (handle_vfork_child_exec_or_exit): Adjust.
12786 * linux-fork.c (linux_fork_detach): Remove args parameter.
12787 * linux-fork.h (linux_fork_detach): Likewise.
12788 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12789 * linux-thread-db.c (thread_db_detach): Likewise.
12790 * nto-procfs.c (procfs_detach): Likewise.
12791 * procfs.c (procfs_detach): Likewise.
12792 (do_detach): Remove signo parameter.
12793 * record.c (record_detach): Remove args parameter.
12794 * record.h (record_detach): Likewise.
12795 * remote-sim.c (gdbsim_detach): Likewise.
12796 * remote.c (remote_detach_1): Likewise.
12797 (remote_detach): Likewise.
12798 (extended_remote_detach): Likewise.
12799 * sol-thread.c (sol_thread_detach): Likewise.
12800 * target-delegates.c: Re-generate.
12801 * top.c (struct qt_args) <args>: Remove field.
12802 (kill_or_detach): Don't pass args.
12803 (quit_force): Don't set args.
12804 * windows-nat.c (windows_detach): Remove args parameter.
12805
12806 2018-01-19 Yao Qi <yao.qi@linaro.org>
12807
12808 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12809 (arm_linux_init_abi): Install it.
12810
12811 2018-01-19 Yao Qi <yao.qi@linaro.org>
12812
12813 * osabi.c (gdb_osabi_names): Extend the regexp for
12814 arm-linux-gnueabihf.
12815
12816 2018-01-18 Yao Qi <yao.qi@linaro.org>
12817
12818 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12819 m_abbrevs.
12820 (abbrev_table::add_abbrev): Update.
12821 (abbrev_table::lookup_abbrev): Update.
12822
12823 2018-01-18 Yao Qi <yao.qi@linaro.org>
12824
12825 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12826
12827 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
12828
12829 * compile/compile.c (compile_to_object): Convert "triplet_rx"
12830 to "std::string".
12831
12832 2018-01-17 Tom Tromey <tom@tromey.com>
12833
12834 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
12835
12836 2018-01-17 Tom Tromey <tom@tromey.com>
12837
12838 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12839 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12840 (create_array_type_with_stride): Update.
12841 * dwarf2read.c (set_die_type): Update.
12842
12843 2018-01-17 Tom Tromey <tom@tromey.com>
12844
12845 * dwarf2read.c (delayed_method_info): Remove typedef.
12846 (dwarf2_cu::method_info): Now a std::vector.
12847 (add_to_method_list): Update.
12848 (free_delayed_list): Remove.
12849 (compute_delayed_physnames): Update.
12850 (process_full_comp_unit, process_full_type_unit): Clear the method
12851 list. Remove cleanups.
12852 (psymtab_include_file_name): Add name_holder parameter. Use
12853 unique_xmalloc_ptr.
12854 (dwarf_decode_lines): Update.
12855
12856 2018-01-17 Tom Tromey <tom@tromey.com>
12857 Simon Marchi <simon.marchi@ericsson.com>
12858
12859 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12860 (dwarf2_per_objfile::free_cached_comp_units)
12861 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12862 (init_cutu_and_read_dies_no_follow): Update.
12863 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12864 (dwarf2_cu::~dwarf2_cu): New.
12865 (free_heap_comp_unit, free_stack_comp_unit): Remove.
12866 (age_cached_comp_units, free_one_cached_comp_unit): Update.
12867
12868 2018-01-17 Tom Tromey <tom@tromey.com>
12869 Simon Marchi <simon.marchi@ericsson.com>
12870
12871 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12872 (struct die_reader_specs) <abbrev_table>: New member.
12873 (struct abbrev_table): Add constructor.
12874 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12875 <abbrev_obstack>: Now an auto_obstack.
12876 (abbrev_table_up): New typedef.
12877 (init_cu_die_reader): Add abbrev_table parameter.
12878 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12879 Add result_dwo_abbrev_table.
12880 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12881 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12882 Update.
12883 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12884 parameter.
12885 (skip_children): Update.
12886 (abbrev_table::alloc_abbrev): Rename from
12887 abbrev_table_alloc_abbrev.
12888 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12889 (abbrev_table::lookup_abbrev): Rename from
12890 abbrev_table_lookup_abbrev.
12891 (abbrev_table_read_table): Return abbrev_table_up.
12892 (abbrev_table_free, abbrev_table_free_cleanup)
12893 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12894 (load_partial_dies): Update.
12895
12896 2018-01-17 Tom Tromey <tom@tromey.com>
12897
12898 * dwarf2read.c (dwarf2_compute_name): Update comment.
12899 (read_func_scope, read_variable): Update.
12900 (new_symbol): Remove.
12901 (new_symbol_full): Rename to new_symbol.
12902
12903 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12904
12905 PR gdb/16577
12906 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12907 a warning instead of throwing an error, set section size to 0 and return
12908 NULL.
12909 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12910
12911 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12912
12913 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12914 std::string.
12915 (linux_ptrace_attach_fail_reason_string): Likewise.
12916 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12917 Likewise.
12918 (linux_ptrace_attach_fail_reason_string): Likewise.
12919 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12920
12921 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12922
12923 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12924
12925 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12926
12927 PR gdb/21559
12928 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12929 checking for fs_base/gs_base fields in struct user_regs_struct.
12930 * configure: Regenerate.
12931
12932 2018-01-17 Yao Qi <yao.qi@linaro.org>
12933
12934 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12935 function.
12936 (aarch64_linux_init_abi): Install it to gdbarch hook
12937 gcc_target_options.
12938
12939 2018-01-15 Pedro Alves <palves@redhat.com>
12940
12941 * common/signals-state-save-restore.c
12942 (save_original_signals_state): Fix typos.
12943
12944 2017-01-12 Tom Tromey <tom@tromey.com>
12945 Sergio Durigan Junior <sergiodj@redhat.com>
12946
12947 * Makefile.in (install-only): Install gdb-add-index.
12948
12949 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12950
12951 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12952
12953 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12954
12955 * infrun.c (keep_going_pass_signal): Clear step-over info when
12956 insert_breakpoints fails.
12957
12958 2018-01-11 Pedro Alves <palves@redhat.com>
12959
12960 PR gdb/22583
12961 * infrun.c (resume): Rename to ...
12962 (resume_1): ... this.
12963 (resume): Reimplement as wrapper around resume_1.
12964
12965 2018-01-11 Pedro Alves <palves@redhat.com>
12966
12967 PR remote/22597
12968 * remote.c (remote_parse_stop_reply): Default to the last-set
12969 general thread instead of to 'magic_null_ptid'.
12970
12971 2018-01-10 Pedro Alves <palves@redhat.com>
12972
12973 * language.h (language_get_symbol_name_matcher): Rename ...
12974 (get_symbol_name_matcher): ... this.
12975 * language.c (language_get_symbol_name_matcher): Ditto.
12976 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12977 callers adjusted.
12978
12979 2018-01-10 Pedro Alves <palves@redhat.com>
12980
12981 PR gdb/22670
12982 * dwarf2read.c
12983 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12984 Adjust to use language_get_symbol_name_matcher instead of
12985 language_defn::la_get_symbol_name_matcher.
12986 * language.c (language_get_symbol_name_matcher): If in Ada mode
12987 and the lookup name is a verbatim match, return Ada's matcher.
12988 * language.h (language_get_symbol_name_matcher): Adjust comment.
12989 (ada_lookup_name_info::verbatim_p):: New method.
12990
12991 2018-01-10 Pedro Alves <palves@redhat.com>
12992
12993 PR gdb/22670
12994 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12995 minsym's language is language_auto or language_cplus, pass down
12996 language_ada instead.
12997 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12998
12999 2018-01-10 Pedro Alves <palves@redhat.com>
13000
13001 PR gdb/22670
13002 * minsyms.c (linkage_name_str): New function.
13003 (iterate_over_minimal_symbols): Use it.
13004
13005 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13006
13007 * NEWS: Document that 'info proc' now works on FreeBSD.
13008
13009 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13010
13011 * configure.ac: Check for kinfo_getfile in libutil.
13012 * configure: Regenerate.
13013 * config.in: Regenerate.
13014 * fbsd-nat.c: Include "fbsd-tdep.h".
13015 (fbsd_fetch_cmdline): New.
13016 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13017 rather than calling error.
13018 (fbsd_info_proc): New.
13019 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13020 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13021 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13022
13023 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13024
13025 * fbsd-nat.c (struct free_deleter): Remove.
13026 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13027
13028 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13029
13030 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13031 NULL for an empty pathname.
13032
13033 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13034
13035 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13036 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13037 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13038 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13039 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13040 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13041 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13042 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13043 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13044 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13045 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13046 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13047 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13048 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13049 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13050
13051 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13052
13053 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13054 (gnu_xfer_auxv): New function.
13055 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13056 TARGET_OBJECT_AUXV.
13057
13058 2018-01-08 Yao Qi <yao.qi@linaro.org>
13059 Simon Marchi <simon.marchi@ericsson.com>
13060
13061 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13062 common/selftest.c.
13063 (COMMON_OBS): Remove selftest.o.
13064 * configure.ac: Append selftest-arch.c and common/selftest.c to
13065 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13066 * configure: Re-generated.
13067 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13068 GDB_SELF_TEST.
13069 (maintenance_info_selftests): Likewise.
13070
13071 2018-01-08 Xavier Roirand <roirand@adacore.com>
13072
13073 * ada-valprint.c (val_print_packed_array_elements): Use
13074 proper number of elements when printing an array indexed
13075 by an enumeration type.
13076
13077 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13078
13079 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13080 (dw2_get_file_names_reader): Adjust.
13081 (lookup_dwo_signatured_type): Adjust.
13082 (lookup_dwp_signatured_type): Adjust.
13083 (lookup_signatured_type): Adjust.
13084 (create_type_unit_group): Adjust.
13085 (get_type_unit_group): Adjust.
13086 (process_psymtab_comp_unit_reader): Adjust.
13087 (build_type_psymtabs_reader): Adjust.
13088 (scan_partial_symbols): Adjust.
13089 (add_partial_symbol): Adjust.
13090 (add_partial_subprogram): Adjust.
13091 (peek_die_abbrev): Adjust.
13092 (fixup_go_packaging): Adjust.
13093 (process_imported_unit_die): Adjust.
13094 (dwarf2_compute_name): Adjust.
13095 (dwarf2_physname): Adjust.
13096 (read_import_statement): Adjust.
13097 (handle_DW_AT_stmt_list): Adjust.
13098 (read_file_scope): Adjust.
13099 (read_func_scope): Adjust.
13100 (read_lexical_block_scope): Adjust.
13101 (read_call_site_scope): Adjust.
13102 (read_variable): Adjust.
13103 (dwarf2_rnglists_process): Adjust.
13104 (dwarf2_ranges_process): Adjust.
13105 (dwarf2_ranges_read): Adjust.
13106 (dwarf2_get_pc_bounds): Adjust.
13107 (dwarf2_record_block_ranges): Adjust.
13108 (dwarf2_add_field): Adjust.
13109 (dwarf2_add_member_fn): Adjust.
13110 (read_structure_type): Adjust.
13111 (process_structure_scope): Adjust.
13112 (read_enumeration_type): Adjust.
13113 (read_array_type): Adjust.
13114 (mark_common_block_symbol_computed): Adjust.
13115 (read_common_block): Adjust.
13116 (read_namespace_type): Adjust.
13117 (read_namespace): Adjust.
13118 (read_module_type): Adjust.
13119 (read_tag_pointer_type): Adjust.
13120 (read_tag_ptr_to_member_type): Adjust.
13121 (read_tag_string_type): Adjust.
13122 (read_subroutine_type): Adjust.
13123 (read_typedef): Adjust.
13124 (read_base_type): Adjust.
13125 (attr_to_dynamic_prop): Adjust.
13126 (read_subrange_type): Adjust.
13127 (read_unspecified_type): Adjust.
13128 (dwarf2_read_abbrevs): Adjust.
13129 (load_partial_dies): Adjust.
13130 (read_partial_die): Adjust.
13131 (find_partial_die): Adjust.
13132 (guess_partial_die_structure_name): Adjust.
13133 (fixup_partial_die): Adjust.
13134 (read_attribute_value): Adjust.
13135 (read_addr_index): Adjust.
13136 (read_addr_index_from_leb128): Adjust.
13137 (read_str_index): Adjust.
13138 (dwarf2_string_attr): Adjust.
13139 (get_debug_line_section): Adjust.
13140 (dwarf_decode_line_header): Adjust.
13141 (lnp_state_machine::check_line_address): Adjust.
13142 (dwarf_decode_lines_1): Adjust.
13143 (dwarf_decode_lines): Adjust.
13144 (dwarf2_start_symtab): Adjust.
13145 (var_decode_location): Adjust.
13146 (new_symbol_full): Adjust.
13147 (dwarf2_const_value_data): Adjust.
13148 (dwarf2_const_value_attr): Adjust.
13149 (dwarf2_const_value): Adjust.
13150 (die_type): Adjust.
13151 (die_containing_type): Adjust.
13152 (build_error_marker_type): Adjust.
13153 (lookup_die_type): Adjust.
13154 (guess_full_die_structure_name): Adjust.
13155 (anonymous_struct_prefix): Adjust.
13156 (determine_prefix): Adjust.
13157 (dwarf2_name): Adjust.
13158 (follow_die_ref_or_sig): Adjust.
13159 (follow_die_offset): Adjust.
13160 (follow_die_ref): Adjust.
13161 (follow_die_sig_1): Adjust.
13162 (follow_die_sig): Adjust.
13163 (get_signatured_type): Adjust.
13164 (get_DW_AT_signature_type): Adjust.
13165 (decode_locdesc): Adjust.
13166 (dwarf_decode_macros): Adjust.
13167 (cu_debug_loc_section): Adjust.
13168 (fill_in_loclist_baton): Adjust.
13169 (dwarf2_symbol_mark_computed): Adjust.
13170 (init_one_comp_unit): Don't assign
13171 dwarf2_cu::dwarf2_per_objfile.
13172 (set_die_type): Adjust.
13173
13174 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13175
13176 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13177 <dwarf2_per_objfile>: New field.
13178 (dwarf2_per_objfile): Remove global.
13179 (get_dwarf2_per_objfile): New function.
13180 (set_dwarf2_per_objfile): New function.
13181 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13182 dwarf2_per_objfile.
13183 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13184 (read_abbrev_offset): Likewise.
13185 (read_indirect_string): Likewise.
13186 (read_indirect_line_string): Likewise.
13187 (read_indirect_string_at_offset): Likewise.
13188 (read_indirect_string_from_dwz): Likewise.
13189 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13190 dwarf2_per_objfile.
13191 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13192 (create_all_comp_units): Change objfile parameter to
13193 dwarf2_per_objfile.
13194 (create_all_type_units): Likewise.
13195 (process_queue): Add dwarf2_per_objfile parameter.
13196 (read_and_check_comp_unit_head): Likewise.
13197 (lookup_dwo_unit_in_dwp): Likewise.
13198 (get_dwp_file): Likewise.
13199 (process_cu_includes): Likewise.
13200 (struct free_dwo_file_cleanup_data): New struct.
13201 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13202 set_dwarf2_per_objfile.
13203 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13204 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13205 context, adjust calls.
13206 (dw2_instantiate_symtab): Likewise.
13207 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13208 (dw2_get_cu): Likewise.
13209 (create_cu_from_index_list): Change objfile parameter to
13210 dwarf2_per_objfile.
13211 (create_cus_from_index_list): Get dwarf2_per_objfile from
13212 context, adjust calls.
13213 (create_cus_from_index): Likewise.
13214 (create_signatured_type_table_from_index): Change objfile
13215 parameter to dwarf2_per_objfile.
13216 (create_signatured_type_table_from_debug_names): Change objfile
13217 parameter to dwarf2_per_objfile.
13218 (create_addrmap_from_index): Likewise.
13219 (create_addrmap_from_aranges): Likewise.
13220 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13221 (dw2_setup): Remove.
13222 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13223 context.
13224 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13225 get_dwarf2_per_objfile.
13226 (dw2_forget_cached_source_info): Likewise.
13227 (dw2_map_symtabs_matching_filename): Likewise.
13228 (struct dw2_symtab_iterator) <index>: Remove.
13229 <dwarf2_per_objfile>: New field.
13230 (dw2_symtab_iter_init): Replace index parameter with
13231 dwarf2_per_objfile.
13232 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13233 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13234 (dw2_print_stats): Likewise.
13235 (dw2_dump): Likewise.
13236 (dw2_expand_symtabs_for_function): Likewise.
13237 (dw2_expand_all_symtabs): Likewise.
13238 (dw2_expand_symtabs_with_fullname): Likewise.
13239 (dw2_expand_marked_cus): Replace index and objfile parameters
13240 with dwarf2_per_objfile.
13241 (dw_expand_symtabs_matching_file_matcher): Add
13242 dwarf2_per_objfile parameter and adjust calls.
13243 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13244 adjust calls.
13245 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13246 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13247 adjust calls.
13248 (create_cus_from_debug_names_list): Replace objfile parameter
13249 with dwarf2_per_objfile and adjust calls.
13250 (create_cus_from_debug_names): Likewise.
13251 (dwarf2_read_debug_names): Likewise.
13252 (mapped_debug_names::namei_to_name): Adjust call.
13253 (dw2_debug_names_iterator::next): Likewise.
13254 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13255 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13256 (dw2_debug_names_dump): Likewise.
13257 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13258 (dw2_debug_names_expand_symtabs_matching): Likewise.
13259 (dwarf2_initialize_objfile): Likewise.
13260 (dwarf2_build_psymtabs): Likewise.
13261 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13262 this_cu.
13263 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13264 (read_and_check_comp_unit_head): Likewise.
13265 (read_abbrev_offset): Likewise.
13266 (create_debug_type_hash_table): Likewise.
13267 (create_debug_types_hash_table): Likewise.
13268 (create_all_type_units): Replace objfile parameter with
13269 dwarf2_per_objfile.
13270 (add_type_unit): Add dwarf2_per_objfile parameter.
13271 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13272 with dwarf2_per_objfile.
13273 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13274 (lookup_dwp_signatured_type): Likewise.
13275 (lookup_signatured_type): Likewise.
13276 (read_cutu_die_from_dwo): Likewise.
13277 (init_tu_and_read_dwo_dies): Likewise.
13278 (init_cutu_and_read_dies): Likewise.
13279 (init_cutu_and_read_dies_no_follow): Likewise.
13280 (allocate_type_unit_groups_table): Add objfile parameter.
13281 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13282 (get_type_unit_group): Likewise.
13283 (process_psymtab_comp_unit): Update call.
13284 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13285 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13286 (print_tu_stats): Likewise.
13287 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13288 in void* parameter.
13289 (build_type_psymtabs): Change objfile parameter to
13290 dwarf2_per_objfile.
13291 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13292 passed in void* parameter.
13293 (process_skeletonless_type_units): Change objfile parameter to
13294 dwarf2_per_objfile.
13295 (set_partial_user): Likewise.
13296 (dwarf2_build_psymtabs_hard): Likewise.
13297 (read_comp_units_from_section): Likewise.
13298 (create_all_comp_units): Likewise.
13299 (scan_partial_symbols): Update calls.
13300 (add_partial_symbol): Likewise.
13301 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13302 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13303 (process_queue): Add dwarf2_per_objfile parameter.
13304 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13305 (compute_compunit_symtab_includes): Likewise.
13306 (process_cu_includes): Add dwarf2_per_objfile parameter.
13307 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13308 (process_full_type_unit): Likewise.
13309 (process_imported_unit_die): Update call.
13310 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13311 (read_file_scope): Likewise.
13312 (allocate_dwo_file_hash_table): Add objfile parameter.
13313 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13314 (create_cus_hash_table): Likewise.
13315 (create_dwp_hash_table): Likewise.
13316 (create_dwo_unit_in_dwp_v1): Likewise.
13317 (create_dwp_v2_section): Likewise.
13318 (create_dwo_unit_in_dwp_v2): Likewise.
13319 (lookup_dwo_unit_in_dwp): Likewise.
13320 (try_open_dwop_file): Likewise.
13321 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13322 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13323 cleanup to include a reference to dwarf2_per_objfile.
13324 (open_dwp_file): Add dwarf2_per_objfile parameter.
13325 (open_and_init_dwp_file): Likewise.
13326 (get_dwp_file): Likewise.
13327 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13328 (queue_and_load_all_dwo_tus): Update call.
13329 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13330 data.
13331 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13332 (dwarf2_ranges_process): Likewise.
13333 (dwarf2_get_pc_bounds): Likewise.
13334 (mark_common_block_symbol_computed): Likewise.
13335 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13336 (dwarf2_read_abbrevs): Update call.
13337 (read_partial_die): Use dwarf2_per_objfile from cu.
13338 (find_partial_die): Likewise.
13339 (fixup_partial_die): Likewise.
13340 (read_attribute_value): Likewise.
13341 (read_indirect_string_at_offset_from): Add objfile parameter.
13342 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13343 parameter.
13344 (read_indirect_string_from_dwz): Add objfile parameter.
13345 (read_indirect_string): Add objfile parameter.
13346 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13347 (read_addr_index): Use dwarf2_per_objfile from cu.
13348 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13349 call dw2_setup.
13350 (read_str_index): Use dwarf2_per_objfile from cu.
13351 (get_debug_line_section): Likewise.
13352 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13353 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13354 (new_symbol_full): Use dwarf2_per_objfile from cu.
13355 (build_error_marker_type): Likewise.
13356 (lookup_die_type): Likewise.
13357 (determine_prefix): Likewise.
13358 (follow_die_offset): Likewise.
13359 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13360 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13361 (dwarf2_fetch_die_type_sect_off): Likewise.
13362 (dwarf2_get_die_type): Likewise.
13363 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13364 (get_signatured_type): Likewise.
13365 (get_DW_AT_signature_type): Likewise.
13366 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13367 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13368 (cu_debug_loc_section): Likewise.
13369 (fill_in_loclist_baton): Likewise.
13370 (dwarf2_symbol_mark_computed): Likewise.
13371 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13372 dwarf2_per_objfile.
13373 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13374 parameter.
13375 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13376 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13377 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13378 (set_die_type): Use dwarf2_free_objfile from cu.
13379 (get_die_type_at_offset): Likewise.
13380 (dwarf2_per_objfile_free): Don't assign global variable.
13381 (debug_names) <constructor>: Add dwarf2_per_objfile
13382 parameter, update m_debugstrlookup construction.
13383 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13384 parameter.
13385 <m_dwarf2_per_objfile>: New field.
13386 <lookup>: Use m_dwarf2_per_objfile.
13387 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13388 (psyms_seen_size): Likewise.
13389 (write_gdbindex): Replace objfile parameter with
13390 dwarf2_per_objfile.
13391 (write_debug_names): Likewise.
13392 (write_psymtabs_to_index): Likewise.
13393 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13394 calls.
13395
13396 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13397
13398 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13399 <dwarf2_per_objfile>: New field.
13400 (struct dwarf2_per_cu_data) <objfile>: Remove.
13401 <dwarf2_per_objfile>: New field.
13402 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13403 of objfile.
13404 (create_signatured_type_table_from_index): Likewise.
13405 (create_debug_type_hash_table): Likewise.
13406 (fill_in_sig_entry_from_dwo_entry): Likewise.
13407 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13408 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13409 objfile.
13410 (create_partial_symtab): Access objfile through
13411 dwarf2_per_objfile.
13412 (process_psymtab_comp_unit_reader): Likewise.
13413 (read_comp_units_from_section): Likewise.
13414 (scan_partial_symbols): Likewise.
13415 (add_partial_symbol): Likewise.
13416 (add_partial_subprogram): Likewise.
13417 (peek_die_abbrev): Likewise.
13418 (fixup_go_packaging): Likewise.
13419 (process_full_comp_unit): Likewise.
13420 (process_full_type_unit): Likewise.
13421 (process_imported_unit_die): Likewise.
13422 (dwarf2_compute_name): Likewise.
13423 (dwarf2_physname): Likewise.
13424 (read_import_statement): Likewise.
13425 (create_cus_hash_table): Assign dwarf2_physname instead of
13426 objfile.
13427 (read_func_scope): Access objfile through dwarf2_per_objfile.
13428 (read_lexical_block_scope): Likewise.
13429 (read_call_site_scope): Likewise.
13430 (read_variable): Likewise.
13431 (dwarf2_rnglists_process): Likewise.
13432 (dwarf2_ranges_process): Likewise.
13433 (dwarf2_ranges_read): Likewise.
13434 (dwarf2_record_block_ranges): Likewise.
13435 (dwarf2_add_field): Likewise.
13436 (dwarf2_add_member_fn): Likewise.
13437 (read_structure_type): Likewise.
13438 (process_structure_scope): Likewise.
13439 (read_enumeration_type): Likewise.
13440 (read_array_type): Likewise.
13441 (read_common_block): Likewise.
13442 (read_namespace_type): Likewise.
13443 (read_namespace): Likewise.
13444 (read_module_type): Likewise.
13445 (read_tag_pointer_type): Likewise.
13446 (read_tag_ptr_to_member_type): Likewise.
13447 (read_tag_string_type): Likewise.
13448 (read_subroutine_type): Likewise.
13449 (read_typedef): Likewise.
13450 (read_base_type): Likewise.
13451 (attr_to_dynamic_prop): Likewise.
13452 (read_subrange_type): Likewise.
13453 (read_unspecified_type): Likewise.
13454 (load_partial_dies): Likewise.
13455 (read_partial_die): Likewise.
13456 (find_partial_die): Likewise.
13457 (guess_partial_die_structure_name): Likewise.
13458 (fixup_partial_die): Likewise.
13459 (read_attribute_value): Likewise.
13460 (read_addr_index_from_leb128): Likewise.
13461 (dwarf2_read_addr_index): Likewise.
13462 (dwarf2_string_attr): Likewise.
13463 (lnp_state_machine::check_line_address): Likewise.
13464 (dwarf_decode_lines_1): Likewise.
13465 (dwarf_decode_lines): Likewise.
13466 (dwarf2_start_symtab): Likewise.
13467 (var_decode_location): Likewise.
13468 (new_symbol_full): Likewise.
13469 (dwarf2_const_value_data): Likewise.
13470 (dwarf2_const_value_attr): Likewise.
13471 (dwarf2_const_value): Likewise.
13472 (die_type): Likewise.
13473 (die_containing_type): Likewise.
13474 (lookup_die_type): Likewise.
13475 (guess_full_die_structure_name): Likewise.
13476 (anonymous_struct_prefix): Likewise.
13477 (dwarf2_name): Likewise.
13478 (follow_die_ref_or_sig): Likewise.
13479 (follow_die_offset): Likewise.
13480 (follow_die_ref): Likewise.
13481 (dwarf2_fetch_die_loc_sect_off): Likewise.
13482 (dwarf2_fetch_constant_bytes): Likewise.
13483 (dwarf2_fetch_die_type_sect_off): Likewise.
13484 (dwarf2_get_die_type): Likewise.
13485 (follow_die_sig): Likewise.
13486 (decode_locdesc): Likewise.
13487 (dwarf2_per_cu_objfile): Likewise.
13488 (dwarf2_per_cu_text_offset): Likewise.
13489 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13490 objfile.
13491 (set_die_type): Access objfile through
13492 dwarf2_per_objfile.
13493
13494 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13495
13496 * valprint.c (converted_character_d): Remove typedef.
13497 (DEF_VEC_O (converted_character_d)): Remove.
13498 (count_next_character): Use std::vector.
13499 (print_converted_chars_to_obstack): Likewise.
13500 (generic_printstr): Likewise.
13501
13502 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13503
13504 * xml-support.h (struct gdb_xml_value): Add constructor.
13505 <value>: Change type to unique_xmalloc_ptr.
13506 (gdb_xml_value_s): Remove typedef.
13507 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13508 (gdb_xml_element_start_handler): Change parameter type to
13509 std::vector.
13510 (xml_find_attribute): Likewise.
13511 * xml-support.c (xml_find_attribute): Change parameter type to
13512 std::vector and adjust.
13513 (gdb_xml_values_cleanup): Remove.
13514 (gdb_xml_parser::start_element): Adjust to std::vector.
13515 (xinclude_start_include): Change paraeter type to std::vector
13516 and adjust.
13517 * btrace.c (check_xml_btrace_version): Likewise.
13518 (parse_xml_btrace_block): Likewise.
13519 (parse_xml_btrace_pt_config_cpu): Likewise.
13520 (parse_xml_btrace_pt): Likewise.
13521 (parse_xml_btrace_conf_bts): Likewise.
13522 (parse_xml_btrace_conf_pt): Likewise.
13523 * memory-map.c (memory_map_start_memory): Likewise.
13524 (memory_map_start_property): Likewise.
13525 * osdata.c (osdata_start_osdata): Likewise.
13526 (osdata_start_item): Likewise.
13527 (osdata_start_column): Likewise.
13528 * remote.c (start_thread): Likewise.
13529 * solib-aix.c (library_list_start_library): Likewise.
13530 (library_list_start_list): Likewise.
13531 * solib-svr4.c (library_list_start_library): Likewise.
13532 (svr4_library_list_start_list): Likewise.
13533 * solib-target.c (library_list_start_segment): Likewise.
13534 (library_list_start_section): Likewise.
13535 (library_list_start_library): Likewise.
13536 (library_list_start_list): Likewise.
13537 * tracepoint.c (traceframe_info_start_memory): Likewise.
13538 (traceframe_info_start_tvar): Likewise.
13539 * xml-syscall.c (syscall_start_syscall): Likewise.
13540 * xml-tdesc.c (tdesc_start_target): Likewise.
13541 (tdesc_start_feature): Likewise.
13542 (tdesc_start_reg): Likewise.
13543 (tdesc_start_union): Likewise.
13544 (tdesc_start_struct): Likewise.
13545 (tdesc_start_flags): Likewise.
13546 (tdesc_start_enum): Likewise.
13547 (tdesc_start_field): Likewise.
13548 (tdesc_start_enum_value): Likewise.
13549 (tdesc_start_vector): Likewise.
13550
13551 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13552
13553 * extension.h (struct xmethod_worker) <clone>: Remove.
13554 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13555 Remove.
13556 (python_xmethod_worker::clone): Remove.
13557 * valops.c (find_overload_match): Use std::move instead of
13558 clone.
13559
13560 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13561
13562 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13563 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13564 <free_xmethod_worker_data>: Remove.
13565 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13566 <get_xmethod_arg_types>: Remove.
13567 <get_xmethod_result_type>: Remove.
13568 <invoke_xmethod>: Remove.
13569 * extension.c (new_xmethod_worker): Remove.
13570 (clone_xmethod_worker): Remove.
13571 (get_matching_xmethod_workers): Return void, pass std::vector by
13572 pointer.
13573 (get_xmethod_arg_types): Rename to...
13574 (xmethod_worker::get_arg_types): ... this, and adjust.
13575 (get_xmethod_result_type): Rename to...
13576 (xmethod_worker::get_result_type): ... this, and adjust.
13577 (invoke_xmethod): Remove.
13578 (free_xmethod_worker): Remove.
13579 (free_xmethod_worker_vec): Remove.
13580 * extension.h (enum ext_lang_rc): Move here from
13581 extension-priv.h.
13582 (struct xmethod_worker): Add constructor and destructor.
13583 <data>: Remove.
13584 <value>: Remove.
13585 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13586 virtual pure methods.
13587 <get_arg_types, get_result_type>: New methods.
13588 (xmethod_worker_ptr): Remove typedef.
13589 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13590 (xmethod_worker_vec): Remove typedef.
13591 (xmethod_worker_up): New typedef.
13592 (invoke_xmethod): Remove.
13593 (clone_xmethod_worker): Remove.
13594 (free_xmethod_worker): Remove.
13595 (free_xmethod_worker_vec): Remove.
13596 (get_xmethod_arg_types): Remove.
13597 (get_xmethod_result_type): Remove.
13598 * valops.c (find_method_list): Use std::vector, don't use
13599 intermediate vector.
13600 (value_find_oload_method_list): Use std::vector.
13601 (find_overload_match): Use std::vector.
13602 (find_oload_champ): Use std::vector.
13603 * value.c (value_free): Use operator delete.
13604 (value_of_xmethod): Rename to...
13605 (value_from_xmethod): ... this. Don't assign
13606 xmethod_worker::value, take rvalue-reference.
13607 (result_type_of_xmethod): Adjust.
13608 (call_xmethod): Adjust.
13609 * value.h: Include extension.h.
13610 (struct xmethod_worker): Don't forward-declare.
13611 (value_of_xmethod): Rename to...
13612 (value_from_xmethod): ... this, take rvalue-reference.
13613 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13614 (struct python_xmethod_worker): ... this, add constructor and
13615 destructor.
13616 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13617 (gdbpy_free_xmethod_worker_data): Rename to...
13618 (python_xmethod_worker::~python_xmethod_worker): ... this and
13619 adjust.
13620 (gdbpy_clone_xmethod_worker_data): Rename to...
13621 (python_xmethod_worker::clone): ... this and adjust.
13622 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13623 temporary vector.
13624 (gdbpy_get_xmethod_arg_types): Rename to...
13625 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13626 (gdbpy_get_xmethod_result_type): Rename to...
13627 (python_xmethod_worker::do_get_result_type): ... this and
13628 adjust.
13629 (gdbpy_invoke_xmethod): Rename to...
13630 (python_xmethod_worker::invoke): ... this and adjust.
13631 (new_python_xmethod_worker): Rename to...
13632 (python_xmethod_worker::python_xmethod_worker): ... this and
13633 adjust.
13634 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13635 Remove.
13636 (gdbpy_free_xmethod_worker_data): Remove.
13637 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13638 (gdbpy_get_xmethod_arg_types): Remove.
13639 (gdbpy_get_xmethod_result_type): Remove.
13640 (gdbpy_invoke_xmethod): Remove.
13641 * python/python.c (python_extension_ops): Remove obsolete
13642 callbacks.
13643
13644 2018-01-05 Pedro Alves <palves@redhat.com>
13645
13646 PR gdb/18653
13647 * common/signals-state-save-restore.c
13648 (save_original_signals_state): New parameter 'quiet'. Warn if we
13649 find a custom handler preinstalled, instead of internal erroring.
13650 But only warn if !quiet.
13651 * common/signals-state-save-restore.h
13652 (save_original_signals_state): New parameter 'quiet'.
13653 * main.c (captured_main_1): Move save_original_signals_state call
13654 after option handling, and pass QUIET.
13655
13656 2018-01-05 Pedro Alves <palves@redhat.com>
13657
13658 * spu-tdep.c (spu_catch_start): Pass
13659 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13660
13661 2018-01-05 Pedro Alves <palves@redhat.com>
13662
13663 PR gdb/22670
13664 * ada-lang.c (literal_symbol_name_matcher): New function.
13665 (ada_get_symbol_name_matcher): Use it for
13666 symbol_name_match_type::SEARCH_NAME.
13667 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13668 it down instead of assuming symbol_name_match_type::FULL.
13669 * block.h (block_lookup_symbol): New parameter 'match_type'.
13670 * c-valprint.c (print_unpacked_pointer): Use
13671 lookup_symbol_search_name instead of lookup_symbol.
13672 * compile/compile-object-load.c (get_out_value_type): Pass down
13673 symbol_name_match_type::SEARCH_NAME.
13674 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13675 symbol_name_match_type::FULL.
13676 * cp-support.c (cp_get_symbol_name_matcher): Handle
13677 symbol_name_match_type::SEARCH_NAME.
13678 * infrun.c (insert_exception_resume_breakpoint): Use
13679 lookup_symbol_search_name.
13680 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13681 * psymtab.c (maintenance_check_psymtabs): Use
13682 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13683 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13684 SYMBOL_SEARCH_NAME.
13685 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13686 if symbol_name_match_type::SEARCH_NAME.
13687 (lookup_symbol_in_language): Pass down
13688 symbol_name_match_type::FULL.
13689 (lookup_symbol_search_name): New.
13690 (lookup_language_this): Pass down
13691 symbol_name_match_type::SEARCH_NAME.
13692 (lookup_symbol_aux, lookup_local_symbol): New parameter
13693 'match_type'. Pass it down.
13694 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13695 (lookup_symbol_search_name): New declaration.
13696 (lookup_symbol_in_block): New 'match_type' parameter.
13697
13698 2018-01-05 Pedro Alves <palves@redhat.com>
13699
13700 PR gdb/22670
13701 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13702 ada_lookup_symbol.
13703 (ada_lookup_symbol): Reimplement in terms of
13704 ada_lookup_symbol_list, bits factored out from
13705 ada_lookup_encoded_symbol.
13706
13707 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13708
13709 * ada-exp.y (write_object_renaming): When subscripting an array
13710 using a symbol as the index, pass the block in call to
13711 ada_lookup_encoded_symbol when looking that symbol up.
13712
13713 2018-01-05 Jerome Guitton <guitton@adacore.com>
13714
13715 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13716 TYPE_INDEX_TYPE.
13717
13718 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13719
13720 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13721 the case where VALUE_LVAL (val0) is not lval_memory.
13722
13723 2018-01-05 Xavier Roirand <roirand@adacore.com>
13724
13725 * ada-valprint.c (print_optional_low_bound): Handle
13726 character-indexed array printing like boolean-indexed array
13727 printing.
13728
13729 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13730
13731 * NEWS: Create a new section for the next release branch.
13732 Rename the section of the current branch, now that it has
13733 been cut.
13734
13735 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13736
13737 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13738 * version.in: Bump version to 8.1.50.DATE-git.
13739
13740 2018-01-03 Xavier Roirand <roirand@adacore.com>
13741
13742 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13743 Add field.
13744 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13745 Add field.
13746 (default_exception_support_info) <catch_handlers_sym>: Add field.
13747 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13748 (ada_exception_name_addr_1): Add "catch handlers" handling.
13749 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13750 Update all callers.
13751 (create_excep_cond_exprs) <ex>: Add parameter.
13752 (re_set_exception): Update create_excep_cond_exprs call.
13753 (print_it_exception, print_one_exception, print_mention_exception)
13754 (print_recreate_exception): Add "catch handler" handling.
13755 (allocate_location_catch_handlers, re_set_catch_handlers)
13756 (check_status_catch_handlers, print_it_catch_handlers)
13757 (print_one_catch_handlers, print_mention_catch_handlers)
13758 (print_recreate_catch_handlers): New function.
13759 (catch_handlers_breakpoint_ops): New variable.
13760 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13761 Add parameter. Add "catch handler" handling.
13762 (ada_exception_sym_name, ada_exception_breakpoint_ops):
13763 Add "catch handler" handling.
13764 (ada_exception_catchpoint_cond_string): Add "catch handler"
13765 handling.
13766 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13767 call.
13768 (catch_ada_handlers_command): New function.
13769 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13770 operations structure.
13771 (_initialize_ada_language): Add "catch handlers" command entry.
13772 * NEWS: Document "catch handlers" feature.
13773
13774 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13775
13776 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13777 account when creating the array type of the slice.
13778 (ada_value_slice): Likewise.
13779
13780 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13781
13782 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13783 New enum value.
13784 (create_array_type_with_stride): Add byte_stride_prop parameter.
13785 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13786 New parameter. Update all callers in this file.
13787 (array_type_has_dynamic_stride): New function.
13788 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13789 of arrays with dynamic byte strides.
13790 * dwarf2read.c (read_array_type): Add support for dynamic
13791 DW_AT_byte_stride attributes.
13792
13793 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13794
13795 * dwarf2read.c (read_unspecified_type): Treat
13796 DW_TAG_enumeration_type DIEs from Ada units as stubs.
13797
13798 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13799
13800 Update copyright year range in all GDB files.
13801
13802 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13803
13804 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13805 and gdb/testsuite/gdb.base/step-line.c.
13806
13807 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13808
13809 * copyright.py (main): Dump the contents of
13810 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13811 even if BY_HAND is empty.
13812
13813 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13814
13815 * top.c (print_gdb_version): Update Copyright year in version
13816 message.
13817
13818 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13819
13820 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13821
13822 For older changes see ChangeLog-2017.
13823 \f
13824 Local Variables:
13825 mode: change-log
13826 left-margin: 8
13827 fill-column: 74
13828 version-control: never
13829 coding: utf-8
13830 End:
This page took 0.32228 seconds and 4 git commands to generate.