]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
Use KF_PATH to verify the size of a struct kinfo_file.
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2
3 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
4 KVE_PATH.
5
6 2018-09-18 Tom Tromey <tom@tromey.com>
7
8 * compile/compile-object-load.c (struct
9 link_hash_table_cleanup_data): Add constructor and destructor.
10 Use DISABLE_COPY_AND_ASSIGN.
11 (~link_hash_table_cleanup_data): Rename from
12 link_hash_table_free. Now a destructor.
13 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
14
15 2018-09-18 Tom Tromey <tom@tromey.com>
16
17 * compile/compile-object-run.c (do_module_cleanup): Use delete.
18 * compile/compile-object-load.c (struct munmap_list): Move to
19 header file.
20 (munmap_list::add): Rename from munmap_list_add; rewrite.
21 (munmap_list::~munmap_list): Rename from munmap_list_free.
22 (munmap_listp_free_cleanup): Remove.
23 (compile_object_load): Update.
24 * compile/compile-object-load.h (struct munmap_list): Move from
25 compile-object-load.c. Rewrite.
26
27 2018-09-18 Alan Hayward <alan.hayward@arm.com>
28
29 * aarch64-tdep.c (pass_in_v): Use register size.
30 (aarch64_extract_return_value): Likewise.
31 (aarch64_store_return_value): Likewise.
32
33 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
34
35 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
36 rlim_t.
37
38 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
39
40 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
41 Fix short help line.
42
43 2018-09-17 Tom Tromey <tom@tromey.com>
44
45 PR python/20445:
46 * configure: Rebuild.
47 * configure.ac: Conditionally use -DNDEBUG for Python.
48
49 2018-09-17 Tom Tromey <tom@tromey.com>
50
51 * configure: Rebuild.
52 * configure.ac: Use gmp as a library dependency when checking for
53 mpfr.
54
55 2018-09-17 Pedro Alves <palves@redhat.com>
56
57 * python/py-inferior.c (find_inferior_object): Delete.
58
59 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
60
61 * compile/compile-cplus-types.c
62 (compile_cplus_instance::enter_scope): Don't use new_scope after
63 std::move.
64
65 2018-09-17 Tom Tromey <tom@tromey.com>
66
67 * common/pathstuff.c (get_standard_cache_dir): Use
68 ~/Library/Caches on macOS.
69 * common/pathstuff.h (get_standard_cache_dir): Update comment.
70
71 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
72
73 PR python/23669
74 * breakpoint.c (commands_cmd_element): New.
75 (_initialize_breakpoint): Assign commands_cmd_element.
76 * breakpoint.h (commands_cmd_element): New.
77 * cli/cli-script.c (while_cmd_element, if_command,
78 define_cmd_element): New.
79 (command_name_equals): Remove.
80 (process_next_line): Compare commands by pointer, not by name.
81 (_initialize_cli_script): Assign the various cmd_list_element
82 variables.
83 * compile/compile.c (compile_cmd_element): New.
84 (_initialize_compile): Assign compile_cmd_element.
85 * compile/compile.h (compile_cmd_element): New.
86 * guile/guile.c (guile_cmd_element): New.
87 (install_gdb_commands): Assign guile_cmd_element.
88 * guile/guile.h (guile_cmd_element): New.
89 * python/python.c (python_cmd_element): New.
90 (_initialize_python): Assign python_cmd_element.
91 * python/python.h (python_cmd_element): New.
92 * tracepoint.c (while_stepping_cmd_element): New.
93 (_initialize_tracepoint): Assign while_stepping_cmd_element.
94 * tracepoint.h (while_stepping_cmd_element): New.
95
96 2018-09-17 Tom Tromey <tom@tromey.com>
97
98 * infrun.c (save_infcall_suspend_state): Return
99 infcall_suspend_state_up.
100 (save_infcall_control_state): Return infcall_control_state_up.
101 * inferior.h (save_infcall_suspend_state)
102 (save_infcall_control_state): Declare later. Return unique
103 pointers.
104
105 2018-09-17 Tom Tromey <tom@tromey.com>
106
107 * infrun.c (struct stop_context): Declare constructor,
108 destructor, "changed" method.
109 (stop_context::stop_context): Rename from save_stop_context.
110 (stop_context::~stop_context): Rename from
111 release_stop_context_cleanup.
112 (normal_stop): Update.
113 (stop_context::changed): Rename from stop_context_changed. Return
114 bool.
115
116 2018-09-17 Tom Tromey <tom@tromey.com>
117
118 * inferior.h (struct infcall_suspend_state_deleter): New.
119 (infcall_suspend_state_up): New typedef.
120 (struct infcall_control_state_deleter): New.
121 (infcall_control_state_up): New typedef.
122 (make_cleanup_restore_infcall_suspend_state)
123 (make_cleanup_restore_infcall_control_state): Don't declare.
124 * infcall.c (call_function_by_hand_dummy): Update.
125 * infrun.c (do_restore_infcall_suspend_state_cleanup)
126 (make_cleanup_restore_infcall_suspend_state): Remove.
127 (do_restore_infcall_control_state_cleanup)
128 (make_cleanup_restore_infcall_control_state): Remove.
129
130 2018-09-17 Tom Tromey <tom@tromey.com>
131
132 * gdbthread.h (struct thread_control_state): Add initializer.
133 (class thread_info) <control>: Remove initializer.
134 * inferior.h (struct inferior_control_state): Add initializer.
135 (class inferior) <control>: Remove initializer.
136 (exit_inferior_1): Update.
137 * infrun.c (struct infcall_control_state): Add constructors.
138 (save_infcall_control_state): Use new.
139 (restore_infcall_control_state, discard_infcall_control_state):
140 Use delete.
141
142 2018-09-17 Tom Tromey <tom@tromey.com>
143
144 * infrun.c (struct infcall_suspend_state) <registers>: Now a
145 unique_ptr.
146 <siginfo_data>: Now a unique_xmalloc_ptr.
147 (save_infcall_suspend_state, restore_infcall_suspend_state)
148 (discard_infcall_suspend_state)
149 (get_infcall_suspend_state_regcache): Update.
150
151 2018-09-17 Tom Tromey <tom@tromey.com>
152
153 * gdbthread.h (struct thread_suspend_state): Add initializers.
154 (class thread_info) <suspend>: Remove initializer.
155 * infrun.c (struct infcall_suspend_state): Add initializers.
156 (save_infcall_suspend_state): Use new.
157 (discard_infcall_suspend_state): Use delete.
158
159 2018-09-16 Tom Tromey <tom@tromey.com>
160
161 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
162 Remove.
163 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
164 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
165 (py_varobj_iter_new): Likewise.
166 (py_varobj_get_iterator): Use gdbpy_ref.
167
168 2018-09-16 Tom Tromey <tom@tromey.com>
169
170 * python/py-threadevent.c (py_get_event_thread): Simplify.
171 * python/py-inferior.c (infpy_thread_from_thread_handle):
172 Return immediately after calling thread_to_thread_object. Use
173 Py_RETURN_NONE.
174 (thread_to_thread_object): Set the exception on a NULL return.
175
176 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
177
178 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
179
180 2018-09-16 Tom Tromey <tom@tromey.com>
181
182 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
183 Remove.
184
185 2018-09-16 Tom Tromey <tom@tromey.com>
186
187 * python/python-internal.h (thread_to_thread_object): Change
188 return type.
189 * python/py-inferior.c (thread_to_thread_object): Return a new
190 reference.
191 (infpy_thread_from_thread_handle): Update.
192 * python/py-infthread.c (gdbpy_selected_thread): Update.
193 * python/py-stopevent.c (create_stop_event_object): Update.
194 * python/py-threadevent.c (py_get_event_thread): Return a new
195 reference.
196 (py_get_event_thread): Update.
197 * python/py-event.h (py_get_event_thread): Change return type.
198 * python/py-continueevent.c (create_continue_event_object):
199 Update.
200
201 2018-09-16 Tom Tromey <tom@tromey.com>
202
203 * python/py-progspace.c (pspy_get_objfiles): Update.
204 * python/python-internal.h (objfile_to_objfile_object): Change
205 return type.
206 * python/py-newobjfileevent.c (create_new_objfile_event_object):
207 Update.
208 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
209 Update.
210 * python/python.c (gdbpy_get_current_objfile): Update.
211 (gdbpy_objfiles): Update.
212 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
213 Update.
214 (objfile_to_objfile_object): Return a new reference.
215 * python/py-symtab.c (stpy_get_objfile): Update.
216 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
217 Update.
218
219 2018-09-16 Tom Tromey <tom@tromey.com>
220
221 * python/py-inferior.c (infpy_get_progspace): Update.
222 * python/python-internal.h (pspace_to_pspace_object): Change
223 return type.
224 * python/py-newobjfileevent.c
225 (create_clear_objfiles_event_object): Update.
226 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
227 Update.
228 * python/python.c (gdbpy_get_current_progspace): Update.
229 (gdbpy_progspaces): Update.
230 * python/py-progspace.c (pspace_to_pspace_object): Return a new
231 reference.
232 * python/py-objfile.c (objfpy_get_progspace): Update.
233 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
234 Update.
235
236 2018-09-16 Tom Tromey <tom@tromey.com>
237
238 * python/lib/gdb/__init__.py (current_progspace, objfiles)
239 (solib_name, block_for_pc, find_pc_line): New functions.
240 (execute_unwinders): Update.
241 * python/py-block.c (gdbpy_block_for_pc): Remove.
242 * python/py-inferior.c (infpy_get_progspace): New function.
243 (inferior_object_getset) <progspace>: Add.
244 * python/py-progspace.c (pspy_objfiles): Rewrite.
245 (pspy_solib_name, pspy_block_for_pc)
246 (pspy_find_pc_line, pspy_is_valid): New functions.
247 (progspace_object_methods): Add entries for solib_name,
248 block_for_pc, find_pc_line, is_valid.
249 * python/python-internal.h (gdbpy_block_for_pc)
250 (build_objfiles_list): Don't declare.
251 * python/python.c: Don't include solib.h.
252 (gdbpy_solib_name, gdbpy_find_pc_line)
253 (gdbpy_get_current_progspace, build_objfiles_list)
254 (gdbpy_objfiles): Remove.
255 (GdbMethods) <current_progspace, objfiles, block_for_pc,
256 solib_name, find_pc_line>: Remove entries.
257
258 2018-09-16 Tom Tromey <tom@tromey.com>
259
260 * top.c (new_ui_command): Use GNU style for metasyntactic
261 variables.
262 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
263 variables.
264 * maint.c (maintenance_translate_address): Remove "<>" around
265 text.
266 * interps.c (interpreter_exec_cmd): Use GNU style for
267 metasyntactic variables.
268 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
269 metasyntactic variables.
270 * tracepoint.c (tfind_range_command): Use GNU style for
271 metasyntactic variables.
272 (tfind_outside_command): Likewise.
273 (_initialize_tracepoint): Likewise.
274 * remote.c (extended_remote_target::create_inferior): Use GNU
275 style for metasyntactic variables.
276 * sparc64-tdep.c (adi_examine_command): Use GNU style for
277 metasyntactic variables.
278 (adi_assign_command): Likewise.
279
280 2018-09-16 Tom Tromey <tom@tromey.com>
281
282 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
283 metasyntactic variables. Print message if no disassembler options
284 are available.
285
286 2018-09-15 Tom Tromey <tom@tromey.com>
287
288 * infcmd.c (get_inferior_args): Return const char *.
289 * inferior.h (get_inferior_args): Return type now const.
290 * linux-tdep.c (linux_fill_prpsinfo): Update.
291 * procfs.c (procfs_target::make_corefile_notes): Update.
292
293 2018-09-07 Tom Tromey <tom@tromey.com>
294
295 * python/python.c (execute_gdb_command): Call bpstat_do_actions
296 inside the TRY.
297
298 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
299
300 * nios2-tdep.c (nios2_type_align): New.
301 (nios2_gdb_arch_init): Install type_align hook.
302
303 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
304
305 * eval.c (fake_method::fake_method): Call xzalloc directly for a
306 type that is neither object file owned, nor gdbarch owned.
307 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
308 gdbarch is non-NULL.
309 (alloc_type_instance): Allocate non-objfile owned types on the
310 gdbarch obstack.
311 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
312 using TYPE_ALLOC to ensure memory is allocated on the correct
313 obstack.
314 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
315 obstack, or the gdbarch obstack.
316 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
317
318 2018-09-14 Tom Tromey <tom@tromey.com>
319
320 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
321 block.
322
323 2018-09-14 Tom Tromey <tom@tromey.com>
324
325 * nat/fork-inferior.c (get_startup_shell): Remove "static".
326
327 2018-09-13 Tom Tromey <tom@tromey.com>
328
329 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
330 static.
331
332 2018-09-13 Tom Tromey <tom@tromey.com>
333
334 * exec.c (try_open_exec_file): Use std::string.
335
336 2018-09-13 Tom Tromey <tom@tromey.com>
337
338 * utils.h (gdb_bfd_errmsg): Return std::string.
339 * exec.c (exec_file_attach): Update.
340 * compile/compile-object-load.c (compile_object_load): Update.
341 * utils.c (gdb_bfd_errmsg): Return std::string.
342
343 2018-09-13 Tom Tromey <tom@tromey.com>
344
345 * procfs.c (struct procinfo_deleter): New.
346 (procinfo_up): New typedef.
347 (do_destroy_procinfo_cleanup): Remove.
348 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
349
350 2018-09-13 Tom Tromey <tom@tromey.com>
351
352 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
353
354 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
355 2018-09-13 Tom Tromey <tom@tromey.com>
356
357 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
358 (pspy_get_objfiles): New function.
359 (progspace_object_methods): New.
360 (pspace_object_type): Add tp_methods callback.
361 * python/python-internal.h (build_objfiles_list): New
362 declaration.
363 * python/python.c (build_objfiles_list): New function.
364 (gdbpy_objfiles): Implement using build_objfiles_list.
365 * NEWS: Mention the Progspace.objfiles method.
366
367 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
368
369 * python/py-inferior.c (infpy_get_progspace): New function.
370 (inferior_object_getset): Add progspace property.
371 * NEWS: Mention the new property.
372
373 2018-09-13 Tom Tromey <tom@tromey.com>
374
375 PR rust/23650:
376 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
377
378 2018-09-13 Tom Tromey <tom@tromey.com>
379
380 PR rust/23626:
381 * rust-lang.c (rust_enum_variant): Now static.
382 (rust_empty_enum_p): New function.
383 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
384 Handle empty enum.
385
386 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
387
388 * python/py-inferior.c (infpy_repr): New.
389 (inferior_object_type): Register infpy_repr.
390 * python/py-objfile.c (objfpy_repr): New.
391 (objfile_object_type): Register objfpy_repr.
392
393 2018-09-12 John Baldwin <jhb@FreeBSD.org>
394
395 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
396
397 2018-09-12 John Baldwin <jhb@FreeBSD.org>
398
399 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
400 typo.
401
402 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
403
404 * common/common-utils.c: Don't include '<sys/stat.h>'.
405 (is_regular_file): Move to...
406 * common/filestuff.c (is_regular_file): ... here.
407 * common/common-utils.h (is_regular_file): Move to...
408 * common/filestuff.h (is_regular_file): ... here.
409
410 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
411
412 * skip.c (debug_skip): New variable.
413 (skiplist_entry::do_skip_file_p): Add debug output.
414 (skiplist_entry::do_skip_gfile_p): Likewise.
415 (skiplist_entry::skip_function_p): Likewise.
416 (_initialize_step_skip): Create debug command.
417 * NEWS: Mention set/show debug skip.
418
419 2018-09-11 Xavier Roirand <roirand@adacore.com>
420
421 * darwin-nat.c (should_disable_startup_with_shell):
422 New function.
423 (darwin_nat_target::create_inferior): Add call.
424
425 2018-09-11 Xavier Roirand <roirand@adacore.com>
426
427 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
428 inf_port, msg_state>: Initialize.
429 (struct darwin_thread_info) <signaled, single_step>: Change
430 type and initialize.
431 (struct darwin_thread_info) <event>: Initialize.
432
433 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
434
435 PR gdb/23555
436 PR gdb/23558
437 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
438 guesses.
439
440 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
441
442 Revert:
443 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
444
445 PR gdb/23555
446 PR gdb/23558
447 * gnulib/aclocal.m4: Regenerate.
448 * gnulib/config.in: Regenerate.
449 * gnulib/configure: Regenerate.
450 * gnulib/import/Makefile.am: Update.
451 * gnulib/import/Makefile.in: Update.
452 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
453 * gnulib/import/_Noreturn.h: ... this.
454 * gnulib/import/alloca.in.h: Update.
455 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
456 * gnulib/import/arg-nonnull.h: ... this.
457 * gnulib/import/assure.h: Update.
458 * gnulib/import/at-func.c: Update.
459 * gnulib/import/basename-lgpl.c: Update.
460 * gnulib/import/extra/snippet/c++defs.h: Rename to...
461 * gnulib/import/c++defs.h: ... this.
462 * gnulib/import/canonicalize-lgpl.c: Update.
463 * gnulib/import/cdefs.h: Update.
464 * gnulib/import/chdir-long.c: Update.
465 * gnulib/import/chdir-long.h: Update.
466 * gnulib/import/cloexec.c: Update.
467 * gnulib/import/cloexec.h: Update.
468 * gnulib/import/close.c: Update.
469 * gnulib/import/closedir.c: Update.
470 * gnulib/import/config.charset: Update.
471 * gnulib/import/dirent-private.h: Update.
472 * gnulib/import/dirent.in.h: Update.
473 * gnulib/import/dirfd.c: Update.
474 * gnulib/import/dirname-lgpl.c: Update.
475 * gnulib/import/dirname.h: Update.
476 * gnulib/import/dosname.h: Update.
477 * gnulib/import/dup-safer-flag.c: Update.
478 * gnulib/import/dup-safer.c: Update.
479 * gnulib/import/dup.c: Update.
480 * gnulib/import/dup2.c: Update.
481 * gnulib/import/errno.in.h: Update.
482 * gnulib/import/error.c: Update.
483 * gnulib/import/error.h: Update.
484 * gnulib/import/exitfail.c: Update.
485 * gnulib/import/exitfail.h: Update.
486 * gnulib/import/extra/update-copyright: Update.
487 * gnulib/import/fchdir.c: Update.
488 * gnulib/import/fcntl.c: Update.
489 * gnulib/import/fcntl.in.h: Update.
490 * gnulib/import/fd-hook.c: Update.
491 * gnulib/import/fd-hook.h: Update.
492 * gnulib/import/fd-safer-flag.c: Update.
493 * gnulib/import/fd-safer.c: Update.
494 * gnulib/import/fdopendir.c: Update.
495 * gnulib/import/filename.h: Update.
496 * gnulib/import/filenamecat-lgpl.c: Update.
497 * gnulib/import/filenamecat.h: Update.
498 * gnulib/import/flexmember.h: Update.
499 * gnulib/import/float+.h: Update.
500 * gnulib/import/float.c: Update.
501 * gnulib/import/float.in.h: Update.
502 * gnulib/import/fnmatch.c: Update.
503 * gnulib/import/fnmatch.in.h: Update.
504 * gnulib/import/fnmatch_loop.c: Update.
505 * gnulib/import/fpucw.h: Update.
506 * gnulib/import/frexp.c: Update.
507 * gnulib/import/frexpl.c: Update.
508 * gnulib/import/fstat.c: Update.
509 * gnulib/import/fstatat.c: Update.
510 * gnulib/import/getcwd-lgpl.c: Update.
511 * gnulib/import/getcwd.c: Update.
512 * gnulib/import/getdtablesize.c: Update.
513 * gnulib/import/getlogin_r.c: Update.
514 * gnulib/import/getprogname.c: Update.
515 * gnulib/import/getprogname.h: Update.
516 * gnulib/import/gettext.h: Update.
517 * gnulib/import/gettimeofday.c: Update.
518 * gnulib/import/glob-libc.h: Update.
519 * gnulib/import/glob.c: Update.
520 * gnulib/import/glob.in.h: Update.
521 * gnulib/import/glob_internal.h: Update.
522 * gnulib/import/glob_pattern_p.c: Update.
523 * gnulib/import/globfree.c: Update.
524 * gnulib/import/hard-locale.c: Update.
525 * gnulib/import/hard-locale.h: Update.
526 * gnulib/import/intprops.h: Update.
527 * gnulib/import/inttypes.in.h: Update.
528 * gnulib/import/isnan.c: Update.
529 * gnulib/import/isnand-nolibm.h: Update.
530 * gnulib/import/isnand.c: Update.
531 * gnulib/import/isnanl-nolibm.h: Update.
532 * gnulib/import/isnanl.c: Update.
533 * gnulib/import/itold.c: Update.
534 * gnulib/import/libc-config.h: Update.
535 * gnulib/import/limits.in.h: Update.
536 * gnulib/import/localcharset.c: Update.
537 * gnulib/import/localcharset.h: Update.
538 * gnulib/import/localtime-buffer.c: Update.
539 * gnulib/import/localtime-buffer.h: Update.
540 * gnulib/import/lstat.c: Update.
541 * gnulib/import/m4/00gnulib.m4: Update.
542 * gnulib/import/m4/__inline.m4: Update.
543 * gnulib/import/m4/absolute-header.m4: Update.
544 * gnulib/import/m4/alloca.m4: Update.
545 * gnulib/import/m4/builtin-expect.m4: Update.
546 * gnulib/import/m4/canonicalize.m4: Update.
547 * gnulib/import/m4/chdir-long.m4: Update.
548 * gnulib/import/m4/close.m4: Update.
549 * gnulib/import/m4/closedir.m4: Update.
550 * gnulib/import/m4/configmake.m4: Update.
551 * gnulib/import/m4/d-ino.m4: Update.
552 * gnulib/import/m4/d-type.m4: Update.
553 * gnulib/import/m4/dirent_h.m4: Update.
554 * gnulib/import/m4/dirfd.m4: Update.
555 * gnulib/import/m4/dirname.m4: Update.
556 * gnulib/import/m4/double-slash-root.m4: Update.
557 * gnulib/import/m4/dup.m4: Update.
558 * gnulib/import/m4/dup2.m4: Update.
559 * gnulib/import/m4/eealloc.m4: Update.
560 * gnulib/import/m4/environ.m4: Update.
561 * gnulib/import/m4/errno_h.m4: Update.
562 * gnulib/import/m4/error.m4: Update.
563 * gnulib/import/m4/exponentd.m4: Update.
564 * gnulib/import/m4/exponentl.m4: Update.
565 * gnulib/import/m4/extensions.m4: Update.
566 * gnulib/import/m4/extern-inline.m4: Update.
567 * gnulib/import/m4/fchdir.m4: Update.
568 * gnulib/import/m4/fcntl-o.m4: Update.
569 * gnulib/import/m4/fcntl.m4: Update.
570 * gnulib/import/m4/fcntl_h.m4: Update.
571 * gnulib/import/m4/fdopendir.m4: Update.
572 * gnulib/import/m4/filenamecat.m4: Update.
573 * gnulib/import/m4/flexmember.m4: Update.
574 * gnulib/import/m4/float_h.m4: Update.
575 * gnulib/import/m4/fnmatch.m4: Update.
576 * gnulib/import/m4/fnmatch_h.m4: Update.
577 * gnulib/import/m4/fpieee.m4: Update.
578 * gnulib/import/m4/frexp.m4: Update.
579 * gnulib/import/m4/frexpl.m4: Update.
580 * gnulib/import/m4/fstat.m4: Update.
581 * gnulib/import/m4/fstatat.m4: Update.
582 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
583 * gnulib/import/m4/getcwd-path-max.m4: Update.
584 * gnulib/import/m4/getcwd.m4: Update.
585 * gnulib/import/m4/getdtablesize.m4: Update.
586 * gnulib/import/m4/getlogin.m4: Update.
587 * gnulib/import/m4/getlogin_r.m4: Update.
588 * gnulib/import/m4/getpagesize.m4: Update.
589 * gnulib/import/m4/getprogname.m4: Update.
590 * gnulib/import/m4/gettimeofday.m4: Update.
591 * gnulib/import/m4/glibc21.m4: Update.
592 * gnulib/import/m4/glob.m4: Update.
593 * gnulib/import/m4/glob_h.m4: Update.
594 * gnulib/import/m4/gnulib-cache.m4: Update.
595 * gnulib/import/m4/gnulib-common.m4: Update.
596 * gnulib/import/m4/gnulib-comp.m4: Update.
597 * gnulib/import/m4/gnulib-tool.m4: Update.
598 * gnulib/import/m4/hard-locale.m4: Update.
599 * gnulib/import/m4/include_next.m4: Update.
600 * gnulib/import/m4/inttypes-pri.m4: Update.
601 * gnulib/import/m4/inttypes.m4: Update.
602 * gnulib/import/m4/isnand.m4: Update.
603 * gnulib/import/m4/isnanl.m4: Update.
604 * gnulib/import/m4/largefile.m4: Update.
605 * gnulib/import/m4/limits-h.m4: Update.
606 * gnulib/import/m4/localcharset.m4: Update.
607 * gnulib/import/m4/locale-fr.m4: Update.
608 * gnulib/import/m4/locale-ja.m4: Update.
609 * gnulib/import/m4/locale-zh.m4: Update.
610 * gnulib/import/m4/localtime-buffer.m4: Update.
611 * gnulib/import/m4/longlong.m4: Update.
612 * gnulib/import/m4/lstat.m4: Update.
613 * gnulib/import/m4/malloc.m4: Update.
614 * gnulib/import/m4/malloca.m4: Update.
615 * gnulib/import/m4/math_h.m4: Update.
616 * gnulib/import/m4/mbrtowc.m4: Update.
617 * gnulib/import/m4/mbsinit.m4: Update.
618 * gnulib/import/m4/mbsrtowcs.m4: Update.
619 * gnulib/import/m4/mbstate_t.m4: Update.
620 * gnulib/import/m4/memchr.m4: Update.
621 * gnulib/import/m4/memmem.m4: Update.
622 * gnulib/import/m4/mempcpy.m4: Update.
623 * gnulib/import/m4/memrchr.m4: Update.
624 * gnulib/import/m4/mkdir.m4: Update.
625 * gnulib/import/m4/mkstemp.m4: Update.
626 * gnulib/import/m4/mmap-anon.m4: Update.
627 * gnulib/import/m4/mode_t.m4: Update.
628 * gnulib/import/m4/msvc-inval.m4: Update.
629 * gnulib/import/m4/msvc-nothrow.m4: Update.
630 * gnulib/import/m4/multiarch.m4: Update.
631 * gnulib/import/m4/nocrash.m4: Update.
632 * gnulib/import/m4/off_t.m4: Update.
633 * gnulib/import/m4/onceonly.m4: Update.
634 * gnulib/import/m4/open-cloexec.m4: Update.
635 * gnulib/import/m4/open.m4: Update.
636 * gnulib/import/m4/openat.m4: Update.
637 * gnulib/import/m4/opendir.m4: Update.
638 * gnulib/import/m4/pathmax.m4: Update.
639 * gnulib/import/m4/rawmemchr.m4: Update.
640 * gnulib/import/m4/readdir.m4: Update.
641 * gnulib/import/m4/readlink.m4: Update.
642 * gnulib/import/m4/realloc.m4: Update.
643 * gnulib/import/m4/rename.m4: Update.
644 * gnulib/import/m4/rewinddir.m4: Update.
645 * gnulib/import/m4/rmdir.m4: Update.
646 * gnulib/import/m4/save-cwd.m4: Update.
647 * gnulib/import/m4/secure_getenv.m4: Update.
648 * gnulib/import/m4/setenv.m4: Update.
649 * gnulib/import/m4/signal_h.m4: Update.
650 * gnulib/import/m4/ssize_t.m4: Update.
651 * gnulib/import/m4/stat-time.m4: Update.
652 * gnulib/import/m4/stat.m4: Update.
653 * gnulib/import/m4/std-gnu11.m4: Update.
654 * gnulib/import/m4/stdbool.m4: Update.
655 * gnulib/import/m4/stddef_h.m4: Update.
656 * gnulib/import/m4/stdint.m4: Update.
657 * gnulib/import/m4/stdio_h.m4: Update.
658 * gnulib/import/m4/stdlib_h.m4: Update.
659 * gnulib/import/m4/strchrnul.m4: Update.
660 * gnulib/import/m4/strdup.m4: Update.
661 * gnulib/import/m4/strerror.m4: Update.
662 * gnulib/import/m4/string_h.m4: Update.
663 * gnulib/import/m4/strstr.m4: Update.
664 * gnulib/import/m4/strtok_r.m4: Update.
665 * gnulib/import/m4/sys_socket_h.m4: Update.
666 * gnulib/import/m4/sys_stat_h.m4: Update.
667 * gnulib/import/m4/sys_time_h.m4: Update.
668 * gnulib/import/m4/sys_types_h.m4: Update.
669 * gnulib/import/m4/tempname.m4: Update.
670 * gnulib/import/m4/time_h.m4: Update.
671 * gnulib/import/m4/unistd-safer.m4: Update.
672 * gnulib/import/m4/unistd_h.m4: Update.
673 * gnulib/import/m4/warn-on-use.m4: Update.
674 * gnulib/import/m4/wchar_h.m4: Update.
675 * gnulib/import/m4/wchar_t.m4: Update.
676 * gnulib/import/m4/wctype_h.m4: Update.
677 * gnulib/import/m4/wint_t.m4: Update.
678 * gnulib/import/malloc.c: Update.
679 * gnulib/import/malloc/scratch_buffer.h: Update.
680 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
681 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
682 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
683 * gnulib/import/malloca.c: Update.
684 * gnulib/import/malloca.h: Update.
685 * gnulib/import/malloca.valgrind: Update.
686 * gnulib/import/math.in.h: Update.
687 * gnulib/import/mbrtowc.c: Update.
688 * gnulib/import/mbsinit.c: Update.
689 * gnulib/import/mbsrtowcs-impl.h: Update.
690 * gnulib/import/mbsrtowcs-state.c: Update.
691 * gnulib/import/mbsrtowcs.c: Update.
692 * gnulib/import/memchr.c: Update.
693 * gnulib/import/memmem.c: Update.
694 * gnulib/import/mempcpy.c: Update.
695 * gnulib/import/memrchr.c: Update.
696 * gnulib/import/mkdir.c: Update.
697 * gnulib/import/mkstemp.c: Update.
698 * gnulib/import/msvc-inval.c: Update.
699 * gnulib/import/msvc-inval.h: Update.
700 * gnulib/import/msvc-nothrow.c: Update.
701 * gnulib/import/msvc-nothrow.h: Update.
702 * gnulib/import/open.c: Update.
703 * gnulib/import/openat-die.c: Update.
704 * gnulib/import/openat-priv.h: Update.
705 * gnulib/import/openat-proc.c: Update.
706 * gnulib/import/openat.c: Update.
707 * gnulib/import/openat.h: Update.
708 * gnulib/import/opendir.c: Update.
709 * gnulib/import/pathmax.h: Update.
710 * gnulib/import/pipe-safer.c: Update.
711 * gnulib/import/rawmemchr.c: Update.
712 * gnulib/import/readdir.c: Update.
713 * gnulib/import/readlink.c: Update.
714 * gnulib/import/realloc.c: Update.
715 * gnulib/import/ref-add.sin: Update.
716 * gnulib/import/ref-del.sin: Update.
717 * gnulib/import/rename.c: Update.
718 * gnulib/import/rewinddir.c: Update.
719 * gnulib/import/rmdir.c: Update.
720 * gnulib/import/same-inode.h: Update.
721 * gnulib/import/save-cwd.c: Update.
722 * gnulib/import/save-cwd.h: Update.
723 * gnulib/import/scratch_buffer.h: Update.
724 * gnulib/import/secure_getenv.c: Update.
725 * gnulib/import/setenv.c: Update.
726 * gnulib/import/signal.in.h: Update.
727 * gnulib/import/stat-time.c: Update.
728 * gnulib/import/stat-time.h: Update.
729 * gnulib/import/stat-w32.c: Update.
730 * gnulib/import/stat-w32.h: Update.
731 * gnulib/import/stat.c: Update.
732 * gnulib/import/stdbool.in.h: Update.
733 * gnulib/import/stddef.in.h: Update.
734 * gnulib/import/stdint.in.h: Update.
735 * gnulib/import/stdio.in.h: Update.
736 * gnulib/import/stdlib.in.h: Update.
737 * gnulib/import/str-two-way.h: Update.
738 * gnulib/import/strchrnul.c: Update.
739 * gnulib/import/strdup.c: Update.
740 * gnulib/import/streq.h: Update.
741 * gnulib/import/strerror-override.c: Update.
742 * gnulib/import/strerror-override.h: Update.
743 * gnulib/import/strerror.c: Update.
744 * gnulib/import/string.in.h: Update.
745 * gnulib/import/stripslash.c: Update.
746 * gnulib/import/strnlen1.c: Update.
747 * gnulib/import/strnlen1.h: Update.
748 * gnulib/import/strstr.c: Update.
749 * gnulib/import/strtok_r.c: Update.
750 * gnulib/import/sys_stat.in.h: Update.
751 * gnulib/import/sys_time.in.h: Update.
752 * gnulib/import/sys_types.in.h: Update.
753 * gnulib/import/tempname.c: Update.
754 * gnulib/import/tempname.h: Update.
755 * gnulib/import/time.in.h: Update.
756 * gnulib/import/unistd--.h: Update.
757 * gnulib/import/unistd-safer.h: Update.
758 * gnulib/import/unistd.in.h: Update.
759 * gnulib/import/unsetenv.c: Update.
760 * gnulib/import/verify.h: Update.
761 * gnulib/import/extra/snippet/warn-on-use.h: Update.
762 * gnulib/import/wchar.in.h: Update.
763 * gnulib/import/wctype.in.h: Update.
764 * gnulib/import/xalloc-oversized.h: Update.
765 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
766 "53e2c179f26a890fa6685af4b6c1397ee370433b".
767
768 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
769
770 * record-btrace.c (get_thread_current_frame): Remove
771 old_inferior_ptid.
772
773 2018-09-10 Jerome Guitton <guitton@adacore.com>
774
775 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
776 with check_tag to 1 if and only if the type is tagged and the
777 component being searched cannot been found in the current
778 view. Otherwise, always call ada_to_fixed_type with
779 check_tag to 0.
780
781 2018-09-10 Xavier Roirand <roirand@adacore.com>
782
783 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
784 declaration.
785 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
786 * ada-varobj.c (ada_varobj_get_number_of_children,
787 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
788
789 2018-09-10 Xavier Roirand <roirand@adacore.com>
790
791 * ada-valprint.c (ada_value_print): Use type instead of
792 enclosing type.
793
794 2018-09-10 Xavier Roirand <roirand@adacore.com>
795
796 * ada-lang.c (ada_value_subscript): Handle case when parameter is
797 an array of access to unconstrained array.
798
799 2018-09-10 Xavier Roirand <roirand@adacore.com>
800
801 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
802 (ada_check_typedef): Use it.
803
804 2018-09-10 Xavier Roirand <roirand@adacore.com>
805
806 * ada-varobj.c (ada_varobj_describe_struct_child)
807 (ada_varobj_describe_child): Handle union case like struct one.
808
809 2018-09-10 Tom Tromey <tom@tromey.com>
810
811 PR python/18380:
812 * python/python.c (_initialize_python): Make example in "python"
813 help work in Python 3.
814
815 2018-09-10 Eli Zaretskii <eliz@gnu.org>
816
817 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
818 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
819 $(EXEEXT) to the script, as it is not a program.
820
821 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
822
823 * python/py-prettyprint.c (pretty_print_one_value): Return
824 gdbpy_ref<>.
825 (print_string_repr): Adjust.
826 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
827 * python/python-internal.h (apply_varobj_pretty_printer): Return
828 gdbpy_ref<>.
829 * varobj.c (varobj_value_get_print_value): Adjust.
830
831 2018-09-08 Tom Tromey <tom@tromey.com>
832
833 PR python/16047:
834 * python/py-prettyprint.c (pretty_print_one_value): Check for
835 to_string method.
836
837 2018-09-08 Joel Brobecker <brobecker@adacore.com>
838
839 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
840 replace_operator_with_call.
841
842 2018-09-08 Joel Brobecker <brobecker@adacore.com>
843
844 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
845
846 2018-09-08 Joel Brobecker <brobecker@adacore.com>
847
848 * ada-typeprint.c (print_range): Print the bounds using TYPE
849 rather than its TYPE_TARGET_TYPE.
850
851 2018-09-08 Joel Brobecker <brobecker@adacore.com>
852
853 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
854 call to ada_to_fixed_value_create.
855
856 2018-09-08 Jerome Guitton <guitton@adacore.com>
857
858 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
859
860 2018-09-08 Joel Brobecker <brobecker@adacore.com>
861
862 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
863 by calls to error.
864
865 2018-09-08 Joel Brobecker <brobecker@adacore.com>
866
867 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
868 Move update of loop variable "fi".
869
870 2018-09-08 Joel Brobecker <brobecker@adacore.com>
871
872 * ada-lang.c (value_assign_to_component): In the case of
873 big-endian targets, extract the bits of the given VAL
874 using an src_offset of zero if container is not a scalar.
875
876 2018-09-06 Simon Ser <contact@emersion.fr>
877
878 PR gdb/23105
879 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
880 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
881 * fbsd-tdep.c (fbsd_make_note_desc): New.
882 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
883 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
884 * target.h (enum target_object) Add FreeBSD-specific
885 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
886
887 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
888
889 * compile/compile-c.h (generate_c_for_variable_locations):
890 Change reference to pointer.
891 * compile/compile-c-support.c (compile_program) <compute>:
892 Likewise.
893 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
894 (generate_c_for_for_one_variable): Likewise
895 (generate_c_for_variable_locations): Likewise
896 * compile/compile-c-types.c (compile_c_instance::convert_type):
897 Likewise
898 * compile/compile-cplus-symbols.c (convert_one_symbol):
899 std::move the scope passed to enter_scope.
900 * compile/compile-cplus-types.c
901 (compile_cplus_instance::enter_scope): Make parameter
902 rvalue-reference.
903 (compile_cplus_instance::new_scope): Change reference to
904 pointer.
905 (compile_cplus_instance::convert_type): Likewise
906 (compile_cplus_convert_typedef): std::move the scope passed to
907 enter_scope.
908 (compile_cplus_convert_struct_or_union): Likewise.
909 (compile_cplus_convert_enum): Likewise.
910 (compile_cplus_convert_namespace): Likewise.
911 * compile/compile-cplus.h (compile_cplus_instance)
912 <enter_scope>: Make parameter rvalue-reference.
913 * compile/compile-internal.h (compile_instance)
914 <get_cached_type>: Likewise
915 * compile/compile-loc2c.c (push): Likewise
916 (pushf): Likewise
917 (unary): Likewise
918 (binary): Likewise
919 (print_label): Likewise
920 (pushf_register_address): Likewise
921 (pushf_register): Likewise
922 (do_compile_dwarf_expr_to_c): Likewise
923 (compile_dwarf_expr_to_c): Likewise
924 (compile_dwarf_bounds_to_c): Likewise
925 * compile/compile.c (compile_instance::get_cached_type):
926 Likewise
927 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
928 (compile_dwarf_bounds_to_c): Likewise
929 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
930 (dwarf2_compile_property_to_c): Likewise
931 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
932 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
933 Likewise
934
935 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
936
937 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
938 * tui/tui-data.c (init_content_element): Don't initialize it.
939
940 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
941
942 * tui/tui-data.h (struct tui_win_info)
943 <detail::opaque>: Remove.
944 * tui/tui-data.c (init_win_info): Remove assignment.
945
946 2018-09-05 Tom Tromey <tom@tromey.com>
947
948 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
949 -Wformat-nonliteral.
950 * target-float.c (host_float_ops<T>::to_string)
951 (host_float_ops<T>::from_string): Use
952 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
953 * configure: Rebuild.
954
955 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
956
957 * printcmd.c (printf_c_string): Use
958 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
959 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
960
961 2018-09-05 Tom Tromey <tom@tromey.com>
962
963 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
964
965 2018-09-05 Tom de Vries <tdevries@suse.de>
966
967 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
968 with resolve_abstract_p == true.
969 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
970 defaulting to false. Propagate resolve_abstract_p to
971 dwarf2_fetch_die_loc_sect_off.
972 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
973 parameter, defaulting to false.
974 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
975 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
976 parameter.
977 * dwarf2read.h (struct die_info): Forward-declare.
978 (die_info_ptr): New typedef.
979 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
980
981 2018-09-05 Joel Brobecker <brobecker@adacore.com>
982
983 GDB 8.2 released.
984
985 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
986 Pedro Alves <palves@redhat.com>
987
988 * gnulib/Makefile.in (aclocal_m4_deps): Move to
989 "aclocal-m4-deps.mk". Include file here.
990 $(srcdir)/aclocal.m4: Add "configure.ac".
991 * gnulib/aclocal-m4-deps.mk: New file.
992 * gnulib/update-gnulib.sh: Automatically update
993 "aclocal-m4-deps.mk".
994
995 2018-09-04 Tom Tromey <tom@tromey.com>
996
997 * configure: Rebuild.
998 * configure.ac: Remove multi-ice code.
999
1000 2018-09-04 Tom Tromey <tom@tromey.com>
1001
1002 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1003 (ada-exp.o): Update.
1004
1005 2018-09-04 Tom Tromey <tom@tromey.com>
1006
1007 * Makefile.in (printcmd.o, target-float.o): Remove.
1008 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1009
1010 2018-09-04 Tom Tromey <tom@tromey.com>
1011
1012 * gnulib/Makefile.in: Remove obsolete comment.
1013 * Makefile.in: Remove obsolete comment.
1014
1015 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1016
1017 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1018 line with '+'.
1019
1020 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1021
1022 * riscv-tdep.c: Add 'prologue-value.h' include.
1023 (struct riscv_unwind_cache): New struct.
1024 (riscv_debug_unwinder): New global.
1025 (riscv_scan_prologue): Update arguments, capture register details
1026 from prologue scan.
1027 (riscv_skip_prologue): Reformat arguments line, move end of
1028 prologue calculation into riscv_scan_prologue.
1029 (riscv_frame_cache): Update return type, create
1030 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1031 details.
1032 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1033 (riscv_frame_prev_register): Use the trad_frame within the
1034 riscv_unwind_cache.
1035 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1036 flag.
1037
1038 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1039
1040 * trad-frame.h (trad_frame_set_realreg): Declare.
1041 (trad_frame_set_addr): Declare.
1042 * trad-frame.c (trad_frame_set_realreg): Define new function.
1043 (trad_frame_set_addr): Define new function.
1044 (trad_frame_set_reg_realreg): Use new function.
1045 (trad_frame_set_reg_addr): Use new function.
1046
1047 2018-09-01 Keith Seitz <keiths@redhat.com>
1048
1049 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1050 pulongest instead of "%lld".
1051 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1052 ATTRIBUTE_UNUSED.
1053
1054 2018-08-31 Tom Tromey <tom@tromey.com>
1055
1056 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1057 variant part type.
1058
1059 2018-08-31 Pedro Alves <palves@redhat.com>
1060
1061 * gdbarch.h: Regenerate.
1062
1063 2018-08-31 Pedro Alves <palves@redhat.com>
1064
1065 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1066 * target.h (Hardware watchpoint interfaces): Describe
1067 continuable/steppable/non-steppable watchpoints.
1068 * gdbarch.h, gdbarch.c: Regenerate.
1069
1070 2018-08-31 Pedro Alves <palves@redhat.com>
1071
1072 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1073 Delete.
1074 * s390-linux-nat.c
1075 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1076 * target.h (target_ops::have_continuable_watchpoint): Delete.
1077 (target_have_continuable_watchpoint): Delete.
1078 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1079 * target-delegates.c: Regenerate.
1080
1081 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1082
1083 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1084 the files present in "gnulib/import/m4/".
1085
1086 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1087
1088 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1089 c.sw, c.swsp, and c.sdsp.
1090
1091 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1092
1093 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1094 (riscv_read_misa_reg): Don't cache value read into inferior data.
1095 (riscv_new_inferior_data): Delete.
1096 (riscv_inferior_data_cleanup): Delete.
1097 (riscv_inferior_data): Delete.
1098 (riscv_invalidate_inferior_data): Delete.
1099 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1100
1101 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1102
1103 * compile/compile-cplus-types.c
1104 (compile_cplus_instance::leave_scope): Take the address of scope
1105 object.
1106 (compile_cplus_instance::convert_qualified_base): Compare quals
1107 to 0.
1108
1109 2018-08-30 Keith Seitz <keiths@redhat.com>
1110
1111 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1112 Use "%s" and host_address_to_string instead of "%p" in printf.
1113
1114 2018-08-29 Keith Seitz <keiths@redhat.com>
1115
1116 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1117 and compile-cplus-types.c.
1118 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1119 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1120 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1121 Declare.
1122 * compile/compile-c-support.c: Include compile-cplus.h.
1123 (load_libcompile): Templatize.
1124 (get_compile_context): "New" function.
1125 (c_get_compile_context): Use get_compile_context.
1126 (cplus_get_compile_context): New function.
1127 (cplus_push_user_expression, cplus_pop_user_expression)
1128 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1129 (cplus_compute_program): Define new structs/functions.
1130 * compile/compile-cplus-symmbols.c: New file.
1131 * compile/compile-cplus-types.c: New file.
1132 * compile/compile-cplus.h: New file.
1133 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1134 Declare.
1135 * compile/compile-object-load.c (get_out_value_type): Use
1136 strncmp_iw when comparing symbol names.
1137 (compile_object_load): Add mst_bss and mst_data.
1138 * compile/compile.c (_initialize_compile): Remove
1139 -Wno-implicit-function-declaration from `compile_args'.
1140 * compile/gcc-cp-plugin.h: New file.
1141 * NEWS: Mention C++ compile support and new debug options.
1142
1143 2018-08-29 Keith Seitz <keiths@redhat.com>
1144
1145 * linespec.c (collect_info::add_symbol): Make virtual.
1146 (struct symbol_searcher_collect_info): New struct.
1147 (symbol_searcher::find_all_symbols): New method.
1148 * symtab.h (class symbol_searcher): New class.
1149
1150 2018-08-29 Keith Seitz <keiths@redhat.com>
1151
1152 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1153 Change to vector of block_symbol. Update all users.
1154 (struct collect_info) <symbols>: Likewise.
1155 (collect_info::add_symbol): Take block_symbol as argument.
1156 Update all callers.
1157 (decode_compound_collector) <m_symbols>: Change type to vector
1158 of block_symbol. Update all users.
1159 (decode_compound_collector::operator ()): Change parameter type
1160 to block_symbol.
1161 (find_method, find_function_symbols, find_linespec_symbols)
1162 (find_label_symbols_in_block, find_label_symbols): Change symbol
1163 vectors to block_symbol vectors.
1164 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1165 block_symbol.
1166
1167 2018-08-29 Keith Seitz <keiths@redhat.com>
1168
1169 * linespec.c (symbolp): Remove typedef and VEC definitions.
1170 (bound_minimal_symbol_d): Likewise.
1171
1172 2018-08-29 Keith Seitz <keiths@redhat.com>
1173
1174 * linespec.c (decode_compound_collector::decode_compound_collector):
1175 Remove initialization for `m_symtabs'.
1176 (decode_compound_collector::release_symbols): Change return type
1177 to std::vector. Update all callers.
1178 (class decode_compound_collector) <m_symbols>: Change type to
1179 std::vector.
1180 (lookup_prefix_sym): Change return type to std::vector. Update all
1181 callers.
1182 (compare_symbols): Remove.
1183 (std_compare_symbols): Rename to `compare_symbols'.
1184 (find_method): Change `sym_classes' parameter to std::vector.
1185 Update all callers. Use std::sort to sort sym_classes.
1186 (find_linespec_symbols): Remove cleanup.
1187
1188 2018-08-29 Keith Seitz <keiths@redhat.com>
1189
1190 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1191 std::vector. Update all users.
1192 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1193 (struct collect_info) <minimal_symbols>: Likewise.
1194 (compare_msymbols): Return bool. Change parameters to const
1195 bound_minimal_symbol references.
1196 (find_method, find_function_symbols, find_linespec_symbols): Change
1197 `minsyms' parameter to std::vector. Update all callers.
1198
1199 2018-08-29 Keith Seitz <keiths@redhat.com>
1200
1201 * linespec.c (struct linespec) <label_symbols>: Change type to
1202 std::vector. Update all users.
1203 (find_label_symbols_in_block): Change `result' parameter to
1204 std::vector. Update all callers.
1205 (find_label_symbols): Return std::vector. Update all callers.
1206
1207 2018-08-29 Keith Seitz <keiths@redhat.com>
1208
1209 * linespec.c (struct linespec) <function_symbols>: Change type to
1210 std::vector. Update all users.
1211 (struct collect_info) <function_symbols>: Likewise.
1212 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1213 (std_compare_symbols): New function.
1214 (find_method, find_function_symbols, find_linespec_symbols)
1215 (find_label_symbols_in_block): Change `symbols' parameter to
1216 std::vector. Update all callers.
1217 (find_label_symbols): Likewise for `function_symbols' and
1218 `label_funcs_ret'.
1219
1220 2018-08-29 Keith Seitz <keiths@redhat.com>
1221
1222 * linespec.c (symtab_vector_up): Define.
1223 (struct linespec) <file_symtabs>: Change type to std::vector *.
1224 Update all uses.
1225 (struct collect_info) <file_symtabs>: Likewise.
1226 (collect_symtabs_from_filename): Return symtab_vector_up.
1227 Update all callers.
1228 (decode_objc): Remove cleanup.
1229 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1230 (symtab_collector::release_symtabs): Return symtab_vector_up.
1231 Update all callers.
1232 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1233 Update all users.
1234 (collect_symtabs_from_filename, symtabs_from_filename): Return
1235 symtab_vector_up. Update all callers.
1236
1237 2018-08-29 Tom Tromey <tom@tromey.com>
1238
1239 * csky-tdep.c (csky_analyze_prologue): Use
1240 core_addr_to_string_nz.
1241
1242 2018-08-29 Tom Tromey <tom@tromey.com>
1243
1244 * windows-nat.c (struct xlate_exception) <them>: Change type to
1245 DWORD.
1246 (xlate): Fix formatting. Remove last entry.
1247 (struct xlate_exception, xlate): Comment out.
1248 (windows_nat_target::resume): Use ranged for.
1249
1250 2018-08-29 Jim Wilson <jimw@sifive.com>
1251
1252 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1253 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1254 of NT_PRFPREG.
1255 (riscv_linux_nat_target::store_registers): Likewise.
1256
1257 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1258
1259 PR gdb/23555
1260 PR gdb/23558
1261 * gnulib/aclocal.m4: Regenerate.
1262 * gnulib/config.in: Regenerate.
1263 * gnulib/configure: Regenerate.
1264 * gnulib/import/Makefile.am: Update.
1265 * gnulib/import/Makefile.in: Update.
1266 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1267 * gnulib/import/_Noreturn.h: ... this.
1268 * gnulib/import/alloca.in.h: Update.
1269 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1270 * gnulib/import/arg-nonnull.h: ... this.
1271 * gnulib/import/assure.h: Update.
1272 * gnulib/import/at-func.c: Update.
1273 * gnulib/import/basename-lgpl.c: Update.
1274 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1275 * gnulib/import/c++defs.h: ... this.
1276 * gnulib/import/canonicalize-lgpl.c: Update.
1277 * gnulib/import/cdefs.h: Update.
1278 * gnulib/import/chdir-long.c: Update.
1279 * gnulib/import/chdir-long.h: Update.
1280 * gnulib/import/cloexec.c: Update.
1281 * gnulib/import/cloexec.h: Update.
1282 * gnulib/import/close.c: Update.
1283 * gnulib/import/closedir.c: Update.
1284 * gnulib/import/config.charset: Update.
1285 * gnulib/import/dirent-private.h: Update.
1286 * gnulib/import/dirent.in.h: Update.
1287 * gnulib/import/dirfd.c: Update.
1288 * gnulib/import/dirname-lgpl.c: Update.
1289 * gnulib/import/dirname.h: Update.
1290 * gnulib/import/dosname.h: Update.
1291 * gnulib/import/dup-safer-flag.c: Update.
1292 * gnulib/import/dup-safer.c: Update.
1293 * gnulib/import/dup.c: Update.
1294 * gnulib/import/dup2.c: Update.
1295 * gnulib/import/errno.in.h: Update.
1296 * gnulib/import/error.c: Update.
1297 * gnulib/import/error.h: Update.
1298 * gnulib/import/exitfail.c: Update.
1299 * gnulib/import/exitfail.h: Update.
1300 * gnulib/import/extra/update-copyright: Update.
1301 * gnulib/import/fchdir.c: Update.
1302 * gnulib/import/fcntl.c: Update.
1303 * gnulib/import/fcntl.in.h: Update.
1304 * gnulib/import/fd-hook.c: Update.
1305 * gnulib/import/fd-hook.h: Update.
1306 * gnulib/import/fd-safer-flag.c: Update.
1307 * gnulib/import/fd-safer.c: Update.
1308 * gnulib/import/fdopendir.c: Update.
1309 * gnulib/import/filename.h: Update.
1310 * gnulib/import/filenamecat-lgpl.c: Update.
1311 * gnulib/import/filenamecat.h: Update.
1312 * gnulib/import/flexmember.h: Update.
1313 * gnulib/import/float+.h: Update.
1314 * gnulib/import/float.c: Update.
1315 * gnulib/import/float.in.h: Update.
1316 * gnulib/import/fnmatch.c: Update.
1317 * gnulib/import/fnmatch.in.h: Update.
1318 * gnulib/import/fnmatch_loop.c: Update.
1319 * gnulib/import/fpucw.h: Update.
1320 * gnulib/import/frexp.c: Update.
1321 * gnulib/import/frexpl.c: Update.
1322 * gnulib/import/fstat.c: Update.
1323 * gnulib/import/fstatat.c: Update.
1324 * gnulib/import/getcwd-lgpl.c: Update.
1325 * gnulib/import/getcwd.c: Update.
1326 * gnulib/import/getdtablesize.c: Update.
1327 * gnulib/import/getlogin_r.c: Update.
1328 * gnulib/import/getprogname.c: Update.
1329 * gnulib/import/getprogname.h: Update.
1330 * gnulib/import/gettext.h: Update.
1331 * gnulib/import/gettimeofday.c: Update.
1332 * gnulib/import/glob-libc.h: Update.
1333 * gnulib/import/glob.c: Update.
1334 * gnulib/import/glob.in.h: Update.
1335 * gnulib/import/glob_internal.h: Update.
1336 * gnulib/import/glob_pattern_p.c: Update.
1337 * gnulib/import/globfree.c: Update.
1338 * gnulib/import/hard-locale.c: Update.
1339 * gnulib/import/hard-locale.h: Update.
1340 * gnulib/import/intprops.h: Update.
1341 * gnulib/import/inttypes.in.h: Update.
1342 * gnulib/import/isnan.c: Update.
1343 * gnulib/import/isnand-nolibm.h: Update.
1344 * gnulib/import/isnand.c: Update.
1345 * gnulib/import/isnanl-nolibm.h: Update.
1346 * gnulib/import/isnanl.c: Update.
1347 * gnulib/import/itold.c: Update.
1348 * gnulib/import/libc-config.h: Update.
1349 * gnulib/import/limits.in.h: Update.
1350 * gnulib/import/localcharset.c: Update.
1351 * gnulib/import/localcharset.h: Update.
1352 * gnulib/import/localtime-buffer.c: Update.
1353 * gnulib/import/localtime-buffer.h: Update.
1354 * gnulib/import/lstat.c: Update.
1355 * gnulib/import/m4/00gnulib.m4: Update.
1356 * gnulib/import/m4/__inline.m4: Update.
1357 * gnulib/import/m4/absolute-header.m4: Update.
1358 * gnulib/import/m4/alloca.m4: Update.
1359 * gnulib/import/m4/builtin-expect.m4: Update.
1360 * gnulib/import/m4/canonicalize.m4: Update.
1361 * gnulib/import/m4/chdir-long.m4: Update.
1362 * gnulib/import/m4/close.m4: Update.
1363 * gnulib/import/m4/closedir.m4: Update.
1364 * gnulib/import/m4/configmake.m4: Update.
1365 * gnulib/import/m4/d-ino.m4: Update.
1366 * gnulib/import/m4/d-type.m4: Update.
1367 * gnulib/import/m4/dirent_h.m4: Update.
1368 * gnulib/import/m4/dirfd.m4: Update.
1369 * gnulib/import/m4/dirname.m4: Update.
1370 * gnulib/import/m4/double-slash-root.m4: Update.
1371 * gnulib/import/m4/dup.m4: Update.
1372 * gnulib/import/m4/dup2.m4: Update.
1373 * gnulib/import/m4/eealloc.m4: Update.
1374 * gnulib/import/m4/environ.m4: Update.
1375 * gnulib/import/m4/errno_h.m4: Update.
1376 * gnulib/import/m4/error.m4: Update.
1377 * gnulib/import/m4/exponentd.m4: Update.
1378 * gnulib/import/m4/exponentl.m4: Update.
1379 * gnulib/import/m4/extensions.m4: Update.
1380 * gnulib/import/m4/extern-inline.m4: Update.
1381 * gnulib/import/m4/fchdir.m4: Update.
1382 * gnulib/import/m4/fcntl-o.m4: Update.
1383 * gnulib/import/m4/fcntl.m4: Update.
1384 * gnulib/import/m4/fcntl_h.m4: Update.
1385 * gnulib/import/m4/fdopendir.m4: Update.
1386 * gnulib/import/m4/filenamecat.m4: Update.
1387 * gnulib/import/m4/flexmember.m4: Update.
1388 * gnulib/import/m4/float_h.m4: Update.
1389 * gnulib/import/m4/fnmatch.m4: Update.
1390 * gnulib/import/m4/fnmatch_h.m4: Update.
1391 * gnulib/import/m4/fpieee.m4: Update.
1392 * gnulib/import/m4/frexp.m4: Update.
1393 * gnulib/import/m4/frexpl.m4: Update.
1394 * gnulib/import/m4/fstat.m4: Update.
1395 * gnulib/import/m4/fstatat.m4: Update.
1396 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1397 * gnulib/import/m4/getcwd-path-max.m4: Update.
1398 * gnulib/import/m4/getcwd.m4: Update.
1399 * gnulib/import/m4/getdtablesize.m4: Update.
1400 * gnulib/import/m4/getlogin.m4: Update.
1401 * gnulib/import/m4/getlogin_r.m4: Update.
1402 * gnulib/import/m4/getpagesize.m4: Update.
1403 * gnulib/import/m4/getprogname.m4: Update.
1404 * gnulib/import/m4/gettimeofday.m4: Update.
1405 * gnulib/import/m4/glibc21.m4: Update.
1406 * gnulib/import/m4/glob.m4: Update.
1407 * gnulib/import/m4/glob_h.m4: Update.
1408 * gnulib/import/m4/gnulib-cache.m4: Update.
1409 * gnulib/import/m4/gnulib-common.m4: Update.
1410 * gnulib/import/m4/gnulib-comp.m4: Update.
1411 * gnulib/import/m4/gnulib-tool.m4: Update.
1412 * gnulib/import/m4/hard-locale.m4: Update.
1413 * gnulib/import/m4/include_next.m4: Update.
1414 * gnulib/import/m4/inttypes-pri.m4: Update.
1415 * gnulib/import/m4/inttypes.m4: Update.
1416 * gnulib/import/m4/isnand.m4: Update.
1417 * gnulib/import/m4/isnanl.m4: Update.
1418 * gnulib/import/m4/largefile.m4: Update.
1419 * gnulib/import/m4/limits-h.m4: Update.
1420 * gnulib/import/m4/localcharset.m4: Update.
1421 * gnulib/import/m4/locale-fr.m4: Update.
1422 * gnulib/import/m4/locale-ja.m4: Update.
1423 * gnulib/import/m4/locale-zh.m4: Update.
1424 * gnulib/import/m4/localtime-buffer.m4: Update.
1425 * gnulib/import/m4/longlong.m4: Update.
1426 * gnulib/import/m4/lstat.m4: Update.
1427 * gnulib/import/m4/malloc.m4: Update.
1428 * gnulib/import/m4/malloca.m4: Update.
1429 * gnulib/import/m4/math_h.m4: Update.
1430 * gnulib/import/m4/mbrtowc.m4: Update.
1431 * gnulib/import/m4/mbsinit.m4: Update.
1432 * gnulib/import/m4/mbsrtowcs.m4: Update.
1433 * gnulib/import/m4/mbstate_t.m4: Update.
1434 * gnulib/import/m4/memchr.m4: Update.
1435 * gnulib/import/m4/memmem.m4: Update.
1436 * gnulib/import/m4/mempcpy.m4: Update.
1437 * gnulib/import/m4/memrchr.m4: Update.
1438 * gnulib/import/m4/mkdir.m4: Update.
1439 * gnulib/import/m4/mkstemp.m4: Update.
1440 * gnulib/import/m4/mmap-anon.m4: Update.
1441 * gnulib/import/m4/mode_t.m4: Update.
1442 * gnulib/import/m4/msvc-inval.m4: Update.
1443 * gnulib/import/m4/msvc-nothrow.m4: Update.
1444 * gnulib/import/m4/multiarch.m4: Update.
1445 * gnulib/import/m4/nocrash.m4: Update.
1446 * gnulib/import/m4/off_t.m4: Update.
1447 * gnulib/import/m4/onceonly.m4: Update.
1448 * gnulib/import/m4/open-cloexec.m4: Update.
1449 * gnulib/import/m4/open.m4: Update.
1450 * gnulib/import/m4/openat.m4: Update.
1451 * gnulib/import/m4/opendir.m4: Update.
1452 * gnulib/import/m4/pathmax.m4: Update.
1453 * gnulib/import/m4/rawmemchr.m4: Update.
1454 * gnulib/import/m4/readdir.m4: Update.
1455 * gnulib/import/m4/readlink.m4: Update.
1456 * gnulib/import/m4/realloc.m4: Update.
1457 * gnulib/import/m4/rename.m4: Update.
1458 * gnulib/import/m4/rewinddir.m4: Update.
1459 * gnulib/import/m4/rmdir.m4: Update.
1460 * gnulib/import/m4/save-cwd.m4: Update.
1461 * gnulib/import/m4/secure_getenv.m4: Update.
1462 * gnulib/import/m4/setenv.m4: Update.
1463 * gnulib/import/m4/signal_h.m4: Update.
1464 * gnulib/import/m4/ssize_t.m4: Update.
1465 * gnulib/import/m4/stat-time.m4: Update.
1466 * gnulib/import/m4/stat.m4: Update.
1467 * gnulib/import/m4/std-gnu11.m4: Update.
1468 * gnulib/import/m4/stdbool.m4: Update.
1469 * gnulib/import/m4/stddef_h.m4: Update.
1470 * gnulib/import/m4/stdint.m4: Update.
1471 * gnulib/import/m4/stdio_h.m4: Update.
1472 * gnulib/import/m4/stdlib_h.m4: Update.
1473 * gnulib/import/m4/strchrnul.m4: Update.
1474 * gnulib/import/m4/strdup.m4: Update.
1475 * gnulib/import/m4/strerror.m4: Update.
1476 * gnulib/import/m4/string_h.m4: Update.
1477 * gnulib/import/m4/strstr.m4: Update.
1478 * gnulib/import/m4/strtok_r.m4: Update.
1479 * gnulib/import/m4/sys_socket_h.m4: Update.
1480 * gnulib/import/m4/sys_stat_h.m4: Update.
1481 * gnulib/import/m4/sys_time_h.m4: Update.
1482 * gnulib/import/m4/sys_types_h.m4: Update.
1483 * gnulib/import/m4/tempname.m4: Update.
1484 * gnulib/import/m4/time_h.m4: Update.
1485 * gnulib/import/m4/unistd-safer.m4: Update.
1486 * gnulib/import/m4/unistd_h.m4: Update.
1487 * gnulib/import/m4/warn-on-use.m4: Update.
1488 * gnulib/import/m4/wchar_h.m4: Update.
1489 * gnulib/import/m4/wchar_t.m4: Update.
1490 * gnulib/import/m4/wctype_h.m4: Update.
1491 * gnulib/import/m4/wint_t.m4: Update.
1492 * gnulib/import/malloc.c: Update.
1493 * gnulib/import/malloc/scratch_buffer.h: Update.
1494 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1495 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1496 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1497 * gnulib/import/malloca.c: Update.
1498 * gnulib/import/malloca.h: Update.
1499 * gnulib/import/malloca.valgrind: Update.
1500 * gnulib/import/math.in.h: Update.
1501 * gnulib/import/mbrtowc.c: Update.
1502 * gnulib/import/mbsinit.c: Update.
1503 * gnulib/import/mbsrtowcs-impl.h: Update.
1504 * gnulib/import/mbsrtowcs-state.c: Update.
1505 * gnulib/import/mbsrtowcs.c: Update.
1506 * gnulib/import/memchr.c: Update.
1507 * gnulib/import/memmem.c: Update.
1508 * gnulib/import/mempcpy.c: Update.
1509 * gnulib/import/memrchr.c: Update.
1510 * gnulib/import/mkdir.c: Update.
1511 * gnulib/import/mkstemp.c: Update.
1512 * gnulib/import/msvc-inval.c: Update.
1513 * gnulib/import/msvc-inval.h: Update.
1514 * gnulib/import/msvc-nothrow.c: Update.
1515 * gnulib/import/msvc-nothrow.h: Update.
1516 * gnulib/import/open.c: Update.
1517 * gnulib/import/openat-die.c: Update.
1518 * gnulib/import/openat-priv.h: Update.
1519 * gnulib/import/openat-proc.c: Update.
1520 * gnulib/import/openat.c: Update.
1521 * gnulib/import/openat.h: Update.
1522 * gnulib/import/opendir.c: Update.
1523 * gnulib/import/pathmax.h: Update.
1524 * gnulib/import/pipe-safer.c: Update.
1525 * gnulib/import/rawmemchr.c: Update.
1526 * gnulib/import/readdir.c: Update.
1527 * gnulib/import/readlink.c: Update.
1528 * gnulib/import/realloc.c: Update.
1529 * gnulib/import/ref-add.sin: Update.
1530 * gnulib/import/ref-del.sin: Update.
1531 * gnulib/import/rename.c: Update.
1532 * gnulib/import/rewinddir.c: Update.
1533 * gnulib/import/rmdir.c: Update.
1534 * gnulib/import/same-inode.h: Update.
1535 * gnulib/import/save-cwd.c: Update.
1536 * gnulib/import/save-cwd.h: Update.
1537 * gnulib/import/scratch_buffer.h: Update.
1538 * gnulib/import/secure_getenv.c: Update.
1539 * gnulib/import/setenv.c: Update.
1540 * gnulib/import/signal.in.h: Update.
1541 * gnulib/import/stat-time.c: Update.
1542 * gnulib/import/stat-time.h: Update.
1543 * gnulib/import/stat-w32.c: Update.
1544 * gnulib/import/stat-w32.h: Update.
1545 * gnulib/import/stat.c: Update.
1546 * gnulib/import/stdbool.in.h: Update.
1547 * gnulib/import/stddef.in.h: Update.
1548 * gnulib/import/stdint.in.h: Update.
1549 * gnulib/import/stdio.in.h: Update.
1550 * gnulib/import/stdlib.in.h: Update.
1551 * gnulib/import/str-two-way.h: Update.
1552 * gnulib/import/strchrnul.c: Update.
1553 * gnulib/import/strdup.c: Update.
1554 * gnulib/import/streq.h: Update.
1555 * gnulib/import/strerror-override.c: Update.
1556 * gnulib/import/strerror-override.h: Update.
1557 * gnulib/import/strerror.c: Update.
1558 * gnulib/import/string.in.h: Update.
1559 * gnulib/import/stripslash.c: Update.
1560 * gnulib/import/strnlen1.c: Update.
1561 * gnulib/import/strnlen1.h: Update.
1562 * gnulib/import/strstr.c: Update.
1563 * gnulib/import/strtok_r.c: Update.
1564 * gnulib/import/sys_stat.in.h: Update.
1565 * gnulib/import/sys_time.in.h: Update.
1566 * gnulib/import/sys_types.in.h: Update.
1567 * gnulib/import/tempname.c: Update.
1568 * gnulib/import/tempname.h: Update.
1569 * gnulib/import/time.in.h: Update.
1570 * gnulib/import/unistd--.h: Update.
1571 * gnulib/import/unistd-safer.h: Update.
1572 * gnulib/import/unistd.in.h: Update.
1573 * gnulib/import/unsetenv.c: Update.
1574 * gnulib/import/verify.h: Update.
1575 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1576 * gnulib/import/wchar.in.h: Update.
1577 * gnulib/import/wctype.in.h: Update.
1578 * gnulib/import/xalloc-oversized.h: Update.
1579 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1580 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1581
1582 2018-08-16 Gary Benson <gbenson@redhat.com>
1583
1584 PR gdb/13000:
1585 * gdb/main.c (captured_main_1): Exit with nonzero status
1586 in batch mode if the last command to be executed failed.
1587 * NEWS: Mention the above.
1588
1589 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1590
1591 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1592 end of warning message.
1593
1594 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1595
1596 PR gdb/22943:
1597 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1598 (aarch64_extract_return_value): Use
1599 aapcs_is_vfp_call_or_return_candidate.
1600 (aarch64_return_in_memory): Likewise.
1601 (aarch64_store_return_value): Likewise.
1602
1603 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1604
1605 * aarch64-tdep.c
1606 (aapcs_is_vfp_call_or_return_candidate): Make static
1607 (pass_in_v_or_stack): Remove function.
1608 (pass_in_v_vfp_candidate): New function.
1609 (aarch64_push_dummy_call): Check for float register candidates.
1610
1611 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1612
1613 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1614 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1615 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1616
1617 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1618
1619 PR build/23399
1620 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1621 (struct ipa_sym_addresses): Rename to...
1622 (struct ipa_sym_addresses_common): ... this.
1623 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1624
1625 2018-08-28 Tom Tromey <tom@tromey.com>
1626
1627 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1628 (token_fifo): Now a std::vector.
1629 (yylex, c_parse): Update.
1630 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1631 (token_fifo): Now a std::vector.
1632 (yylex, d_parse): Update.
1633 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1634 (token_fifo): Now a std::vector.
1635 (yylex, go_parse): Update.
1636
1637 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
1638
1639 * parser-defs.h (struct type_stack) <elements>: Change type to
1640 std::vector<union type_stack_elt>.
1641 <depth, size>: Remove.
1642 * parse.c (parse_exp_in_context_1): Adjust.
1643 (type_stack_reserve): Remove.
1644 (check_type_stack_depth): Remove.
1645 (insert_into_type_stack): Adjust to std::vector.
1646 (insert_type): Likewise.
1647 (push_type): Likewise.
1648 (push_type_int): Likewise.
1649 (insert_type_address_space): Likewise.
1650 (pop_type): Likewise.
1651 (pop_type_int): Likewise.
1652 (pop_typelist): Likewise.
1653 (pop_type_stack): Likewise.
1654 (append_type_stack): Likewise.
1655 (push_type_stack): Likewise.
1656 (get_type_stack): Likewise.
1657 (type_stack_cleanup): Likewise.
1658 (push_typelist): Likewise.
1659 (follow_types): Likewise.
1660 (_initialize_parse): Likewise.
1661
1662 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
1663
1664 * NEWS: Mention csky target.
1665
1666 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
1667 Hafiz Abid Qadeer <abidh@codesourcery.com>
1668 Don Breazeal <donb@codesourcery.com>
1669
1670 * csky-linux-tdep.c: New file.
1671 * csky-tdep.c: Likewise.
1672 * csky-tdep.h: Likewise.
1673 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1674 csky-tdep.o.
1675 (HFILES_NO_SRCDIR): Add csky-tdep.h.
1676 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1677 * configure.tgt: Add csky support.
1678
1679 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
1680
1681 * python/py-framefilter.c (py_print_frame): Print frame architecture
1682 when printing on an MI output.
1683
1684 2018-08-27 Tom Tromey <tom@tromey.com>
1685
1686 PR build/23087:
1687 * configure: Rebuild.
1688 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1689
1690 2018-08-27 Tom Tromey <tom@tromey.com>
1691
1692 * aarch64-linux-tdep.c
1693 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1694 casts to int.
1695
1696 2018-08-27 Tom Tromey <tom@tromey.com>
1697
1698 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1699 unsigned.
1700 (ppc64_standard_linkage1, ppc64_standard_linkage2)
1701 (ppc64_standard_linkage3, ppc64_standard_linkage4)
1702 (ppc64_standard_linkage5, ppc64_standard_linkage6)
1703 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1704 unsigned.
1705
1706 2018-08-27 Tom Tromey <tom@tromey.com>
1707
1708 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1709 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1710
1711 2018-08-27 Tom Tromey <tom@tromey.com>
1712
1713 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1714 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1715 ULONGEST_MAX.
1716 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1717 ULONGEST_MAX.
1718 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1719 ULONGEST_MAX.
1720 * sparc-linux-tdep.c (sparc32_linux_sigframe)
1721 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1722 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1723 ULONGEST_MAX.
1724 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1725 (ppc64_linux_sigaction_tramp_frame)
1726 (ppc32_linux_sighandler_tramp_frame)
1727 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1728 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1729 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1730 * mn10300-linux-tdep.c (am33_linux_sigframe)
1731 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1732 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1733 * mips-linux-tdep.c (mips_linux_o32_sigframe)
1734 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1735 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1736 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1737 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1738 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1739 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1740 * microblaze-linux-tdep.c
1741 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1742 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1743 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1744 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1745 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1746 * common/common-types.h (ULONGEST_MAX): New define.
1747 (CORE_ADDR_MAX): Fix formatting.
1748 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1749 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1750 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1751 (arm_linux_rt_sigreturn_tramp_frame)
1752 (arm_eabi_linux_sigreturn_tramp_frame)
1753 (arm_eabi_linux_rt_sigreturn_tramp_frame)
1754 (thumb2_eabi_linux_sigreturn_tramp_frame)
1755 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1756 (arm_linux_restart_syscall_tramp_frame)
1757 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1758 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1759 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1760 ULONGEST_MAX.
1761 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1762
1763 2018-08-27 Tom Tromey <tom@tromey.com>
1764
1765 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1766 CORE_ADDR_MAX.
1767 * mips-tdep.c (mips_deal_with_atomic_sequence)
1768 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1769 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1770 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1771 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1772 CORE_ADDR_MAX.
1773 * aarch64-tdep.c (aarch64_software_single_step): Use
1774 CORE_ADDR_MAX.
1775
1776 2018-08-27 Tom Tromey <tom@tromey.com>
1777
1778 * linespec.c (complete_linespec_component): Add cast to "char".
1779 * completer.c (completion_tracker::build_completion_result): Add
1780 cast to "char".
1781
1782 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1783
1784 * solist.h (struct solist, struct target_so_ops): Fix
1785 indentation.
1786
1787 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1788
1789 * ada-tasks.c (ada_task_info_s): Remove typedef.
1790 (DEF_VEC_O(ada_task_info_s)): Remove.
1791 (struct ada_tasks_inferior_data): Initialize fields.
1792 <task_list>: Make an std::vector.
1793 (get_ada_tasks_inferior_data): Allocate with new.
1794 (ada_get_task_number): Adjust.
1795 (get_task_number_from_id): Likewise.
1796 (valid_task_id): Likewise.
1797 (ada_get_task_info_from_ptid): Likewise.
1798 (iterate_over_live_ada_tasks): Likewise.
1799 (add_ada_task): Likewise.
1800 (read_known_tasks): Likewise.
1801 (ada_build_task_list): Likewise.
1802 (print_ada_task_info): Likewise.
1803 (info_task): Likewise.
1804 (task_command_1): Likewise.
1805
1806 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1807
1808 * ada-lang.c (add_angle_brackets): Return std::string.
1809
1810 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1811
1812 * python/py-threadevent.c (py_get_event_thread): Initialize
1813 pythread.
1814
1815 2018-08-24 Pedro Alves <palves@redhat.com>
1816
1817 * python/py-bpevent.c (create_breakpoint_event_object): Use
1818 copy-initialization.
1819 * python/py-continueevent.c (emit_continue_event): Use
1820 copy-initialization.
1821 * python/py-exitedevent.c (create_exited_event_object): Return a
1822 gdbpy_ref<>.
1823 (emit_exited_event): Use copy-initialization.
1824 * python/py-inferior.c (python_new_inferior)
1825 (python_inferior_deleted, add_thread_object): Use
1826 copy-initialization.
1827 * python/py-infevents.c (create_inferior_call_event_object)
1828 (create_register_changed_event_object)
1829 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1830 (emit_inferior_call_event, emit_memory_changed_event)
1831 (emit_register_changed_event): Use copy-initialization.
1832 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1833 Return a gdbpy_ref<>.
1834 (emit_new_objfile_event): Use copy-initialization.
1835 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1836 (emit_clear_objfiles_event): Use copy-initialization.
1837 * python/py-signalevent.c (create_signal_event_object): Use
1838 copy-initialization.
1839 * python/py-threadevent.c (create_thread_event_object): Use
1840 copy-initialization.
1841
1842 2018-08-24 Pedro Alves <palves@redhat.com>
1843 Simon Marchi <simon.marchi@ericsson.com>
1844
1845 PR gdb/23379
1846 * python/py-continueevent.c: Include "gdbthread.h".
1847 (create_continue_event_object): Add intro comment. Add 'ptid'
1848 parameter. Use it to find thread to pass to
1849 create_thread_event_object.
1850 (emit_continue_event): Pass PTID down to
1851 create_continue_event_object.
1852 * python/py-event.h (py_get_event_thread): Declare.
1853 (create_thread_event_object): Remove default from 'thread'
1854 parameter.
1855 * python/py-stopevent.c (create_stop_event_object): Use
1856 py_get_event_thread.
1857 * python/py-threadevent.c (get_event_thread): Rename to ...
1858 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1859 and use it to find the thread.
1860 (create_thread_event_object): Assert that THREAD isn't null.
1861 Don't find the event thread here.
1862
1863 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1864
1865 * block.h (blockrange, blockranges): New struct declarations.
1866 (struct block): Add new field named `ranges'.
1867 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1868 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1869 macros for accessing ranges in struct block.
1870 (make_blockranges): New declaration.
1871 block.c (make_blockranges): New function.
1872 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1873 for block.
1874 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1875 * blockframe.c (cache_pc_function_block): New static global.
1876 (clear_pc_function_cache): Clear cache_pc_function_block.
1877 (find_pc_partial_function): Move comment to symtab.h. Add
1878 support for non-contiguous blocks.
1879 * cli/cli-cmds.c (block.h): Include.
1880 (print_disassembly): Handle printing of non-contiguous blocks.
1881 (disassemble_current_function): Likewise.
1882 (disassemble_command): Likewise.
1883
1884 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1885 BLOCK_START.
1886 * blockframe.c (get_pc_function_start): Likewise.
1887 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1888 (gcc_symbol_address): Likewise.
1889 * compile/compile-object-run.c (compile_object_run): Likewise.
1890 * compile/compile.c (get_expr_block_and_pc): Likewise.
1891 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1892 (func_addr_to_tail_call_list): Likewise.
1893 * findvar.c (default_read_var_value): Likewise.
1894 * inline-frame.c (inline_frame_this_id): Likewise.
1895 (skip-inline_frames): Likewise.
1896 * infcmd.c (until_next_command): Likewise.
1897 * linespec.c (convert_linespec_to_sals): Likewise.
1898 * parse.c (parse_exp_in_context_1): Likewise.
1899 * printcmd.c (build_address_symbolic): likewise.
1900 (info_address_command): Likewise.
1901 symtab.c (find_function_start_sal): Likewise.
1902 (skip_prologue_sal): Likewise.
1903 (find_function_alias_target): Likewise.
1904 (find_gnu_ifunc): Likewise.
1905 * stack.c (find_frame_funname): Likewise.
1906 * symtab.c (fixup_symbol_section): Likewise.
1907 (find_function_start_sal): Likewise.
1908 (skip_prologue_sal): Likewsie.
1909 (find_function_alias_target): Likewise.
1910 (find_gnu_ifunc): Likewise.
1911 * tracepoint.c (info_scope_command): Likewise.
1912 * value.c (value_fn_field): Likewise.
1913
1914 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1915 in place of find_pc_partial_function.
1916 * blockframe.c (find_function_entry_range_from_pc): New function.
1917 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1918 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1919 for each range in a block.
1920
1921
1922 2018-08-23 Xavier Roirand <roirand@adacore.com>
1923
1924 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1925 incrementation.
1926
1927 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1928
1929 * solib-svr4.c (read_program_headers_from_bfd): Return
1930 gdb::optional<gdb::byte_vector>.
1931 (svr4_exec_displacement): Adjust.
1932
1933 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1934
1935 * solib-svr4.c (read_program_header): Return
1936 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1937 (find_program_interpreter): Return
1938 gdb::optional<gdb::byte_vector>.
1939 (scan_dyntag_auxv): Adjust.
1940 (enable_break): Adjust.
1941 (svr4_exec_displacement): Adjust.
1942
1943 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1944
1945 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1946 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1947
1948 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1949
1950 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1951 string_vprintf.
1952 * guile/scm-utils.c (gdbscm_printf): Likewise.
1953 * serial.c (serial_printf): Likewise.
1954 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1955
1956 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1957
1958 * stack.c (print_frame): Print frame architecture when printing on
1959 an MI output.
1960 * NEWS: Mention new "arch" attribute in frame output.
1961
1962 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1963
1964 * arch/aarch64.h (aarch64_regnum): Update comment.
1965
1966 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1967
1968 * NEWS: Add SVE to 8.2 section.
1969
1970 2018-08-21 Pedro Alves <palves@redhat.com>
1971
1972 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1973 out from gdbscm_parse_function_args.
1974 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1975 gdbscm_parse_function_args_1.
1976
1977 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1978
1979 PR gdb/17816
1980 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1981 operator.
1982
1983 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1984
1985 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1986
1987 2018-08-19 Michael Spang <spang@google.com>
1988
1989 PR gdb/11786
1990 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1991 for PT_TLS segments.
1992
1993 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1994
1995 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1996 dwarf_variable_value.
1997 * dwarf2-frame.c (class dwarf_expr_executor):
1998 Add override for dwarf_variable_value.
1999 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2000 (class symbol_needs_eval_context): Likewise.
2001 (indirect_synthetic_pointer): Add forward declaration.
2002 (sect_variable_value): New function.
2003 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2004 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2005 for DW_OP_GNU_variable_value.
2006
2007 2018-08-16 Tom Tromey <tom@tromey.com>
2008
2009 * top.c (read_command_file): Update.
2010 (command_line_input): Remove "repeat" argument.
2011 * ada-lang.c (get_selections): Update.
2012 * linespec.c (decode_line_2): Update.
2013 * defs.h (command_line_input): Remove argument.
2014 * cli/cli-script.c (read_next_line): Update.
2015 * python/py-gdb-readline.c: Update.
2016
2017 2018-08-17 Tom Tromey <tom@tromey.com>
2018
2019 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2020 command_line_input.
2021
2022 2018-08-15 Tom Tromey <tom@tromey.com>
2023
2024 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2025
2026 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2027
2028 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2029 If used, use find_pc_partial_function to find address range
2030 to disassemble.
2031 * mi/mi-main.c (mi_cmd_list_features): Report
2032 "data-disassemble-a-option" feature.
2033 * NEWS: Mention new -data-disassemble option -a.
2034
2035 2018-08-13 Tom Tromey <tom@tromey.com>
2036
2037 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2038
2039 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2040
2041 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2042 (aarch64_linux_collect_sve_regset): Likewise.
2043 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2044 * regcache.h (regcache_map_entry_size): New function.
2045
2046 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2047
2048 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2049 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2050 (SVE_HEADER_VL_LENGTH): Likewise.
2051 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2052 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2053 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2054 (SVE_HEADER_SIZE_OFFSET): Likewise.
2055 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2056 (SVE_HEADER_VL_OFFSET): Likewise.
2057 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2058 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2059 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2060 (SVE_HEADER_SIZE): Likewise.
2061 (aarch64_linux_core_read_vq): Add function.
2062 (aarch64_linux_core_read_description): Check for SVE section.
2063
2064 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2065
2066 * aarch64-fbsd-tdep.c
2067 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2068 collect_size.
2069 * aarch64-linux-tdep.c
2070 (aarch64_linux_iterate_over_regset_sections): Likewise.
2071 * alpha-linux-tdep.c
2072 (alpha_linux_iterate_over_regset_sections):
2073 * alpha-nbsd-tdep.c
2074 (alphanbsd_iterate_over_regset_sections): Likewise.
2075 * amd64-fbsd-tdep.c
2076 (amd64fbsd_iterate_over_regset_sections): Likewise.
2077 * amd64-linux-tdep.c
2078 (amd64_linux_iterate_over_regset_sections): Likewise.
2079 * arm-bsd-tdep.c
2080 (armbsd_iterate_over_regset_sections): Likewise.
2081 * arm-fbsd-tdep.c
2082 (arm_fbsd_iterate_over_regset_sections): Likewise.
2083 * arm-linux-tdep.c
2084 (arm_linux_iterate_over_regset_sections): Likewise.
2085 * corelow.c (get_core_registers_cb): Likewise.
2086 (core_target::fetch_registers): Likewise.
2087 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2088 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2089 * gdbarch.h (void): Regenerate.
2090 * gdbarch.sh: Add supply_size and collect_size.
2091 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2092 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2093 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2094 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2095 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2096 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2097 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2098 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2099 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2100 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2101 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2102 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2103 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2104 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2105 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2106 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2107 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2108 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2109 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2110 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2111 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2112 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2113 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2114 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2115 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2116 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2117 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2118 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2119 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2120 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2121
2122 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2123
2124 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2125 with string_printf.
2126
2127 2018-08-10 Keith Seitz <keiths@redhat.com>
2128
2129 * compile/compile-c-support.c (add_code_header, add_code_footer):
2130 Move into policy class.
2131 (c_push_user_expression, pop_user_expression_nop)
2132 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2133 (compile_program): New host class.
2134 (c_compile_program): New typedef.
2135 (c_compute_porgram): Use c_compile_program.
2136
2137 2018-08-10 Keith Seitz <keiths@redhat.com>
2138
2139 * compile/compile-internal.h (compile_instance::~compile_instance):
2140 Remove calls to htab_delete.
2141 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2142 * compile.c (compile_instance::compile_instance): Initialize
2143 htab unique pointers.
2144 (compile_instance::get_cached_type, compile_instance::insert_type)
2145 (compile_instance::error_symbol_once): Update for unique_ptr.
2146
2147 2018-08-10 Keith Seitz <keiths@redhat.com>
2148
2149 * compile/compile-c-symbols.c (struct symbol_error)
2150 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2151 (compile_instance::insert_symbol_error)
2152 (compile_instance::error_symbol_once): Move to ...
2153 * compile/compile.c: ... here.
2154
2155 2018-08-10 Keith Seitz <keiths@redhat.com>
2156
2157 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2158 instead of `new_compile_instance'.
2159 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2160 Update description.
2161 If the symbol error map is not initialized, create it.
2162 (generate_c_for_for_one_symbol): Do not check/initialize
2163 the symbol error map.
2164 * compile/compile-c-types.c (compile_c_instance): Make a class.
2165 Update all callers.
2166 (compile_instance::compile_instance): Initialize the type cache.
2167 (get_cached_type): New function.
2168 (insert_type): Update description.
2169 (compile_c_instance::m_default_cflags): Define.
2170 (convert_type): Update description. Use get_cached_type.
2171 (delete_instance): Moved to destructor.
2172 (new_compile_instance): Moved to constructor.
2173 * compile/compile-c.h (compile_c_instance): Make class inheriting
2174 from compile_instance.
2175 <base>: Remove field.
2176 <type_map, symbol_err_map>: Move to base class.
2177 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2178 * compile/compile-internal.h (compile_instance): Make class.
2179 <type_map_t, symbol_err_map_t>: Define.
2180 <fe>: Rename to `m_gcc_fe'.
2181 <scope, block, gcc_target_options>: Add `m_' prefix.
2182 <m_type_map, m_symbol_err_map>: New fields, moved from
2183 compile_c_instance.
2184 <destroy>: Remove.
2185 (convert_type, new_compile_instance): Remove.
2186 * compile/compile.c (cleanup_compile_instance): Remove.
2187 (compile_to_object): Use unique_ptr to eliminate cleanups.
2188 (compile_instance::set_print_callback, compile_instance::version)
2189 (compile_instance::set_verbose)
2190 (compile_instance::set_driver_filename)
2191 (compile_instance::set_triplet_regexp)
2192 (compile_instance::set_arguments)
2193 (compile_instance::set_source_file)
2194 (compile_instance::compile): Define.
2195
2196 2018-08-10 Keith Seitz <keiths@redhat.com>
2197
2198 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2199 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2200 gcc-c-fe.def to define C plugin.
2201 (delete_instance): Delete `c_plugin'.
2202 (new_compile_instance): Initialize `c_plugin'.
2203 * compile/compile-c.h: Include gcc_c_plugin.h.
2204 (struct compile_c_instance) <c_plugin>: New member.
2205 * gcc-c-plugin.h: New file.
2206 Update all callers with API change.
2207
2208 2018-08-10 Keith Seitz <keiths@redhat.com>
2209
2210 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2211 (HFILES_NO_SRCDIR): ... to here.
2212 Add compile-internal.h and compile-c.h.
2213 * compile/compile-c-support.c: Include compile-c.h.
2214 * compile/compile-c-symbols.c: Include compile-c.h.
2215 (generate_c_for_variable_locations): Update comment.
2216 * compile/compile-c-types.c: Include compile-c.h.
2217 * compile/compile-c.h: New file -- moved C language declarations
2218 from other files here.
2219 * compile/compile-internal.h: Do not include hashtab.h or
2220 common/enum-flags.h.
2221 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2222 (gcc_convert_symbol, gcc_symbol_address)
2223 (generate_c_for_variable_locations, c_get_mode_for_size)
2224 (c_get_range_decl_name): Definitions moved to compile-c.h.
2225 * compile/compile-loc2c.c: Include compile-c.h.
2226
2227 2018-08-10 Keith Seitz <keiths@redhat.com>
2228
2229 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2230 (c_symbol_substitution_name): ... this.
2231 Update all callers.
2232
2233 2018-08-10 Keith Seitz <keiths@redhat.com>
2234
2235 * compile/compile-c-support.c (c_compute_program): Use
2236 unique_xmalloc_ptr to eliminate cleanup.
2237 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2238 Return a unique_xmalloc_ptr and eliminate cleanup.
2239 * compile/compile-internal.h (generate_c_for_variable_locations):
2240 Return unique_xmalloc_ptr and update description.
2241
2242 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2243
2244 * corelow.c (core_target::get_core_register_section): Rename
2245 min_size to section_min_size.
2246
2247 2018-08-09 Jim Wilson <jimw@sifive.com>
2248
2249 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2250 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2251 * NEWS: Mention new GNU/Linux RISC-V target.
2252 * configure.host: Add riscv*-*-linux*.
2253 * configure.nat: Add riscv*.
2254 * configure.tgt: Add riscv*-*-linux*.
2255 * riscv-linux-nat.c: New file.
2256 * riscv-linux-tdep.c: New file.
2257
2258 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2259
2260 * infrun.c (resume): Make static, add forward declaration.
2261 (proceed): Update header comment.
2262 * infrun.h (resume): Delete declaration.
2263
2264 2018-08-09 Tom Tromey <tom@tromey.com>
2265
2266 * riscv-tdep.h: Minor formatting fixes.
2267
2268 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2269
2270 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2271 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2272 (test_mkdir_recursive): Likewise.
2273 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2274
2275 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2276
2277 * valarith.c (value_subscripted_rvalue): If an array is not in
2278 memory, and we don't know the upper bound, then we can't know that
2279 the requested element exists or not.
2280
2281 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2282
2283 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2284 (target_options_to_string): Add comment.
2285
2286 2018-08-08 Tom Tromey <tom@tromey.com>
2287
2288 * unittests/scoped_mmap-selftests.c: Check result of "write".
2289
2290 2018-08-08 Jim Wilson <jimw@sifive.com>
2291
2292 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2293 (decode_register_index_short): New.
2294 (decode_j_type_insn, decode_cj_type_insn): New.
2295 (decode_b_type_insn, decode_cb_type_insn): New.
2296 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2297 local xlen. Check xlen when decoding ambiguous compressed insns. In
2298 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2299 is_c_sw_insn instead of is_sw_insn.
2300 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2301 (riscv_software_single_step): New.
2302 * riscv-tdep.h (riscv_software_single_step): Declare.
2303
2304 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2305 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2306
2307 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2308
2309 PR gdb/18050:
2310 * target.c (dispose_inferior): Don't dispose of inferiors that are
2311 already killed.
2312
2313 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2314
2315 * remote.c (remote_target::download_tracepoint): Change char* to
2316 const char*.
2317
2318 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2319
2320 * target.h (target_options_to_string): Return an std::string.
2321 * target.c (str_comma_list_concat_elem): Return void, use
2322 std::string.
2323 (do_option): Likewise.
2324 (target_options_to_string): Return an std::string.
2325 * linux-nat.c (linux_nat_target::wait): Adjust.
2326 * target-debug.h (target_debug_print_options): Adjust.
2327
2328 2018-08-07 Tom Tromey <tom@tromey.com>
2329
2330 * Makefile.in (CPPFLAGS): New variable.
2331 (INTERNAL_CPPFLAGS): Use it.
2332
2333 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2334
2335 * NEWS: Mention the index cache.
2336
2337 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2338
2339 * common/pathstuff.h (get_standard_cache_dir): New.
2340 * common/pathstuff.c (get_standard_cache_dir): New.
2341 * build-id.h (build_id_to_string): New.
2342 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2343 DEBUG_STR_SUFFIX): Move to here.
2344 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2345 DEBUG_STR_SUFFIX): Move from there.
2346 (write_psymtabs_to_index): Make non-static, add basename
2347 parameter. Write to temporary files, rename when done.
2348 (save_gdb_index_command): Adjust call to
2349 write_psymtabs_to_index.
2350 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2351 field.
2352 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2353 (get_gdb_index_contents_from_cache): New.
2354 (get_gdb_index_contents_from_cache_dwz): New.
2355 (dwarf2_initialize_objfile): Read index from cache.
2356 (dwarf2_build_psymtabs): Save to index.
2357 * dwarf-index-cache.h: New file.
2358 * dwarf-index-cache.c: New file.
2359 * dwarf-index-write.h: New file.
2360
2361 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2362
2363 * gnulib/aclocal.m4: Re-generate.
2364 * gnulib/config.in: Re-generate.
2365 * gnulib/configure: Re-generate.
2366 * gnulib/import/Makefile.am: Re-generate.
2367 * gnulib/import/Makefile.in: Re-generate.
2368 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2369 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2370 * gnulib/import/m4/mkdir.m4: New file.
2371 * gnulib/import/mkdir.c: New file.
2372 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2373 module.
2374
2375 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2376
2377 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2378 * common/scoped_mmap.c: New file.
2379 * common/scoped_mmap.h (destroy): New method.
2380 (~scoped_mmap, reset): Use destroy.
2381 (scoped_mmap): New move constructor.
2382 (mmap_file): New declaration.
2383 * unittests/scoped_mmap-selftests.c (test_normal,
2384 test_invalid_filename, run_tests): New functions.
2385 (_initialize_scoped_mmap_selftests): Register selftest.
2386
2387 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2388
2389 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2390 (read_gdb_index_from_buffer): ... this. Remove section
2391 parameter, add buffer parameter.
2392 (get_gdb_index_contents_ftype,
2393 get_gdb_index_contents_dwz_ftype): New typedefs.
2394 (dwarf2_read_gdb_index): Add callback parameters to get the
2395 index contents.
2396 (get_gdb_index_contents_from_section): New.
2397 (dwarf2_initialize_objfile): Update call to
2398 dwarf2_read_gdb_index.
2399
2400 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2401
2402 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2403 (gdb_open_cloexec): Likewise.
2404 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2405 (commandline_from_pid): Likewise.
2406 (linux_xfer_osdata_threads): Likewise.
2407 (linux_xfer_osdata_fds): Likewise.
2408 * ada-lang.c (is_package_name): Likewise.
2409 * auxv.c (procfs_xfer_auxv): Likewise.
2410 * breakpoint.c (print_one_breakpoint_location): Use
2411 uiout::field_fmt.
2412 (print_one_catch_solib): Use string_printf.
2413 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2414 (add_pe_forwarded_sym): Likewise.
2415 * dwarf2read.c (create_type_unit_group): Likewise.
2416 (build_error_marker_type): Likewise.
2417 * infcall.c (get_function_name): Likewise.
2418 * valprint.c (print_converted_chars_to_obstack): Likewise.
2419 * xtensa-tdep.c (xtensa_register_type): Likewise.
2420
2421 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2422
2423 * remote.c (remote_target::download_tracepoint): Fix format
2424 string errors.
2425
2426 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2427
2428 * tracefile.c: Include common/byte-vector.h.
2429 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2430 with trace_regblock_size if needed. Update uses of buf.
2431
2432 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2433
2434 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2435 std::vector<unsigned char>.
2436 * tracepoint.c (collection_list::collection_list): Remove
2437 m_regs_mask initializer from initializer list. Resize
2438 m_regs_mask using the largest remote register number.
2439 (collection_list::add_remote_register): Remove size check on
2440 m_regs_mask. Use at to access element.
2441 (collection_list::stringify): Change type of temp_buf to
2442 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2443 stringify the register mask. Use pack_hex_byte for the register
2444 mask.
2445
2446 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2447
2448 * tracepoint.h (class collection_list) <add_register>: Remove.
2449 <add_remote_register, add_ax_registers, add_local_register>:
2450 Declare.
2451 <add_memrange>: Add scope parameter.
2452 * tracepoint.c (encode_actions_1): Likewise.
2453 (collection_list::add_register): Rename to ...
2454 (collection_list::add_remote_register): ... this. Update
2455 comment.
2456 (collection_list::add_ax_registers, add_local_register): New
2457 methods.
2458 (collection_list::add_memrange): Add scope parameter. Call
2459 add_local_register instead of add_register.
2460 (finalize_tracepoint_aexpr): New function.
2461 (collection_list::collect_symbol): Update calls to add_memrange.
2462 Call add_local_register instead of add_register. Call
2463 add_ax_registers. Call finalize_tracepoint_aexpr.
2464 (encode_actions_1): Get remote regnos for $reg action. Call
2465 add_remote_register, add_ax_registers, and add_local_register.
2466 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2467 (validate_actionline): Call finalize_tracepoint_aexpr.
2468
2469 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2470
2471 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2472 Replace array buf with gdb::char_vector buf, of size
2473 get_remote_packet_size (). Replace references to buf and
2474 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2475 and xsnprintf with snprintf. Raise errors if the buffer is too
2476 small.
2477
2478 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2479
2480 * remote.c (remote_target::download_tracepoint): Fix the has_more
2481 predicate in the QTDP action list iteration.
2482
2483 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2484
2485 * remote.c (remote_target::download_tracepoint): Fix indentation
2486 in for block.
2487
2488 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2489
2490 * proc-api.c (_initialize_proc_api): Remove c, unused.
2491 * procfs.c (procfs_init_inferior): Remove signals, unused.
2492 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2493 unused.
2494
2495 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2496 Andrew Burgess <andrew.burgess@embecosm.com>
2497
2498 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2499 'W_STOPCODE (0)' as this could be ambiguous.
2500
2501 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2502
2503 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2504 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2505 "ai_socktype").
2506
2507 2018-08-02 Tom Tromey <tom@tromey.com>
2508
2509 PR symtab/16842.
2510 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2511 symbols.
2512 (process_structure_scope): Likewise.
2513
2514 2018-08-02 Xavier Roirand <roirand@adacore.com>
2515
2516 PR gdb/22629:
2517 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2518 kill inferior.
2519
2520 2018-08-02 Tom Tromey <tom@tromey.com>
2521
2522 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2523 (darwin_suspend_inferior, darwin_resume_inferior)
2524 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2525 (darwin_check_new_threads): Check result of get_darwin_inferior.
2526
2527 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2528
2529 GDB 8.1.1 released.
2530
2531 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2532
2533 * varobj.c (varobj_get_path_expr_parent): Report an error if
2534 parent is a dynamic varobj.
2535
2536 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2537
2538 * gnulib/aclocal.m4: Re-generate.
2539 * gnulib/config.in: Re-generate.
2540 * gnulib/configure: Re-generate.
2541 * gnulib/import/Makefile.in: Re-generate.
2542 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2543 * gnulib/import/m4/onceonly.m4: Re-generate.
2544
2545 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2546
2547 * target-descriptions.c (struct xml_test_tdesc): New.
2548 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2549 (record_xml_tdesc): Update.
2550 (maintenance_check_xml_descriptions): Update.
2551 * target-descriptions.h (record_xml_tdesc): Update comment.
2552
2553 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2554
2555 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2556 checking array bounds are defined.
2557
2558 2018-07-30 Tom Tromey <tom@tromey.com>
2559
2560 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2561 irreflexivity violation.
2562
2563 2018-07-30 Tom Tromey <tom@tromey.com>
2564
2565 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2566 * value.c (unpack_long): Remove lint code.
2567 * valops.c (value_ind): Remove lint code.
2568 * valarith.c (value_x_binop, value_x_unop, value_equal)
2569 (value_pos): Remove lint code.
2570
2571 2018-07-28 Tom de Vries <tdevries@suse.de>
2572
2573 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2574 with undefined upper bound as <optimized out>.
2575
2576 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2577
2578 * gcore.in: Rename variable "name" to "prefix". Expand
2579 "usage" text.
2580
2581 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2582
2583 * windows-nat.c (windows_nat_target::create_inferior): Update to
2584 call close() in global namespace.
2585
2586 2018-07-26 Tom Tromey <tom@tromey.com>
2587
2588 * dwarf-index-write.c (add_address_entry): Don't add objfile
2589 offsets.
2590 * dbxread.c (find_stab_function): Rename from
2591 find_stab_function_addr. Return a bound_minimal_symbol.
2592 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2593 Don't add objfile offsets.
2594 (end_psymtab): Use raw_text_low, raw_text_high,
2595 MSYMBOL_VALUE_RAW_ADDRESS.
2596 (read_ofile_symtab): Update.
2597 (process_one_symbol): Update.
2598 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2599 offsets.
2600 (dw2_relocate): Remove.
2601 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2602 searching addrmap.
2603 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2604 Update.
2605 (process_psymtab_comp_unit_reader, add_partial_symbol)
2606 (add_partial_subprogram, dwarf2_ranges_read): Update.
2607 (load_partial_dies): Update.
2608 (add_address_entry): Don't add objfile offsets.
2609 (dwarf2_build_include_psymtabs): Update.
2610 (create_addrmap_from_aranges): Don't add objfile offsets.
2611 (dw2_find_pc_sect_compunit_symtab): Update.
2612 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2613 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2614 Update.
2615 (parse_partial_symbols): Don't add objfile offsets. Use
2616 raw_text_low, raw_text_high. Update.
2617 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2618 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2619 or call 'relocate' quick function. Clear psymbol_map.
2620 * psympriv.h (struct partial_symbol) <address>: Add section
2621 offset.
2622 <set_unrelocated_address>: Rename from set_address.
2623 <raw_text_low, raw_text_high>: New methods.
2624 <text_low, text_high>: Add objfile parameter.
2625 (add_psymbol_to_bcache): Add 'section' parameter. Call
2626 set_unrelocated_address.
2627 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2628 (find_pc_psymbol): Update.
2629 (fixup_psymbol_section, relocate_psymtabs): Remove.
2630 (dump_psymtab, psym_functions): Update.
2631 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2632 parameter.
2633 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2634 (start_psymtab_common): Update.
2635 * symfile-debug.c (debug_qf_relocate): Remove.
2636 (debug_sym_quick_functions): Update.
2637 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2638 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2639 Update.
2640
2641 2018-07-26 Tom Tromey <tromey@redhat.com>
2642
2643 * dbxread.c (end_psymtab): Use text_high_valid and
2644 text_low_valid.
2645 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2646 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2647 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2648 Update comment.
2649 <text_low_valid, text_high_valid>: New fields.
2650 <set_text_low, set_text_high>: Update.
2651 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2652
2653 2018-07-26 Tom Tromey <tom@tromey.com>
2654
2655 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2656 Update.
2657 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2658 textlow and texthigh fields.
2659 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2660 Update.
2661 * mdebugread.c (parse_lines, parse_partial_symbols)
2662 (psymtab_to_symtab_1): Update.
2663 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2664 Rename fields. Update comment. Now private.
2665 <text_low, text_high, set_text_low, set_text_high>: New methods.
2666 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2667 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2668 (start_psymtab_common, maintenance_info_psymtabs)
2669 (maintenance_check_psymtabs): Update.
2670 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2671 texthigh fields.
2672 (scan_xcoff_symtab): Update.
2673
2674 2018-07-26 Tom Tromey <tromey@redhat.com>
2675
2676 * psympriv.h (struct partial_symbol) <unrelocated_address,
2677 address, set_address>: New methods.
2678 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2679 (fixup_psymbol_section, relocate_psymtabs): Update.
2680 (print_partial_symbols): Add 'objfile' parameter. Update.
2681 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2682 Update.
2683
2684 2018-07-26 Tom Tromey <tom@tromey.com>
2685
2686 * dwarf-index-write.c (write_psymbols, debug_names::insert)
2687 (debug_names::write_psymbols): Update.
2688 * psympriv.h (struct partial_symbol): Derive from
2689 general_symbol_info.
2690 <obj_section>: New method.
2691 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2692 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2693 (find_pc_sect_psymbol, fixup_psymbol_section)
2694 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2695 (print_partial_symbols, recursively_search_psymtabs)
2696 (compare_psymbols, psymbol_hash, psymbol_compare)
2697 (add_psymbol_to_bcache, maintenance_check_psymtabs)
2698 (psymbol_name_matches, psym_fill_psymbol_map): Update.
2699
2700 2018-07-26 Tom Tromey <tromey@redhat.com>
2701
2702 * dbxread.c (end_psymtab): Remove dead code.
2703
2704 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
2705
2706 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2707 DWARF unwinders are disabled.
2708 * dwarf2-frame.c: Add dwarf2read.h include.
2709 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2710 disabled.
2711 (dwarf2_frame_unwinders_enabled_p): Define.
2712 (show_dwarf_unwinders_enabled_p): New function.
2713 (_initialize_dwarf2_frame): Register switch to control DWARF
2714 unwinder use.
2715 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2716 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2717 (show_dwarf_cmdlist): Remove static keyword.
2718 * dwarf2read.h (set_dwarf_cmdlist): Declare.
2719 (show_dwarf_cmdlist): Declare.
2720 * NEWS: Document new feature.
2721
2722 2018-07-26 Tom de Vries <tdevries@suse.de>
2723
2724 PR breakpoints/23366
2725 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2726
2727 2018-07-26 Tom de Vries <tdevries@suse.de>
2728
2729 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2730 DW_AT_count can't be translated to a dynamic prop.
2731
2732 2018-07-25 Tom de Vries <tdevries@suse.de>
2733
2734 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2735 try/catch.
2736
2737 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
2738
2739 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2740
2741 2018-07-25 Joel Brobecker <brobecker@adacore.com>
2742
2743 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2744
2745 2018-07-24 Keith Seitz <keiths@redhat.comt
2746
2747 PR symtab/23010
2748 * dwarf2read.c (dw2_add_symbol_to_list): New function.
2749 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2750 instead of add_symbol_to_list.
2751 (read_file_scope): Call prepare_one_comp_unit before reading
2752 any other DIEs.
2753
2754 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
2755
2756 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2757
2758 2018-07-24 Tom Tromey <tom@tromey.com>
2759
2760 * utils.c (malloc, realloc, free): Don't declare.
2761 * configure, config.in: Rebuild.
2762 * configure.ac: Don't check for declarations of free, malloc, or
2763 realloc.
2764
2765 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2766
2767 * aarch64-linux-nat.c
2768 (aarch64_linux_nat_target::stopped_data_address): Remove unused
2769 variable.
2770 * arm-linux-nat.c (fetch_regs): Likewise.
2771 (store_regs): Likewise.
2772 (fetch_vfp_regs): Likewise.
2773 (store_vfp_regs): Likewise.
2774 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2775 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2776 (arm_linux_nat_target::insert_watchpoint): Likewise.
2777 (arm_linux_nat_target::remove_watchpoint): Likewise.
2778 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2779 Likewise.
2780 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2781 Likewise.
2782 * ppc-linux-nat.c (fetch_register): Likewise.
2783 (fetch_all_gp_regs): Likewise.
2784 (fetch_ppc_registers): Likewise.
2785 (store_all_gp_regs): Likewise.
2786 (store_ppc_registers): Likewise.
2787 (hwdebug_insert_point): Likewise.
2788 (can_use_watchpoint_cond_accel): Likewise.
2789 * remote-sim.c (gdb_os_write_stdout): Likewise.
2790
2791 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2792 Tom Tromey <tom@tromey.com>
2793
2794 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2795 test for it.
2796 * configure: Rebuild.
2797
2798 2018-07-22 Tom Tromey <tom@tromey.com>
2799
2800 * regformats/regdat.sh: Define xmltarget_${name} inside
2801 #ifndef IN_PROCESS_AGENT.
2802
2803 2018-07-22 Tom Tromey <tom@tromey.com>
2804
2805 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2806
2807 2018-07-22 Tom Tromey <tom@tromey.com>
2808
2809 * symfile.c (reread_symbols): Notify iter, not objfile.
2810
2811 2018-07-22 Tom Tromey <tom@tromey.com>
2812
2813 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2814 Use arch_ops.
2815 (ravenscar_thread_target::prepare_to_store): Likewise.
2816
2817 2018-07-22 Tom Tromey <tom@tromey.com>
2818
2819 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2820 unused variable. Call value_fetch_lazy when needed.
2821 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2822 Remove unused variable. Call value_fetch_lazy when needed.
2823
2824 2018-07-22 Tom Tromey <tom@tromey.com>
2825
2826 * m32c-tdep.c (mark_dma): Return void.
2827 (make_regs): Remove unused declarations.
2828
2829 2018-07-22 Tom Tromey <tom@tromey.com>
2830
2831 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2832 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2833 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2834 bkscm_get_valid_block_smob_arg_unsafe for effect.
2835
2836 2018-07-22 Tom Tromey <tom@tromey.com>
2837
2838 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2839 value_type.
2840
2841 2018-07-22 Tom Tromey <tom@tromey.com>
2842
2843 * windows-nat.c (saved_context): Conditionally define.
2844 * remote.c (remote_target::remote_btrace_maybe_reopen):
2845 Conditionally declare "warned".
2846 * inflow.c (sigquit_ours): Conditionally define.
2847 (new_tty): Move "tty" declaration inside #if.
2848 * guile/guile.c (guile_datadir): Conditionally define.
2849 * charset.c (set_be_le_names): Move some declarations inside #if.
2850 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2851 #if.
2852 (parse_xml_btrace_conf): Likewise.
2853
2854 2018-07-22 Tom Tromey <tom@tromey.com>
2855
2856 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2857
2858 2018-07-22 Tom Tromey <tom@tromey.com>
2859
2860 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2861 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2862 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2863 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2864 * stack.c (frame_apply_level_command): Remove unused variable.
2865 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2866 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2867 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2868 unused variable.
2869 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2870 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2871 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2872 variable.
2873 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2874 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2875 variable.
2876 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2877 Remove unused variable.
2878 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2879 variable.
2880 * common/tdesc.c (print_xml_feature::visit): Remove unused
2881 variable.
2882 * compile/compile-object-load.c (store_regs): Remove unused
2883 variables.
2884 * complaints.c (clear_complaints): Remove unused variable.
2885 * corelow.c (core_target_open): Remove unused variable.
2886 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2887 variable.
2888 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2889 variable.
2890 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2891 variable.
2892 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2893 variable.
2894 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2895 variable.
2896 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2897 variable.
2898 * ia64-tdep.c (examine_prologue): Remove unused variable.
2899 * infcall.c (run_inferior_call): Remove unused variable.
2900 * inferior.c (exit_inferior): Remove unused variable.
2901 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2902 * linespec.c (decode_line_2): Remove unused variable.
2903 * linux-nat.c (super_close): Remove.
2904 * linux-tdep.c (linux_info_proc): Remove unused variable.
2905 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2906 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2907 Remove unused variable.
2908 * parse.c (find_minsym_type_and_address): Remove unused variable.
2909 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2910 variable.
2911 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2912 variable.
2913 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2914 variables.
2915 * record-btrace.c (record_btrace_target::store_registers): Remove
2916 unused variable.
2917 (cmd_show_record_btrace_cpu): Remove unused variable.
2918 * riscv-tdep.c (riscv_register_reggroup_p)
2919 (riscv_push_dummy_call, riscv_return_value): Remove unused
2920 variable.
2921 * rust-exp.y (literal): Remove unused variable.
2922 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2923 unused variable.
2924 <STRUCTOP_ANONYMOUS>: Likewise.
2925 * s390-linux-tdep.c (s390_linux_init_abi_31)
2926 (s390_linux_init_abi_64): Remove unused variable.
2927 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2928 (file_select_thread, net_windows_open, _initialize_ser_windows):
2929 Remove unused variables.
2930 * symtab.c (find_pc_sect_line): Remove unused variable.
2931 * target-memory.c (compute_garbled_blocks): Remove unused
2932 variable.
2933 (target_write_memory_blocks): Remove unused variable.
2934 * target.c (target_stack::unpush): Remove unused variables.
2935 * tracepoint.c (start_tracing, all_tracepoint_actions)
2936 (merge_uploaded_trace_state_variables)
2937 (print_one_static_tracepoint_marker): Remove unused variable.
2938 * unittests/basic_string_view/element_access/char/1.cc (test01):
2939 Remove unused variable.
2940 * windows-nat.c (windows_continue, windows_add_all_dlls)
2941 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2942 Remove unused variables.
2943
2944 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2945
2946 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2947 attr_profile in HAVE_ELF.
2948 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2949 HAVE_ELF.
2950
2951 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2952
2953 * frame.c (frame_register_unwind): Change parameter name.
2954 (frame_unwind_register): Likewise.
2955 (frame_unwind_register_value): Likewise.
2956 (frame_unwind_register_signed): Likewise.
2957 (frame_unwind_register_unsigned): Likewise.
2958 * frame.h (frame_register_unwind): Likewise.
2959 (frame_unwind_register): Likewise.
2960 (frame_unwind_register_value): Likewise.
2961 (frame_unwind_register_signed): Likewise.
2962 (frame_unwind_register_unsigned): Likewise.
2963 (frame_unwind_arch): Likewise.
2964
2965 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2966
2967 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2968 ISA maintenance.
2969
2970 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2971
2972 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2973 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2974 hand.
2975
2976 2018-07-20 Keith Seitz <keiths@redhat.com>
2977
2978 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2979 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2980 m_compunit_symtab, m_language>: Add "m_" prefix.
2981 Update all uses.
2982 * buildsym.c: Update all uses.
2983
2984 2018-07-20 Tom Tromey <tom@tromey.com>
2985
2986 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2987 * buildsym.h (record_line_ftype): Remove typedef.
2988
2989 2018-07-20 Tom Tromey <tom@tromey.com>
2990
2991 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2992 (end_expandable_symtab): Likewise.
2993 (end_symtab_get_static_block): Likewise.
2994 (end_symtab_from_static_block): Likewise.
2995 * buildsym-legacy.c (augment_type_symtab): Remove.
2996 (end_expandable_symtab): Remove.
2997 (end_symtab_get_static_block): Remove.
2998 (end_symtab_from_static_block): Remove.
2999
3000 2018-07-20 Tom Tromey <tom@tromey.com>
3001
3002 * dwarf2read.c: Include buildsym.h.
3003 (struct dwarf2_cu) <builder>: New method.
3004 (fixup_go_packaging): Update.
3005 (process_full_comp_unit, process_full_type_unit): Update. Don't
3006 use scoped_free_pendings.
3007 (using_directives): Add "cu" parameter, remove "language".
3008 (read_import_statement, setup_type_unit_groups, )
3009 (read_func_scope, read_lexical_block_scope)
3010 (dwarf2_record_block_ranges, read_namespace): Update.
3011 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3012 (lnp_state_machine::handle_end_sequence): Update.
3013 (class lnp_state_machine) <m_cu>: New member.
3014 <m_record_line_callback>: Remove.
3015 <m_currently_recording_lines>: New member.
3016 (lnp_state_machine::handle_set_file): Update.
3017 (noop_record_line): Remove.
3018 (dwarf_record_line_p): Add cu parameter.
3019 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3020 (lnp_state_machine::record_line)
3021 (lnp_state_machine::lnp_state_machine)
3022 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3023 (dwarf_decode_lines): Update.
3024 (dwarf2_start_subfile): Add cu parameter.
3025 (dwarf2_start_symtab, new_symbol): Update.
3026 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3027 Remove dwarf2_per_objfile parameter.
3028 (dwarf_decode_macros): Update.
3029
3030 2018-07-20 Tom Tromey <tom@tromey.com>
3031
3032 * stabsread.c (define_symbol): Update.
3033 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3034 * dwarf2read.c (new_symbol): Update.
3035 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3036 * cp-namespace.c: Include buildsym.h.
3037 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3038 * buildsym-legacy.c (get_buildsym_compunit): New function.
3039
3040 2018-07-20 Tom Tromey <tom@tromey.com>
3041
3042 * xcoffread.c: Include buildsym-legacy.h.
3043 * windows-nat.c: Include buildsym-legacy.h.
3044 * stabsread.c: Include buildsym-legacy.h.
3045 * mdebugread.c: Include buildsym-legacy.h.
3046 * buildsym-legacy.h: New file.
3047 * buildsym-legacy.c: New file, from buildsym.c.
3048 * go32-nat.c: Include buildsym-legacy.h.
3049 * dwarf2read.c: Include buildsym-legacy.h.
3050 * dbxread.c: Include buildsym-legacy.h.
3051 * cp-namespace.c: Include buildsym-legacy.h.
3052 * coffread.c: Include buildsym-legacy.h.
3053 * buildsym.h: Move some contents to buildsym-legacy.h.
3054 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3055 buildsym-legacy.c.
3056 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3057
3058 2018-07-20 Tom Tromey <tom@tromey.com>
3059
3060 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3061 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3062 (buildsym_compunit::buildsym_compunit)
3063 (buildsym_compunit::~buildsym_compunit)
3064 (buildsym_compunit::get_macro_table): Define.
3065
3066 2018-07-20 Tom Tromey <tom@tromey.com>
3067
3068 * buildsym.c (reset_symtab_globals): Remove.
3069 (buildsym_compunit::end_symtab_from_static_block): Update.
3070 (buildsym_compunit::augment_type_symtab): Update.
3071 (end_symtab_from_static_block): Call free_buildsym_compunit.
3072 (augment_type_symtab, end_symtab, end_expandable_symtab):
3073 Likewise.
3074
3075 2018-07-20 Tom Tromey <tom@tromey.com>
3076
3077 * arch-utils.c: Do not include buildsym.h.
3078 * mipsread.c: Do not include buildsym.h.
3079 * machoread.c: Do not include buildsym.h.
3080 * elfread.c: Do not include buildsym.h.
3081
3082 2018-07-20 Tom Tromey <tom@tromey.com>
3083
3084 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3085 initialization.
3086 (buildsym_compunit): Add new constructor.
3087 (struct buildsym_compunit) <get_last_source_file, finish_block,
3088 record_block_range, start_subfile, patch_subfile_names,
3089 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3090 set_last_source_start_addr, get_last_source_start_addr,
3091 get_local_using_directives, set_local_using_directives,
3092 get_global_using_directives, outermost_context_p,
3093 get_current_context_stack, get_context_stack_depth,
3094 get_current_subfile, get_local_symbols, get_file_symbols,
3095 get_global_symbols, record_debugformat, record_producer,
3096 push_context, pop_context, end_symtab_get_static_block,
3097 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3098 New public methods.
3099 <record_pending_block, finish_block_internal, make_blockvector,
3100 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3101 private methods.
3102 Update all users.
3103
3104 2018-05-22 Tom Tromey <tom@tromey.com>
3105
3106 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3107 parameter.
3108 (finish_block_internal): Update.
3109
3110 2018-07-20 Tom Tromey <tom@tromey.com>
3111
3112 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3113 parameter.
3114 (finish_block_internal): Update.
3115
3116 2018-07-20 Tom Tromey <tom@tromey.com>
3117
3118 * buildsym.h (EXTERN): Don't define or undef.
3119 * buildsym.c (EXTERN): Don't define.
3120
3121 2018-07-20 Tom Tromey <tom@tromey.com>
3122
3123 * buildsym.c: Remove TODO comment.
3124
3125 2018-07-20 Tom Tromey <tom@tromey.com>
3126
3127 * coffread.c (coff_symtab_read): Update.
3128 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3129 (xcoff_new_init): Update.
3130 * mipsread.c (mipscoff_new_init): Update.
3131 * mdebugread.c (mdebug_build_psymtabs): Update.
3132 * elfread.c (elf_new_init): Update.
3133 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3134 Update.
3135 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3136 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3137 (stabsect_build_psymtabs): Update.
3138 * buildsym.h (buildsym_init): Don't declare.
3139 * buildsym.c: Update comment.
3140 (prepare_for_building): Remove.
3141 (start_symtab, restart_symtab): Update.
3142 (reset_symtab_globals): Update comment.
3143 (buildsym_init): Remove.
3144
3145 2018-07-20 Tom Tromey <tom@tromey.com>
3146
3147 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3148 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3149 (read_enum_type, common_block_start, common_block_end)
3150 (cleanup_undefined_types_1, finish_global_stabs): Update.
3151 * mdebugread.c (psymtab_to_symtab_1): Update.
3152 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3153 (read_lexical_block_scope, new_symbol): Update.
3154 * dbxread.c (process_one_symbol): Update.
3155 * coffread.c (coff_symtab_read, process_coff_symbol)
3156 (coff_read_enum_type): Update.
3157 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3158 declare.
3159 (get_local_symbols, get_file_symbols, get_global_symbols): New
3160 functions.
3161 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3162 m_global_symbols.
3163 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3164 (~scoped_free_pendings): Update.
3165 (finish_block, prepare_for_building, reset_symtab_globals)
3166 (end_symtab_get_static_block, end_symtab_with_blockvector)
3167 (augment_type_symtab, push_context): Update.
3168 (get_local_symbols, get_file_symbols, get_global_symbols): New
3169 functions.
3170 (buildsym_init): Update.
3171
3172 2018-07-20 Tom Tromey <tom@tromey.com>
3173
3174 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3175 (process_full_type_unit): Likewise.
3176 (dwarf2_start_symtab): Set list_in_scope.
3177
3178 2018-07-20 Tom Tromey <tom@tromey.com>
3179
3180 * dwarf2read.c (process_psymtab_comp_unit_reader)
3181 (build_type_psymtabs_reader): Do not set list_in_scope.
3182
3183 2018-07-20 Tom Tromey <tom@tromey.com>
3184
3185 * buildsym.c (free_pendings): Remove.
3186 (add_symbol_to_list, scoped_free_pendings)
3187 (finish_block_internal, buildsym_init): Update.
3188
3189 2018-07-20 Tom Tromey <tom@tromey.com>
3190
3191 * xcoffread.c (read_xcoff_symtab): Update.
3192 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3193 Update.
3194 * dbxread.c (process_one_symbol): Update.
3195 * coffread.c (coff_symtab_read): Update.
3196 * buildsym.h (finish_block): Update.
3197 * buildsym.c (finish_block): Remove "listhead" argument.
3198 (end_symtab_get_static_block): Update.
3199
3200 2018-07-20 Tom Tromey <tom@tromey.com>
3201
3202 * buildsym.h (class scoped_free_pendings): Remove constructor.
3203 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3204 method.
3205 <m_pending_block_obstack, m_pending_blocks>: New members.
3206 (pending_block_obstack, pending_blocks): Remove.
3207 (scoped_free_pendings::scoped_free_pendings): Default.
3208 (~scoped_free_pendings): Update.
3209 (free_pending_blocks): Remove.
3210 (finish_block_internal, record_pending_block, make_blockvector)
3211 (end_symtab_get_static_block, augment_type_symtab, push_context)
3212 (buildsym_init): Update.
3213
3214 2018-07-20 Tom Tromey <tom@tromey.com>
3215
3216 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3217 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3218 members.
3219 (pending_addrmap, pending_addrmap_obstack)
3220 (pending_addrmap_interesting): Remove.
3221 (scoped_free_pendings, record_block_range, make_blockvector)
3222 (prepare_for_building, reset_symtab_globals, buildsym_init):
3223 Update.
3224
3225 2018-07-20 Tom Tromey <tom@tromey.com>
3226
3227 * xcoffread.c (process_linenos): Update.
3228 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3229 * mdebugread.c (psymtab_to_symtab_1): Update.
3230 * dwarf2read.c (setup_type_unit_groups)
3231 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3232 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3233 * dbxread.c (process_one_symbol): Update.
3234 * coffread.c (coff_symtab_read, enter_linenos)
3235 (process_coff_symbol): Update.
3236 * buildsym.h (current_subfile): Don't declare.
3237 (get_current_subfile): Declare.
3238 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3239 member.
3240 (start_subfile, free_buildsym_compunit, push_subfile)
3241 (prepare_for_building, start_symtab): Update.
3242 (get_current_subfile): New function.
3243
3244 2018-07-20 Tom Tromey <tom@tromey.com>
3245
3246 * coffread.c (coff_symtab_read): Update.
3247 * xcoffread.c (read_xcoff_symtab): Update.
3248 * dwarf2read.c (new_symbol): Update.
3249 (read_func_scope, read_lexical_block_scope): Update.
3250 * dbxread.c (process_one_symbol): Update.
3251 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3252 (outermost_context_p): Remove macro.
3253 (outermost_context_p, get_current_context_stack)
3254 (get_context_stack_depth): Declare.
3255 (pop_context): Return struct context_stack.
3256 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3257 member.
3258 (context_stack_size): Remove.
3259 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3260 (prepare_for_building, end_symtab_get_static_block)
3261 (augment_type_symtab, push_context): Update.
3262 (pop_context): Return struct context_stack.
3263 (outermost_context_p, get_current_context_stack)
3264 (get_context_stack_depth): New functions.
3265 (buildsym_init): Update.
3266
3267 2018-07-20 Tom Tromey <tom@tromey.com>
3268
3269 * rust-exp.y: Now a pure parser. Update all rules.
3270 (%union): Move earlier.
3271 (current_parser, work_obstack): Remove globals.
3272 (rust_parser, ~rust_parser): Update.
3273 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3274 lex_character, lex_number, lex_string, lex_identifier,
3275 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3276 convert_name, convert_params_to_expression,
3277 convert_ast_to_expression, ast_basic_type, ast_operation,
3278 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3279 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3280 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3281 ast_array_type, ast_slice_type, ast_reference_type,
3282 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3283 (rust_parse): Update.
3284 (rustyyerror, rustyylex): Add parser parameter.
3285 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3286 (rust_lex_stringish_test, rust_lex_test_sequence)
3287 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3288 (rust_lex_test_push_back, rust_lex_tests): Update.
3289
3290 2018-07-19 Pedro Alves <palves@redhat.com>
3291
3292 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3293 gdb::unique_xmalloc_ptr.
3294 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3295 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3296 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3297 copy-initialization.
3298 * guile/scm-pretty-print.c (ppscm_print_children): Use
3299 gdb::unique_xmalloc_ptr instead of cleanups.
3300 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3301 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3302 gdb::unique_xmalloc_ptr.
3303 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3304 Adjust to use gdb::unique_xmalloc_ptr.
3305 * guile/scm-utils.c (extract_arg): Adjust.
3306 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3307 gdb::unique_xmalloc_ptr instead of a cleanup.
3308
3309 2018-07-19 Tom Tromey <tom@tromey.com>
3310
3311 * utils.c (do_value_free_to_mark)
3312 (make_cleanup_value_free_to_mark): Remove.
3313 * utils.h (make_cleanup_value_free_to_mark): Remove.
3314
3315 2018-07-19 Pedro Alves <palves@redhat.com>
3316
3317 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3318 forwarding reference.
3319
3320 2018-07-18 Pedro Alves <palves@redhat.com>
3321
3322 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3323 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3324 cleanup.
3325
3326 2018-07-18 Pedro Alves <palves@redhat.com>
3327
3328 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3329 exceptions.
3330 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3331 (gdbscm_wrap): New.
3332 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3333 directly instead of a cleanup.
3334 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3335 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3336 (vlscm_binop_gdbthrow): New, factored out from ...
3337 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3338 (vlscm_rich_compare): Use gdbscm_wrap.
3339 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3340 instead of a cleanup.
3341 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3342 cleanup.
3343 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3344 Use xfree directly instead of a cleanup.
3345 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3346 Adjust to use gdbscm_wrap and scoped_value_mark.
3347 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3348 (gdbscm_value_address, gdbscm_value_dereference)
3349 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3350 scoped_value_mark.
3351 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3352 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3353 scoped_value_mark.
3354 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3355 gdbscm_wrap and scoped_value_mark.
3356 (gdbscm_value_to_string): Use xfree directly instead of a
3357 cleanup. Move 'buffer' unique_ptr to TRY scope.
3358 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3359 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3360 scoped_value_mark.
3361 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3362 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3363 scoped_value_mark.
3364 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3365 gdbscm_wrap.
3366
3367 2018-07-18 Tom de Vries <tdevries@suse.de>
3368
3369 * findvar.c (default_read_var_value): Also resolve dynamic type for
3370 LOC_OPTIMIZED_OUT vars.
3371
3372 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3373
3374 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3375 decoding.
3376
3377 2018-07-17 Tom Tromey <tom@tromey.com>
3378
3379 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3380 (compute_enum_list, pascm_set_param_value_x)
3381 (gdbscm_parameter_value): Update.
3382 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3383 (gdbscm_scm_to_host_string): Update.
3384 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3385 Update.
3386 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3387 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3388 * guile/scm-string.c (gdbscm_scm_to_string): Return
3389 unique_xmalloc_ptr.
3390 (gdbscm_scm_to_host_string): Likewise.
3391
3392 2018-07-17 Tom Tromey <tom@tromey.com>
3393
3394 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3395 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3396 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3397 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3398 unique_xmalloc_ptr.
3399
3400 2018-07-17 Tom Tromey <tom@tromey.com>
3401
3402 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3403 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3404 Update.
3405 * guile/scm-cmd.c (cmdscm_function): Update.
3406 * guile/scm-pretty-print.c
3407 (ppscm_print_exception_unless_memory_error): Update.
3408 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3409 Return unique_xmalloc_ptr.
3410
3411 2018-07-17 Tom Tromey <tom@tromey.com>
3412
3413 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3414 Use string_printf.
3415
3416 2018-07-17 Jim Wilson <jimw@sifive.com>
3417
3418 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3419 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3420 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3421 unecessary braces after EF_RISCV_RVC test. Delete call to
3422 set_gdbarch_decr_pc_after_break.
3423
3424 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3425 RISCV_LAST_FP_REGNUM + 1.
3426 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3427
3428 2018-07-17 Tom Tromey <tom@tromey.com>
3429
3430 * configure.ac: Remove --disable-gdbcli.
3431 * configure: Rebuild.
3432 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3433 (SUBDIR_CLI_CFLAGS): Remove.
3434 (SFILES): Use SUBDIR_CLI_SRCS.
3435 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3436
3437 2018-07-17 Tom Tromey <tom@tromey.com>
3438
3439 PR gdb/18624:
3440 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3441
3442 2018-07-16 Jim Wilson <jimw@sifive.com>
3443
3444 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3445
3446 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3447
3448 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3449 variable.
3450 (libunwind_frame_sniffer): Likewise.
3451 (libunwind_frame_prev_register): Likewise.
3452 (libunwind_sigtramp_frame_sniffer): Likewise.
3453 * ia64-tdep.c (ia64_access_reg): Likewise.
3454 (ia64_access_rse_reg): Likewise.
3455 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3456 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3457
3458 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3459
3460 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3461
3462 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3463
3464 * remote-sim.c (gdbsim_target::close,
3465 gdbsim_target::mourn_inferior): Remove unused variables.
3466
3467 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3468
3469 * ia64-tdep.c (ktab_buf): New global.
3470 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3471 (get_kernel_table): Adjust.
3472
3473 2018-07-16 Tom Tromey <tom@tromey.com>
3474
3475 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3476 * dwarf2read.c (using_directives, new_symbol): Use
3477 outermost_context_p.
3478 * dbxread.c (process_one_symbol): Use outermost_context_p.
3479 * coffread.c (coff_symtab_read): Use outermost_context_p.
3480
3481 2018-07-16 Tom Tromey <tom@tromey.com>
3482
3483 * dwarf2read.c (using_directives, read_func_scope)
3484 (read_lexical_block_scope): Update.
3485 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3486 * buildsym.h (local_using_directives, global_using_directives):
3487 Don't declare.
3488 (get_local_using_directives, set_local_using_directives)
3489 (get_global_using_directives): Declare.
3490 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3491 m_global_using_directives>: New members.
3492 (finish_block_internal, prepare_for_building)
3493 (reset_symtab_globals, end_symtab_get_static_block)
3494 (push_context): Update.
3495 (get_local_using_directives, set_local_using_directives)
3496 (get_global_using_directives): New functions.
3497 (buildsym_init): Update.
3498
3499 2018-07-16 Tom Tromey <tom@tromey.com>
3500
3501 * xcoffread.c (xcoff_initial_scan): Don't call
3502 free_pending_blocks.
3503 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3504 * buildsym.h (class scoped_free_pendings): Add constructor.
3505 (free_pending_blocks): Don't declare.
3506 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3507 (free_pending_blocks): Now static.
3508
3509 2018-07-16 Tom Tromey <tom@tromey.com>
3510
3511 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3512 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3513 member.
3514 (struct subfile_stack): Remove.
3515 (subfile_stack): Remove.
3516 (push_subfile, pop_subfile, buildsym_init): Update.
3517
3518 2018-07-16 Tom Tromey <tom@tromey.com>
3519
3520 * buildsym.c (push_subfile): Use gdb_assert.
3521 (pop_subfile): Use gdb_assert.
3522
3523 2018-07-16 Tom Tromey <tom@tromey.com>
3524
3525 * buildsym.h (merge_symbol_lists): Remove.
3526 * buildsym.c (merge_symbol_lists): Remove.
3527
3528 2018-07-16 Tom Tromey <tom@tromey.com>
3529
3530 * stabsread.c (scan_file_globals): Update comment.
3531 * stabsread.h (scan_file_globals): Move from buildsym.h.
3532 * buildsym.h (scan_file_globals): Move to stabsread.h.
3533
3534 2018-07-16 Tom Tromey <tom@tromey.com>
3535
3536 * xcoffread.c (xcoff_new_init): Update.
3537 * mipsread.c (mipscoff_new_init): Update.
3538 * mdebugread.c (mdebug_build_psymtabs): Update.
3539 * elfread.c (elf_new_init): Update.
3540 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3541 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3542 * buildsym.h (buildsym_new_init): Don't declare.
3543 * buildsym.c (buildsym_new_init): Remove.
3544
3545 2018-07-16 Tom Tromey <tom@tromey.com>
3546
3547 * stabsread.h (within_function): Move from buildsym.h.
3548 * stabsread.c (start_stabs): Clear within_function.
3549 * coffread.c (coff_start_symtab): Clear within_function.
3550 * buildsym.h (within_function): Move to stabsread.h.
3551 * buildsym.c (prepare_for_building): Update.
3552
3553 2018-07-16 Tom Tromey <tom@tromey.com>
3554
3555 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3556 * dwarf2read.c (dwarf2_start_symtab): Don't set
3557 processing_gcc_compilation.
3558 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3559
3560 2018-07-16 Tom Tromey <tom@tromey.com>
3561
3562 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3563 (next_symbol_text_func): Move from buildsym.h.
3564 * stabsread.c (hashname): Move from buildsym.c.
3565 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3566 (next_symbol_text_func, hashname): Move to stabsread.h.
3567 * buildsym.c: Don't include bcache.h
3568 (hashname): Move to stasbread.c.
3569
3570 2018-07-16 Tom Tromey <tom@tromey.com>
3571
3572 * buildsym.h (context_stack_size): Don't declare.
3573 * buildsym.c (context_stack_size): New global.
3574
3575 2018-07-16 Tom Tromey <tom@tromey.com>
3576
3577 * dbxread.c (processing_acc_compilation): New global.
3578 * buildsym.h (processing_acc_compilation): Don't declare.
3579
3580 2018-07-16 Tom Tromey <tom@tromey.com>
3581
3582 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3583 * dbxread.c (read_ofile_symtab): Update.
3584 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3585 * buildsym.h (last_source_start_addr): Remove.
3586 (set_last_source_start_addr, get_last_source_start_addr):
3587 Declare.
3588 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3589 parameter.
3590 (struct buildsym_compunit) <m_last_source_start_addr>: New
3591 member.
3592 (prepare_for_building): Remove start_addr parameter.
3593 (start_symtab, restart_symtab, end_symtab_get_static_block)
3594 (end_symtab_with_blockvector): Update.
3595 (set_last_source_start_addr, get_last_source_start_addr): New
3596 functions.
3597
3598 2018-07-16 Tom Tromey <tom@tromey.com>
3599
3600 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3601 member.
3602 (have_line_numbers): Remove.
3603 (record_line, prepare_for_building, end_symtab_get_static_block)
3604 (augment_type_symtab): Update.
3605
3606 2018-07-16 Tom Tromey <tom@tromey.com>
3607
3608 * buildsym.c (~buildsym_compunit): Free the macro table.
3609 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3610 methods.
3611 <m_pending_macros>: New member.
3612 (pending_macros): Remove.
3613 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3614 (reset_symtab_globals, end_symtab_get_static_block)
3615 (end_symtab_with_blockvector, augment_type_symtab)
3616 (buildsym_init): Update.
3617
3618 2018-07-16 Tom Tromey <tom@tromey.com>
3619
3620 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3621 parameter.
3622 (buildsym_compunit::set_last_source_file): New method.
3623 <m_last_source_file>: New member.
3624 (prepare_for_building): Remove "name" parameter.
3625 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3626 (last_source_file): Remove.
3627 (set_last_source_file, get_last_source_file): Update.
3628
3629 2018-07-16 Tom Tromey <tom@tromey.com>
3630
3631 * buildsym.c (prepare_for_building): Add assert.
3632
3633 2018-07-16 Tom Tromey <tom@tromey.com>
3634
3635 * buildsym.c (~buildsym_compunit): Update.
3636 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3637 (start_subfile, patch_subfile_names)
3638 (end_symtab_with_blockvector): Update.
3639
3640 2018-07-16 Tom Tromey <tom@tromey.com>
3641
3642 * buildsym.c (struct buildsym_compunit): Add constructor,
3643 destructor, initializers.
3644 (start_buildsym_compunit): Remove.
3645 (free_buildsym_compunit): Use "delete".
3646 (start_symtab, restart_symtab): Use "new".
3647
3648 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
3649
3650 * symfile.c (set_objfile_default_section_offset): Remove struct
3651 keyword.
3652
3653 2018-07-14 Stafford Horne <shorne@gmail.com>
3654
3655 * (Responsible Maintainers): Add myself as or1k maintainer.
3656
3657 2018-07-13 Tom Tromey <tom@tromey.com>
3658
3659 * symfile.c (set_objfile_default_section_offset): Use extra braces
3660 around initializer.
3661
3662 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3663
3664 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3665 non-branching basr.
3666
3667 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3668
3669 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3670 unittests/cli-utils-selftests.c
3671 * unittests/cli-utils-selftests.c: New file.
3672
3673 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3674
3675 * NEWS: Mention new commands. Mention change to 'thread apply'.
3676
3677 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3678
3679 * thread.c (thr_try_catch_cmd): New function.
3680 (thread_apply_all_command): Handle qcs flags.
3681 (thread_apply_command): Handle qcs flags.
3682 (taas_command): New function.
3683 (tfaas_command): New function.
3684 (_initialize_thread): Update to setup the new commands 'taas
3685 and 'tfaas'. Change doc string for 'thread apply'.
3686
3687 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3688
3689 * stack.c: (trailing_outermost_frame): New function, mostly
3690 extracted from backtrace_command_1.
3691 (leading_innermost_frame): New function.
3692 (backtrace_command_1): Update to call trailing_outermost_frame.
3693 (frame_apply_command_count): New function.
3694 (frame_apply_level_command): New function.
3695 (frame_apply_all_command): New function.
3696 (frame_apply_command): New function.
3697 (faas_command): New function.
3698 (frame_cmd_list): New variable.
3699 (_initialize_stack): Update to setup the new commands 'frame apply'
3700 and 'faas'.
3701
3702 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3703
3704 * cli-utils.c (number_or_range_parser::get_number): Only handle
3705 numbers or convenience var as numbers.
3706 (parse_flags): New function.
3707 (parse_flags_qcs): New function.
3708 (number_or_range_parser::finished): Ensure parsing end is detected
3709 before end of string.
3710 * cli-utils.h (parse_flags): New function.
3711 (parse_flags_qcs): New function.
3712 (number_or_range_parser): Remove m_finished bool.
3713 (number_or_range_parser::skip_range): Set m_in_range to false.
3714
3715 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
3716
3717 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3718 on Windows.
3719
3720 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3721 Jan Kratochvil <jan.kratochvil@redhat.com>
3722 Paul Fertser <fercerpav@gmail.com>
3723 Tsutomu Seki <sekiriki@gmail.com>
3724 Pedro Alves <palves@redhat.com>
3725
3726 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3727 'unittests/parse-connection-spec-selftests.c'.
3728 (COMMON_SFILES): Add 'common/netstuff.c'.
3729 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3730 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3731 * common/netstuff.c: New file.
3732 * common/netstuff.h: New file.
3733 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3734 (wait_for_connect): Update comment. New parameter
3735 'gdb::optional<int> sock' instead of 'struct serial *scb'.
3736 Use 'sock' directly instead of 'scb->fd'.
3737 (try_connect): New function, with code from 'net_open'.
3738 (net_open): Rewrite main loop to deal with multiple
3739 sockets/addresses. Handle IPv6-style hostnames; implement
3740 support for IPv6 connections.
3741 * unittests/parse-connection-spec-selftests.c: New file.
3742
3743 2018-07-11 Pedro Alves <palves@redhat.com>
3744
3745 PR gdb/23377
3746 * remote.c (remote_target::remote_detach_pid): Call
3747 set_current_process.
3748
3749 2018-07-11 Pedro Alves <palves@redhat.com>
3750
3751 * h8300-tdep.c (h8300_gdbarch_init): Remove
3752 set_gdbarch_ecoff_reg_to_regnum calls.
3753
3754 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3755
3756 PR c++/23373
3757 * c-typeprint.c (c_type_print_base_struct_union): Don't print
3758 offsets/sizes for static members of a class/struct.
3759
3760 2018-07-11 Alan Hayward <alan.hayward@arm.com>
3761
3762 * target-descriptions.c (tdesc_register_bitsize): Rename.
3763 * target-descriptions.h (tdesc_register_bitsize): Likewise.
3764 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3765 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3766
3767 2018-07-10 Tom Tromey <tom@tromey.com>
3768
3769 * breakpoint.c (moribund_locations): Now static and a
3770 std::vector.
3771 (breakpoint_init_inferior, moribund_breakpoint_here_p)
3772 (build_bpstat_chain, update_global_location_list)
3773 (breakpoint_retire_moribund): Update.
3774 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
3775 VEC.
3776
3777 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3778
3779 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3780 (riscv_register_reggroup_p): Use new function, remove unneeded
3781 parenthesis.
3782 (riscv_push_dummy_call): Extend assert to compare against xlen or
3783 flen based on register type.
3784
3785 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3786
3787 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3788
3789 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
3790
3791 * remote.c (show_hardware_watchpoint_limit): New function.
3792 (show_hardware_watchpoint_length_limit): New function.
3793 (show_hardware_breakpoint_limit): New function.
3794 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3795 where appropriate, update help text.
3796
3797 2018-07-09 Tom Tromey <tom@tromey.com>
3798
3799 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3800 (CLIBS): Don't mention NAT_CLIBS.
3801
3802 2018-07-09 Tom Tromey <tom@tromey.com>
3803
3804 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3805 (LIBGDB_OBS, clean mostlyclean): Update.
3806 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3807
3808 2018-07-09 Tom Tromey <tom@tromey.com>
3809
3810 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3811 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3812 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3813
3814 2018-07-09 Tom Tromey <tom@tromey.com>
3815
3816 * Makefile.in (ALLDEPFILES): Remove exec.c.
3817 (COMMON_OBS): Remove exec.o.
3818 (COMMON_SFILES): Add exec.c.
3819
3820 2018-07-09 Tom Tromey <tom@tromey.com>
3821
3822 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3823
3824 2018-07-09 Tom Tromey <tom@tromey.com>
3825
3826 * Makefile.in (clean mostlyclean): Remove stamp-version.
3827 (version.c): Depend on stamp-version.
3828 (stamp-version): New rule, from version.c rule.
3829
3830 2018-07-09 Tom Tromey <tom@tromey.com>
3831
3832 * Makefile.in (init.c): Depend on stamp-init.
3833 (stamp-init): New rule, from init.c rule.
3834 (clean mostlyclean): Remove stamp-init.
3835
3836 2018-07-09 Tom Tromey <tom@tromey.com>
3837
3838 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3839 SUBDIR_GCC_COMPILE_SRCS.
3840
3841 2018-07-09 Tom Tromey <tom@tromey.com>
3842
3843 * Makefile.in (init.c): Remove some unused sed rules.
3844
3845 2018-07-09 Tom Tromey <tom@tromey.com>
3846
3847 * Makefile.in (TSOBS): Remove.
3848 (INIT_FILES): Update.
3849 (LIBGDB_OBS): Update.
3850 (COMMON_SFILES): Add inflow.c.
3851 (SFILES): Remove inflow.c.
3852
3853 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3854
3855 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3856
3857 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3858
3859 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3860 get_saveloc_name, is_signal_frame_name, step_name,
3861 init_remote_name, create_addr_space_name,
3862 destroy_addr_space_name, search_unwind_table_name,
3863 find_dyn_list_name): Constify.
3864
3865 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3866
3867 * darwin-nat.c (darwin_pthread_kill): New function.
3868 (darwin_resume_thread): Use darwin_pthread_kill.
3869
3870 2018-07-05 Tom de Vries <tdevries@suse.de>
3871
3872 * macroexp.c (macro_buffer) <operator=>: New member function.
3873
3874 2018-07-04 Tom Tromey <tom@tromey.com>
3875
3876 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3877
3878 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3879
3880 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3881 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3882 * maint.c: Likewise.
3883 * top.c: Likewise.
3884
3885 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3886
3887 * NEWS: Create a new section for the next release branch.
3888 Rename the section of the current branch, now that it has
3889 been cut.
3890
3891 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3892
3893 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3894 * version.in: Bump version to 8.2.50.DATE-git.
3895
3896 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3897 Pedro Alves <palves@redhat.com>
3898
3899 * linux-nat.c (linux_init_ptrace): Rename to ...
3900 (linux_init_ptrace_procfs): ... this. Call
3901 linux_proc_init_warnings.
3902 (linux_nat_target::post_attach)
3903 (linux_nat_target::post_startup_inferior): Adjust.
3904 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3905 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3906
3907 2018-07-04 Tom de Vries <tdevries@suse.de>
3908
3909 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3910 check ...
3911 (read_comp_unit_head): ... here.
3912
3913 2018-07-03 Tom Tromey <tom@tromey.com>
3914
3915 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3916 (stop_tracing, tstatus_command)
3917 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3918 (print_one_static_tracepoint_marker): Update.
3919 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3920 std::vector.
3921 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3922 VEC.
3923 (all_tracepoints, static_tracepoints_here): Return std::vector.
3924
3925 2018-07-03 Tom Tromey <tom@tromey.com>
3926
3927 * common/ptid.c (ptid_equal): Remove.
3928 * common/ptid.h (ptid_equal): Don't declare.
3929 * ada-tasks.c: Update.
3930 * breakpoint.c: Update.
3931 * common/agent.c: Update.
3932 * corelow.c: Update.
3933 * darwin-nat-info.c: Update.
3934 * darwin-nat.c: Update.
3935 * dcache.c: Update.
3936 * dtrace-probe.c: Update.
3937 * dummy-frame.c: Update.
3938 * fbsd-nat.c: Update.
3939 * frame.c: Update.
3940 * gdbthread.h: Update.
3941 * gnu-nat.c: Update.
3942 * go32-nat.c: Update.
3943 * inf-loop.c: Update.
3944 * inf-ptrace.c: Update.
3945 * infcall.c: Update.
3946 * infcmd.c: Update.
3947 * inflow.c: Update.
3948 * infrun.c: Update.
3949 * linux-fork.c: Update.
3950 * linux-nat.c: Update.
3951 * linux-thread-db.c: Update.
3952 * mi/mi-cmd-var.c: Update.
3953 * mi/mi-interp.c: Update.
3954 * mi/mi-main.c: Update.
3955 * nto-procfs.c: Update.
3956 * ppc-linux-tdep.c: Update.
3957 * procfs.c: Update.
3958 * python/py-inferior.c: Update.
3959 * python/py-record-btrace.c: Update.
3960 * python/py-record.c: Update.
3961 * ravenscar-thread.c: Update.
3962 * regcache.c: Update.
3963 * remote-sim.c: Update.
3964 * remote.c: Update.
3965 * sol-thread.c: Update.
3966 * solib.c: Update.
3967 * target.c: Update.
3968 * tui/tui-stack.c: Update.
3969 * varobj.c: Update.
3970 * windows-nat.c: Update.
3971 * windows-tdep.c: Update.
3972
3973 2018-07-03 Tom Tromey <tom@tromey.com>
3974
3975 * common/ptid.c (ptid_match): Remove.
3976 * common/ptid.h (ptid_match): Don't declare.
3977 * fbsd-nat.c: Update.
3978 * infcmd.c: Update.
3979 * infrun.c: Update.
3980 * linux-nat.c: Update.
3981 * record-btrace.c: Update.
3982 * regcache.c: Update.
3983 * remote.c: Update.
3984
3985 2018-07-03 Tom Tromey <tom@tromey.com>
3986
3987 * common/ptid.c (ptid_tid_p): Remove.
3988 * common/ptid.h (ptid_tid_p): Don't declare.
3989 * sol-thread.c: Update.
3990
3991 2018-07-03 Tom Tromey <tom@tromey.com>
3992
3993 * common/ptid.c (ptid_lwp_p): Remove.
3994 * common/ptid.h (ptid_lwp_p): Don't declare.
3995 * fbsd-nat.c: Update.
3996 * linux-nat.c: Update.
3997 * nat/linux-procfs.c: Update.
3998 * nat/x86-linux-dregs.c: Update.
3999 * sol-thread.c: Update.
4000
4001 2018-07-03 Tom Tromey <tom@tromey.com>
4002
4003 * common/ptid.c (ptid_is_pid): Remove.
4004 * common/ptid.h (ptid_is_pid): Don't declare.
4005 * infrun.c: Update.
4006 * linux-nat.c: Update.
4007 * mi/mi-interp.c: Update.
4008 * remote.c: Update.
4009 * thread.c: Update.
4010
4011 2018-07-03 Tom Tromey <tom@tromey.com>
4012
4013 * common/ptid.c (ptid_get_tid): Remove.
4014 * common/ptid.h (ptid_get_tid): Don't declare.
4015 * ada-tasks.c: Update.
4016 * aix-thread.c: Update.
4017 * bsd-uthread.c: Update.
4018 * darwin-nat.c: Update.
4019 * fbsd-nat.c: Update.
4020 * i386-darwin-nat.c: Update.
4021 * infrun.c: Update.
4022 * linux-tdep.c: Update.
4023 * nto-procfs.c: Update.
4024 * ppc-ravenscar-thread.c: Update.
4025 * python/py-infthread.c: Update.
4026 * ravenscar-thread.c: Update.
4027 * sol-thread.c: Update.
4028 * sparc-ravenscar-thread.c: Update.
4029 * windows-nat.c: Update.
4030
4031 2018-07-03 Tom Tromey <tom@tromey.com>
4032
4033 * common/ptid.c (ptid_get_lwp): Remove.
4034 * common/ptid.h (ptid_get_lwp): Don't declare.
4035 * aarch64-linux-nat.c: Update.
4036 * ada-tasks.c: Update.
4037 * aix-thread.c: Update.
4038 * amd64-linux-nat.c: Update.
4039 * arm-linux-nat.c: Update.
4040 * corelow.c: Update.
4041 * fbsd-nat.c: Update.
4042 * fbsd-tdep.c: Update.
4043 * gnu-nat.c: Update.
4044 * i386-cygwin-tdep.c: Update.
4045 * i386-gnu-nat.c: Update.
4046 * i386-linux-nat.c: Update.
4047 * ia64-linux-nat.c: Update.
4048 * inf-ptrace.c: Update.
4049 * infrun.c: Update.
4050 * linux-fork.c: Update.
4051 * linux-nat.c: Update.
4052 * linux-tdep.c: Update.
4053 * linux-thread-db.c: Update.
4054 * mips-linux-nat.c: Update.
4055 * nat/aarch64-linux-hw-point.c: Update.
4056 * nat/aarch64-linux.c: Update.
4057 * nat/linux-btrace.c: Update.
4058 * nat/linux-osdata.c: Update.
4059 * nat/linux-procfs.c: Update.
4060 * nat/x86-linux-dregs.c: Update.
4061 * obsd-nat.c: Update.
4062 * ppc-fbsd-nat.c: Update.
4063 * ppc-linux-nat.c: Update.
4064 * procfs.c: Update.
4065 * python/py-infthread.c: Update.
4066 * ravenscar-thread.c: Update.
4067 * remote.c: Update.
4068 * s390-linux-nat.c: Update.
4069 * sol-thread.c: Update.
4070 * sol2-tdep.c: Update.
4071 * spu-linux-nat.c: Update.
4072 * x86-linux-nat.c: Update.
4073 * xtensa-linux-nat.c: Update.
4074
4075 2018-07-03 Tom Tromey <tom@tromey.com>
4076
4077 * common/ptid.c (ptid_get_pid): Remove.
4078 * common/ptid.h (ptid_get_pid): Don't declare.
4079 * aarch64-linux-nat.c: Update.
4080 * ada-lang.c: Update.
4081 * aix-thread.c: Update.
4082 * alpha-bsd-nat.c: Update.
4083 * amd64-fbsd-nat.c: Update.
4084 * amd64-linux-nat.c: Update.
4085 * arm-linux-nat.c: Update.
4086 * arm-nbsd-nat.c: Update.
4087 * auxv.c: Update.
4088 * break-catch-syscall.c: Update.
4089 * breakpoint.c: Update.
4090 * bsd-uthread.c: Update.
4091 * corelow.c: Update.
4092 * ctf.c: Update.
4093 * darwin-nat.c: Update.
4094 * fbsd-nat.c: Update.
4095 * fbsd-tdep.c: Update.
4096 * gcore.c: Update.
4097 * gnu-nat.c: Update.
4098 * hppa-nbsd-nat.c: Update.
4099 * hppa-obsd-nat.c: Update.
4100 * i386-fbsd-nat.c: Update.
4101 * ia64-linux-nat.c: Update.
4102 * inf-ptrace.c: Update.
4103 * infcmd.c: Update.
4104 * inferior.c: Update.
4105 * inferior.h: Update.
4106 * inflow.c: Update.
4107 * infrun.c: Update.
4108 * linux-fork.c: Update.
4109 * linux-nat.c: Update.
4110 * linux-tdep.c: Update.
4111 * linux-thread-db.c: Update.
4112 * m68k-bsd-nat.c: Update.
4113 * mi/mi-interp.c: Update.
4114 * mi/mi-main.c: Update.
4115 * mips-linux-nat.c: Update.
4116 * mips-nbsd-nat.c: Update.
4117 * mips64-obsd-nat.c: Update.
4118 * nat/aarch64-linux-hw-point.c: Update.
4119 * nat/aarch64-linux.c: Update.
4120 * nat/linux-btrace.c: Update.
4121 * nat/linux-osdata.c: Update.
4122 * nat/linux-procfs.c: Update.
4123 * nat/x86-linux-dregs.c: Update.
4124 * nto-procfs.c: Update.
4125 * obsd-nat.c: Update.
4126 * ppc-linux-nat.c: Update.
4127 * ppc-nbsd-nat.c: Update.
4128 * ppc-obsd-nat.c: Update.
4129 * proc-service.c: Update.
4130 * procfs.c: Update.
4131 * python/py-inferior.c: Update.
4132 * python/py-infthread.c: Update.
4133 * ravenscar-thread.c: Update.
4134 * record.c: Update.
4135 * remote-sim.c: Update.
4136 * remote.c: Update.
4137 * rs6000-nat.c: Update.
4138 * s390-linux-nat.c: Update.
4139 * sh-nbsd-nat.c: Update.
4140 * sol-thread.c: Update.
4141 * sparc-nat.c: Update.
4142 * sparc64-tdep.c: Update.
4143 * spu-linux-nat.c: Update.
4144 * spu-tdep.c: Update.
4145 * target-debug.h: Update.
4146 * target.c: Update.
4147 * thread.c: Update.
4148 * tid-parse.c: Update.
4149 * tracefile-tfile.c: Update.
4150 * vax-bsd-nat.c: Update.
4151 * windows-nat.c: Update.
4152 * x86-linux-nat.c: Update.
4153 * x86-nat.c: Update.
4154
4155 2018-07-03 Tom Tromey <tom@tromey.com>
4156
4157 * common/ptid.c (pid_to_ptid): Remove.
4158 * common/ptid.h (pid_to_ptid): Don't declare.
4159 * aix-thread.c: Update.
4160 * arm-linux-nat.c: Update.
4161 * common/ptid.c: Update.
4162 * common/ptid.h: Update.
4163 * corelow.c: Update.
4164 * ctf.c: Update.
4165 * darwin-nat.c: Update.
4166 * fbsd-nat.c: Update.
4167 * fork-child.c: Update.
4168 * gnu-nat.c: Update.
4169 * go32-nat.c: Update.
4170 * inf-ptrace.c: Update.
4171 * infcmd.c: Update.
4172 * inferior.c: Update.
4173 * infrun.c: Update.
4174 * linux-fork.c: Update.
4175 * linux-nat.c: Update.
4176 * nat/aarch64-linux-hw-point.c: Update.
4177 * nat/fork-inferior.c: Update.
4178 * nat/x86-linux-dregs.c: Update.
4179 * nto-procfs.c: Update.
4180 * obsd-nat.c: Update.
4181 * procfs.c: Update.
4182 * progspace.c: Update.
4183 * remote.c: Update.
4184 * rs6000-nat.c: Update.
4185 * s390-linux-nat.c: Update.
4186 * sol-thread.c: Update.
4187 * spu-linux-nat.c: Update.
4188 * target.c: Update.
4189 * top.c: Update.
4190 * tracefile-tfile.c: Update.
4191 * windows-nat.c: Update.
4192
4193 2018-07-03 Tom Tromey <tom@tromey.com>
4194
4195 * common/ptid.h (ptid_build): Don't declare.
4196 * common/ptid.c (ptid_build): Remove.
4197 * aix-thread.c: Update.
4198 * bsd-kvm.c: Update.
4199 * bsd-uthread.c: Update.
4200 * common/agent.c: Update.
4201 * common/ptid.c: Update.
4202 * common/ptid.h: Update.
4203 * corelow.c: Update.
4204 * darwin-nat.c: Update.
4205 * fbsd-nat.c: Update.
4206 * gnu-nat.c: Update.
4207 * linux-fork.c: Update.
4208 * linux-nat.c: Update.
4209 * linux-thread-db.c: Update.
4210 * nat/linux-osdata.c: Update.
4211 * nat/linux-procfs.c: Update.
4212 * nto-procfs.c: Update.
4213 * obsd-nat.c: Update.
4214 * proc-service.c: Update.
4215 * procfs.c: Update.
4216 * ravenscar-thread.c: Update.
4217 * remote-sim.c: Update.
4218 * remote.c: Update.
4219 * sol-thread.c: Update.
4220 * target.c: Update.
4221 * windows-nat.c: Update.
4222
4223 2018-07-03 Tom Tromey <tom@tromey.com>
4224
4225 * infrun.c (follow_exec): Use exit_inferior_silent.
4226 * inferior.c (exit_inferior_num_silent): Remove.
4227 * inferior.h (exit_inferior_num_silent): Don't declare.
4228
4229 2018-07-03 Tom Tromey <tom@tromey.com>
4230
4231 PR cli/23340:
4232 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4233 inferior_ptid on error.
4234
4235 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4236 Simon Marchi <simon.marchi@polymtl.ca>
4237
4238 PR tdep/8282
4239 * disasm.h (gdb_disassembler): Add
4240 `m_disassembler_options_holder'. member
4241 * disasm.c (get_all_disassembler_options): New function.
4242 (gdb_disassembler::gdb_disassembler): Use it.
4243 (gdb_buffered_insn_length_init_dis): Likewise.
4244 (gdb_buffered_insn_length): Adjust accordingly.
4245 (set_disassembler_options): Handle options with arguments.
4246 (show_disassembler_options_sfunc): Likewise. Add a leading new
4247 line if showing options with descriptions.
4248 (disassembler_options_completer): Adapt to using the
4249 `disasm_options_and_args_t' structure.
4250 * mips-tdep.c (mips_disassembler_options): New variable.
4251 (mips_disassembler_options_o32): Likewise.
4252 (mips_disassembler_options_n32): Likewise.
4253 (mips_disassembler_options_n64): Likewise.
4254 (gdb_print_insn_mips): Don't set `disassembler_options'.
4255 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4256 functions.
4257 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4258 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4259 `gdbarch_disassembler_options_implicit' and
4260 `gdbarch_valid_disassembler_options'.
4261 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4262 `disasm_options_and_args_t' structure.
4263 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4264 method.
4265 (valid_disassembler_options): Switch from `disasm_options_t' to
4266 the `disasm_options_and_args_t' structure.
4267 * NEWS: Document `set disassembler-options' support for the MIPS
4268 target.
4269 * gdbarch.h: Regenerate.
4270 * gdbarch.c: Regenerate.
4271
4272 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4273
4274 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4275
4276 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4277
4278 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4279 parameter in call to amd64_target_description.
4280 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4281 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4282 (amd64fbsd_init_abi): Likewise.
4283 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4284 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4285 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4286 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4287
4288 2018-06-29 Pedro Alves <palves@redhat.com>
4289
4290 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4291 "segments" parameter.
4292 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4293 (_initialize_amd64_tdep): Update call to
4294 amd64_create_target_description.
4295 (amd64_target_description): Add "segments" parameter. Adjust
4296 the implementation to use it.
4297 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4298 call to amd64_create_target_description.
4299 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4300 * gdb/arch/amd64.h (amd64_create_target_description): Add
4301 "segments" register.
4302 * gdb/arch/amd64.c (amd64_create_target_description): Add
4303 "segments" parameter. Call create_feature_i386_64bit_segments
4304 only if SEGMENTS is true.
4305 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4306 call to amd64_create_target_description.
4307
4308 2018-06-29 Pedro Alves <palves@redhat.com>
4309
4310 * thread.c (thread_target_id_str): New, factored out from ...
4311 (print_thread_info_1): ... here. Use it to compute the max
4312 "Target Id" column width.
4313
4314 2018-06-29 Pedro Alves <palves@redhat.com>
4315
4316 * remote.c (remote_target::extra_thread_info): Delete
4317 'display_buf' and 'n' locals. from the cache, regardless of
4318 packet mechanims is in use. Use cache for qThreadExtra and qP
4319 methods too.
4320
4321 2018-06-29 Pedro Alves <palves@redhat.com>
4322
4323 * blockframe.c (find_pc_sect_containing_function): New function.
4324 * breakpoint.c (print_breakpoint_location): Don't call
4325 find_pc_sect_function.
4326 * linespec.c (create_sals_line_offset): Record the location's
4327 symbol in the sal.
4328 * linespec.c (convert_address_location_to_sals): Fill in sal's
4329 symbol with find_pc_sect_containing_function.
4330 * symtab.c (find_function_start_sal): Rename to ...
4331 (find_function_start_sal_1): ... this.
4332 (find_function_start_sal): Reimplement as wrapper around
4333 find_function_start_sal_1, and use
4334 find_pc_sect_containing_function to fill in the sal's symbol.
4335 (find_function_start_sal(symbol*, bool)): Adjust.
4336 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4337 comments.
4338 (find_pc_sect_containing_function): Declare.
4339
4340 2018-06-29 Pedro Alves <palves@redhat.com>
4341
4342 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4343 true if the the location has no symbol.
4344
4345 2018-06-28 Tom Tromey <tom@tromey.com>
4346
4347 * NEWS: Mention --enable-codesign.
4348 * silent-rules.mk (ECHO_SIGN): New variable.
4349 * configure.ac: Add --enable-codesign.
4350 * configure: Rebuild.
4351 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4352 (gdb$(EXEEXT)): Optionally invoke codesign.
4353
4354 2018-06-28 Pedro Alves <palves@redhat.com>
4355
4356 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4357 comments.
4358 (switch_to_thread_no_regs): Adjust comment.
4359 * infcmd.c (stop_pc): Delete.
4360 (post_create_inferior, info_program_command): Replace references
4361 to stop_pc with references to thread_info->suspend.stop_pc.
4362 * inferior.h (stop_pc): Delete declaration.
4363 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4364 (handle_inferior_event_1, handle_signal_stop)
4365 (process_event_stop_test, keep_going_stepped_thread)
4366 (handle_step_into_function, handle_step_into_function_backward)
4367 (print_stop_location): Replace references to stop_pc with
4368 references to thread_info->suspend.stop_pc.
4369 (struct infcall_suspend_state) <stop_pc>: Delete field.
4370 (save_infcall_suspend_state, restore_infcall_suspend_state):
4371 Remove references to inf_stat->stop_pc.
4372 * linux-fork.c (fork_load_infrun_state): Likewise.
4373 * record-btrace.c (record_btrace_set_replay): Likewise.
4374 * record-full.c (record_full_goto_entry): Likewise.
4375 * remote.c (print_one_stopped_thread): Likewise.
4376 * target.c (target_resume): Extend comment.
4377 * thread.c (set_executing_thread): New.
4378 (set_executing): Use it.
4379 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4380 Remove references to stop_pc.
4381
4382 2018-06-28 Pedro Alves <palves@redhat.com>
4383
4384 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4385 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4386
4387 2018-06-28 Tom Tromey <tom@tromey.com>
4388
4389 * coffread.c (coff_symfile_finish): Update.
4390 * xcoffread.c (xcoff_symfile_finish): Update.
4391 * elfread.c (elf_symfile_finish): Update.
4392 * symfile.h (dwarf2_free_objfile): Don't declare.
4393 * dwarf2read.c (_initialize_dwarf2_read): Use
4394 register_objfile_data_with_cleanup.
4395 (dwarf2_free_objfile): Now static. Change signature.
4396
4397 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4398
4399 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4400 option "-o" to add-symbol-file-load to add an offset to each
4401 section's load address.
4402 * symfile.c (set_objfile_default_section_offset): New function.
4403
4404 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4405
4406 * symfile.c (add_symbol_file_command): Make sure that sections
4407 with the same name are sorted in the same order.
4408
4409 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4410
4411 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4412 require the second argument. If omitted, load sections at the
4413 addresses specified in the file.
4414
4415 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4416
4417 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4418 (_initialize_symfile): Add option "-o" to symbol-file to add an
4419 offset to each section of the symbol file.
4420
4421 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4422
4423 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4424
4425 2018-06-27 Tom Tromey <tom@tromey.com>
4426
4427 * stack.c (_initialize_stack): Update "func" help text.
4428
4429 2018-06-27 Tom Tromey <tom@tromey.com>
4430
4431 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4432 std::vector.
4433 (unwind_infopy_str, pyuw_create_unwind_info)
4434 (unwind_infopy_add_saved_register, pyuw_sniffer)
4435 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4436 Update.
4437 (struct saved_reg): Add constructor.
4438 <value>: Now a gdbpy_ref<>.
4439
4440 2018-06-27 Tom Tromey <tom@tromey.com>
4441
4442 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4443
4444 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4445
4446 * gdb-gdb.py.in: Format using autopep8.
4447
4448 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4449
4450 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4451 (type_lookup_function): Recognize CORE_ADDR values.
4452
4453 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4454
4455 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4456 print tag_name.
4457
4458 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4459
4460 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4461 <__lt__>: Add.
4462
4463 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4464
4465 * gdb-gdb.py: Move to...
4466 * gdb-gdb.py.in: ... here.
4467 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4468 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4469 dependencies.
4470 (distclean): Remove gdb-gdb.py when cleaning.
4471 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4472 * configure: Re-generate.
4473
4474 2018-06-27 Pedro Alves <palves@redhat.com>
4475
4476 * proc-service.c (get_ps_regcache): New.
4477 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4478 (ps_lsetfpregs): Use it.
4479
4480 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4481
4482 PR gdb/21695
4483 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4484 (dwarf_decode_lines_1): Adjust.
4485
4486 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4487
4488 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4489 override.
4490 <info_proc>: Likewise.
4491
4492 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4493
4494 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4495 to windows_fetch_one_register, and only handle the case of
4496 fetching one register. Move the code that reloads the context
4497 and iterates over all registers if R is negative to...
4498 (windows_nat_target::fetch_registers): ... here.
4499 (do_windows_store_inferior_registers): Rename to
4500 windows_store_one_register, and only handle the case of storing
4501 one register. Move the code that handles the case where r is
4502 negative to...
4503 (windows_nat_target::store_registers) ... here.
4504
4505 2018-06-26 Tom Tromey <tom@tromey.com>
4506
4507 PR rust/22574:
4508 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4509 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4510 Update.
4511 (rust_internal_print_type): Add podata parameter.
4512 (rust_print_type): Update.
4513
4514 2018-06-26 Tom Tromey <tom@tromey.com>
4515
4516 * typeprint.h (struct print_offset_data) <update, finish,
4517 maybe_print_hole>: New methods.
4518 <indentation>: New constant.
4519 * typeprint.c (print_offset_data::indentation): Define.
4520 (print_offset_data::maybe_print_hole, print_offset_data::update)
4521 (print_offset_data::finish): Move from c-typeprint.c and rename.
4522 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4523 (print_spaces_filtered_with_print_options): Update.
4524 (c_print_type_union_field_offset, maybe_print_hole)
4525 (c_print_type_struct_field_offset): Move to typeprint.c and
4526 rename.
4527 (c_type_print_base_struct_union): Update.
4528
4529 2018-06-25 Pedro Alves <palves@redhat.com>
4530
4531 * gdbthread.h (thread_info_ref, delete_thread)
4532 (delete_thread_silent, first_thread_of_inferior)
4533 (any_thread_of_inferior, switch_to_thread)
4534 (enable_thread_stack_temporaries)
4535 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4536 (get_last_thread_stack_temporary)
4537 (value_in_thread_stack_temporaries, can_access_registers_thread):
4538 Spell out "struct thread_info" instead of just "thread_info".
4539 * inferior.h (notice_new_inferior): Likewise.
4540
4541 2018-06-25 Pedro Alves <palves@redhat.com>
4542
4543 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4544 pass thread_info pointer to delete_thread.
4545 (windows_nat_target::detach): Pass inferior pointer to
4546 detach_inferior.
4547 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4548 delete_thread.
4549 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4550 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4551 and pass a thread_info pointer to delete_thread.
4552 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4553 pass thread_info pointer to delete_thread.
4554 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4555 delete_thread_silent call.
4556 * procfs.c (procfs_target::detach): Pass inferior pointer to
4557 detach_inferior.
4558 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4559 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4560 delete_thread_silent call.
4561 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4562 pass thread_info pointer to delete_thread.
4563 (windows_nat_target::detach): Pass inferior pointer to
4564 delete_inferior.
4565
4566 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4567
4568 * regcache.c (readable_regcache::read_part): Fix asserts.
4569 (reg_buffer::raw_collect_part): New function.
4570 (regcache::write_part): Fix asserts.
4571 (reg_buffer::raw_supply_part): New function.
4572 (regcache::transfer_regset_register): New helper function.
4573 (regcache::transfer_regset): Call new functions.
4574 (regcache_supply_regset): Use gdb_byte*.
4575 (regcache::supply_regset): Likewise.
4576 (regcache_collect_regset): Likewise.
4577 (regcache::collect_regset): Likewise.
4578 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4579 (reg_buffer::raw_supply_part): Likewise.
4580 (regcache::transfer_regset_register): Likewise.
4581 (regcache::transfer_regset): Use gdb_byte*.
4582
4583 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4584
4585 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4586
4587 2018-06-21 Pedro Alves <palves@redhat.com>
4588
4589 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4590 instead of a ptid_t. All callers adjusted.
4591 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4592 adjusted.
4593 (print_ada_task_info, display_current_task_id, task_command_1):
4594 Adjust.
4595 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4596 inferior_thread.
4597 (breakpoint_kind): Adjust.
4598 (remove_breakpoints_pid): Rename to ...
4599 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4600 pointer. All callers adjusted.
4601 (bpstat_clear_actions): Use inferior_thread.
4602 (get_bpstat_thread): New.
4603 (bpstat_do_actions): Use it.
4604 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4605 to take a thread_info pointer. All callers adjusted.
4606 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4607 (breakpoint_re_set_thread): Use inferior_thread.
4608 * breakpoint.h (struct inferior): Forward declare.
4609 (bpstat_stop_status): Update.
4610 (remove_breakpoints_pid): Delete.
4611 (remove_breakpoints_inf): New.
4612 * bsd-uthread.c (bsd_uthread_target::wait)
4613 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4614 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4615 (maint_btrace_packet_history_cmd)
4616 (maint_btrace_clear_packet_history_cmd): Adjust.
4617 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4618 inferior_thread.
4619 * cli/cli-interp.c: Include "inferior.h".
4620 * common/refcounted-object.h (struct
4621 refcounted_object_ref_policy): New.
4622 * compile/compile-object-load.c: Include gdbthread.h.
4623 (store_regs): Use inferior_thread.
4624 * corelow.c (core_target::close): Use current_inferior.
4625 (core_target_open): Adjust to use first_thread_of_inferior and use
4626 the current inferior.
4627 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4628 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4629 <thread>: ... this new field. All references adjusted.
4630 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4631 Take a thread_info pointer instead of a ptid_t.
4632 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4633 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4634 thread_info pointer instead of a ptid_t.
4635 * elfread.c: Include "inferior.h".
4636 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4637 Use inferior_thread.
4638 * eval.c (evaluate_subexp): Likewise.
4639 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4640 inferior_thread.
4641 * gdb_proc_service.h (struct thread_info): Forward declare.
4642 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4643 <thread>: ... this new field. All references adjusted.
4644 * gdbarch.h, gdbarch.c: Regenerate.
4645 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4646 'thread' parameter. All implementations and callers adjusted.
4647 * gdbthread.h (thread_info) <set_running>: New method.
4648 (delete_thread, delete_thread_silent): Take a thread_info pointer
4649 instead of a ptid.
4650 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4651 (first_thread_of_process): Delete, replaced by ...
4652 (first_thread_of_inferior): ... this new function. All callers
4653 adjusted.
4654 (any_live_thread_of_process): Delete, replaced by ...
4655 (any_live_thread_of_inferior): ... this new function. All callers
4656 adjusted.
4657 (switch_to_thread, switch_to_no_thread): Declare.
4658 (is_executing): Delete.
4659 (enable_thread_stack_temporaries): Update comment.
4660 <enable_thread_stack_temporaries>: Take a thread_info pointer
4661 instead of a ptid_t. Incref the thread.
4662 <~enable_thread_stack_temporaries>: Decref the thread.
4663 <m_ptid>: Delete
4664 <m_thr>: New.
4665 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4666 (get_last_thread_stack_temporary)
4667 (value_in_thread_stack_temporaries, can_access_registers_thread):
4668 Take a thread_info pointer instead of a ptid_t. All callers
4669 adjusted.
4670 * infcall.c (get_call_return_value): Use inferior_thread.
4671 (run_inferior_call): Work with thread pointers instead of ptid_t.
4672 (call_function_by_hand_dummy): Work with thread pointers instead
4673 of ptid_t. Use thread_info_ref.
4674 * infcmd.c (proceed_thread_callback): Access thread's state
4675 directly.
4676 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4677 access thread's state directly.
4678 (continue_command): Use inferior_thread.
4679 (info_program_command): Use find_thread_ptid and access thread
4680 state directly.
4681 (proceed_after_attach_callback): Use thread state directly.
4682 (notice_new_inferior): Take a thread_info pointer instead of a
4683 ptid_t. All callers adjusted.
4684 (exit_inferior): Take an inferior pointer instead of a pid. All
4685 callers adjusted.
4686 (exit_inferior_silent): New.
4687 (detach_inferior): Delete.
4688 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4689 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4690 (detach_inferior_command, kill_inferior_command): Use
4691 find_inferior_id instead of valid_gdb_inferior_id and
4692 gdb_inferior_id_to_pid.
4693 (inferior_command): Use inferior and thread pointers.
4694 * inferior.h (struct thread_info): Forward declare.
4695 (notice_new_inferior): Take a thread_info pointer instead of a
4696 ptid_t. All callers adjusted.
4697 (detach_inferior): Delete declaration.
4698 (exit_inferior, exit_inferior_silent): Take an inferior pointer
4699 instead of a pid. All callers adjusted.
4700 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4701 (valid_gdb_inferior_id): Delete.
4702 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4703 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4704 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4705 ...
4706 <inf>: ... this new field.
4707 <step_ptid>: Delete, replaced by ...
4708 <step_thread>: ... this new field.
4709 (get_displaced_stepping_state): Take an inferior pointer instead
4710 of a pid. All callers adjusted.
4711 (displaced_step_in_progress_any_inferior): Adjust.
4712 (displaced_step_in_progress_thread): Take a thread pointer instead
4713 of a ptid_t. All callers adjusted.
4714 (displaced_step_in_progress, add_displaced_stepping_state): Take
4715 an inferior pointer instead of a pid. All callers adjusted.
4716 (get_displaced_step_closure_by_addr): Adjust.
4717 (remove_displaced_stepping_state): Take an inferior pointer
4718 instead of a pid. All callers adjusted.
4719 (displaced_step_prepare_throw, displaced_step_prepare)
4720 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4721 All callers adjusted.
4722 (start_step_over): Adjust.
4723 (infrun_thread_ptid_changed): Remove bit updating ptids in the
4724 displaced step queue.
4725 (do_target_resume): Adjust.
4726 (fetch_inferior_event): Use inferior_thread.
4727 (context_switch, get_inferior_stop_soon): Take an
4728 execution_control_state pointer instead of a ptid_t. All callers
4729 adjusted.
4730 (switch_to_thread_cleanup): Delete.
4731 (stop_all_threads): Use scoped_restore_current_thread.
4732 * inline-frame.c: Include "gdbthread.h".
4733 (inline_state) <inline_state>: Take a thread pointer instead of a
4734 ptid_t. All callers adjusted.
4735 <ptid>: Delete, replaced by ...
4736 <thread>: ... this new field.
4737 (find_inline_frame_state): Take a thread pointer instead of a
4738 ptid_t. All callers adjusted.
4739 (skip_inline_frames, step_into_inline_frame)
4740 (inline_skipped_frames, inline_skipped_symbol): Take a thread
4741 pointer instead of a ptid_t. All callers adjusted.
4742 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4743 (inline_skipped_frames, inline_skipped_symbol): Likewise.
4744 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4745 pointers directly.
4746 * linux-nat.c (get_detach_signal): Likewise.
4747 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4748 (thread_db_notice_clone): Adjust.
4749 (thread_db_find_new_threads_silently)
4750 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4751 a thread pointer instead of a ptid_t. All callers adjusted.
4752 * mi/mi-cmd-var.c: Include "inferior.h".
4753 (mi_cmd_var_update_iter): Update to use thread pointers.
4754 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4755 inferior directly.
4756 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4757 out to ...
4758 (mi_output_running): ... this new function.
4759 (mi_on_resume_1): Adjust to use it.
4760 (mi_user_selected_context_changed): Adjust to use inferior_thread.
4761 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4762 directly.
4763 (interrupt_thread_callback): : Adjust to use thread and inferior
4764 pointers.
4765 * proc-service.c: Include "gdbthread.h".
4766 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4767 * progspace-and-thread.c: Include "inferior.h".
4768 * progspace.c: Include "inferior.h".
4769 * python/py-exitedevent.c (create_exited_event_object): Adjust to
4770 hold a reference to an inferior_object.
4771 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4772 inferior_thread.
4773 * python/py-inferior.c (struct inferior_object): Give the type a
4774 tag name instead of a typedef.
4775 (python_on_normal_stop): No need to check if the current thread is
4776 listed.
4777 (inferior_to_inferior_object): Change return type to
4778 inferior_object. All callers adjusted.
4779 (find_thread_object): Delete, bits factored out to ...
4780 (thread_to_thread_object): ... this new function.
4781 * python/py-infthread.c (create_thread_object): Use
4782 inferior_to_inferior_object.
4783 (thpy_is_stopped): Use thread pointer directly.
4784 (gdbpy_selected_thread): Use inferior_thread.
4785 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4786 field, replaced with ...
4787 <thread>: ... this new field. All users adjusted.
4788 (btpy_insn_or_gap_new): Drop const.
4789 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
4790 callers adjusted.
4791 * python/py-record.c: Include "gdbthread.h".
4792 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4793 a ptid_t. All callers adjusted.
4794 (gdbpy_current_recording): Use inferior_thread.
4795 * python/py-record.h (recpy_record_object) <ptid>: Delete
4796 field, replaced with ...
4797 <thread>: ... this new field. All users adjusted.
4798 (recpy_element_object) <ptid>: Delete
4799 field, replaced with ...
4800 <thread>: ... this new field. All users adjusted.
4801 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4802 a ptid_t. All callers adjusted.
4803 * python/py-threadevent.c: Include "gdbthread.h".
4804 (get_event_thread): Use thread_to_thread_object.
4805 * python/python-internal.h (struct inferior_object): Forward
4806 declare.
4807 (find_thread_object, find_inferior_object): Delete declarations.
4808 (thread_to_thread_object, inferior_to_inferior_object): New
4809 declarations.
4810 * record-btrace.c: Include "inferior.h".
4811 (require_btrace_thread): Use inferior_thread.
4812 (record_btrace_frame_sniffer)
4813 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4814 (get_thread_current_frame): Use scoped_restore_current_thread and
4815 switch_to_thread.
4816 (get_thread_current_frame): Use thread pointer directly.
4817 (record_btrace_replay_at_breakpoint): Use thread's inferior
4818 pointer directly.
4819 * record-full.c: Include "inferior.h".
4820 * regcache.c: Include "gdbthread.h".
4821 (get_thread_arch_regcache): Use the inferior's address space
4822 directly.
4823 (get_thread_regcache, registers_changed_thread): New.
4824 * regcache.h (get_thread_regcache(thread_info *thread)): New
4825 overload.
4826 (registers_changed_thread): New.
4827 (remote_target) <remote_detach_1>: Swap order of parameters.
4828 (remote_add_thread): <remote_add_thread>: Return the new thread.
4829 (get_remote_thread_info(ptid_t)): New overload.
4830 (remote_target::remote_notice_new_inferior): Use thread pointers
4831 directly.
4832 (remote_target::process_initial_stop_replies): Use
4833 thread_info::set_running.
4834 (remote_target::remote_detach_1, remote_target::detach)
4835 (extended_remote_target::detach): Adjust.
4836 * stack.c (frame_show_address): Use inferior_thread.
4837 * target-debug.h (target_debug_print_thread_info_pp): New.
4838 * target-delegates.c: Regenerate.
4839 * target.c (default_thread_address_space): Delete.
4840 (memory_xfer_partial_1): Use current_inferior.
4841 (target_detach): Use current_inferior.
4842 (target_thread_address_space): Delete.
4843 (generic_mourn_inferior): Use current_inferior.
4844 * target.h (struct target_ops) <thread_address_space>: Delete.
4845 (target_thread_address_space): Delete.
4846 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4847 pointers directly.
4848 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4849 thread pointer instead of a ptid_t. Adjust all callers.
4850 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4851 (first_thread_of_process): Delete, replaced by ...
4852 (first_thread_of_inferior): ... this new function. All callers
4853 adjusted.
4854 (any_thread_of_process): Rename to ...
4855 (any_thread_of_inferior): ... this, and take an inferior pointer.
4856 (any_live_thread_of_process): Rename to ...
4857 (any_live_thread_of_inferior): ... this, and take an inferior
4858 pointer.
4859 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4860 (value_in_thread_stack_temporaries)
4861 (get_last_thread_stack_temporary): Take a thread pointer instead
4862 of a ptid_t. Adjust all callers.
4863 (thread_info::set_running): New.
4864 (validate_registers_access): Use inferior_thread.
4865 (can_access_registers_ptid): Rename to ...
4866 (can_access_registers_thread): ... this, and take a thread
4867 pointer.
4868 (print_thread_info_1): Adjust to compare thread pointers instead
4869 of ptids.
4870 (switch_to_no_thread, switch_to_thread): Make extern.
4871 (scoped_restore_current_thread::~scoped_restore_current_thread):
4872 Use m_thread pointer directly.
4873 (scoped_restore_current_thread::scoped_restore_current_thread):
4874 Use inferior_thread.
4875 (thread_command): Use thread pointer directly.
4876 (thread_num_make_value_helper): Use inferior_thread.
4877 * top.c (execute_command): Use inferior_thread.
4878 * tui/tui-interp.c: Include "inferior.h".
4879 * varobj.c (varobj_create): Use inferior_thread.
4880 (value_of_root_1): Use find_thread_global_id instead of
4881 global_thread_id_to_ptid.
4882
4883 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4884
4885 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4886 possible.
4887 (regcache::write_part): Likewise.
4888 (readable_regcache::cooked_read_part): Update comment.
4889 (readable_regcache::cooked_write_part): Likewise.
4890 * regcache.h: (readable_regcache::read_part): Likewise.
4891 (regcache::write_part): Likewise.
4892
4893 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4894 Dirk Schubert <dirk.schubert@arm.com>
4895
4896 * aarch64-linux-nat.c (post_attach): New.
4897 (aarch64_linux_nat_target::post_attach): Override post_attach to
4898 record the number of hardware debug registers.
4899
4900 2018-06-20 Tom Tromey <tom@tromey.com>
4901
4902 * python/py-param.c (add_setshow_generic): Make parameters const.
4903 (parmpy_init): Update.
4904
4905 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4906
4907 * regcache.h (regcache_cooked_read_ftype): Rename to...
4908 (register_read_ftype): ...this, change type to function_view.
4909 (class reg_buffer) <save>: Remove src parameter.
4910 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4911 parameter non-const in first overload. Remove src parameter in
4912 second overload.
4913 * regcache.c (do_cooked_read): Remove.
4914 (readonly_detached_regcache::readonly_detached_regcache): Make
4915 parameter non-const, adjust call to other constructor.
4916 (reg_buffer::save): Remove src parameter.
4917 * frame.c (do_frame_register_read): Remove.
4918 (frame_save_as_regcache): Use lambda function.
4919 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4920 parameter to ppu2spu_data *.
4921 (ppu2spu_sniffer): Use lambda function.
4922
4923 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4924
4925 * record-full.c (record_full_target::insert_breakpoint): Remove
4926 "struct" keyword, add const.
4927
4928 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4929
4930 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4931 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4932 * configure.ac: Remove AC_PREREQ, add missing quoting.
4933 * gnulib/configure.ac: Modernize usage of
4934 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4935 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4936 (AUTOMAKE_VERSION): Bump to 1.15.1.
4937 * configure: Re-generate.
4938 * config.in: Re-generate.
4939 * aclocal.m4: Re-generate.
4940 * gnulib/aclocal.m4: Re-generate.
4941 * gnulib/config.in: Re-generate.
4942 * gnulib/configure: Re-generate.
4943 * gnulib/import/Makefile.in: Re-generate.
4944
4945 2018-06-19 Pedro Alves <palves@redhat.com>
4946
4947 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4948 (lookup_minimal_symbol_by_pc_section): ... here with
4949 gdb_assert_not_reached added.
4950
4951 2018-06-19 Pedro Alves <palves@redhat.com>
4952
4953 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4954 parameter with a block parameter. Compare location's block symbol
4955 with the frame's block instead of addresses.
4956 (skip_inline_frames): Pass the current block instead of the
4957 frame's address. Break out as soon as we determine the frame
4958 should not be skipped.
4959
4960 2018-06-18 Tom Tromey <tom@tromey.com>
4961
4962 * solib-aix.c (solib_aix_get_section_offsets): Return
4963 unique_xmalloc_ptr.
4964 (solib_aix_solib_create_inferior_hook): Update.
4965
4966 2018-06-18 Tom Tromey <tom@tromey.com>
4967
4968 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4969
4970 2018-06-18 Tom Tromey <tom@tromey.com>
4971
4972 * solib-frv.c (frv_relocate_main_executable): Use
4973 unique_xmalloc_ptr.
4974 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4975 unique_xmalloc_ptr.
4976
4977 2018-06-18 Tom Tromey <tom@tromey.com>
4978
4979 * objfiles.h (inhibit_section_map_updates): Update.
4980 (resume_section_map_updates, resume_section_map_updates_cleanup):
4981 Remove.
4982 * solib-svr4.c (svr4_handle_solib_event): Update.
4983 * objfiles.c (inhibit_section_map_updates): Return
4984 scoped_restore_tmpl<int>.
4985 (resume_section_map_updates, resume_section_map_updates_cleanup):
4986 Remove.
4987
4988 2018-06-18 Tom Tromey <tom@tromey.com>
4989
4990 * valprint.h (read_string): Update.
4991 * valprint.c (read_string): Change type of "buffer".
4992 (val_print_string): Update.
4993 * python/py-value.c (valpy_string): Update.
4994 * language.h (struct language_defn) <la_get_string>: Change
4995 type of "buffer".
4996 (default_get_string, c_get_string): Update.
4997 * language.c (default_get_string): Change type of "buffer".
4998 * guile/scm-value.c (gdbscm_value_to_string): Update.
4999 * c-lang.c (c_get_string): Change type of "buffer".
5000
5001 2018-06-18 Tom Tromey <tom@tromey.com>
5002
5003 * ser-mingw.c (struct pipe_state_destroyer): New.
5004 (pipe_state_up): New typedef.
5005 (cleanup_pipe_state): Remove.
5006 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5007
5008 2018-06-18 Tom Tromey <tom@tromey.com>
5009
5010 * rust-lang.h (rust_yyerror): Don't declare.
5011 * rust-lang.c (rust_language_defn): Update.
5012 * rust-exp.y (yyerror): Now static.
5013 * parse.c (parse_exp_in_context_1): Update.
5014 * p-lang.h (p_yyerror): Don't declare.
5015 * p-lang.c (p_language_defn): Update.
5016 * p-exp.y (yyerror): Now static.
5017 * opencl-lang.c (opencl_language_defn): Update.
5018 * objc-lang.c (objc_language_defn): Update.
5019 * m2-lang.h (m2_yyerror): Don't declare.
5020 * m2-lang.c (m2_language_defn): Update.
5021 * m2-exp.y (yyerror): Now static.
5022 * language.h (struct language_defn) <la_error>: Remove.
5023 * language.c (unk_lang_error): Remove.
5024 (unknown_language_defn, auto_language_defn): Remove.
5025 * go-lang.h (go_yyerror): Don't declare.
5026 * go-lang.c (go_language_defn): Update.
5027 * go-exp.y (yyerror): Now static.
5028 * f-lang.h (f_yyerror): Don't declare.
5029 * f-lang.c (f_language_defn): Update.
5030 * f-exp.y (yyerror): Now static.
5031 * d-lang.h (d_yyerror): Don't declare.
5032 * d-lang.c (d_language_defn): Update.
5033 * d-exp.y (yyerror): Now static.
5034 * c-lang.h (c_yyerror): Don't declare.
5035 * c-lang.c (c_language_defn, cplus_language_defn)
5036 (asm_language_defn, minimal_language_defn): Update.
5037 * c-exp.y (yyerror): Now static.
5038 * ada-lang.h (ada_yyerror): Don't declare.
5039 * ada-lang.c (ada_language_defn): Update.
5040 * ada-exp.y (yyerror): Now static.
5041
5042 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5043
5044 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5045 (store_sveregs_to_thread): Likewise.
5046 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5047 (aarch64_linux_store_inferior_registers): Likewise.
5048 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5049 function.
5050 (aarch64_sve_regs_copy_to_regcache): Likewise.
5051 (aarch64_sve_regs_copy_from_regcache): Likewise.
5052 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5053 declaration.
5054 (aarch64_sve_regs_copy_to_regcache): Likewise.
5055 (aarch64_sve_regs_copy_from_regcache): Likewise.
5056 (sve_context): Structure from Linux headers.
5057 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5058 (SVE_SIG_ZREG_SIZE): Likewise.
5059 (SVE_SIG_PREG_SIZE): Likewise.
5060 (SVE_SIG_FFR_SIZE): Likewise.
5061 (SVE_SIG_REGS_OFFSET): Likewise.
5062 (SVE_SIG_ZREGS_OFFSET): Likewise.
5063 (SVE_SIG_ZREG_OFFSET): Likewise.
5064 (SVE_SIG_ZREGS_SIZE): Likewise.
5065 (SVE_SIG_PREGS_OFFSET): Likewise.
5066 (SVE_SIG_PREG_OFFSET): Likewise.
5067 (SVE_SIG_PREGS_SIZE): Likewise.
5068 (SVE_SIG_FFR_OFFSET): Likewise.
5069 (SVE_SIG_REGS_SIZE): Likewise.
5070 (SVE_SIG_CONTEXT_SIZE): Likewise.
5071 (SVE_PT_REGS_MASK): Likewise.
5072 (SVE_PT_REGS_FPSIMD): Likewise.
5073 (SVE_PT_REGS_SVE): Likewise.
5074 (SVE_PT_VL_INHERIT): Likewise.
5075 (SVE_PT_VL_ONEXEC): Likewise.
5076 (SVE_PT_REGS_OFFSET): Likewise.
5077 (SVE_PT_FPSIMD_OFFSET): Likewise.
5078 (SVE_PT_FPSIMD_SIZE): Likewise.
5079 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5080 (SVE_PT_SVE_PREG_SIZE): Likewise.
5081 (SVE_PT_SVE_FFR_SIZE): Likewise.
5082 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5083 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5084 (__SVE_SIG_TO_PT): Likewise.
5085 (SVE_PT_SVE_OFFSET): Likewise.
5086 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5087 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5088 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5089 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5090 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5091 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5092 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5093 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5094 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5095 (SVE_PT_SVE_SIZE): Likewise.
5096 (SVE_PT_SIZE): Likewise.
5097 (HAS_SVE_STATE): New define.
5098
5099 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5100
5101 * nat/aarch64-sve-linux-sigcontext.h: New file.
5102 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5103 new files.
5104 (SVE_VQ_MIN): Likewise.
5105 (SVE_VQ_MAX): Likewise.
5106 (SVE_VL_MIN): Likewise.
5107 (SVE_VL_MAX): Likewise.
5108 (SVE_NUM_ZREGS): Likewise.
5109 (SVE_NUM_PREGS): Likewise.
5110 (sve_vl_valid): Likewise.
5111 (struct user_sve_header): Likewise.
5112
5113 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5114 Richard Bunt <Richard.Bunt@arm.com>
5115
5116 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5117 was requested by GDB.
5118
5119 2018-06-15 Tom de Vries <tdevries@suse.de>
5120
5121 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5122
5123 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5124
5125 * gnulib/update-gnulib.sh: Print expected versions of
5126 autoconf/aclocal.
5127
5128 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5129
5130 * arch-utils.c (default_type_align): Use type_length_units.
5131 * gdbtypes.c (type_align): Use type_length_units.
5132
5133 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5134
5135 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5136 of 'define' command.
5137
5138 2018-06-14 Tom de Vries <tdevries@suse.de>
5139
5140 PR cli/22573
5141 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5142 get_no_prettyformat_print_options.
5143
5144 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5145
5146 * sparc-nat.h: Include target.h.
5147 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5148 <fetch_registers>: Remove this argument in function call.
5149 <store_registers>: Remove this argument in function call, remove
5150 extra semicolon.
5151 <low_forget_process>: Call sparc64_forget_process instead of
5152 sparc_forget_process.
5153
5154 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5155
5156 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5157 (procfs_target::make_corefile_notes): Adjust to new
5158 target_read_alloc return type.
5159
5160 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5161 Stephen Roberts <stephen.roberts@arm.com>
5162
5163 PR gdb/22882
5164 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5165 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5166 Move should_notify_stop local into more inner scope.
5167
5168 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5169 Stephen Roberts <stephen.roberts@arm.com>
5170
5171 PR gdb/22882
5172 * infrun.c (resume_1): Add call to mark_async_event_handler.
5173
5174 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5175
5176 * infrun.c (do_target_wait): Change old version of $pc printed.
5177
5178 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5179
5180 * dwarf2read.c (read_index_from_section): Rename to...
5181 (read_gdb_index_from_section): ... this, update all callers.
5182 (dwarf2_read_index): Rename to...
5183 (dwarf2_read_gdb_index): ... this, update all callers.
5184
5185 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5186
5187 * gdb/hppa-linux-nat.c
5188 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5189 hppa_linux_nat_target::fetch_registers.
5190
5191 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5192
5193 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5194 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5195 (AARCH64_DWARF_SVE_FFR): Likewise.
5196 (AARCH64_DWARF_SVE_P0): Likewise.
5197 (AARCH64_DWARF_SVE_Z0): Likewise.
5198
5199 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5200
5201 * common/common-regcache.h (raw_compare): New function.
5202 * regcache.c (regcache::raw_compare): Likewise.
5203 * regcache.h (regcache::raw_compare): New declaration.
5204
5205 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5206
5207 * common/common-regcache.h (reg_buffer_common): New structure.
5208 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5209 (reg_buffer::raw_supply): Likewise.
5210 (reg_buffer::raw_supply_integer): Likewise.
5211 (reg_buffer::raw_supply_zeroed): Likewise.
5212 (reg_buffer::raw_collect): Likewise.
5213 (reg_buffer::raw_collect_integer): Likewise.
5214 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5215 (reg_buffer::raw_supply): Likewise.
5216 (reg_buffer::raw_supply_integer): Likewise.
5217 (reg_buffer::raw_supply_zeroed): Likewise.
5218 (reg_buffer::raw_collect): Likewise.
5219 (reg_buffer::raw_collect_integer): Likewise.
5220
5221 2018-06-10 Tom Tromey <tom@tromey.com>
5222
5223 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5224 (class remote_state) <stop_reply_queue>: Now std::vector.
5225 (remote_state::~remote_state)
5226 (remote_target::stop_reply_queue_length): Update.
5227 (struct queue_iter_param, remove_child_of_pending_fork)
5228 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5229 (check_pending_event_prevents_wildcard_vcont_callback)
5230 (remove_stop_reply_for_inferior)
5231 (remove_stop_reply_of_remote_state)
5232 (remote_notif_remove_once_on_match)
5233 (stop_reply_match_ptid_and_ws)
5234 (remote_kill_child_of_pending_fork): Remove.
5235 (remote_target::remove_new_fork_children)
5236 (remote_target::check_pending_events_prevent_wildcard_vcont)
5237 (remote_target::discard_pending_stop_replies)
5238 (remote_target::discard_pending_stop_replies_in_queue)
5239 (remote_target::remote_notif_remove_queued_reply)
5240 (remote_target::queued_stop_reply)
5241 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5242 (remote_target::wait, remote_target::kill_new_fork_children)
5243 (remote_target::async): Update.
5244
5245 2018-06-10 Tom Tromey <tom@tromey.com>
5246
5247 * record-full.c (record_full_arch_list_cleanups): Remove.
5248 (record_full_message): Use try/catch.
5249 (record_full_wait_cleanups): Remove.
5250 (record_full_wait_1): Use try/catch.
5251 (record_full_restore): Likewise.
5252
5253 2018-06-10 Tom Tromey <tom@tromey.com>
5254
5255 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5256 declare VEC. Add constructor.
5257 <in_target_beneath>: Now bool.
5258 (record_full_breakpoints): Now a std::vector, static.
5259 (record_full_sync_record_breakpoints)
5260 (record_full_init_record_breakpoints)
5261 (record_full_target::insert_breakpoint)
5262 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5263
5264 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5265
5266 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5267 * serial.c (serial_interface_lookup): Remove struct keyword.
5268
5269 2018-06-10 Tom Tromey <tom@tromey.com>
5270
5271 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5272 method.
5273 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5274 a method.
5275 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5276 method.
5277 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5278 "beneath" as a method.
5279 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5280 Use "beneath" as a method.
5281
5282 2018-06-10 Tom Tromey <tom@tromey.com>
5283
5284 * tracefile.c (struct trace_file_writer_deleter): New.
5285 <operator()>: Rename from trace_file_writer_xfree.
5286 (trace_file_writer_up): New typedef.
5287 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5288
5289 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5290
5291 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5292 <m_registers, m_register_status>: Change type to
5293 std::unique_ptr.
5294 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5295 XCNEWVEC.
5296
5297 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5298
5299 * common/common-regcache.h (enum register_status): Add
5300 underlying type "signed char".
5301 * regcache.h (reg_buffer) <m_register_status>: Change type to
5302 register_status *.
5303 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5304 register_status instead of signed char.
5305 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5306 (reg_buffer::get_register_status): Remove cast.
5307 (readable_regcache::raw_read): Remove cast.
5308 (readable_regcache::cooked_read): Remove cast.
5309
5310 2018-06-09 Tom Tromey <tom@tromey.com>
5311
5312 * source.c (reverse_search_command, forward_search_command): Use
5313 scoped_fd.
5314
5315 2018-06-09 Tom Tromey <tom@tromey.com>
5316
5317 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5318 (serial_ops_list): Now static, std::vector.
5319 (serial_interface_lookup, serial_add_interface): Update.
5320
5321 2018-06-09 Tom Tromey <tom@tromey.com>
5322
5323 * dwarf2read.c (process_cu_includes): Update.
5324 (process_full_comp_unit): Update.
5325 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5326 std::vector.
5327
5328 2018-06-08 Paul Koning <paul_koning@dell.com>
5329
5330 PR gdb/23252
5331
5332 * python/python.c (do_start_initialization):
5333 Avoid call to internal Python API.
5334 (init__gdb_module): New function.
5335
5336 2018-06-08 Gary Benson <gbenson@redhat.com>
5337
5338 * linux-thread-db.c (valprint.h): New include.
5339 (struct check_thread_db_info): New structure.
5340 (check_thread_db_on_load, tdb_testinfo): New static globals.
5341 (check_thread_db, check_thread_db_callback): New functions.
5342 (try_thread_db_load_1): Run integrity checks if requested.
5343 (maintenance_check_libthread_db): New function.
5344 (_initialize_thread_db): Register "maint check libthread-db"
5345 and "maint set/show check-libthread-db".
5346 * NEWS: Mention the above new commands.
5347
5348 2018-06-08 Tom Tromey <tom@tromey.com>
5349
5350 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5351 now a method.
5352
5353 2018-06-08 Tom Tromey <tom@tromey.com>
5354
5355 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5356
5357 2018-06-08 Tom Tromey <tom@tromey.com>
5358
5359 * common/btrace-common.h (struct btrace_data): Add constructor,
5360 destructor, move assignment operator.
5361 <empty, clear, fini>: New methods.
5362 <format>: Initialize.
5363 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5364 (btrace_data_empty): Don't declare.
5365 * common/btrace-common.c (btrace_data_init): Remove.
5366 (btrace_data::fini): Rename from btrace_data_fini.
5367 (btrace_data::empty): Rename from btrace_data_empty.
5368 (btrace_data::clear): Rename from btrace_data_clear. Return
5369 bool.
5370 * btrace.h (make_cleanup_btrace_data): Don't declare.
5371 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5372 (parse_xml_btrace): Update.
5373 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5374 (maint_btrace_clear_packet_history_cmd): Update.
5375
5376 2018-06-07 Pedro Alves <palves@redhat.com>
5377
5378 * target.h (target_ops) <beneath>: Now a method. All references
5379 updated.
5380 (class target_stack): New.
5381 * target.c (g_target_stack): New.
5382 (g_current_top_target): Delete.
5383 (current_top_target): Get the top target out of g_target_stack.
5384 (target_stack::push, target_stack::unpush): New.
5385 (push_target, unpush_target): Reimplement.
5386 (target_is_pushed): Reimplement in terms of g_target_stack.
5387 (target_ops::beneath, target_stack::find_beneath): New.
5388
5389 2018-06-07 Pedro Alves <palves@redhat.com>
5390
5391 * target.h (find_target_beneath): Delete declaration.
5392 * target.c (find_target_beneath): Delete definition.
5393 * aix-thread.c: All callers of find_target_beneath adjusted to
5394 call target_ops::beneath instead.
5395 * bsd-uthread.c: Likewise.
5396 * linux-thread-db.c: Likewise.
5397 * ravenscar-thread.c: Likewise.
5398 * sol-thread.c: Likewise.
5399 * spu-multiarch.c: Likewise.
5400
5401 2018-06-07 Pedro Alves <palves@redhat.com>
5402
5403 * target.h (target_ops) <beneath>: Now a method. All references
5404 updated.
5405 (target_ops) <m_beneath>: New.
5406 * target.c (target_ops::beneath): New.
5407 * corelow.c: Adjust all references to target_ops::beneath.
5408 * linux-thread-db.c: Likewise.
5409 * make-target-delegates: Likewise.
5410 * record-btrace.c: Likewise.
5411 * record-full.c: Likewise.
5412 * remote.c: Likewise.
5413 * target.c: Likewise.
5414 * target-delegates.c: Regenerate.
5415
5416 2018-06-07 Pedro Alves <palves@redhat.com>
5417
5418 * target.h (target_stack): Delete.
5419 (current_top_target): Declare function.
5420 * target.c (target_stack): Delete.
5421 (g_current_top_target): New.
5422 (current_top_target): New function.
5423 * auxv.c: Use current_top_target instead of target_stack
5424 throughout.
5425 * avr-tdep.c: Likewise.
5426 * breakpoint.c: Likewise.
5427 * corefile.c: Likewise.
5428 * elfread.c: Likewise.
5429 * eval.c: Likewise.
5430 * exceptions.c: Likewise.
5431 * frame.c: Likewise.
5432 * gdbarch-selftests.c: Likewise.
5433 * gnu-v3-abi.c: Likewise.
5434 * ia64-tdep.c: Likewise.
5435 * ia64-vms-tdep.c: Likewise.
5436 * infcall.c: Likewise.
5437 * infcmd.c: Likewise.
5438 * infrun.c: Likewise.
5439 * linespec.c: Likewise.
5440 * linux-tdep.c: Likewise.
5441 * minsyms.c: Likewise.
5442 * ppc-linux-nat.c: Likewise.
5443 * ppc-linux-tdep.c: Likewise.
5444 * procfs.c: Likewise.
5445 * regcache.c: Likewise.
5446 * remote.c: Likewise.
5447 * rs6000-tdep.c: Likewise.
5448 * s390-linux-nat.c: Likewise.
5449 * s390-tdep.c: Likewise.
5450 * solib-aix.c: Likewise.
5451 * solib-darwin.c: Likewise.
5452 * solib-dsbt.c: Likewise.
5453 * solib-spu.c: Likewise.
5454 * solib-svr4.c: Likewise.
5455 * solib-target.c: Likewise.
5456 * sparc-tdep.c: Likewise.
5457 * sparc64-tdep.c: Likewise.
5458 * spu-tdep.c: Likewise.
5459 * symfile.c: Likewise.
5460 * symtab.c: Likewise.
5461 * target-descriptions.c: Likewise.
5462 * target-memory.c: Likewise.
5463 * target.c: Likewise.
5464 * target.h: Likewise.
5465 * tracefile-tfile.c: Likewise.
5466 * tracepoint.c: Likewise.
5467 * valops.c: Likewise.
5468 * valprint.c: Likewise.
5469 * value.c: Likewise.
5470 * windows-tdep.c: Likewise.
5471 * mi/mi-main.c: Likewise.
5472
5473 2018-06-07 Tom Tromey <tom@tromey.com>
5474
5475 * valprint.h (build_address_symbolic): Declare.
5476 * printcmd.c (print_address_symbolic): Update.
5477 (build_address_symbolic): Change "name" and "filename" to
5478 std::string.
5479 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5480 Update.
5481 * defs.h (build_address_symbolic): Remove declaration.
5482
5483 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5484
5485 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5486 (aarch64_vnv_type): Add function.
5487 (aarch64_pseudo_register_name): Add V regs for SVE.
5488 (aarch64_pseudo_register_type): Likewise.
5489 (aarch64_pseudo_register_reggroup_p): Likewise.
5490 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5491 (aarch64_pseudo_read_value): Add V regs for SVE.
5492 (aarch64_pseudo_write_2): Use V0 offset for SVE
5493 (aarch64_pseudo_write): Add V regs for SVE.
5494 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5495
5496 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5497
5498 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5499 (sve_vl_from_vq): Likewise.
5500
5501 2018-06-05 Tom Tromey <tom@tromey.com>
5502
5503 * cli/cli-cmds.c (show_version): Update.
5504 * top.c (print_gdb_version): Add "interactive" parameter.
5505 Update.
5506 * main.c (captured_main_1): Update.
5507 * top.h (print_gdb_version): Add "interactive" parameter and a
5508 comment.
5509
5510 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5511
5512 * common/enum-flags.h: Add trailing semicolon to example in
5513 comment.
5514
5515 2018-06-05 Tom Tromey <tom@tromey.com>
5516
5517 PR cli/12326:
5518 * NEWS: Add entry about pager.
5519 * utils.c (pagination_disabled_for_command): New global.
5520 (prompt_for_continue): Allow "c" response to prompt.
5521 (reinitialize_more_filter): Clear
5522 pagination_disabled_for_command.
5523 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5524
5525 2018-06-04 Tom Tromey <tom@tromey.com>
5526
5527 * ada-lang.h (ada_lookup_symbol_list): Update.
5528 * ada-lang.c (resolve_subexp): Update.
5529 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5530 parameter.
5531 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5532 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5533 results parameter to std::vector.
5534 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5535 Update.
5536 * ada-exp.y (block_lookup): Update.
5537 (select_possible_type_sym): Change type of syms. Remove nsyms
5538 parameter.
5539 (write_var_or_type, write_name_assoc): Update.
5540
5541 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5542
5543 * windows-nat.c (windows_nat_target::xfer_partial): Return
5544 TARGET_XFER_E_IO if we need to delegate to the target beneath
5545 but BENEATH is NULL.
5546
5547 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5548
5549 * Makefile.in (config.status): Add configure.nat as a
5550 dependency.
5551
5552 2018-06-04 Tom Tromey <tom@tromey.com>
5553
5554 * cp-name-parser.y (cpname_state): Add method declarations.
5555 (HANDLE_QUAL): Update.
5556 (cpname_state::d_grab, cpname_state::fill_comp)
5557 (cpname_state::make_operator, cpname_state::make_dtor)
5558 (cpname_state::make_builtin_type, cpname_state::make_name)
5559 (cpname_state::d_qualify, cpname_state::d_int_type)
5560 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5561 (%union): Move earlier.
5562
5563 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5564
5565 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5566
5567 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5568
5569 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5570 (aarch64_pseudo_write_1): Likewise.
5571 (aarch64_pseudo_read_value): Use helper.
5572 (aarch64_pseudo_write): Likewise.
5573
5574 2018-06-04 Pedro Alves <palves@redhat.com>
5575
5576 * darwin-nat.c (darwin_ops): Delete.
5577 (darwin_attach_pid): Use get_native_target.
5578
5579 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5580
5581 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5582 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5583
5584 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5585
5586 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5587 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5588 (aarch64_gdbarch_init): Check for SVE.
5589 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5590
5591 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5592
5593 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5594 * aarch64-tdep.h (aarch64_read_description): Likewise.
5595 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5596 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5597 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5598 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5599 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5600
5601 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
5602
5603 * value.c (value_fetch_lazy_bitfield): New.
5604 (value_fetch_lazy_memory): New.
5605 (value_fetch_lazy_register): New.
5606 (value_fetch_lazy): Factor out to smaller functions.
5607
5608 2018-06-01 Tom Tromey <tom@tromey.com>
5609
5610 * cp-name-parser.y (backslashable, represented): Now const.
5611
5612 2018-06-01 Tom Tromey <tom@tromey.com>
5613
5614 * cp-name-parser.y: Include parser-defs.h.
5615 (parser_fprintf): Remove declaration.
5616
5617 2018-06-01 Tom Tromey <tom@tromey.com>
5618
5619 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5620 %parse-param.
5621 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5622 (global_result): Remove globals.
5623 (struct cpname_state): New.
5624 (yyparse): Don't declare.
5625 (yylex, yyerror): Move declarations after %union.
5626 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5627 (make_name): Add state parameter.
5628 Update all callers.
5629 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5630 parameter.
5631 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5632 Update.
5633 (yylex): Add lvalp, state parameters.
5634 (yyerror): Add state parameter.
5635 (cp_demangled_name_to_comp): Update.
5636
5637 2018-06-01 Tom Tromey <tom@tromey.com>
5638
5639 * cp-name-parser.y (parser_fprintf): Declare.
5640 (GDB_YY_REMAP_PREFIX): Define.
5641 Include yy-remap.h. Don't redefine yy* identifiers.
5642
5643 2018-06-01 Tom Tromey <tom@tromey.com>
5644
5645 * python/py-type.c (typy_legacy_template_argument): Update.
5646 * cp-support.h (cp_demangled_name_to_comp): Update.
5647 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5648 parameter to be a "std::string *".
5649 (main): Update.
5650
5651 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
5652
5653 * ada-lex.l: Include "diagnostics.h" instead of
5654 "common/diagnostics.h".
5655 * unittests/environ-selftests.c: Likewise.
5656 * common/diagnostics.h: Moved to ../include.
5657
5658 2018-06-01 Joel Brobecker <brobecker@adacore.com>
5659
5660 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5661 to language_mode_manual while calling breakpoint_re_set_one.
5662
5663 2018-06-01 Tom Tromey <tom@tromey.com>
5664
5665 * valops.c (value_cast_structs, destructor_name_p): Update.
5666 * symtab.c (gdb_mangle_name): Update.
5667 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5668 Update.
5669 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5670 (pascal_object_print_value_fields, pascal_object_print_value):
5671 Update.
5672 * p-typeprint.c (pascal_type_print_derivation_info): Update.
5673 * linespec.c (find_methods): Update.
5674 * gdbtypes.h (type_name_no_tag): Remove.
5675 (type_name_or_error): Rename from type_name_no_tag_or_error.
5676 * gdbtypes.c (type_name_no_tag): Remove.
5677 (type_name_or_error): Rename from type_name_no_tag_or_error.
5678 (lookup_struct_elt_type, check_typedef): Update.
5679 * expprint.c (print_subexp_standard): Update.
5680 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5681 * d-namespace.c (d_lookup_nested_symbol): Update.
5682 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5683 (cp_print_class_member): Update.
5684 * cp-namespace.c (cp_lookup_nested_symbol): Update.
5685 * completer.c (add_struct_fields): Update.
5686 * c-typeprint.c (cp_type_print_derivation_info)
5687 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5688 Update.
5689 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5690 (ada_prefer_type, ada_is_exception_sym): Update.
5691
5692 2018-06-01 Tom Tromey <tom@tromey.com>
5693
5694 * valops.c (enum_constant_from_type, value_namespace_elt)
5695 (value_maybe_namespace_elt): Update.
5696 * valarith.c (find_size_for_pointer_math): Update.
5697 * target-descriptions.c (make_gdb_type): Update.
5698 * symmisc.c (print_symbol): Update.
5699 * stabsread.c (define_symbol, read_type)
5700 (complain_about_struct_wipeout, add_undefined_type)
5701 (cleanup_undefined_types_1): Update.
5702 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5703 (rust_range_type_p, val_print_struct, rust_print_struct_def)
5704 (rust_internal_print_type, rust_composite_type)
5705 (rust_evaluate_funcall, rust_evaluate_subexp)
5706 (rust_inclusive_range_type_p): Update.
5707 * python/py-type.c (typy_get_tag): Update.
5708 * p-typeprint.c (pascal_type_print_base): Update.
5709 * mdebugread.c (parse_symbol, parse_type): Update.
5710 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5711 Update.
5712 * guile/scm-type.c (gdbscm_type_tag): Update.
5713 * go-lang.c (sixg_string_p): Update.
5714 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5715 Update.
5716 * gdbtypes.h (struct main_type) <tag_name>: Remove.
5717 (TYPE_TAG_NAME): Remove.
5718 * gdbtypes.c (type_name_no_tag): Simplify.
5719 (check_typedef, check_types_equal, recursive_dump_type)
5720 (copy_type_recursive, arch_composite_type): Update.
5721 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
5722 in summary mode when needed.
5723 * eval.c (evaluate_funcall): Update.
5724 * dwarf2read.c (fixup_go_packaging, read_structure_type)
5725 (process_structure_scope, read_enumeration_type)
5726 (read_namespace_type, read_module_type, determine_prefix): Update.
5727 * cp-support.c (inspect_type): Update.
5728 * coffread.c (process_coff_symbol, decode_base_type): Update.
5729 * c-varobj.c (c_is_path_expr_parent): Update.
5730 * c-typeprint.c (c_type_print_base_struct_union): Update.
5731 (c_type_print_base_1): Update. Print struct/class/union/enum in
5732 summary when using C language.
5733 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5734 (gen_maybe_namespace_elt): Update.
5735 * ada-lang.c (ada_type_name): Simplify.
5736 (empty_record, ada_template_to_fixed_record_type_1)
5737 (template_to_static_fixed_type)
5738 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5739
5740 2018-06-01 Tom Tromey <tom@tromey.com>
5741
5742 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5743 c_print_type.
5744 * c-typeprint.c (c_print_type_1): Add "language" parameter.
5745 (c_print_type): Update.
5746 (c_print_type): New overload.
5747 (c_type_print_varspec_prefix, c_type_print_args)
5748 (c_type_print_varspec_suffix, c_print_type_no_offsets)
5749 (c_type_print_base_struct_union, c_type_print_base_1)
5750 (cp_type_print_method_args): Add "language" parameter.
5751 (c_type_print_base): Update.
5752 * c-lang.h (c_print_type): Add new overload.
5753
5754 2018-06-01 Tom Tromey <tom@tromey.com>
5755
5756 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5757 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5758
5759 2018-06-01 Alan Hayward <alan.hayward@arm.com>
5760
5761 * aarch64-tdep.c (aarch64_sve_register_names): New const
5762 var.
5763 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5764 (AARCH64_SVE_Z_REGS_NUM): New define.
5765 (AARCH64_SVE_P_REGS_NUM): Likewise.
5766 (AARCH64_SVE_NUM_REGS): Likewise.
5767
5768 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5769
5770 * nat/linux-ptrace.h [__alpha__]
5771 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5772 definitions.
5773
5774 2018-05-31 Maciej W. Rozycki <macro@mips.com>
5775
5776 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5777 the endianness selected.
5778 * NEWS: Document `set endian auto' mode operation update.
5779
5780 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5781
5782 * Makefile.in: Add new header.
5783 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5784 (sve_vl_from_vg): Likewise.
5785 (sve_vq_from_vl): Likewise.
5786 (sve_vl_from_vq): Likewise.
5787 (sve_vq_from_vg): Likewise.
5788 (sve_vg_from_vq): Likewise.
5789 * configure.nat: Add new c file.
5790 * nat/aarch64-sve-linux-ptrace.c: New file.
5791 * nat/aarch64-sve-linux-ptrace.h: New file.
5792
5793 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5794
5795 * aarch64-linux-nat.c (aarch64_linux_read_description):
5796 Add parmeter zero.
5797 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5798 Likewise.
5799 * aarch64-tdep.c (tdesc_aarch64_list): Add.
5800 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5801 (aarch64_gdbarch_init): Add parmeter zero.
5802 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5803 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5804 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5805 parmeter.
5806 * doc/gdb.texinfo: Describe SVE feature
5807 * features/aarch64-sve.c: New file.
5808
5809 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5810
5811 PR gdb/23210
5812 * gdbarch.sh (significant_addr_bit): Default to zero when
5813 not set by target architecture.
5814 * gdbarch.c: Re-generated.
5815 * utils.c (address_significant): Update.
5816
5817 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5818
5819 * stack.c (func_command): Remove trailing newline in call to error.
5820
5821 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5822
5823 * regcache.h (regcache_raw_collect): Remove, update callers to
5824 use regcache::raw_collect.
5825 * regcache.c (regcache_raw_collect): Remove.
5826
5827 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5828
5829 * regcache.h (regcache_raw_supply): Remove, update callers to
5830 use detached_regcache::raw_supply.
5831 * regcache.c (regcache_raw_supply): Remove.
5832
5833 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5834
5835 * regcache.h (regcache_cooked_write_part): Remove, update
5836 callers to use regcache::cooked_write_part.
5837 * regcache.c (regcache_cooked_write_part): Remove.
5838
5839 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5840
5841 * regcache.h (regcache_cooked_read_part): Remove, update callers
5842 to use readable_regcache::cooked_read_part.
5843 * regcache.c (regcache_cooked_read_part): Remove.
5844
5845 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5846
5847 * regcache.h (regcache_cooked_read_value): Remove, update
5848 callers to use readable_regcache::cooked_read_value.
5849 * regcache.c (regcache_cooked_read_value): Remove.
5850
5851 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5852
5853 * regcache.h (regcache_cooked_write): Remove, update callers to
5854 use regcache::cooked_write.
5855 * regcache.c (regcache_cooked_write): Remove.
5856
5857 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5858
5859 * regcache.h (regcache_invalidate): Remove, update callers to
5860 use detached_regcache::invalidate instead.
5861 * regcache.c (regcache_invalidate): Remove.
5862
5863 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5864
5865 * regcache.h (regcache_raw_write_part): Remove, update callers
5866 to use regcache::raw_write_part instead.
5867 * regcache.c (regcache_raw_write_part): Remove.
5868
5869 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5870
5871 * regcache.h (regcache_raw_read_part): Remove, update callers to
5872 use readable_regcache::raw_read_part instead.
5873 * regcache.c (regcache_raw_read_part): Remove.
5874
5875 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5876
5877 * regcache.h (regcache_cooked_read): Remove, update callers to
5878 use readable_regcache::cooked_read instead.
5879 * regcache.c (regcache_cooked_read): Remove.
5880
5881 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5882
5883 * regcache.h (regcache_raw_write): Remove, update callers to use
5884 regcache::raw_write instead.
5885 * regcache.c (regcache_raw_write): Remove.
5886
5887 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5888
5889 * regcache.h (regcache_raw_read): Remove, update callers to use
5890 readable_regcache::raw_read instead.
5891 * regcache.c (regcache_raw_read): Remove.
5892
5893 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5894
5895 * regcache.h (regcache_raw_update): Remove, update callers to
5896 use readable_regcache::raw_update instead.
5897 * regcache.c (regcache_raw_update): Remove.
5898
5899 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5900
5901 * regcache.h (regcache_register_status): Remove, update callers
5902 to use reg_buffer::get_register_status directly instead.
5903 * regcache.c (regcache_register_status): Remove.
5904
5905 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5906
5907 * regcache.h (regcache_get_ptid): Remove, update all callers to
5908 call regcache::ptid instead.
5909 * regcache.c (regcache_get_ptid): Remove.
5910
5911 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5912
5913 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5914
5915 2018-05-30 Pedro Alves <palves@redhat.com>
5916
5917 * common/common-exceptions.h (exception_rethrow): Use
5918 ATTRIBUTE_NORETURN.
5919
5920 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5921
5922 * breakpoint.c (print_solib_event, check_status_catch_solib):
5923 Remove struct keyword in range-based for loops.
5924 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5925 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5926 Likewise.
5927 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5928 Likewise.
5929 * symfile.c (addr_info_make_relative): Likewise.
5930 * thread.c (value_in_thread_stack_temporaries): Likewise.
5931
5932 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5933
5934 PR gdb/16841
5935 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5936 aggregate type to get its real type before accessing it.
5937
5938 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5939
5940 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5941 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5942 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5943 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5944 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5945 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5946 * printcmd.c (info_address_command): Likewise.
5947
5948 2018-05-29 Tom Tromey <tom@tromey.com>
5949
5950 * windows-nat.c (handle_exception): Update fall-through comment.
5951
5952 2018-05-29 Tom Tromey <tom@tromey.com>
5953
5954 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5955 (struct program_space) <added_solibs>: Now a std::vector.
5956 * breakpoint.c (print_solib_event): Update.
5957 (check_status_catch_solib): Update.
5958 * progspace.c (clear_program_space_solib_cache): Update.
5959 * solib.c (update_solib_list): Update.
5960
5961 2018-05-29 Tom Tromey <tom@tromey.com>
5962
5963 * python/py-type.c (typy_richcompare): Update.
5964 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5965 * gdbtypes.h (types_deeply_equal): Return bool.
5966 (types_equal): Likewise.
5967 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5968 declare VEC.
5969 (check_types_equal): Change worklist to std::vector. Return
5970 bool.
5971 (struct type_equality_entry): Add constructor.
5972 (compare_maybe_null_strings): Return bool.
5973 (check_types_worklist): Return bool. Change worklist to
5974 std::vector.
5975 (types_deeply_equal): Use std::vector.
5976 (types_equal): Return bool.
5977 (compare_maybe_null_strings): Simplify.
5978
5979 2018-05-29 Tom Tromey <tom@tromey.com>
5980
5981 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5982
5983 2018-05-29 Tom Tromey <tom@tromey.com>
5984
5985 * objc-lang.h: Don't include cp-support.h.
5986 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5987 declare VEC.
5988
5989 2018-05-27 Tom Tromey <tom@tromey.com>
5990
5991 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5992
5993 2018-05-25 Tom Tromey <tom@tromey.com>
5994
5995 * value.c (value::location): Initialize.
5996
5997 2018-05-25 Tom Tromey <tom@tromey.com>
5998
5999 * dbxread.c (init_bincl_list): Remove.
6000 (bincl_list): Now a std::vector.
6001 (bincls_allocated, next_bincl): Remove.
6002 (free_bincl_list, do_free_bincl_list_cleanup)
6003 (make_cleanup_free_bincl_list): Remove.
6004 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6005 unique_xmalloc_ptr.
6006 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6007 (struct header_file_location): Add constructor.
6008 (add_bincl_to_list): Remove.
6009
6010 2018-05-25 Tom Tromey <tom@tromey.com>
6011
6012 * tui/tui.c (tui_enable): Update.
6013 * mi/mi-interp.c (mi_interp::init): Update.
6014 * interps.h (class interp) <name>: New method.
6015 <m_name>: Rename from name.
6016 (~scoped_restore_interp): Update.
6017 * interps.c (interp::interp): Update.
6018 (interp_add, interp_set, interp_lookup_existing)
6019 (current_interp_named_p): Update.
6020
6021 2018-05-25 Tom Tromey <tom@tromey.com>
6022
6023 * interps.c (interp_name): Remove.
6024 * mi/mi-interp.c (mi_interp::init): Update.
6025 * interps.h (interp_name): Remove.
6026 (~scoped_restore_interp): Update.
6027 * tui/tui.c (tui_enable): Update.
6028
6029 2018-05-25 Tom Tromey <tom@tromey.com>
6030
6031 * utils.c (fputs_maybe_filtered): Update.
6032 * linespec.c (decode_line_full): Update.
6033 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6034 (mi_print_breakpoint_for_event, mi_solib_loaded)
6035 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6036 (mi_user_selected_context_changed): Update.
6037 * mi/mi-main.c (mi_execute_command): Update.
6038 * cli/cli-script.c (execute_control_command): Update.
6039 * python/python.c (execute_gdb_command): Update.
6040 * solib.c (info_sharedlibrary_command): Update.
6041 * interps.c (interp_ui_out): Remove.
6042 * interps.h (interp_ui_out): Remove.
6043
6044 2018-05-25 Tom Tromey <tom@tromey.com>
6045
6046 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6047 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6048 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6049
6050 2018-05-25 Tom Tromey <tom@tromey.com>
6051
6052 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6053 * interps.c (interp_exec): Use scoped_restore.
6054
6055 2018-05-25 Tom Tromey <tom@tromey.com>
6056
6057 * remote.c (remote_target::remote_file_get): Use
6058 gdb::byte_vector.
6059 (remote_target::remote_file_put): Likewise.
6060
6061 2018-05-25 Tom Tromey <tom@tromey.com>
6062
6063 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6064 a std::string.
6065 (get_pe_section_index, add_pe_exported_sym): Update.
6066 (read_pe_exported_syms): Use gdb::def_vector.
6067
6068 2018-05-25 Tom Tromey <tom@tromey.com>
6069
6070 * frame.c (remove_prev_frame): Remove.
6071 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6072
6073 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6074
6075 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6076 Remove prototypes.
6077 * mips-linux-nat.c (supply_fpregset): Always call
6078 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6079 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6080 `mips_fill_fpregset'.
6081 * mips-linux-tdep.c (mips_supply_fpregset)
6082 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6083 (mips_fill_fpregset_wrapper): Remove functions.
6084 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6085 (mips_linux_fpregset): Remove variable.
6086 (mips_linux_iterate_over_regset_sections): Use
6087 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6088 (mips_linux_o32_sigframe_init): Remove comment.
6089
6090 2018-05-25 Pedro Alves <palves@redhat.com>
6091
6092 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6093 (struct readahead_cache, struct packet_reg, struct
6094 remote_arch_state, class remote_state): Move higher up in the
6095 file.
6096 (remote_target::m_remote_state): Now an object instead of a pointer.
6097 (remote_target::get_remote_state): Adjust.
6098
6099 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6100
6101 * stack.c (select_and_print_frame): Delete.
6102 (struct function_bounds): Move struct within function.
6103 (func_command): Most content moved into new function
6104 find_frame_for_function, use new function, print result, add
6105 function comment.
6106 (find_frame_for_function): New function, now returns a result.
6107
6108 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6109
6110 * stack.c (iterate_over_block_arg_vars): Fix comment.
6111 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6112
6113 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6114
6115 PR gdb/23203
6116 * frame.c
6117 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6118 Define.
6119 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6120 Define.
6121 * frame.h (class scoped_restore_selected_frame): New class.
6122 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6123 of any exception, use scoped_restore_selected_frame to restore the
6124 frame instead.
6125
6126 2018-05-24 Pedro Alves <palves@redhat.com>
6127
6128 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6129 override.
6130
6131 2018-05-23 Tom Tromey <tom@tromey.com>
6132
6133 * complaints.c (struct complaints): Remove.
6134 (symfile_complaint_book): Remove.
6135 (series): New global.
6136 (complaint_internal): Update.
6137 (clear_complaints): Update.
6138
6139 2018-05-23 Tom Tromey <tom@tromey.com>
6140
6141 * complaints.c (counters): New global.
6142 (struct complain): Remove.
6143 (struct complaints) <root>: Remove.
6144 (complaint_sentinel): Remove.
6145 (symfile_complaint_book): Update.
6146 (find_complaint) Remove.
6147 (complaint_internal, clear_complaints): Update.
6148
6149 2018-05-23 Tom Tromey <tom@tromey.com>
6150
6151 * complaints.c (struct complain) <file, line>: Remove.
6152 (find_complaint): Remove file, line parameters.
6153 (complaint_internal): Update.
6154
6155 2018-05-23 Tom Tromey <tom@tromey.com>
6156
6157 * complaints.c (vcomplaint): Remove.
6158 (complaint_internal) Merge in contents of vcomplaint.
6159
6160 2018-05-23 Tom Tromey <tom@tromey.com>
6161
6162 * complaints.c (struct complaints) <explanation>: Remove.
6163 (symfile_explanations): Remove.
6164 (symfile_complaint_book): Update.
6165 (vcomplaint): Update.
6166 (struct explanation): Remove.
6167
6168 2018-05-23 Tom Tromey <tom@tromey.com>
6169
6170 * complaints.c (symfile_complaints): Remove.
6171 (complaint_internal): Remove "complaints" parameter.
6172 (clear_complaints, vcomplaint): Remove "c" parameter.
6173 (get_complaints): Remove.
6174 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6175 (dwarf2_debug_line_missing_file_complaint)
6176 (dwarf2_debug_line_missing_end_sequence_complaint)
6177 (dwarf2_complex_location_expr_complaint)
6178 (dwarf2_const_value_length_mismatch_complaint)
6179 (dwarf2_section_buffer_overflow_complaint)
6180 (dwarf2_macro_malformed_definition_complaint)
6181 (dwarf2_invalid_attrib_class_complaint)
6182 (create_addrmap_from_index, dw2_symtab_iter_next)
6183 (dw2_expand_marked_cus)
6184 (dw2_debug_names_iterator::find_vec_in_debug_names)
6185 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6186 (create_debug_type_hash_table, init_cutu_and_read_dies)
6187 (partial_die_parent_scope, add_partial_enumeration)
6188 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6189 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6190 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6191 (create_cus_hash_table, create_dwp_hash_table)
6192 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6193 (dwarf2_rnglists_process, dwarf2_ranges_process)
6194 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6195 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6196 (handle_struct_member_die, process_structure_scope)
6197 (read_array_type, read_common_block, read_module_type)
6198 (read_tag_pointer_type, read_typedef, read_base_type)
6199 (read_subrange_type, load_partial_dies, partial_die_info::read)
6200 (partial_die_info::read, partial_die_info::read)
6201 (partial_die_info::read, read_checked_initial_length_and_offset)
6202 (dwarf2_string_attr, read_formatted_entries)
6203 (dwarf_decode_line_header)
6204 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6205 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6206 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6207 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6208 (get_signatured_type, get_DW_AT_signature_type)
6209 (decode_locdesc, file_file_name, consume_improper_spaces)
6210 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6211 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6212 (dwarf2_symbol_mark_computed, set_die_type)
6213 (read_attribute_value): Update.
6214 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6215 Update.
6216 * dbxread.c (unknown_symtype_complaint)
6217 (lbrac_mismatch_complaint, repeated_header_complaint)
6218 (set_namestring, function_outside_compilation_unit_complaint)
6219 (read_dbx_symtab, process_one_symbol): Update.
6220 * gdbtypes.c (stub_noname_complaint): Update.
6221 * windows-nat.c (handle_unload_dll): Update.
6222 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6223 (decode_base_type): Update.
6224 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6225 (eb_complaint, record_include_begin, record_include_end)
6226 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6227 (process_xcoff_symbol, read_symbol)
6228 (function_outside_compilation_unit_complaint)
6229 (scan_xcoff_symtab): Update.
6230 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6231 * buildsym.c (finish_block_internal, make_blockvector)
6232 (end_symtab_get_static_block, augment_type_symtab): Update.
6233 * dtrace-probe.c (dtrace_process_dof)
6234 (dtrace_static_probe_ops::get_probes): Update.
6235 * complaints.h (struct complaint): Don't declare.
6236 (symfile_complaints): Remove.
6237 (complaint_internal): Remove "complaints" parameter.
6238 (complaint): Likewise.
6239 (clear_complaints): Likewise.
6240 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6241 (reread_symbols): Update.
6242 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6243 (dwarf2_frame_cache, decode_frame_entry): Update.
6244 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6245 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6246 (info_selectors_command): Update.
6247 * macrotab.c (macro_include, check_for_redefinition)
6248 (macro_undef): Update.
6249 * objfiles.c (filter_overlapping_sections): Update.
6250 * stabsread.c (invalid_cpp_abbrev_complaint)
6251 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6252 (define_symbol, error_type, read_type, rs6000_builtin_type)
6253 (stabs_method_name_from_physname, read_member_functions)
6254 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6255 (attach_fields_to_type, complain_about_struct_wipeout)
6256 (read_range_type, read_args, common_block_start)
6257 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6258 Update.
6259 * mdebugread.c (index_complaint, unknown_ext_complaint)
6260 (basic_type_complaint, bad_tag_guess_complaint)
6261 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6262 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6263 (parse_procedure, parse_lines)
6264 (function_outside_compilation_unit_complaint)
6265 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6266 (bad_tag_guess_complaint, reg_value_complaint): Update.
6267 * cp-support.c (demangled_name_complaint): Update.
6268 * macroscope.c (sal_macro_scope): Update.
6269 * dwarf-index-write.c (class debug_names): Update.
6270
6271 2018-05-23 Tom Tromey <tom@tromey.com>
6272
6273 * complaints.c (clear_complaints): Remove "noisy" parameter.
6274 * complaints.h (clear_complaints): Update.
6275 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6276 (reread_symbols): Update.
6277
6278 2018-05-23 Tom Tromey <tom@tromey.com>
6279
6280 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6281 SUBSEQUENT_MESSAGE.
6282 (vcomplaint, clear_complaints): Update.
6283 (symfile_explanations): Remove some messages.
6284
6285 2018-05-23 Tom Tromey <tom@tromey.com>
6286
6287 * complaints.c (internal_complaint): Remove.
6288 * complaints.h (internal_complaint): Remove.
6289
6290 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6291
6292 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6293
6294 2018-05-22 Pedro Alves <palves@redhat.com>
6295
6296 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6297 (remote_fileio_badfd, remote_fileio_return_errno)
6298 (remote_fileio_return_success, remote_fileio_func_open)
6299 (remote_fileio_func_open, remote_fileio_func_close)
6300 (remote_fileio_func_read, remote_fileio_func_write)
6301 (remote_fileio_func_lseek, remote_fileio_func_rename)
6302 (remote_fileio_func_unlink, remote_fileio_func_stat)
6303 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6304 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6305 remote_target parameter.
6306 (remote_fio_func_map) <func>: Add remote_target parameter.
6307 (do_remote_fileio_request, remote_fileio_request):
6308 * remote-fileio.h (remote_fileio_request):
6309 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6310 remote_target parameter.
6311 (remote_notif_process, handle_notification): Adjust to pass down
6312 the remote.
6313 (remote_notif_state_allocate): Add remote_target parameter. Save
6314 it.
6315 * remote-notif.h (struct remote_target): Forward declare.
6316 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6317 remote_target parameter.
6318 (struct remote_notif_state) <remote>: New field.
6319 (remote_notif_ack, remote_notif_parse): Add remote_target
6320 parameter.
6321 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6322 remote_target parameter.
6323 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6324 (threads_listing_context, rmt_thread_action, protocol_feature)
6325 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6326 (packet_result, struct threads_listing_context, remote_state):
6327 Move definitions and declarations higher up.
6328 (remote_target) <~remote_target>: Declare.
6329 (remote_download_command_source, remote_file_put, remote_file_get)
6330 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6331 (remote_hostio_pread_vFile, remote_hostio_send_command)
6332 (remote_hostio_set_filesystem, remote_hostio_open)
6333 (remote_hostio_close, remote_hostio_unlink, remote_state)
6334 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6335 (get_memory_write_packet_size, get_memory_read_packet_size)
6336 (append_pending_thread_resumptions, remote_detach_1)
6337 (append_resumption, remote_resume_with_vcont)
6338 (add_current_inferior_and_thread, wait_ns, wait_as)
6339 (process_stop_reply, remote_notice_new_inferior)
6340 (process_initial_stop_replies, remote_add_thread)
6341 (btrace_sync_conf, remote_btrace_maybe_reopen)
6342 (remove_new_fork_children, kill_new_fork_children)
6343 (discard_pending_stop_replies, stop_reply_queue_length)
6344 (check_pending_events_prevent_wildcard_vcont)
6345 (discard_pending_stop_replies_in_queue, stop_reply)
6346 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6347 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6348 (remote_interrupt_as, remote_interrupt_ns)
6349 (remote_get_noisy_reply, remote_query_attached)
6350 (remote_add_inferior, remote_current_thread, get_current_thread)
6351 (set_thread, set_general_thread, set_continue_thread)
6352 (set_general_process, write_ptid)
6353 (remote_unpack_thread_info_response, remote_get_threadinfo)
6354 (parse_threadlist_response, remote_get_threadlist)
6355 (remote_threadlist_iterator, remote_get_threads_with_ql)
6356 (remote_get_threads_with_qxfer)
6357 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6358 (get_offsets, remote_check_symbols, remote_supported_packet)
6359 (remote_query_supported, remote_packet_size)
6360 (remote_serial_quit_handler, remote_detach_pid)
6361 (remote_vcont_probe, remote_resume_with_hc)
6362 (send_interrupt_sequence, interrupt_query)
6363 (remote_notif_get_pending_events, fetch_register_using_p)
6364 (send_g_packet, process_g_packet, fetch_registers_using_g)
6365 (store_register_using_P, store_registers_using_G)
6366 (set_remote_traceframe, check_binary_download)
6367 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6368 (remote_xfer_live_readonly_partial, remote_read_bytes)
6369 (remote_send_printf, remote_flash_write, readchar)
6370 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6371 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6372 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6373 (extended_remote_disable_randomization, extended_remote_run)
6374 (send_environment_packet, extended_remote_environment_support)
6375 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6376 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6377 (packet_command): Now methods of ...
6378 (remote_target): ... this class.
6379 (m_remote_state) <remote_target>: New field.
6380 (struct remote_state) <stop_reply_queue,
6381 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6382 fields.
6383 (remote_state::remote_state): Allocate stop_reply_queue.
6384 (remote_state): Delete global.
6385 (get_remote_state_raw): Delete.
6386 (remote_target::get_remote_state): Allocate m_remote_state on
6387 demand.
6388 (get_current_remote_target): New.
6389 (remote_ops, extended_remote_ops): Delete.
6390 (wait_forever_enabled_p, remote_async_inferior_event_token):
6391 Delete, moved to struct remote_state.
6392 (remote_target::close): Delete self. Destruction bits split to
6393 ...
6394 (remote_target::~remote_target): ... this.
6395 (show_memory_packet_size): Adjust to use
6396 get_current_remote_target.
6397 (struct protocol_feature) <func>: Add remote_target parameter.
6398 All callers adjusted.
6399 (curr_quit_handler_target): New.
6400 (remote_serial_quit_handler): Reimplement.
6401 (remote_target::open_1): Adjust to use get_current_remote_target.
6402 Heap-allocate remote_target/extended_remote_target instances.
6403 (vcont_builder::vcont_builder): Add remote_target parameter, and
6404 save it in m_remote. All callers adjusted.
6405 (vcont_builder::m_remote): New field.
6406 (vcont_builder::restart, vcont_builder::flush)
6407 (vcont_builder::push_action): Use it.
6408 (remote_target::commit_resume): Use it.
6409 (struct queue_iter_param) <remote>: New field.
6410 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6411 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6412 (check_pending_event_prevents_wildcard_vcont_callback)
6413 (remote_target::check_pending_events_prevent_wildcard_vcont)
6414 (remote_target::discard_pending_stop_replies)
6415 (remote_target::discard_pending_stop_replies_in_queue)
6416 (remote_target::remote_notif_remove_queued_reply): Fill in
6417 'remote' field.
6418 (remote_notif_get_pending_events): New.
6419 (remote_target::readchar, remote_target::remote_serial_write):
6420 Save/restore curr_quit_handler_target.
6421 (putpkt): New.
6422 (kill_new_fork_children): Fill in 'remote' field.
6423 (packet_command): Use get_current_remote_target, defer to
6424 remote_target method of same name.
6425 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6426 parameter, and save it in m_remote. All callers adjusted.
6427 (scoped_remote_fd::release): Use m_remote.
6428 (scoped_remote_fd::m_remote): New field.
6429 (remote_file_put, remote_file_get, remote_file_delete): Use
6430 get_current_remote_target, defer to remote_target method of same
6431 name.
6432 (remote_btrace_reset): Add remote_state paremeter. Update all
6433 callers.
6434 (remote_async_inferior_event_handler). Pass down 'data'.
6435 (remote_new_objfile): Use get_current_remote_target.
6436 (remote_target::vcont_r_supported): New.
6437 (set_range_stepping): Use get_current_remote_target and
6438 remote_target::vcont_r_supported.
6439 (_initialize_remote): Don't allocate 'remote_state' and
6440 'stop_reply_queue' globals.
6441 * remote.h (struct remote_target): Forward declare.
6442 (getpkt, putpkt, remote_notif_get_pending_events): Add
6443 'remote_target' parameter.
6444
6445 2018-05-22 Pedro Alves <palves@redhat.com>
6446
6447 * remote.c (vcont_builder): Now a class. Make all data members
6448 private.
6449 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6450 Declare methods.
6451 (vcont_builder_restart): Rename to ...
6452 (vcont_builder::restart): ... this.
6453 (vcont_builder_flush): Rename to ...
6454 (vcont_builder::flush): ... this.
6455 (vcont_builder_push_action): Rename to ...
6456 (vcont_builder::push_action): ... this.
6457 (remote_target::commit_resume): Adjust.
6458
6459 2018-05-22 Pedro Alves <palves@redhat.com>
6460
6461 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6462 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6463 (get_fixed_memory_packet_size): New.
6464 (get_memory_packet_size): Use it.
6465 (set_memory_packet_size): Don't override the config size with
6466 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6467 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6468 Don't refer to get_memory_packet_size if not connected to a remote
6469 target. Show "(default)" if configured size is 0.
6470
6471 2018-05-22 Pedro Alves <palves@redhat.com>
6472
6473 * remote.c (remote_target::mourn_inferior): Move
6474 discard_pending_stop_replies call here from ...
6475 (_initialize_remote): ... here.
6476
6477 2018-05-22 Pedro Alves <palves@redhat.com>
6478
6479 * remote.c (compare_section_command): Remove set_general_process
6480 call.
6481
6482 2018-05-22 Pedro Alves <palves@redhat.com>
6483
6484 * remote.c (struct packet_reg, struct remote_arch_state):
6485 Move higher up in the file.
6486 (remote_state) <m_arch_states>: Store remote_arch_state values
6487 instead of remote_arch_state pointers.
6488 (remote_state::get_remote_arch_state): Adjust.
6489
6490 2018-05-22 Pedro Alves <palves@redhat.com>
6491
6492 * remote.c: Include <unordered_map>.
6493 (remote_state): Now a class.
6494 (remote_state) <get_remote_arch_state>: Declare method.
6495 <get_remote_arch_state>: New field.
6496 (remote_arch_state) <remote_arch_state>: Declare ctor.
6497 <regs>: Now a unique_ptr.
6498 (remote_gdbarch_data_handle): Delete.
6499 (get_remote_arch_state): Delete.
6500 (remote_state::get_remote_arch_state): New.
6501 (get_remote_state): Adjust to call remote_state's
6502 get_remote_arch_state method.
6503 (init_remote_state): Delete, bits factored out to ...
6504 (remote_arch_state::remote_arch_state): ... this new method.
6505 (get_remote_packet_size, get_memory_packet_size)
6506 (process_g_packet, remote_target::fetch_registers)
6507 (remote_target::prepare_to_store, store_registers_using_G)
6508 (remote_target::store_registers, remote_target::get_trace_status):
6509 Adjust to call remote_state's method.
6510 (_initialize_remote): Remove reference to
6511 remote_gdbarch_data_handle.
6512
6513 2018-05-22 Pedro Alves <palves@redhat.com>
6514
6515 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6516 pread>: New method declarations.
6517 (remote_target::open_1): Adjust.
6518 (readahead_cache_invalidate): Rename to ...
6519 (readahead_cache::invalidate): ... this, and adjust to be a class
6520 method.
6521 (readahead_cache_invalidate_fd): Rename to ...
6522 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6523 class method.
6524 (remote_hostio_pwrite): Adjust.
6525 (remote_hostio_pread_from_cache): Rename to ...
6526 (readahead_cache::pread): ... this, and adjust to be a class
6527 method.
6528 (remote_hostio_close): Adjust.
6529
6530 2018-05-22 Pedro Alves <palves@redhat.com>
6531
6532 * remote.c (remote_hostio_close_cleanup): Delete.
6533 (class scoped_remote_fd): New.
6534 (remote_file_put, remote_file_get): Use it.
6535
6536 2018-05-22 Pedro Alves <palves@redhat.com>
6537
6538 (struct vCont_action_support): Use bool and initialize all fields.
6539 (struct readahead_cache): Initialize all fields.
6540 (remote_state): Use bool and initialize all fields.
6541 (remote_state::remote_state, remote_state::~remote_state): New.
6542 (new_remote_state): Delete.
6543 (_initialize_remote): Use new to allocate remote_state.
6544
6545 2018-05-22 Pedro Alves <palves@redhat.com>
6546 張俊芝 <zjz@zjz.name>
6547
6548 PR gdb/22973
6549 * c-exp.y: Include "c-support.h".
6550 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6551 of tolower. Use c_ident_is_alpha to scan names.
6552 * c-lang.c: Include "c-support.h".
6553 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6554 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6555 * c-support.h: New file, with bits factored out from ...
6556 * cp-name-parser.y: ... this file.
6557 Include "c-support.h".
6558 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6559 c-support.h and renamed.
6560 (symbol_end, yylex): Adjust.
6561
6562 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6563
6564 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6565 parameter type to CORE_ADDR.
6566 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6567 parameter type in declaration to CORE_ADDR.
6568 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6569 target_auxv_search to get AT_HWCAP and use the result to get the
6570 target description.
6571 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6572 to CORE_ADDR. Remove the cast of the return value to unsigned
6573 long. Fix error predicate of target_auxv_search.
6574 (ppc_linux_nat_target::read_description): Change the type of the
6575 hwcap variable to CORE_ADDR.
6576
6577 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6578
6579 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6580 if the size of fpscr is larger than 32 bits.
6581
6582 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6583
6584 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6585 (ppc32_linux_vsxregmap): New global.
6586 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6587 regcache_supply_regset, and regcache_collect_regset.
6588 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6589 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6590 (fetch_vsx_register, store_vsx_register): Remove.
6591 (fetch_vsx_registers): Add regno parameter. Get regset using
6592 ppc_linux_vsxregset. Use regset to supply registers.
6593 (store_vsx_registers): Add regno parameter. Get regset using
6594 ppc_linux_vsxregset. Use regset to collect registers.
6595 (fetch_register): Call fetch_vsx_registers instead of
6596 fetch_vsx_register.
6597 (store_register): Call store_vsx_registers instead of
6598 store_vsx_register.
6599 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6600 new regno parameter.
6601 (store_ppc_registers): Call store_vsx_registers with -1 for the
6602 new regno parameter.
6603 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6604 (ppc_collect_vsxregset): Remove.
6605
6606 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6607
6608 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6609 offset fields.
6610 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6611 for vector register offset fields.
6612 (ppc64_fbsd_reg_offsets): Likewise.
6613 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6614 to vector register offset fields.
6615 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6616 to vector register offset fields.
6617 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6618 vector register offset fields.
6619 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6620 initializers for vector register offset fields.
6621 (rs6000_aix64_reg_offsets): Likewise.
6622 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6623 (ppc_supply_vrregset): Remove.
6624 (ppc_collect_vrregset): Remove.
6625 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6626 (ppc_linux_vrregset) : New function.
6627 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6628 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6629 (ppc32_linux_vrregset): Remove.
6630 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6631 and use result instead of ppc32_linux_vrregset.
6632 (ppc32_linux_reg_offsets): Remove initializers for vector register
6633 offset fields.
6634 (ppc64_linux_reg_offsets): Likewise.
6635 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6636 * ppc-linux-nat.c: Include regset.h.
6637 (gdb_vrregset_t): Adjust comment to account for little-endian
6638 mode.
6639 (supply_vrregset, fill_vrregset): Remove.
6640 (fetch_altivec_register, store_altivec_register): Remove.
6641 (fetch_altivec_registers): Add regno parameter. Get regset using
6642 ppc_linux_vrregset. Use regset to supply registers.
6643 (store_altivec_registers): Add regno parameter. Get regset using
6644 ppc_linux_vrregset. Use regset to collect registers.
6645 (fetch_register): Call fetch_altivec_registers instead of
6646 fetch_altivec_register.
6647 (store_register): Call store_altivec_registers instead of
6648 store_altivec_register.
6649 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6650 the new regno parameter.
6651 (store_ppc_registers): Call store_altivec_registers with -1 for
6652 the new regno parameter.
6653
6654 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6655
6656 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6657 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6658 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6659 (gdb_vrregset_t): Change array type size to
6660 PPC_LINUX_SIZEOF_VRREGSET.
6661 (gdb_vsxregset_t): Change array type size to
6662 PPC_LINUX_SIZEOF_VSXREGSET.
6663 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6664 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6665 PPC_LINUX_SIZEOF_VSXREGSET.
6666
6667 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6668
6669 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6670 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6671 nat/ppc-linux.c.
6672 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6673 ppc_linux_target_wordsize with tid.
6674 (ppc_linux_nat_target::read_description): Call ppc_linux_target
6675 wordsize with tid.
6676 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6677 (ppc64_64bit_inferior_p): Add static and inline specifiers.
6678 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6679 tid parameter. Remove static specifier.
6680 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6681 (ppc_linux_target_wordsize): New declaration.
6682
6683 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6684
6685 * arch/ppc-linux-common.c: New file.
6686 * arch/ppc-linux-common.h: New file.
6687 * arch/ppc-linux-tdesc.h: New file.
6688 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6689 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6690 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6691 arch/ppc-linux-tdesc.h.
6692 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6693 arch/ppc-linux-tdesc.h.
6694 (ppc_linux_nat_target::read_description): Remove target
6695 description matching code. Fill a ppc_linux_features struct and
6696 call ppc_linux_match_description with it. Move comment about ISA
6697 2.05 to ppc-linux-common.c.
6698 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6699 arch/ppc-linux-tdesc.h.
6700 (ppc_linux_core_read_description): Remove target description
6701 matching code. Fill a ppc_linux_features struct and call
6702 ppc_linux_match_description with it.
6703 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6704 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6705 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6706 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6707 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6708 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6709 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6710 (tdesc_powerpc_e500l): Remove.
6711
6712 2018-05-22 Joel Brobecker <brobecker@adacore.com>
6713
6714 * ada-lang.c (catch_assert_command): Pass empty string instead
6715 of NULL for excep_string argument.
6716
6717 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6718
6719 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6720 the width of the requested register exceeds the width of the
6721 `ptrace' data type.
6722
6723 2018-05-21 Tom Tromey <tom@tromey.com>
6724
6725 * printcmd.c (output_command): Remove.
6726 (output_command_const): Rename to output_command.
6727 * valprint.h (output_command): Rename from output_command_const.
6728 * tracepoint.c (trace_dump_actions): Call output_command.
6729
6730 2018-05-21 Tom Tromey <tom@tromey.com>
6731
6732 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6733 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6734 * ada-lang.h (create_ada_exception_catchpoint): Update.
6735 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6736 std::string.
6737 (create_excep_cond_exprs, ~ada_catchpoint)
6738 (should_stop_exception, print_one_exception)
6739 (print_mention_exception, print_recreate_exception): Update.
6740 (ada_get_next_arg): Remove.
6741 (catch_ada_exception_command_split): Use std::string. Change type
6742 of "excep_string", "cond_string".
6743 (catch_ada_exception_command): Update.
6744 (create_ada_exception_catchpoint): Change type of excep_string.
6745 (ada_exception_sal): Remove excep_string parameter.
6746 (~ada_catchpoint): Remove.
6747
6748 2018-05-21 Tom Tromey <tom@tromey.com>
6749
6750 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6751 cleanup.
6752
6753 2018-05-21 Tom Tromey <tom@tromey.com>
6754
6755 * ada-lang.c (ada_exception_message_1, ada_exception_message):
6756 Return unique_xmalloc_ptr.
6757 (print_it_exception): Update.
6758
6759 2018-05-21 Tom Tromey <tom@tromey.com>
6760
6761 * tracepoint.c (trace_dump_actions): Use std::string.
6762
6763 2018-05-21 Tom Tromey <tom@tromey.com>
6764
6765 * symfile.c (reread_symbols): Use std::string for original_name.
6766
6767 2018-05-21 Tom Tromey <tom@tromey.com>
6768
6769 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6770 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
6771 constructor.
6772
6773 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
6774
6775 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6776 instance to...
6777 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6778 * objfiles.c (get_objfile_bfd_data): Allocate
6779 objfile_per_bfd_storage with obstack_new when allocating on
6780 obstack.
6781
6782 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6783
6784 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6785 OBSTACK_ZALLOC.
6786 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6787 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6788 * mdebugread.c (mdebug_build_psymtabs): Likewise.
6789 (add_pending): Likewise.
6790 (parse_symbol): Likewise.
6791 (parse_partial_symbols): Likewise.
6792 (psymtab_to_symtab_1): Likewise.
6793 (new_psymtab): Likewise.
6794 (elfmdebug_build_psymtabs): Likewise.
6795 * minsyms.c (terminate_minimal_symbol_table): Likewise.
6796 * objfiles.c (get_objfile_bfd_data): Likewise.
6797 (objfile_register_static_link): Likewise.
6798 * psymtab.c (allocate_psymtab): Likewise.
6799 * stabsread.c (read_member_functions): Likewise.
6800 * xcoffread.c (xcoff_end_psymtab): Likewise.
6801
6802 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6803
6804 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6805 compiler supports std::is_trivially_constructible.
6806 * common/poison.h: Include obstack.h.
6807 (IsMallocable): Define to is_trivially_constructible if the
6808 compiler supports it, define to true_type otherwise.
6809 (xobnew): New.
6810 (XOBNEW): Redefine.
6811 (xobnewvec): New.
6812 (XOBNEWVEC): Redefine.
6813 * gdb_obstack.h (obstack_zalloc): New.
6814 (OBSTACK_ZALLOC): Redefine.
6815 (obstack_calloc): New.
6816 (OBSTACK_CALLOC): Redefine.
6817 (obstack_new): New.
6818 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6819 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6820 gdbarch.c.
6821 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6822 obstack_calloc/obstack_zalloc.
6823 (gdbarch_obstack_zalloc): Remove.
6824 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6825
6826 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6827
6828 * stack.c (backtrace_command_1): Remove useless variable int i.
6829
6830 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6831
6832 * stack.c (print_frame_info): Fix comment.
6833
6834 2018-05-18 Tom Tromey <tom@tromey.com>
6835
6836 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6837 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6838 (~dwarf2_per_objfile): Update
6839 (dwarf2_get_dwz_file): Use new.
6840 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6841 unique_ptr.
6842
6843 2018-05-18 Tom Tromey <tom@tromey.com>
6844
6845 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6846 unique_ptr.
6847 * dwarf2read.c (struct dwp_file): Add constructor and
6848 initializers.
6849 (open_and_init_dwp_file): Return a unique_ptr.
6850 (dwarf2_per_objfile, create_dwp_hash_table)
6851 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6852 (lookup_dwo_unit_in_dwp): Update.
6853 (open_and_init_dwp_file, get_dwp_file): Update.
6854
6855 2018-05-18 Tom Tromey <tom@tromey.com>
6856
6857 * dwarf2read.c (dwarf2_per_objfile): Update.
6858 (struct mapped_index): Add initializers.
6859 (dwarf2_read_index): Use new.
6860 (dw2_symtab_iter_init): Update.
6861 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6862 unique_ptr.
6863
6864 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6865
6866 * dwarf2read.c (mapped_index) <total_size>: Remove.
6867
6868 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6869
6870 * unittests/format_pieces-selftests.c (test_format_specifier):
6871 Add ARI comments.
6872
6873 2018-05-18 Tom Tromey <tom@tromey.com>
6874
6875 * c-typeprint.c (maybe_print_hole): New function.
6876 (c_print_type_struct_field_offset): Update.
6877 (c_type_print_base_struct_union): Call maybe_print_hole.
6878
6879 2018-05-17 Keith Seitz <keiths@redhat.com>
6880
6881 * breakpoint.c (build_bpstat_chain): New function, moved from
6882 bpstat_stop_status.
6883 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6884 If no stop chain is passed, call build_bpstat_chain to build it.
6885 * breakpoint.h (build_bpstat_chain): Declare.
6886 (bpstat_stop_status): Move documentation here from breakpoint.c.
6887 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6888 build the stop chain and pass it to skip_inline_frames.
6889 Pass this stop chain to bpstat_stop_status.
6890 * inline-frame.c: Include breakpoint.h.
6891 (stopped_by_user_bp_inline_frame): New function.
6892 (skip_inline_frames): Add parameter `stop_chain'.
6893 Move documention to inline-frame.h.
6894 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6895 whether the frame should be elided.
6896 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6897 Add moved documentation and update for new parameter.
6898
6899 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6900
6901 PR cli/14975
6902 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6903 unittests/format_pieces-selftests.c.
6904 * common/format.h (format_piece) <operator==>: New.
6905 (format_pieces) <operator[]>: Remove.
6906 * common/format.c (format_pieces::format_pieces): Handle \e.
6907 * unittests/format_pieces-selftests.c: New.
6908
6909 2018-05-17 Tom Tromey <tom@tromey.com>
6910
6911 PR symtab/23010:
6912 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6913 (dw2_instantiate_symtab): Add skip_partial parameter.
6914 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6915 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6916 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6917 (dw2_expand_symtabs_matching_one)
6918 (dw2_find_pc_sect_compunit_symtab)
6919 (dw2_debug_names_lookup_symbol)
6920 (dw2_debug_names_expand_symtabs_for_function): Update.
6921 (init_cutu_and_read_dies): Add skip_partial parameter.
6922 (process_psymtab_comp_unit, build_type_psymtabs_1)
6923 (process_skeletonless_type_unit, load_partial_comp_unit)
6924 (psymtab_to_symtab_1): Update.
6925 (load_full_comp_unit): Add skip_partial parameter.
6926 (process_imported_unit_die, dwarf2_read_addr_index)
6927 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6928 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6929 (read_signatured_type): Update.
6930
6931 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6932
6933 * value.c (release_value): Remove unused variable.
6934 (record_latest_value): Likewise.
6935 (access_value_history): Likewise.
6936 (preserve_values): Likewise.
6937
6938 2018-05-17 Tom Tromey <tom@tromey.com>
6939
6940 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6941 Initialize.
6942
6943 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6944
6945 PR gdb/22286
6946 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6947 Also handle registers whose width is not a multiple of
6948 PTRACE_TYPE_RET.
6949 (linux_nat_trad_target::store_register): Likewise.
6950
6951 2018-05-16 Tom Tromey <tom@tromey.com>
6952
6953 * gdbcore.h (core_bfd): Redefine.
6954 * corelow.c (core_target::close): Update.
6955 (core_target_open): Update.
6956 * progspace.h (struct program_space) <cbfd>: Now a
6957 gdb_bfd_ref_ptr.
6958
6959 2018-05-16 Tom Tromey <tom@tromey.com>
6960
6961 PR cli/19551:
6962 * symfile-add-flags.h (enum symfile_add_flags)
6963 <SYMFILE_NOT_FILENAME>: New constant.
6964 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6965 objfile name from BFD.
6966 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6967 * minidebug.c (find_separate_debug_file_in_section): Put
6968 ".gnu_debugdata" into BFD's file name.
6969
6970 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6971
6972 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6973 Remove.
6974
6975 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6976
6977 PR binutils/21446
6978 * aarch64-tdep.c (aarch64_analyze_prologue,
6979 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6980 Indicate not interested in errors.
6981
6982 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6983
6984 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6985 Supply the MIPS_ZERO_REGNUM register.
6986
6987 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6988
6989 * mips-tdep.c (mask_address_var): Make variable static.
6990
6991 2018-05-14 Tom Tromey <tom@tromey.com>
6992
6993 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6994
6995 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6996
6997 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6998 FXSAVE_ADDR for the mxcsr register.
6999
7000 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7001
7002 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7003
7004 2018-05-11 Pedro Alves <palves@redhat.com>
7005
7006 * corelow.c (core_target) <core_target>: No longer inline.
7007 Initialize m_core_gdbarch, m_core_vec and build the section table
7008 here.
7009 <~core_target>: New.
7010 <core_gdbarch, get_core_register_section>: New methods.
7011 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7012 factored out from ...
7013 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7014 (core_ops): Delete.
7015 (sniff_core_bfd): Add gdbarch parameter.
7016 (core_close): Delete, merged into ...
7017 (core_target::close): ... here. Delete self.
7018 (core_close_cleanup): Delete.
7019 (core_target_open): Allocate a core_target on the heap. Use a
7020 unique_ptr instead of a cleanup. Bits moved into the core_target
7021 ctor. Adjust to use core_target methods instead of globals.
7022 (get_core_register_section): Rename to ...
7023 (core_target::get_core_register_section): ... this and adjust.
7024 (struct get_core_registers_cb_data): New.
7025 (get_core_registers_cb): Use it. Use bool.
7026 (core_target::fetch_registers, core_target::files_info)
7027 (core_target::xfer_partial, core_target::read_description)
7028 (core_target::pid_to, core_target::thread_name): Adjust to
7029 reference class fields instead of globals.
7030 * target.h (struct target_ops_deleter, target_ops_up): New.
7031
7032 2018-05-11 Pedro Alves <palves@redhat.com>
7033
7034 * corefile.c (core_file_command): Move to corelow.c.
7035 * corelow.c (the_core_target): Delete.
7036 (core_file_command): Moved from corefile.c. Check exec_bfd
7037 instead of the_core_target. Use target_detach instead of calling
7038 into the_core_target directly.
7039 (maybe_say_no_core_file_now): New.
7040 (core_target::detach): Use it.
7041 (_initialize_corelow): Remove references to the_core_target.
7042 * gdbcore.h (the_core_target): Delete.
7043
7044 2018-05-11 Tom Tromey <tromey@redhat.com>
7045 Pedro Alves <palves@redhat.com>
7046
7047 * corefile.c (core_bfd): Remove.
7048 * gdbcore.h (core_bfd): Now a macro.
7049 * progspace.h (struct program_space) <cbfd>: New field.
7050
7051 2018-05-11 Tom Tromey <tom@tromey.com>
7052
7053 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7054 gdb::def_vector.
7055
7056 2018-05-10 Tom Tromey <tom@tromey.com>
7057
7058 * configure: Rebuild.
7059 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7060
7061 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7062
7063 PR server/23158:
7064 * regformats/regdat.sh: Adjust script, following the addition
7065 of the new expedite_regs parameter to init_target_desc.
7066
7067 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7068
7069 PR gdb/23127
7070 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7071 set_gdbarch_significant_addr_bit.
7072 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7073 set_gdbarch_significant_addr_bit.
7074 * utils.c (address_significant): Update to sign extend addr.
7075
7076 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7077
7078 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7079 (xtensa_linux_init_abi): Limit tdep->num_regs by
7080 tdep->num_nopriv_regs.
7081 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7082 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7083 not initialized.
7084
7085 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7086
7087 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7088
7089 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7090
7091 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7092 (I387_MXCSR_INIT_VAL): New constant.
7093 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7094 buffer if it was supplied by the inferior.
7095 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7096 (i387_xsave_get_clear_bv): New function.
7097 (i387_supply_xsave): Only read x87 control registers from the
7098 xsave buffer if the feature is enabled, and the state will have
7099 been written, otherwise, provide a suitable default.
7100 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7101 including x87 control registers. Update control registers if they
7102 have changed from the default value, and mark features as enabled
7103 as required.
7104 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7105
7106 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7107
7108 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7109
7110 2018-05-07 Tom Tromey <tom@tromey.com>
7111
7112 * configure: Rebuild.
7113 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7114
7115 2018-05-07 Tom Tromey <tom@tromey.com>
7116
7117 PR tdep/20362:
7118 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7119 bit. Use correct value for VDIV.
7120
7121 2018-05-04 Tom Tromey <tom@tromey.com>
7122
7123 * configure: Rebuild.
7124 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7125
7126 2018-05-04 Tom Tromey <tom@tromey.com>
7127
7128 * linux-record.c (record_linux_system_call) <case
7129 RECORD_SYS_RECVFROM>: Add "break".
7130
7131 2018-05-04 Tom Tromey <tom@tromey.com>
7132
7133 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7134 Add missing "break".
7135 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7136 Add missing "break".
7137
7138 2018-05-04 Tom Tromey <tom@tromey.com>
7139
7140 * rs6000-tdep.c (ppc_process_record_op4)
7141 (ppc_process_record_op63): Add fall-through comment.
7142
7143 2018-05-04 Tom Tromey <tom@tromey.com>
7144
7145 * i386-tdep.c (i386_process_record): Add fall-through comment.
7146
7147 2018-05-04 Tom Tromey <tom@tromey.com>
7148
7149 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7150 comment.
7151
7152 2018-05-04 Tom Tromey <tom@tromey.com>
7153
7154 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7155 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7156 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7157 comment.
7158 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7159 comment.
7160 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7161 comment.
7162
7163 2018-05-04 Tom Tromey <tom@tromey.com>
7164
7165 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7166
7167 2018-05-04 Tom Tromey <tom@tromey.com>
7168
7169 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7170 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7171 * symfile.c (section_is_mapped): Fix fall-through comment.
7172 * stabsread.c (define_symbol, read_member_functions): Fix
7173 fall-through comment.
7174 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7175 comment.
7176 * remote.c (remote_wait_as): Fix fall-through comment.
7177 * p-exp.y (yylex): Fix fall-through comment.
7178 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7179 comment.
7180 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7181 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7182 * jv-exp.y (yylex): Fix fall-through comment.
7183 * go-exp.y (lex_one_token): Fix fall-through comment.
7184 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7185 fall-through comment.
7186 * f-exp.y (yylex): Fix fall-through comment.
7187 * dwarf2read.c (process_die): Fix fall-through comments.
7188 * dbxread.c (process_one_symbol): Fix fall-through comment.
7189 * d-exp.y (lex_one_token): Fix fall-through comment.
7190 * cp-name-parser.y (yylex): Fix fall-through comment.
7191 * coffread.c (coff_symtab_read): Fix fall-through comment.
7192 * c-exp.y (lex_one_token): Fix fall-through comment.
7193 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7194 comment.
7195 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7196 comment.
7197
7198 2018-05-04 Tom Tromey <tom@tromey.com>
7199
7200 PR python/22730:
7201 * NEWS: Mention gdb.execute change.
7202 * gdbcmd.h (execute_control_command): Don't declare.
7203 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7204 execute_control_commands, execute_control_commands_to_string.
7205 * cli/cli-script.h (execute_control_commands)
7206 (execute_control_commands_to_string): Declare.
7207 (execute_control_command): Add from_tty parameter.
7208 * cli/cli-script.c (execute_control_commands)
7209 (execute_control_commands_to_string): New functions.
7210 (execute_user_command): Use execute_control_commands.
7211 (execute_control_command_1): Add "from_tty" parameter. Update.
7212 (execute_control_command): Likewise.
7213
7214 2018-05-04 Tom Tromey <tom@tromey.com>
7215
7216 PR python/22731:
7217 * NEWS: Mention that breakpoint commands are writable.
7218 * python/py-breakpoint.c (bppy_set_commands): New function.
7219 (breakpoint_object_getset) <"commands">: Use it.
7220
7221 2018-05-04 Tom Tromey <tom@tromey.com>
7222
7223 * tracepoint.c (actions_command): Update.
7224 * mi/mi-cmd-break.c (mi_command_line_array)
7225 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7226 (mi_read_next_line): Remove.
7227 (mi_cmd_break_commands): Update.
7228 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7229 function_view.
7230 * cli/cli-script.c (get_command_line): Update.
7231 (process_next_line): Use function_view. Constify.
7232 (recurse_read_control_structure, read_command_lines)
7233 (read_command_lines_1): Change argument types to function_view.
7234 (do_define_command, document_command): Update.
7235 * breakpoint.h (check_tracepoint_command): Don't declare.
7236 * breakpoint.c (check_tracepoint_command): Remove.
7237 (commands_command_1, create_tracepoint_from_upload): Update.
7238
7239 2018-05-04 Tom Tromey <tom@tromey.com>
7240
7241 PR gdb/11750:
7242 * cli/cli-script.h (enum command_control_type) <define_control>:
7243 New constant.
7244 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7245 (build_command_line, execute_control_command_1)
7246 (process_next_line): Likewise.
7247 (do_define_command): New function, extracted from define_command.
7248 (define_command): Use it.
7249
7250 2018-05-04 Tom Tromey <tom@tromey.com>
7251
7252 * tracepoint.c (actions_command): Update.
7253 * cli/cli-script.h (read_command_lines): Update.
7254 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7255 (MAX_TMPBUF): Remove define.
7256 (define_command): Use string_printf.
7257 (document_command): Likewise.
7258 * breakpoint.c (commands_command_1): Update.
7259
7260 2018-05-04 Tom Tromey <tom@tromey.com>
7261
7262 * top.c (execute_command): Update.
7263 * cli/cli-script.h (print_command_lines): Now varargs.
7264 * cli/cli-script.c (print_command_lines): Now varargs.
7265 (execute_control_command_1) <case while_control, case if_control>:
7266 Update.
7267
7268 2018-05-04 Tom Tromey <tom@tromey.com>
7269
7270 * tracepoint.c (all_tracepoint_actions): Rename from
7271 all_tracepoint_actions_and_cleanup. Change return type.
7272 (actions_command, encode_actions_1, encode_actions)
7273 (trace_dump_actions, tdump_command): Update.
7274 * remote.c (remote_download_command_source): Update.
7275 * python/python.c (gdbpy_eval_from_control_command)
7276 (python_command, python_interactive_command): Update.
7277 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7278 * guile/guile.c (guile_command)
7279 (gdbscm_eval_from_control_command, guile_command): Update.
7280 * compile/compile.c (compile_code_command)
7281 (compile_print_command, compile_to_object): Update.
7282 * cli/cli-script.h (struct command_lines_deleter): New.
7283 (counted_command_line): New typedef.
7284 (struct command_line): Add constructor, destructor.
7285 <body_list>: Remove.
7286 <body_list_0, body_list_1>: New members.
7287 (command_line_up): Remove typedef.
7288 (read_command_lines, read_command_lines_1, get_command_line):
7289 Update.
7290 (copy_command_lines): Don't declare.
7291 * cli/cli-script.c (build_command_line): Use "new".
7292 (get_command_line): Return counted_command_line.
7293 (print_command_lines, execute_user_command)
7294 (execute_control_command_1, while_command, if_command): Update.
7295 (realloc_body_list): Remove.
7296 (process_next_line, recurse_read_control_structure): Update.
7297 (read_command_lines, read_command_lines_1): Return counted_command_line.
7298 (free_command_lines): Use "delete".
7299 (copy_command_lines): Remove.
7300 (define_command, document_command, show_user_1): Update.
7301 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7302 a counted_command_line.
7303 * breakpoint.h (counted_command_line): Remove typedef.
7304 (breakpoint_set_commands): Update.
7305 * breakpoint.c (check_no_tracepoint_commands)
7306 (validate_commands_for_breakpoint): Update.
7307 (breakpoint_set_commands): Change commands to be a
7308 counted_command_line.
7309 (commands_command_1, update_dprintf_command_list)
7310 (create_tracepoint_from_upload): Update.
7311
7312 2018-05-04 Tom Tromey <tom@tromey.com>
7313
7314 * cli/cli-decode.h (cmd_list_element): New constructor.
7315 (~cmd_list_element): New destructor.
7316 (struct cmd_list_element): Add initializers.
7317 * cli/cli-decode.c (do_add_cmd): Use "new".
7318 (delete_cmd): Use "delete".
7319
7320 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7321 Pedro Alves <palves@redhat.com>
7322
7323 PR breakpoints/19806 and support for PR external/20207.
7324 * NEWS: Mention Aarch64 watchpoint improvements.
7325 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7326 watchpoints and PR external/20207 watchpoints.
7327 * nat/aarch64-linux-hw-point.c
7328 (kernel_supports_any_contiguous_range): New.
7329 (aarch64_watchpoint_offset): New.
7330 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7331 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7332 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7333 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7334 next_addr_orig_p. Support PR external/20207 watchpoints.
7335 (aarch64_downgrade_regs): New.
7336 (aarch64_dr_state_insert_one_point): New parameters offset and
7337 addr_orig.
7338 (aarch64_dr_state_remove_one_point): Likewise.
7339 (aarch64_handle_breakpoint): Update caller.
7340 (aarch64_handle_aligned_watchpoint): Likewise.
7341 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7342 aligned_offset.
7343 (aarch64_linux_set_debug_regs): Remove const from state. Call
7344 aarch64_downgrade_regs.
7345 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7346 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7347 (DR_CONTROL_MASK): ... this.
7348 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7349 (unsigned int aarch64_watchpoint_offset): New prototype.
7350 (aarch64_linux_set_debug_regs): Remove const from state.
7351 * utils.c (align_up, align_down): Move to ...
7352 * common/common-utils.c (align_up, align_down): ... here.
7353 * utils.h (align_up, align_down): Move to ...
7354 * common/common-utils.h (align_up, align_down): ... here.
7355
7356 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7357
7358 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7359 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7360 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7361 Re-implement to match the ABI as summarized in GCC's
7362 gcc/config/sparc/sparc.c. All callers updated.
7363 (sparc32_store_arguments): Remove assertion.
7364
7365 2018-05-04 Tom Tromey <tom@tromey.com>
7366
7367 * printcmd.c: Don't include tui.h.
7368 (decode_format): Use skip_spaces.
7369
7370 2018-05-04 Tom Tromey <tom@tromey.com>
7371
7372 PR gdb/22619:
7373 * printcmd.c (last_count): New global.
7374 (x_command): Use saved count when repeating.
7375
7376 2018-05-04 Tom Tromey <tom@tromey.com>
7377
7378 * nto-procfs.c (do_closedir_cleanup): Remove.
7379 (procfs_pidlist): Use gdb_dir_up.
7380 * procfs.c (do_closedir_cleanup): Remove.
7381 (proc_update_threads): Use gdb_dir_up.
7382 * common/filestuff.h (struct gdb_dir_deleter): New.
7383 (gdb_dir_up): New typedef.
7384
7385 2018-05-04 Tom Tromey <tom@tromey.com>
7386
7387 * ada-lang.c (print_mention_exception): Use std::string.
7388
7389 2018-05-04 Tom Tromey <tom@tromey.com>
7390
7391 * ada-lang.c (create_excep_cond_exprs): Update.
7392 (ada_exception_catchpoint_cond_string): Use std::string.
7393
7394 2018-05-04 Tom Tromey <tom@tromey.com>
7395
7396 * ada-lang.c (xget_renaming_scope): Return std::string.
7397 (old_renaming_is_invisible): Update.
7398
7399 2018-05-04 Tom Tromey <tom@tromey.com>
7400
7401 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7402 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7403
7404 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7405
7406 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7407
7408 2018-05-04 Tom Tromey <tom@tromey.com>
7409
7410 * remote.c (remote_query_supported_append): Change type.
7411 (remote_check_symbols): Update.
7412
7413 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7414
7415 PR gdb/11420
7416 * configure.ac: Prepend libpython.
7417 * python/python-config.py: Likewise.
7418 * configure: Regenerate.
7419
7420 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7421
7422 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7423
7424 2018-05-03 Pedro Alves <palves@redhat.com>
7425
7426 * s390-linux-nat.c
7427 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7428 override. Write 'true' instead of '1'.
7429 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7430 declaration.
7431
7432 2018-05-02 Pedro Alves <palves@redhat.com>
7433
7434 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7435 add_inf_child_target.
7436 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7437 add_inf_child_target.
7438 * aix-thread.c (aix_thread_target_info): New.
7439 (aix_thread_target) <shortname, longname, doc>: Delete.
7440 <info>: New.
7441 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7442 add_inf_child_target.
7443 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7444 add_inf_child_target.
7445 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7446 add_inf_child_target.
7447 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7448 add_inf_child_target.
7449 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7450 add_inf_child_target.
7451 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7452 add_inf_child_target.
7453 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7454 add_inf_child_target.
7455 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7456 add_inf_child_target.
7457 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7458 add_inf_child_target.
7459 * bfd-target.c (target_bfd_target_info): New.
7460 (target_bfd) <shortname, longname, doc>: Delete.
7461 <info>: New.
7462 * bsd-kvm.c (bsd_kvm_target_info): New.
7463 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7464 <info>: New.
7465 (bsd_kvm_target::open): Rename to ...
7466 (bsd_kvm_target_open): ... this. Adjust.
7467 * bsd-uthread.c (bsd_uthread_target_info): New.
7468 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7469 <info>: New.
7470 * corefile.c (core_file_command): Adjust.
7471 * corelow.c (core_target_info): New.
7472 (core_target) <shortname, longname, doc>: Delete.
7473 <info>: New.
7474 (core_target::open): Rename to ...
7475 (core_target_open): ... this. Adjust.
7476 * ctf.c (ctf_target_info): New.
7477 (ctf_target) <shortname, longname, doc>: Delete.
7478 <info>: New.
7479 (ctf_target::open): Rename to ...
7480 (ctf_target_open): ... this.
7481 (_initialize_ctf): Adjust.
7482 * exec.c (exec_target_info): New.
7483 (exec_target) <shortname, longname, doc>: Delete.
7484 <info>: New.
7485 (exec_target::open): Rename to ...
7486 (exec_target_open): ... this.
7487 * gdbcore.h (core_target_open): Declare.
7488 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7489 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7490 add_inf_child_target.
7491 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7492 add_inf_child_target.
7493 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7494 add_inf_child_target.
7495 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7496 add_inf_child_target.
7497 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7498 add_inf_child_target.
7499 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7500 add_inf_child_target.
7501 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7502 add_inf_child_target.
7503 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7504 add_inf_child_target.
7505 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7506 add_inf_child_target.
7507 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7508 add_inf_child_target.
7509 * inf-child.c (inf_child_target_info): New.
7510 (inf_child_target::info): New.
7511 (inf_child_open_target): Remove 'target' parameter. Use
7512 get_native_target instead.
7513 (inf_child_target::open): Delete.
7514 (add_inf_child_target): New.
7515 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7516 Delete.
7517 <info>: New.
7518 (add_inf_child_target): Declare.
7519 (inf_child_open_target): Declare.
7520 * linux-thread-db.c (thread_db_target_info): New.
7521 (thread_db_target) <shortname, longname, doc>: Delete.
7522 <info>: New.
7523 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7524 add_inf_child_target.
7525 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7526 add_inf_child_target.
7527 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7528 add_inf_child_target.
7529 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7530 add_inf_child_target.
7531 * make-target-delegates (print_class): Adjust.
7532 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7533 add_inf_child_target.
7534 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7535 add_inf_child_target.
7536 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7537 add_inf_child_target.
7538 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7539 add_inf_child_target.
7540 * nto-procfs.c (nto_native_target_info): New.
7541 (nto_procfs_target_native) <shortname, longname, doc>:
7542 Delete.
7543 <info>: New.
7544 (nto_procfs_target_info): New.
7545 (nto_procfs_target_procfs) <shortname, longname, doc>:
7546 Delete.
7547 <info>: New.
7548 (init_procfs_targets): Adjust.
7549 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7550 add_inf_child_target.
7551 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7552 add_inf_child_target.
7553 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7554 add_inf_child_target.
7555 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7556 add_inf_child_target.
7557 * ravenscar-thread.c (ravenscar_target_info): New.
7558 (ravenscar_thread_target) <shortname, longname, doc>:
7559 Delete.
7560 <info>: New.
7561 * record-btrace.c (record_btrace_target_info):
7562 (record_btrace_target) <shortname, longname, doc>: Delete.
7563 <info>: New.
7564 (record_btrace_target::open): Rename to ...
7565 (record_btrace_target_open): ... this. Adjust.
7566 * record-full.c (record_longname, record_doc): New.
7567 (record_full_base_target) <shortname, longname, doc>: Delete.
7568 <info>: New.
7569 (record_full_target_info): New.
7570 (record_full_target): <shortname>: Delete.
7571 <info>: New.
7572 (record_full_core_open_1, record_full_open_1): Update comments.
7573 (record_full_base_target::open): Rename to ...
7574 (record_full_open): ... this.
7575 (cmd_record_full_restore): Update.
7576 (_initialize_record_full): Update.
7577 * remote-sim.c (remote_sim_target_info): New.
7578 (gdbsim_target) <shortname, longname, doc>: Delete.
7579 <info>: New.
7580 (gdbsim_target::open): Rename to ...
7581 (gdbsim_target_open): ... this.
7582 (_initialize_remote_sim): Adjust.
7583 * remote.c (remote_doc): New.
7584 (remote_target_info): New.
7585 (remote_target) <shortname, longname, doc>: Delete.
7586 <info>: New.
7587 (extended_remote_target_info): New.
7588 (extended_remote_target) <shortname, longname, doc>: Delete.
7589 <info>: New.
7590 (remote_target::open_1): Make static. Adjust.
7591 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7592 * s390-linux-nat.c (_initialize_s390_nat): Use
7593 add_inf_child_target.
7594 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7595 add_inf_child_target.
7596 * sol-thread.c (thread_db_target_info): New.
7597 (sol_thread_target) <shortname, longname, doc>: Delete.
7598 <info>: New.
7599 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7600 add_inf_child_target.
7601 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7602 add_inf_child_target.
7603 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7604 add_inf_child_target.
7605 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7606 add_inf_child_target.
7607 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7608 add_inf_child_target.
7609 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7610 add_inf_child_target.
7611 * spu-linux-nat.c (_initialize_spu_nat): Use
7612 add_inf_child_target.
7613 * spu-multiarch.c (spu_multiarch_target_info): New.
7614 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7615 <info>: New.
7616 * target-delegates.c: Regenerate.
7617 * target.c: Include <unordered_map>.
7618 (target_ops_p): Delete.
7619 (DEF_VEC_P(target_ops_p)): Delete.
7620 (target_factories): New.
7621 (test_target_info): New.
7622 (test_target_ops::info): New.
7623 (open_target): Adjust to use target_factories.
7624 (add_target_with_completer): Rename to ...
7625 (add_target): ... this. Change prototype. Register target_info
7626 and open callback in target_factories. Register target_info in
7627 command context instead of target_ops.
7628 (add_target): Delete old implementation.
7629 (add_deprecated_target_alias): Change prototype. Adjust.
7630 (the_native_target): New.
7631 (set_native_target, get_native_target): New.
7632 (find_default_run_target): Use the_native_target.
7633 (find_attach_target, find_run_target): Simplify.
7634 (target_ops::open): Delete.
7635 (dummy_target_info): New.
7636 (dummy_target::shortname, dummy_target::longname)
7637 (dummy_target::doc): Delete.
7638 (dummy_target::info): New.
7639 (debug_target::shortname, debug_target::longname)
7640 (debug_target::doc): Delete.
7641 (debug_target::info): New.
7642 * target.h (struct target_info): New.
7643 (target_ops::~target_ops): Add comment.
7644 (target_ops::info): New.
7645 (target_ops::shortname, target_ops::longname, target_ops::doc): No
7646 longer virtual. Implement in terms of target_info.
7647 (set_native_target, get_native_target): Declare.
7648 (target_open_ftype): New.
7649 (add_target, add_target_with_completer)
7650 (add_deprecated_target_alias): Change prototype.
7651 (test_target) <shortname, longname, doc>: Delete.
7652 <info>: New.
7653 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7654 add_inf_child_target.
7655 * tracefile-tfile.c (tfile_target_info): New.
7656 (tfile_target) <shortname, longname, doc>: Delete.
7657 <info>: New.
7658 (tfile_target::open): Rename to ...
7659 (tfile_target_open): ... this.
7660 (_initialize_tracefile_tfile): Adjust.
7661 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7662 add_inf_child_target.
7663 * windows-nat.c (_initialize_windows_nat): Use
7664 add_inf_child_target.
7665 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7666 add_inf_child_target.
7667
7668 2018-05-02 Pedro Alves <palves@redhat.com>
7669
7670 * linux-nat.h (linux_nat_target) <low_new_thread,
7671 low_delete_thread, low_new_fork, low_forget_process,
7672 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7673 New virtual methods.
7674 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7675 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7676 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7677 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7678 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7679 Delete.
7680 * linux-fork.c (delete_fork): Adjust to call low method.
7681 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7682 (linux_nat_new_fork, linux_nat_forget_process_hook)
7683 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7684 (linux_nat_status_is_event):
7685 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7686 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7687 to call low method.
7688 (sigtrap_is_event): Rename to ...
7689 (linux_nat_target::low_status_is_event): ... this.
7690 (linux_nat_set_status_is_event): Delete.
7691 (save_stop_reason, linux_nat_wait_1)
7692 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7693 low methods.
7694 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7695 (linux_nat_set_new_fork, linux_nat_set_forget_process)
7696 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7697 (linux_nat_set_prepare_to_resume): Delete.
7698 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7699 low virtual methods.
7700 * amd64-linux-nat.c: Likewise.
7701 * arm-linux-nat.c: Likewise.
7702 * i386-linux-nat.c: Likewise.
7703 * ia64-linux-nat.c: Likewise.
7704 * mips-linux-nat.c: Likewise.
7705 * ppc-linux-nat.c: Likewise.
7706 * s390-linux-nat.c: Likewise.
7707 * sparc64-linux-nat.c: Likewise.
7708 * x86-linux-nat.c: Likewise.
7709 * x86-linux-nat.h: Include "nat/x86-linux.h".
7710 (x86_linux_nat_target) <low_new_fork, low_forget_process,
7711 low_prepare_to_resume, low_new_thread, low_delete_thread>:
7712 Override methods.
7713
7714 2018-05-02 Pedro Alves <palves@redhat.com>
7715
7716 * target.h (target_ops)
7717 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7718 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7719 stopped_by_watchpoint, have_continuable_watchpoint,
7720 stopped_data_address, watchpoint_addr_within_range,
7721 can_accel_watchpoint_condition, can_run, thread_alive,
7722 has_all_memory, has_memory, has_stack, has_registers,
7723 has_execution, can_async_p, is_async_p, supports_non_stop,
7724 always_non_stop_p, can_execute_reverse, supports_multi_process,
7725 supports_enable_disable_tracepoint,
7726 supports_disable_randomization, supports_string_tracing,
7727 supports_evaluation_of_breakpoint_conditions,
7728 can_run_breakpoint_commands, filesystem_is_local,
7729 can_download_tracepoint, get_trace_state_variable_value,
7730 set_trace_notes, get_tib_address, use_agent, can_use_agent,
7731 record_is_replaying, record_will_replay,
7732 augmented_libraries_svr4_read>: Adjust to return bool.
7733 * aarch64-linux-nat.c: All implementations adjusted.
7734 * aix-thread.c: All implementations adjusted.
7735 * arm-linux-nat.c: All implementations adjusted.
7736 * breakpoint.c: All implementations adjusted.
7737 * bsd-kvm.c: All implementations adjusted.
7738 * bsd-uthread.c: All implementations adjusted.
7739 * corelow.c: All implementations adjusted.
7740 * ctf.c: All implementations adjusted.
7741 * darwin-nat.c: All implementations adjusted.
7742 * darwin-nat.h: All implementations adjusted.
7743 * exec.c: All implementations adjusted.
7744 * fbsd-nat.c: All implementations adjusted.
7745 * fbsd-nat.h: All implementations adjusted.
7746 * gnu-nat.c: All implementations adjusted.
7747 * gnu-nat.h: All implementations adjusted.
7748 * go32-nat.c: All implementations adjusted.
7749 * ia64-linux-nat.c: All implementations adjusted.
7750 * inf-child.c: All implementations adjusted.
7751 * inf-child.h: All implementations adjusted.
7752 * inf-ptrace.c: All implementations adjusted.
7753 * inf-ptrace.h: All implementations adjusted.
7754 * linux-nat.c: All implementations adjusted.
7755 * linux-nat.h: All implementations adjusted.
7756 * mips-linux-nat.c: All implementations adjusted.
7757 * nto-procfs.c: All implementations adjusted.
7758 * ppc-linux-nat.c: All implementations adjusted.
7759 * procfs.c: All implementations adjusted.
7760 * ravenscar-thread.c: All implementations adjusted.
7761 * record-btrace.c: All implementations adjusted.
7762 * record-full.c: All implementations adjusted.
7763 * remote-sim.c: All implementations adjusted.
7764 * remote.c: All implementations adjusted.
7765 * s390-linux-nat.c: All implementations adjusted.
7766 * sol-thread.c: All implementations adjusted.
7767 * spu-multiarch.c: All implementations adjusted.
7768 * target-delegates.c: All implementations adjusted.
7769 * target.c: All implementations adjusted.
7770 * target.h: All implementations adjusted.
7771 * tracefile-tfile.c: All implementations adjusted.
7772 * tracefile.c: All implementations adjusted.
7773 * tracefile.h: All implementations adjusted.
7774 * windows-nat.c: All implementations adjusted.
7775 * x86-linux-nat.h: All implementations adjusted.
7776 * x86-nat.h: All implementations adjusted.
7777
7778 2018-05-02 Pedro Alves <palves@redhat.com>
7779
7780 * make-target-delegates (scan_target_h): Don't trim lines here.
7781 Replace sequences of tabs and/or whitespace with a single
7782 whitespace.
7783 (top level, parsing methods): Trim each line before processing it
7784 here.
7785
7786 2018-05-02 Pedro Alves <palves@redhat.com>
7787 John Baldwin <jhb@freebsd.org>
7788
7789 * target.h (enum strata) <debug_stratum>: New.
7790 (struct target_ops) <all delegation methods>: Replace by C++
7791 virtual methods, and drop "to_" prefix. All references updated
7792 throughout.
7793 <to_shortname, to_longname, to_doc, to_data,
7794 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7795 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7796 virtual methods. All references updated throughout.
7797 <can_attach, supports_terminal_ours, can_create_inferior,
7798 get_thread_control_capabilities, attach_no_wait>: New
7799 virtual methods.
7800 <insert_breakpoint, remove_breakpoint>: Now
7801 TARGET_DEFAULT_NORETURN methods.
7802 <info_proc>: Now returns bool.
7803 <to_magic>: Delete.
7804 (OPS_MAGIC): Delete.
7805 (current_target): Delete. All references replaced by references
7806 to ...
7807 (target_stack): ... this. New.
7808 (target_shortname, target_longname): Adjust.
7809 (target_can_run): Now a function declaration.
7810 (default_child_has_all_memory, default_child_has_memory)
7811 (default_child_has_stack, default_child_has_registers)
7812 (default_child_has_execution): Remove target_ops parameter.
7813 (complete_target_initialization): Delete.
7814 (memory_breakpoint_target): New template class.
7815 (test_target_ops): Refactor as a C++ class with virtual methods.
7816 * make-target-delegates (NAME_PART): Tighten.
7817 (POINTER_PART, CP_SYMBOL): New.
7818 (SIMPLE_RETURN_PART): Reimplement.
7819 (VEC_RETURN_PART): Expect less.
7820 (RETURN_PART, VIRTUAL_PART): New.
7821 (METHOD): Adjust to C++ virtual methods.
7822 (scan_target_h): Remove reference to C99.
7823 (dname): Output "target_ops::" prefix.
7824 (write_function_header): Adjust to output a C++ class method.
7825 (write_declaration): New.
7826 (write_delegator): Adjust to output a C++ class method.
7827 (tdname): Output "dummy_target::" prefix.
7828 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7829 method.
7830 (tdefault_names, debug_names): Delete.
7831 (return_types, tdefaults, styles, argtypes_array): New.
7832 (top level): All methods are delegators.
7833 (print_class): New.
7834 (top level): Print dummy_target and debug_target classes.
7835 * target-delegates.c: Regenerate.
7836 * target-debug.h (target_debug_print_enum_info_proc_what)
7837 (target_debug_print_thread_control_capabilities)
7838 (target_debug_print_thread_info_p): New.
7839 * target.c (dummy_target): Delete.
7840 (the_dummy_target, the_debug_target): New.
7841 (target_stack): Now extern.
7842 (set_targetdebug): Push/unpush debug target.
7843 (default_child_has_all_memory, default_child_has_memory)
7844 (default_child_has_stack, default_child_has_registers)
7845 (default_child_has_execution): Remove target_ops parameter.
7846 (complete_target_initialization): Delete.
7847 (add_target_with_completer): No longer call
7848 complete_target_initialization.
7849 (target_supports_terminal_ours): Use regular delegation.
7850 (update_current_target): Delete.
7851 (push_target): No longer check magic number. Don't call
7852 update_current_target.
7853 (unpush_target): Don't call update_current_target.
7854 (target_is_pushed): No longer check magic number.
7855 (target_require_runnable): Skip for all stratums over
7856 process_stratum.
7857 (target_ops::info_proc): New.
7858 (target_info_proc): Use find_target_at and
7859 find_default_run_target.
7860 (target_supports_disable_randomization): Use regular delegation.
7861 (target_get_osdata): Use find_target_at.
7862 (target_ops::open, target_ops::close, target_ops::can_attach)
7863 (target_ops::attach, target_ops::can_create_inferior)
7864 (target_ops::create_inferior, target_ops::can_run)
7865 (target_can_run): New.
7866 (default_fileio_target): Use regular delegation.
7867 (target_ops::fileio_open, target_ops::fileio_pwrite)
7868 (target_ops::fileio_pread, target_ops::fileio_fstat)
7869 (target_ops::fileio_close, target_ops::fileio_unlink)
7870 (target_ops::fileio_readlink): New.
7871 (target_fileio_open_1, target_fileio_unlink)
7872 (target_fileio_readlink): Always call the target method. Handle
7873 FILEIO_ENOSYS.
7874 (return_zero, return_zero_has_execution): Delete.
7875 (init_dummy_target): Delete.
7876 (dummy_target::dummy_target, dummy_target::shortname)
7877 (dummy_target::longname, dummy_target::doc)
7878 (debug_target::debug_target, debug_target::shortname)
7879 (debug_target::longname, debug_target::doc): New.
7880 (target_supports_delete_record): Use regular delegation.
7881 (setup_target_debug): Delete.
7882 (maintenance_print_target_stack): Skip debug_stratum.
7883 (initialize_targets): Instantiate the_dummy_target and
7884 the_debug_target.
7885 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7886 use target_stack.
7887 (target_auxv_search, fprint_target_auxv): Adjust.
7888 (info_auxv_command): Adjust to use target_stack.
7889 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7890 * exceptions.c (print_flush): Handle a NULL target_stack.
7891 * regcache.c (target_ops_no_register): Refactor as class with
7892 virtual methods.
7893
7894 * exec.c (exec_target): New class.
7895 (exec_ops): Now an exec_target.
7896 (exec_open, exec_close_1, exec_get_section_table)
7897 (exec_xfer_partial, exec_files_info, exec_has_memory)
7898 (exec_make_note_section): Refactor as exec_target methods.
7899 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7900 Delete.
7901 (exec_target::find_memory_regions): New.
7902 (_initialize_exec): Don't call init_exec_ops.
7903 * gdbcore.h (exec_file_clear): Delete.
7904
7905 * corefile.c (core_target): Delete.
7906 (core_file_command): Adjust.
7907 * corelow.c (core_target): New class.
7908 (the_core_target): New.
7909 (core_close): Remove target_ops parameter.
7910 (core_close_cleanup): Adjust.
7911 (core_target::close): New.
7912 (core_open, core_detach, get_core_registers, core_files_info)
7913 (core_xfer_partial, core_thread_alive, core_read_description)
7914 (core_pid_to_str, core_thread_name, core_has_memory)
7915 (core_has_stack, core_has_registers, core_info_proc): Rework as
7916 core_target methods.
7917 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7918 (_initialize_corelow): Initialize the_core_target.
7919 * gdbcore.h (core_target): Delete.
7920 (the_core_target): New.
7921
7922 * ctf.c: (ctf_target): New class.
7923 (ctf_ops): Now a ctf_target.
7924 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7925 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7926 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7927 methods.
7928 (init_ctf_ops): Delete.
7929 (_initialize_ctf): Don't call it.
7930 * tracefile-tfile.c (tfile_target): New class.
7931 (tfile_ops): Now a tfile_target.
7932 (tfile_open, tfile_close, tfile_files_info)
7933 (tfile_get_tracepoint_status, tfile_trace_find)
7934 (tfile_fetch_registers, tfile_xfer_partial)
7935 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7936 Refactor as tfile_target methods.
7937 (tfile_xfer_partial_features): Remove target_ops parameter.
7938 (init_tfile_ops): Delete.
7939 (_initialize_tracefile_tfile): Don't call it.
7940 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7941 (tracefile_has_stack, tracefile_has_registers)
7942 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7943 tracefile_target methods.
7944 (init_tracefile_ops): Delete.
7945 (tracefile_target::tracefile_target): New.
7946 * tracefile.h: Include "target.h".
7947 (tracefile_target): New class.
7948 (init_tracefile_ops): Delete.
7949
7950 * spu-multiarch.c (spu_multiarch_target): New class.
7951 (spu_ops): Now a spu_multiarch_target.
7952 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7953 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7954 (spu_search_memory, spu_mourn_inferior): Refactor as
7955 spu_multiarch_target methods.
7956 (init_spu_ops): Delete.
7957 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7958 complete_target_initialization.
7959
7960 * ravenscar-thread.c (ravenscar_thread_target): New class.
7961 (ravenscar_ops): Now a ravenscar_thread_target.
7962 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7963 (ravenscar_thread_alive, ravenscar_pid_to_str)
7964 (ravenscar_fetch_registers, ravenscar_store_registers)
7965 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7966 (ravenscar_stopped_by_hw_breakpoint)
7967 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7968 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7969 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7970 methods.
7971 (init_ravenscar_thread_ops): Delete.
7972 (_initialize_ravenscar): Remove references to
7973 init_ravenscar_thread_ops and complete_target_initialization.
7974
7975 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7976 (bsd_uthread_target): New class.
7977 (bsd_uthread_ops): Now a bsd_uthread_target.
7978 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7979 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7980 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7981 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7982 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7983 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7984 (bsd_uthread_target): Delete function.
7985 (_initialize_bsd_uthread): Remove reference to
7986 complete_target_initialization.
7987
7988 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7989 (target_bfd): ... this new class.
7990 (target_bfd_xfer_partial, target_bfd_get_section_table)
7991 (target_bfd_close): Refactor as target_bfd methods.
7992 (target_bfd::~target_bfd): New.
7993 (target_bfd_reopen): Adjust.
7994 (target_bfd::close): New.
7995
7996 * record-btrace.c (record_btrace_target): New class.
7997 (record_btrace_ops): Now a record_btrace_target.
7998 (record_btrace_open, record_btrace_stop_recording)
7999 (record_btrace_disconnect, record_btrace_close)
8000 (record_btrace_async, record_btrace_info)
8001 (record_btrace_insn_history, record_btrace_insn_history_range)
8002 (record_btrace_insn_history_from, record_btrace_call_history)
8003 (record_btrace_call_history_range)
8004 (record_btrace_call_history_from, record_btrace_record_method)
8005 (record_btrace_is_replaying, record_btrace_will_replay)
8006 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8007 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8008 (record_btrace_store_registers, record_btrace_prepare_to_store)
8009 (record_btrace_to_get_unwinder)
8010 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8011 (record_btrace_commit_resume, record_btrace_wait)
8012 (record_btrace_stop, record_btrace_can_execute_reverse)
8013 (record_btrace_stopped_by_sw_breakpoint)
8014 (record_btrace_supports_stopped_by_sw_breakpoint)
8015 (record_btrace_stopped_by_hw_breakpoint)
8016 (record_btrace_supports_stopped_by_hw_breakpoint)
8017 (record_btrace_update_thread_list, record_btrace_thread_alive)
8018 (record_btrace_goto_begin, record_btrace_goto_end)
8019 (record_btrace_goto, record_btrace_stop_replaying_all)
8020 (record_btrace_execution_direction)
8021 (record_btrace_prepare_to_generate_core)
8022 (record_btrace_done_generating_core): Refactor as
8023 record_btrace_target methods.
8024 (init_record_btrace_ops): Delete.
8025 (_initialize_record_btrace): Remove reference to
8026 init_record_btrace_ops.
8027 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8028 the execution_direction global.
8029 (record_full_base_target, record_full_target)
8030 (record_full_core_target): New classes.
8031 (record_full_ops): Now a record_full_target.
8032 (record_full_core_ops): Now a record_full_core_target.
8033 (record_full_target::detach, record_full_target::disconnect)
8034 (record_full_core_target::disconnect)
8035 (record_full_target::mourn_inferior, record_full_target::kill):
8036 New.
8037 (record_full_open, record_full_close, record_full_async): Refactor
8038 as methods of the record_full_base_target class.
8039 (record_full_resume, record_full_commit_resume): Refactor
8040 as methods of the record_full_target class.
8041 (record_full_wait, record_full_stopped_by_watchpoint)
8042 (record_full_stopped_data_address)
8043 (record_full_stopped_by_sw_breakpoint)
8044 (record_full_supports_stopped_by_sw_breakpoint)
8045 (record_full_stopped_by_hw_breakpoint)
8046 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8047 methods of the record_full_base_target class.
8048 (record_full_store_registers, record_full_xfer_partial)
8049 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8050 Refactor as methods of the record_full_target class.
8051 (record_full_can_execute_reverse, record_full_get_bookmark)
8052 (record_full_goto_bookmark, record_full_execution_direction)
8053 (record_full_record_method, record_full_info, record_full_delete)
8054 (record_full_is_replaying, record_full_will_replay)
8055 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8056 (record_full_stop_replaying): Refactor as methods of the
8057 record_full_base_target class.
8058 (record_full_core_resume, record_full_core_kill)
8059 (record_full_core_fetch_registers)
8060 (record_full_core_prepare_to_store)
8061 (record_full_core_store_registers, record_full_core_xfer_partial)
8062 (record_full_core_insert_breakpoint)
8063 (record_full_core_remove_breakpoint)
8064 (record_full_core_has_execution): Refactor
8065 as methods of the record_full_core_target class.
8066 (record_full_base_target::supports_delete_record): New.
8067 (init_record_full_ops): Delete.
8068 (init_record_full_core_ops): Delete.
8069 (record_full_save): Refactor as method of the
8070 record_full_base_target class.
8071 (_initialize_record_full): Remove references to
8072 init_record_full_ops and init_record_full_core_ops.
8073
8074 * remote.c (remote_target, extended_remote_target): New classes.
8075 (remote_ops): Now a remote_target.
8076 (extended_remote_ops): Now an extended_remote_target.
8077 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8078 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8079 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8080 (remote_pass_signals, remote_set_syscall_catchpoint)
8081 (remote_program_signals, )
8082 (remote_thread_always_alive): Remove target_ops parameter.
8083 (remote_thread_alive, remote_thread_name)
8084 (remote_update_thread_list, remote_threads_extra_info)
8085 (remote_static_tracepoint_marker_at)
8086 (remote_static_tracepoint_markers_by_strid)
8087 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8088 (remote_open): Refactor as methods of remote_target.
8089 (extended_remote_open, extended_remote_detach)
8090 (extended_remote_attach, extended_remote_post_attach):
8091 (extended_remote_supports_disable_randomization)
8092 (extended_remote_create_inferior): : Refactor as method of
8093 extended_remote_target.
8094 (remote_set_permissions, remote_open_1, remote_detach)
8095 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8096 (remote_resume, remote_commit_resume, remote_stop)
8097 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8098 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8099 (remote_prepare_to_store, remote_store_registers)
8100 (remote_flash_erase, remote_flash_done, remote_files_info)
8101 (remote_kill, remote_mourn, remote_insert_breakpoint)
8102 (remote_remove_breakpoint, remote_insert_watchpoint)
8103 (remote_watchpoint_addr_within_range)
8104 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8105 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8106 (remote_supports_stopped_by_sw_breakpoint)
8107 (remote_stopped_by_hw_breakpoint)
8108 (remote_supports_stopped_by_hw_breakpoint)
8109 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8110 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8111 (remote_verify_memory): Refactor as methods of remote_target.
8112 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8113 parameter.
8114 (remote_xfer_partial, remote_get_memory_xfer_limit)
8115 (remote_search_memory, remote_rcmd, remote_memory_map)
8116 (remote_pid_to_str, remote_get_thread_local_address)
8117 (remote_get_tib_address, remote_read_description): Refactor as
8118 methods of remote_target.
8119 (remote_target::fileio_open, remote_target::fileio_pwrite)
8120 (remote_target::fileio_pread, remote_target::fileio_close): New.
8121 (remote_hostio_readlink, remote_hostio_fstat)
8122 (remote_filesystem_is_local, remote_can_execute_reverse)
8123 (remote_supports_non_stop, remote_supports_disable_randomization)
8124 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8125 (remote_supports_enable_disable_tracepoint)
8126 (remote_supports_string_tracing)
8127 (remote_can_run_breakpoint_commands, remote_trace_init)
8128 (remote_download_tracepoint, remote_can_download_tracepoint)
8129 (remote_download_trace_state_variable, remote_enable_tracepoint)
8130 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8131 (remote_trace_start, remote_get_trace_status)
8132 (remote_get_tracepoint_status, remote_trace_stop)
8133 (remote_trace_find, remote_get_trace_state_variable_value)
8134 (remote_save_trace_data, remote_get_raw_trace_data)
8135 (remote_set_disconnected_tracing, remote_core_of_thread)
8136 (remote_set_circular_trace_buffer, remote_traceframe_info)
8137 (remote_get_min_fast_tracepoint_insn_len)
8138 (remote_set_trace_buffer_size, remote_set_trace_notes)
8139 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8140 (remote_disable_btrace, remote_teardown_btrace)
8141 (remote_read_btrace, remote_btrace_conf)
8142 (remote_augmented_libraries_svr4_read, remote_load)
8143 (remote_pid_to_exec_file, remote_can_do_single_step)
8144 (remote_execution_direction, remote_thread_handle_to_thread_info):
8145 Refactor as methods of remote_target.
8146 (init_remote_ops, init_extended_remote_ops): Delete.
8147 (remote_can_async_p, remote_is_async_p, remote_async)
8148 (remote_thread_events, remote_upload_tracepoints)
8149 (remote_upload_trace_state_variables): Refactor as methods of
8150 remote_target.
8151 (_initialize_remote): Remove references to init_remote_ops and
8152 init_extended_remote_ops.
8153
8154 * remote-sim.c (gdbsim_target): New class.
8155 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8156 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8157 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8158 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8159 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8160 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8161 Refactor as methods of gdbsim_target.
8162 (gdbsim_ops): Now a gdbsim_target.
8163 (init_gdbsim_ops): Delete.
8164 (gdbsim_cntrl_c): Adjust.
8165 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8166
8167 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8168 (the_amd64_linux_nat_target): New.
8169 (amd64_linux_fetch_inferior_registers)
8170 (amd64_linux_store_inferior_registers): Refactor as methods of
8171 amd64_linux_nat_target.
8172 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8173 * i386-linux-nat.c: Don't include "linux-nat.h".
8174 (i386_linux_nat_target): New class.
8175 (the_i386_linux_nat_target): New.
8176 (i386_linux_fetch_inferior_registers)
8177 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8178 as methods of i386_linux_nat_target.
8179 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8180 * inf-child.c (inf_child_ops): Delete.
8181 (inf_child_fetch_inferior_registers)
8182 (inf_child_store_inferior_registers): Delete.
8183 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8184 methods of inf_child_target.
8185 (inf_child_target::supports_terminal_ours)
8186 (inf_child_target::terminal_init)
8187 (inf_child_target::terminal_inferior)
8188 (inf_child_target::terminal_ours_for_output)
8189 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8190 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8191 New.
8192 (inf_child_open, inf_child_disconnect, inf_child_close)
8193 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8194 (inf_child_post_startup_inferior, inf_child_can_run)
8195 (inf_child_pid_to_exec_file): Refactor as methods of
8196 inf_child_target.
8197 (inf_child_follow_fork): Delete.
8198 (inf_child_target::can_create_inferior)
8199 (inf_child_target::can_attach): New.
8200 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8201 (inf_child_target::has_stack, inf_child_target::has_registers)
8202 (inf_child_target::has_execution): New.
8203 (inf_child_fileio_open, inf_child_fileio_pwrite)
8204 (inf_child_fileio_pread, inf_child_fileio_fstat)
8205 (inf_child_fileio_close, inf_child_fileio_unlink)
8206 (inf_child_fileio_readlink, inf_child_use_agent)
8207 (inf_child_can_use_agent): Refactor as methods of
8208 inf_child_target.
8209 (return_zero, inf_child_target): Delete.
8210 (inf_child_target::inf_child_target): New.
8211 * inf-child.h: Include "target.h".
8212 (inf_child_target): Delete function prototype.
8213 (inf_child_target): New class.
8214 (inf_child_open_target, inf_child_mourn_inferior)
8215 (inf_child_maybe_unpush_target): Delete.
8216 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8217 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8218 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8219 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8220 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8221 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8222 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8223 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8224 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8225 methods of inf_ptrace_target.
8226 (inf_ptrace_target): Delete function.
8227 * inf-ptrace.h: Include "inf-child.h".
8228 (inf_ptrace_target): Delete function declaration.
8229 (inf_ptrace_target): New class.
8230 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8231 * linux-nat.c (linux_target): New.
8232 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8233 (linux_nat_target::~linux_nat_target): New.
8234 (linux_child_post_attach, linux_child_post_startup_inferior)
8235 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8236 (linux_child_remove_fork_catchpoint)
8237 (linux_child_insert_vfork_catchpoint)
8238 (linux_child_remove_vfork_catchpoint)
8239 (linux_child_insert_exec_catchpoint)
8240 (linux_child_remove_exec_catchpoint)
8241 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8242 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8243 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8244 (linux_nat_stopped_data_address)
8245 (linux_nat_stopped_by_sw_breakpoint)
8246 (linux_nat_supports_stopped_by_sw_breakpoint)
8247 (linux_nat_stopped_by_hw_breakpoint)
8248 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8249 (linux_nat_kill, linux_nat_mourn_inferior)
8250 (linux_nat_xfer_partial, linux_nat_thread_alive)
8251 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8252 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8253 (linux_child_static_tracepoint_markers_by_strid)
8254 (linux_nat_is_async_p, linux_nat_can_async_p)
8255 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8256 (linux_nat_supports_multi_process)
8257 (linux_nat_supports_disable_randomization, linux_nat_async)
8258 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8259 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8260 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8261 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8262 methods of linux_nat_target.
8263 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8264 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8265 parameter.
8266 (check_stopped_by_watchpoint): Adjust.
8267 (linux_xfer_partial): Delete.
8268 (linux_target_install_ops, linux_target, linux_nat_add_target):
8269 Delete.
8270 (linux_nat_target::linux_nat_target): New.
8271 * linux-nat.h: Include "inf-ptrace.h".
8272 (linux_nat_target): New.
8273 (linux_target, linux_target_install_ops, linux_nat_add_target):
8274 Delete function declarations.
8275 (linux_target): Declare global.
8276 * linux-thread-db.c (thread_db_target): New.
8277 (thread_db_target::thread_db_target): New.
8278 (thread_db_ops): Delete.
8279 (the_thread_db_target): New.
8280 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8281 (thread_db_update_thread_list, thread_db_pid_to_str)
8282 (thread_db_extra_thread_info)
8283 (thread_db_thread_handle_to_thread_info)
8284 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8285 (thread_db_resume): Refactor as methods of thread_db_target.
8286 (init_thread_db_ops): Delete.
8287 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8288 * x86-linux-nat.c: Don't include "linux-nat.h".
8289 (super_post_startup_inferior): Delete.
8290 (x86_linux_nat_target::~x86_linux_nat_target): New.
8291 (x86_linux_child_post_startup_inferior)
8292 (x86_linux_read_description, x86_linux_enable_btrace)
8293 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8294 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8295 methods of x86_linux_nat_target.
8296 (x86_linux_create_target): Delete. Bits folded ...
8297 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8298 pointer.
8299 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8300 (x86_linux_nat_target): New class.
8301 (x86_linux_create_target): Delete.
8302 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8303 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8304 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8305 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8306 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8307 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8308 make extern.
8309 (x86_use_watchpoints): Delete.
8310 * x86-nat.h: Include "breakpoint.h" and "target.h".
8311 (x86_use_watchpoints): Delete.
8312 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8313 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8314 (x86_insert_watchpoint, x86_remove_watchpoint)
8315 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8316 (x86_stopped_by_hw_breakpoint): New declarations.
8317 (x86_nat_target): New template class.
8318
8319 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8320 (the_ppc_linux_nat_target): New.
8321 (ppc_linux_fetch_inferior_registers)
8322 (ppc_linux_can_use_hw_breakpoint)
8323 (ppc_linux_region_ok_for_hw_watchpoint)
8324 (ppc_linux_ranged_break_num_registers)
8325 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8326 (ppc_linux_insert_mask_watchpoint)
8327 (ppc_linux_remove_mask_watchpoint)
8328 (ppc_linux_can_accel_watchpoint_condition)
8329 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8330 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8331 (ppc_linux_watchpoint_addr_within_range)
8332 (ppc_linux_masked_watch_num_registers)
8333 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8334 (ppc_linux_read_description): Refactor as methods of
8335 ppc_linux_nat_target.
8336 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8337
8338 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8339 (procfs_target): New class.
8340 (the_procfs_target): New.
8341 (procfs_target): Delete function.
8342 (procfs_auxv_parse, procfs_attach, procfs_detach)
8343 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8344 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8345 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8346 (procfs_create_inferior, procfs_update_thread_list)
8347 (procfs_thread_alive, procfs_pid_to_str)
8348 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8349 (procfs_stopped_data_address, procfs_insert_watchpoint)
8350 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8351 (proc_find_memory_regions, procfs_info_proc)
8352 (procfs_make_note_section): Refactor as methods of procfs_target.
8353 (_initialize_procfs): Adjust.
8354 * sol-thread.c (sol_thread_target): New class.
8355 (sol_thread_ops): Now a sol_thread_target.
8356 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8357 (sol_thread_fetch_registers, sol_thread_store_registers)
8358 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8359 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8360 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8361 (init_sol_thread_ops): Delete.
8362 (_initialize_sol_thread): Adjust. Remove references to
8363 init_sol_thread_ops and complete_target_initialization.
8364
8365 * windows-nat.c (windows_nat_target): New class.
8366 (windows_fetch_inferior_registers)
8367 (windows_store_inferior_registers, windows_resume, windows_wait)
8368 (windows_attach, windows_detach, windows_pid_to_exec_file)
8369 (windows_files_info, windows_create_inferior)
8370 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8371 (windows_close, windows_pid_to_str, windows_xfer_partial)
8372 (windows_get_tib_address, windows_get_ada_task_ptid)
8373 (windows_thread_name, windows_thread_alive): Refactor as
8374 windows_nat_target methods.
8375 (do_initial_windows_stuff): Adjust.
8376 (windows_target): Delete function.
8377 (_initialize_windows_nat): Adjust.
8378
8379 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8380 (darwin_mourn_inferior, darwin_kill_inferior)
8381 (darwin_create_inferior, darwin_attach, darwin_detach)
8382 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8383 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8384 (darwin_supports_multi_process): Refactor as darwin_nat_target
8385 methods.
8386 (darwin_resume_to, darwin_files_info): Delete.
8387 (_initialize_darwin_inferior): Rename to ...
8388 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8389 * darwin-nat.h: Include "inf-child.h".
8390 (darwin_nat_target): New class.
8391 (darwin_complete_target): Delete.
8392 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8393 (darwin_target): New.
8394 (i386_darwin_fetch_inferior_registers)
8395 (i386_darwin_store_inferior_registers): Refactor as methods of
8396 darwin_nat_target.
8397 (darwin_complete_target): Delete, with ...
8398 (_initialize_i386_darwin_nat): ... bits factored out here.
8399
8400 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8401 (the_alpha_linux_nat_target): New.
8402 (alpha_linux_register_u_offset): Refactor as
8403 alpha_linux_nat_target method.
8404 (_initialize_alpha_linux_nat): Adjust.
8405 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8406 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8407 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8408 methods of linux_nat_trad_target.
8409 (linux_trad_target): Delete.
8410 * linux-nat-trad.h (linux_trad_target): Delete function.
8411 (linux_nat_trad_target): New class.
8412 * mips-linux-nat.c (mips_linux_nat_target): New class.
8413 (super_fetch_registers, super_store_registers, super_close):
8414 Delete.
8415 (the_mips_linux_nat_target): New.
8416 (mips64_linux_regsets_fetch_registers)
8417 (mips64_linux_regsets_store_registers)
8418 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8419 (mips_linux_register_u_offset, mips_linux_read_description)
8420 (mips_linux_can_use_hw_breakpoint)
8421 (mips_linux_stopped_by_watchpoint)
8422 (mips_linux_stopped_data_address)
8423 (mips_linux_region_ok_for_hw_watchpoint)
8424 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8425 (mips_linux_close): Refactor as methods of mips_linux_nat.
8426 (_initialize_mips_linux_nat): Adjust to C++ification.
8427
8428 * aix-thread.c (aix_thread_target): New class.
8429 (aix_thread_ops): Now an aix_thread_target.
8430 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8431 (aix_thread_fetch_registers, aix_thread_store_registers)
8432 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8433 (aix_thread_thread_alive, aix_thread_pid_to_str)
8434 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8435 Refactor as methods of aix_thread_target.
8436 (init_aix_thread_ops): Delete.
8437 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8438 and complete_target_initialization.
8439 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8440 (rs6000_nat_target): New class.
8441 (the_rs6000_nat_target): New.
8442 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8443 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8444 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8445 (super_create_inferior): Delete.
8446 (_initialize_rs6000_nat): Adjust to C++ification.
8447
8448 * arm-linux-nat.c (arm_linux_nat_target): New class.
8449 (the_arm_linux_nat_target): New.
8450 (arm_linux_fetch_inferior_registers)
8451 (arm_linux_store_inferior_registers, arm_linux_read_description)
8452 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8453 (arm_linux_remove_hw_breakpoint)
8454 (arm_linux_region_ok_for_hw_watchpoint)
8455 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8456 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8457 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8458 arm_linux_nat_target.
8459 (_initialize_arm_linux_nat): Adjust to C++ification.
8460
8461 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8462 (the_aarch64_linux_nat_target): New.
8463 (aarch64_linux_fetch_inferior_registers)
8464 (aarch64_linux_store_inferior_registers)
8465 (aarch64_linux_child_post_startup_inferior)
8466 (aarch64_linux_read_description)
8467 (aarch64_linux_can_use_hw_breakpoint)
8468 (aarch64_linux_insert_hw_breakpoint)
8469 (aarch64_linux_remove_hw_breakpoint)
8470 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8471 (aarch64_linux_region_ok_for_hw_watchpoint)
8472 (aarch64_linux_stopped_data_address)
8473 (aarch64_linux_stopped_by_watchpoint)
8474 (aarch64_linux_watchpoint_addr_within_range)
8475 (aarch64_linux_can_do_single_step): Refactor as methods of
8476 aarch64_linux_nat_target.
8477 (super_post_startup_inferior): Delete.
8478 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8479
8480 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8481 (the_hppa_linux_nat_target): New.
8482 (hppa_linux_fetch_inferior_registers)
8483 (hppa_linux_store_inferior_registers): Refactor as methods of
8484 hppa_linux_nat_target.
8485 (_initialize_hppa_linux_nat): Adjust to C++ification.
8486
8487 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8488 (the_ia64_linux_nat_target): New.
8489 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8490 (ia64_linux_stopped_data_address)
8491 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8492 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8493 ia64_linux_nat_target methods.
8494 (super_xfer_partial): Delete.
8495 (_initialize_ia64_linux_nat): Adjust to C++ification.
8496
8497 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8498 (the_m32r_linux_nat_target): New.
8499 (m32r_linux_fetch_inferior_registers)
8500 (m32r_linux_store_inferior_registers): Refactor as
8501 m32r_linux_nat_target methods.
8502 (_initialize_m32r_linux_nat): Adjust to C++ification.
8503
8504 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8505 (the_m68k_linux_nat_target): New.
8506 (m68k_linux_fetch_inferior_registers)
8507 (m68k_linux_store_inferior_registers): Refactor as
8508 m68k_linux_nat_target methods.
8509 (_initialize_m68k_linux_nat): Adjust to C++ification.
8510
8511 * s390-linux-nat.c (s390_linux_nat_target): New class.
8512 (the_s390_linux_nat_target): New.
8513 (s390_linux_fetch_inferior_registers)
8514 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8515 (s390_insert_watchpoint, s390_remove_watchpoint)
8516 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8517 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8518 (s390_auxv_parse, s390_read_description): Refactor as methods of
8519 s390_linux_nat_target.
8520 (_initialize_s390_nat): Adjust to C++ification.
8521
8522 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8523 (the_sparc_linux_nat_target): New.
8524 (_initialize_sparc_linux_nat): Adjust to C++ification.
8525 * sparc-nat.c (sparc_fetch_inferior_registers)
8526 (sparc_store_inferior_registers): Remove target_ops parameter.
8527 * sparc-nat.h (sparc_fetch_inferior_registers)
8528 (sparc_store_inferior_registers): Remove target_ops parameter.
8529 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8530 (the_sparc64_linux_nat_target): New.
8531 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8532
8533 * spu-linux-nat.c (spu_linux_nat_target): New class.
8534 (the_spu_linux_nat_target): New.
8535 (spu_child_post_startup_inferior, spu_child_post_attach)
8536 (spu_child_wait, spu_fetch_inferior_registers)
8537 (spu_store_inferior_registers, spu_xfer_partial)
8538 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8539 methods.
8540 (_initialize_spu_nat): Adjust to C++ification.
8541
8542 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8543 (the_tilegx_linux_nat_target): New.
8544 (fetch_inferior_registers, store_inferior_registers):
8545 Refactor as methods.
8546 (_initialize_tile_linux_nat): Adjust to C++ification.
8547
8548 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8549 (the_xtensa_linux_nat_target): New.
8550 (xtensa_linux_fetch_inferior_registers)
8551 (xtensa_linux_store_inferior_registers): Refactor as
8552 xtensa_linux_nat_target methods.
8553 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8554
8555 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8556 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8557 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8558 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8559 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8560 (fbsd_stopped_by_sw_breakpoint)
8561 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8562 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8563 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8564 (fbsd_post_startup_inferior, fbsd_post_attach)
8565 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8566 (fbsd_set_syscall_catchpoint)
8567 (super_xfer_partial, super_resume, super_wait)
8568 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8569 (fbsd_handle_debug_trap): Remove target_ops parameter.
8570 (fbsd_nat_add_target): Delete.
8571 * fbsd-nat.h: Include "inf-ptrace.h".
8572 (fbsd_nat_add_target): Delete.
8573 (USE_SIGTRAP_SIGINFO): Define.
8574 (fbsd_nat_target): New class.
8575
8576 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8577 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8578 (amd64bsd_target): Delete.
8579 * amd64-bsd-nat.h: New file.
8580 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8581 "x86-bsd-nat.h".
8582 (amd64_fbsd_nat_target): New class.
8583 (the_amd64_fbsd_nat_target): New.
8584 (amd64fbsd_read_description): Refactor as method of
8585 amd64_fbsd_nat_target.
8586 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8587 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8588 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8589 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8590 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8591 (i386bsd_target): Delete.
8592 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8593 (i386bsd_fetch_inferior_registers)
8594 (i386bsd_store_inferior_registers): Declare.
8595 (i386_bsd_nat_target): New class.
8596 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8597 (the_i386_fbsd_nat_target): New.
8598 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8599 i386_fbsd_nat_target methods.
8600 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8601 (_initialize_i386fbsd_nat): Adjust to C++ification.
8602 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8603 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8604 (_initialize_x86_bsd_nat): Adjust to C++ification.
8605 * x86-bsd-nat.h: Include "x86-nat.h".
8606 (x86bsd_target): Delete declaration.
8607 (x86bsd_nat_target): New class.
8608
8609 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8610 (the_aarch64_fbsd_nat_target): New.
8611 (aarch64_fbsd_fetch_inferior_registers)
8612 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8613 aarch64_fbsd_nat_target.
8614 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8615 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8616 (the_alpha_bsd_nat_target): New.
8617 (alphabsd_fetch_inferior_registers)
8618 (alphabsd_store_inferior_registers): Refactor as
8619 alpha_bsd_nat_target methods.
8620 (_initialize_alphabsd_nat): Refactor as methods of
8621 alpha_bsd_nat_target.
8622 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8623 (the_amd64_nbsd_nat_target): New.
8624 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8625 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8626 (the_amd64_obsd_nat_target): New.
8627 (_initialize_amd64obsd_nat): Adjust to C++ification.
8628 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8629 (the_arm_fbsd_nat_target): New.
8630 (arm_fbsd_fetch_inferior_registers)
8631 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8632 (_initialize_arm_fbsd_nat): Refactor as methods of
8633 arm_fbsd_nat_target.
8634 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8635 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8636 (the_arm_netbsd_nat_target): New.
8637 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8638 arm_netbsd_nat_target.
8639 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8640 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8641 (the_hppa_nbsd_nat_target): New.
8642 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8643 hppa_nbsd_nat_target methods.
8644 (_initialize_hppanbsd_nat): Adjust to C++ification.
8645 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8646 (the_hppa_obsd_nat_target): New.
8647 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8648 methods of hppa_obsd_nat_target.
8649 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
8650 add_target.
8651 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8652 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
8653 add_target.
8654 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8655 (_initialize_i386obsd_nat): Use add_target.
8656 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8657 (the_m68k_bsd_nat_target): New.
8658 (m68kbsd_fetch_inferior_registers)
8659 (m68kbsd_store_inferior_registers): Refactor as methods of
8660 m68k_bsd_nat_target.
8661 (_initialize_m68kbsd_nat): Adjust to C++ification.
8662 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8663 (the_mips_fbsd_nat_target): New.
8664 (mips_fbsd_fetch_inferior_registers)
8665 (mips_fbsd_store_inferior_registers): Refactor as methods of
8666 mips_fbsd_nat_target.
8667 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
8668 add_target.
8669 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8670 (the_mips_nbsd_nat_target): New.
8671 (mipsnbsd_fetch_inferior_registers)
8672 (mipsnbsd_store_inferior_registers): Refactor as methods of
8673 mips_nbsd_nat_target.
8674 (_initialize_mipsnbsd_nat): Adjust to C++ification.
8675 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8676 (the_mips64_obsd_nat_target): New.
8677 (mips64obsd_fetch_inferior_registers)
8678 (mips64obsd_store_inferior_registers): Refactor as methods of
8679 mips64_obsd_nat_target.
8680 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
8681 add_target.
8682 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8683 nbsd_nat_target.
8684 * nbsd-nat.h: Include "inf-ptrace.h".
8685 (nbsd_nat_target): New class.
8686 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8687 (obsd_wait): Refactor as methods of obsd_nat_target.
8688 (obsd_add_target): Delete.
8689 * obsd-nat.h: Include "inf-ptrace.h".
8690 (obsd_nat_target): New class.
8691 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8692 (the_ppc_fbsd_nat_target): New.
8693 (ppcfbsd_fetch_inferior_registers)
8694 (ppcfbsd_store_inferior_registers): Refactor as methods of
8695 ppc_fbsd_nat_target.
8696 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
8697 add_target.
8698 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8699 (the_ppc_nbsd_nat_target): New.
8700 (ppcnbsd_fetch_inferior_registers)
8701 (ppcnbsd_store_inferior_registers): Refactor as methods of
8702 ppc_nbsd_nat_target.
8703 (_initialize_ppcnbsd_nat): Adjust to C++ification.
8704 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8705 (the_ppc_obsd_nat_target): New.
8706 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8707 methods of ppc_obsd_nat_target.
8708 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
8709 add_target.
8710 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8711 (the_sh_nbsd_nat_target): New.
8712 (shnbsd_fetch_inferior_registers)
8713 (shnbsd_store_inferior_registers): Refactor as methods of
8714 sh_nbsd_nat_target.
8715 (_initialize_shnbsd_nat): Adjust to C++ification.
8716 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8717 (inf_ptrace_xfer_partial): Delete.
8718 (sparc_xfer_partial, sparc_target): Delete.
8719 * sparc-nat.h (sparc_fetch_inferior_registers)
8720 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8721 (sparc_target): Delete function declaration.
8722 (sparc_target): New template class.
8723 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8724 (_initialize_sparcnbsd_nat): Adjust to C++ification.
8725 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8726 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
8727 add_target.
8728 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8729 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8730 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8731 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
8732 add_target.
8733 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8734 (the_vax_bsd_nat_target): New.
8735 (vaxbsd_fetch_inferior_registers)
8736 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8737 methods.
8738 (_initialize_vaxbsd_nat): Adjust to C++ification.
8739
8740 * bsd-kvm.c (bsd_kvm_target): New class.
8741 (bsd_kvm_ops): Now a bsd_kvm_target.
8742 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8743 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8744 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8745 bsd_kvm_target.
8746 (bsd_kvm_return_one): Delete.
8747 (bsd_kvm_add_target): Adjust to C++ification.
8748
8749 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8750 (nto_procfs_target_procfs): New classes.
8751 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8752 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8753 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8754 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8755 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8756 (procfs_remove_hw_breakpoint, procfs_resume)
8757 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8758 (procfs_kill_inferior, procfs_store_registers)
8759 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8760 as methods of nto_procfs_target.
8761 (nto_procfs_ops): Now an nto_procfs_target_procfs.
8762 (nto_native_ops): Delete.
8763 (procfs_open, procfs_native_open): Delete.
8764 (nto_native_ops): Now an nto_procfs_target_native.
8765 (init_procfs_targets): Adjust to C++ification.
8766 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8767 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8768 Refactor as methods of nto_procfs_target.
8769
8770 * go32-nat.c (go32_nat_target): New class.
8771 (the_go32_nat_target): New.
8772 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8773 (go32_store_registers, go32_xfer_partial, go32_files_info)
8774 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8775 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8776 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8777 (go32_pid_to_str): Refactor as methods of go32_nat_target.
8778 (go32_target): Delete.
8779 (_initialize_go32_nat): Adjust to C++ification.
8780
8781 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8782 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8783 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8784 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8785 gnu_nat_target.
8786 (gnu_target): Delete.
8787 * gnu-nat.h (gnu_target): Delete.
8788 (gnu_nat_target): New class.
8789 * i386-gnu-nat.c (gnu_base_target): New.
8790 (i386_gnu_nat_target): New class.
8791 (the_i386_gnu_nat_target): New.
8792 (_initialize_i386gnu_nat): Adjust to C++ification.
8793
8794 2018-05-02 Pedro Alves <palves@redhat.com>
8795
8796 * bfd-target.c (target_bfd_xclose): Rename to ...
8797 (target_bfd_close): ... this.
8798 (target_bfd_reopen): Adjust.
8799 * target.c (target_close): Remove references to to_xclose.
8800 * target.h (target_ops::to_xclose): Delete.
8801 (target_ops::to_close): Update comments.
8802
8803 2018-05-02 Pedro Alves <palves@redhat.com>
8804
8805 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8806 "linux-nat.h".
8807 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8808 * inf-ptrace.c (inf_ptrace_register_u_offset)
8809 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8810 (inf_ptrace_store_register, inf_ptrace_store_registers)
8811 (inf_ptrace_trad_target): Move to ...
8812 * linux-nat-trad.c: ... this new file.
8813 * linux-nat-trad.h: New file.
8814 * linux-nat.c (linux_target_install_ops): Make extern.
8815 (linux_trad_target): Delete.
8816 * linux-nat.h (linux_trad_target): Delete declaration.
8817 (linux_target_install_ops): Declare.
8818 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8819 "linux-nat.h".
8820
8821 2018-05-02 Pedro Alves <palves@redhat.com>
8822
8823 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8824 procfs_target/add_target here.
8825 * procfs.c (procfs_target): Make static.
8826 (_initialize_procfs): Call add_target here.
8827 * procfs.h (struct target_ops): Remove forward declaration.
8828 (procfs_target): Remove declaration.
8829 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8830
8831 2018-05-02 Pedro Alves <palves@redhat.com>
8832
8833 * procfs.c (procfs_stopped_by_watchpoint)
8834 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8835 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8836 Forward declare.
8837 (procfs_use_watchpoints): Delete, move contents...
8838 (procfs_target): ... here.
8839 * procfs.h (procfs_use_watchpoints): Delete declaration.
8840 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8841 procfs_use_watchpoints.
8842 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8843 procfs_use_watchpoints.
8844
8845 2018-05-02 Tom Tromey <tom@tromey.com>
8846
8847 PR python/20084:
8848 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8849 and var_zuinteger_unlimited.
8850 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8851 and PARAM_ZUINTEGER_UNLIMITED.
8852 (set_parameter_value): Handle var_zuinteger and
8853 var_zuinteger_unlimited.
8854 (add_setshow_generic): Likewise.
8855 (parmpy_init): Likewise.
8856
8857 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8858
8859 PR rust/23124
8860 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8861 pointer is not null before dereferencing it.
8862
8863 2018-04-30 Tom Tromey <tom@tromey.com>
8864
8865 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8866 is_mi_like_p.
8867
8868 2018-04-30 Tom Tromey <tom@tromey.com>
8869
8870 * breakpoint.c (mention): Remove use of is_mi_like_p.
8871 (print_mention_ranged_breakpoint): Likewise.
8872 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8873 of is_mi_like_p.
8874
8875 2018-04-30 Tom Tromey <tom@tromey.com>
8876
8877 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8878
8879 2018-04-30 Tom Tromey <tom@tromey.com>
8880
8881 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8882 (info_spu_event_command): Remove some uses of is_mi_like_p.
8883
8884 2018-04-30 Tom Tromey <tom@tromey.com>
8885
8886 * python/py-framefilter.c (py_print_single_arg)
8887 (enumerate_locals, py_print_args, py_print_frame): Remove some
8888 uses of is_mi_like_p.
8889
8890 2018-04-30 Tom Tromey <tom@tromey.com>
8891
8892 * ui-out.c: Update.
8893 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8894 * ui-out.h (ui_out::is_mi_like_p): Now const.
8895 (ui_out::do_is_mi_like_p): Now const.
8896 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8897
8898 2018-04-30 Tom Tromey <tom@tromey.com>
8899
8900 * varobj.c (varobj_set_visualizer): Use new_reference.
8901 * python/python.c (gdbpy_decode_line): Use new_reference.
8902 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8903 new_reference.
8904
8905 2018-04-30 Tom Tromey <tom@tromey.com>
8906
8907 * varobj.c (install_new_value): Use new_reference.
8908 * value.h (value_incref): Return void. Swap intro comment with
8909 value_decref.
8910 * value.c (set_value_parent): Use new_reference.
8911 (value_incref): Return void. Update intro comment.
8912 (release_value): Use new_reference.
8913 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8914
8915 2018-04-30 Tom Tromey <tom@tromey.com>
8916
8917 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8918 * gdb_bfd.h (new_bfd_ref): Remove.
8919 (gdb_bfd_open): Update comment.
8920 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8921 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8922 (gdb_bfd_fdopenr): Use new_reference.
8923 * exec.c (exec_file_attach): Use new_reference.
8924
8925 2018-04-30 Tom Tromey <tom@tromey.com>
8926
8927 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8928 method.
8929
8930 2018-04-30 Tom Tromey <tom@tromey.com>
8931
8932 * jit.c (jit_read_code_entry): Use type_align.
8933 * i386-tdep.c (i386_gdbarch_init): Don't call
8934 set_gdbarch_long_long_align_bit.
8935 * gdbarch.sh: Remove long_long_align_bit.
8936 * gdbarch.c, gdbarch.h: Rebuild.
8937 * arc-tdep.c (arc_type_align): New function.
8938 (arc_gdbarch_init): Use arc_type_align. Don't call
8939 set_gdbarch_long_long_align_bit.
8940
8941 2018-04-30 Tom Tromey <tom@tromey.com>
8942
8943 * rust-lang.c (rust_type_alignment): Remove.
8944 (rust_composite_type): Use type_align.
8945
8946 2018-04-30 Tom Tromey <tom@tromey.com>
8947
8948 * NEWS: Mention Type.align.
8949 * python/py-type.c (typy_get_alignof): New function.
8950 (type_object_getset): Add "alignof".
8951
8952 2018-04-30 Tom Tromey <tom@tromey.com>
8953
8954 PR exp/17095:
8955 * NEWS: Update.
8956 * std-operator.def (UNOP_ALIGNOF): New operator.
8957 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8958 New.
8959 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8960 * c-lang.c (c_op_print_tab): Add alignof.
8961 * c-exp.y (ALIGNOF): New token.
8962 (exp): Add "ALIGNOF" production.
8963 (ident_tokens): Add _Alignof and alignof.
8964
8965 2018-04-30 Tom Tromey <tom@tromey.com>
8966
8967 * i386-tdep.c (i386_type_align): New function.
8968 (i386_gdbarch_init): Update.
8969 * gdbarch.sh (type_align): New method.
8970 * gdbarch.c, gdbarch.h: Rebuild.
8971 * arch-utils.h (default_type_align): Declare.
8972 * arch-utils.c (default_type_align): New function.
8973 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8974 (struct type) <align_log2>: New field.
8975 <instance_flags>: Now a bitfield.
8976 (TYPE_RAW_ALIGN): New macro.
8977 (type_align, type_raw_align, set_type_align): Declare.
8978 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8979 functions.
8980 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8981 (get_alignment, maybe_set_alignment): New functions.
8982 (read_structure_type, read_enumeration_type, read_array_type)
8983 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8984 (read_subrange_type, read_base_type): Set type alignment.
8985
8986 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8987
8988 * dwarf2read.c (read_index_from_section): Use bool.
8989
8990 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8991
8992 PR gdb/22950
8993 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8994 with #ifdef.
8995
8996 2018-04-29 John Reiser <jreiser@BitWagon.com>
8997
8998 PR build/22873
8999 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9000 last step, and do it atomically.
9001
9002 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9003
9004 * compile/compile-c-types.c (convert_int, convert_float):
9005 Update for C FE v1.
9006
9007 2018-04-27 Tom Tromey <tom@tromey.com>
9008
9009 PR rust/22545:
9010 * rust-lang.c (rust_inclusive_range_type_p): New function.
9011 (rust_range): Handle inclusive ranges.
9012 (rust_compute_range): Likewise.
9013 * rust-exp.y (struct rust_op) <inclusive>: New field.
9014 (DOTDOTEQ): New constant.
9015 (range_expr): Add "..=" productions.
9016 (operator_tokens): Add "..=" token.
9017 (ast_range): Add "inclusive" parameter.
9018 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9019 ranges.
9020 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9021 bounds values.
9022 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9023 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9024 Update comments.
9025 * expprint.c (print_subexp_standard): Handle new bounds values.
9026 (dump_subexp_body_standard): Likewise.
9027
9028 2018-04-27 Tom Tromey <tom@tromey.com>
9029
9030 * configure: Rebuild.
9031 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9032 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9033 "OVERRIDE".
9034 (class symbol_needs_eval_context): Likewise.
9035 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9036 (mock_mapped_index::symbol_name_at): Use "override". Remove
9037 "virtual".
9038 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9039 "override".
9040 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9041 * aarch64-tdep.c (instruction_reader::read): Use "override".
9042 (instruction_reader_test::read): Likewise.
9043 * arm-tdep.c (instruction_reader::read): Use "override".
9044 (instruction_reader_thumb::read): Likewise.
9045
9046 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9047
9048 PR remote/9665
9049 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9050 instead of remote_send.
9051 (remote_send): Remove.
9052
9053 2018-04-26 Pedro Alves <palves@redhat.com>
9054
9055 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9056 find_function_start_sal instead of find_pc_line.
9057
9058 2018-04-26 Pedro Alves <palves@redhat.com>
9059
9060 * breakpoint.c (set_breakpoint_location_function): Handle
9061 mst_data_gnu_ifunc.
9062 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9063 * elfread.c (elf_symtab_read): Give data symbols with
9064 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9065 (elf_rel_plt_read): Update comment.
9066 * linespec.c (convert_linespec_to_sals): Handle
9067 mst_data_gnu_ifunc.
9068 (minsym_found): Handle mst_data_gnu_ifunc.
9069 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9070 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9071 * parse.c (find_minsym_type_and_address): Handle
9072 mst_data_gnu_ifunc.
9073 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9074 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9075 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9076 comment.
9077 <mst_data_gnu_ifunc>: New enumerator.
9078
9079 2018-04-26 Pedro Alves <palves@redhat.com>
9080
9081 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9082 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9083 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9084 Handle it.
9085 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9086 (lookup_minimal_symbol_by_pc): Adjust.
9087 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9088 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9089 * minsyms.h (lookup_msym_prefer): New enum.
9090 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9091 parameter by a lookup_msym_prefer parameter.
9092
9093 2018-04-26 Pedro Alves <palves@redhat.com>
9094
9095 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9096 ends in "@plt" instead of looking at the symbol's section.
9097
9098 2018-04-26 Pedro Alves <palves@redhat.com>
9099
9100 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9101 all references.
9102 (find_pc_partial_function_gnu_ifunc): Rename to ...
9103 (find_pc_partial_function): ... this, and remove references to
9104 'is_gnu_ifunc_p'.
9105 (find_pc_partial_function): Delete old implementation.
9106 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9107
9108 2018-04-26 Pedro Alves <palves@redhat.com>
9109
9110 * linespec.c (struct bound_minimal_symbol_search_key): New.
9111 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9112 skip first line if we found a GNU ifunc minimal symbol by name.
9113 (compare_msymbols): Change parameters to work with a destructured
9114 lhs minsym.
9115 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9116 functions.
9117
9118 2018-04-26 Pedro Alves <palves@redhat.com>
9119
9120 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9121 ifunc targets here. Instead, if we have an ifunc minsym, use its
9122 address/name.
9123 (add_location_to_breakpoint): Store the minsym and the objfile in
9124 the breakpoint location.
9125 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9126 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9127 Record the minsym in the sal.
9128 * symtab.h (symtab_and_line) <msymbol>: New field.
9129
9130 2018-04-26 Pedro Alves <palves@redhat.com>
9131
9132 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9133 unless we actually resolved the ifunc.
9134
9135 2018-04-26 Pedro Alves <palves@redhat.com>
9136
9137 * c-exp.y (variable production): Prefer ifunc minsyms over
9138 regular function symbols.
9139 * symtab.c (find_gnu_ifunc): New function.
9140 * minsyms.h (lookup_msym_prefer): New enum.
9141 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9142 parameter by a lookup_msym_prefer parameter.
9143 * symtab.h (find_gnu_ifunc): New declaration.
9144
9145 2018-04-26 Pedro Alves <palves@redhat.com>
9146
9147 * blockframe.c (find_gnu_ifunc_target_type): New function.
9148 (find_function_type): New.
9149 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9150 return a value with a memory address.
9151 (eval_call): For calls to GNU ifunc functions, try to find the
9152 type of the target function from the type that the resolver
9153 returns.
9154 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9155 symbols.
9156 * infcall.c (find_function_return_type): Delete.
9157 (find_function_addr): Add 'function_type' parameter. For calls to
9158 GNU ifunc functions, try to find the type of the target function
9159 from the type that the resolver returns, and return it via
9160 FUNCTION_TYPE.
9161 (call_function_by_hand_dummy): Adjust to use the function type
9162 returned by find_function_addr.
9163 (find_function_addr): Add 'function_type' parameter and move
9164 description here.
9165 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9166 declarations.
9167
9168 2018-04-26 Pedro Alves <palves@redhat.com>
9169
9170 * c-exp.y (variable production): Skip finding an alias for ifunc
9171 symbols.
9172
9173 2018-04-26 Pedro Alves <palves@redhat.com>
9174
9175 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9176
9177 2018-04-25 Pedro Alves <palves@redhat.com>
9178
9179 * infcmd.c (kill_command): Print the pid as string, not the whole
9180 thread's ptid. Add comment. s/has been killed/killed/ in output
9181 message.
9182 * remote.c (remote_detach_1): Print the pid as string, not the
9183 whole thread's ptid.
9184
9185 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9186 Sergio Durigan Junior <sergiodj@redhat.com>
9187 Pedro Alves <palves@redhat.com>
9188
9189 * infcmd.c (kill_command): Print message when inferior has
9190 been killed.
9191 * inferior.c (print_inferior_events): Remove 'static'. Set as
9192 '1'.
9193 (add_inferior): Improve message printed when
9194 'print_inferior_events' is on.
9195 (exit_inferior): Remove message printed when
9196 'print_inferior_events' is on.
9197 (detach_inferior): Improve message printed when
9198 'print_inferior_events' is on.
9199 (initialize_inferiors): Use 'add_inferior_silent' to set
9200 'current_inferior_'.
9201 * inferior.h (print_inferior_events): Declare here as
9202 'extern'.
9203 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9204 '[Detaching...]' messages when 'print_inferior_events' is on.
9205 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9206 as prefix/suffix for messages. Remove periods. Fix erroneous
9207 'Detaching after fork from child...', replace it by '... from
9208 parent...'.
9209 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9210 prefix/suffix when printing 'Detaching...' messages. Print
9211 them when 'print_inferior_events' is on.
9212 * remote.c (remote_detach_1): Print message when detaching
9213 from inferior and '!is_fork_parent'.
9214
9215 2018-04-24 Tom Tromey <tom@tromey.com>
9216
9217 * cli-out.h: Reindent.
9218
9219 2018-04-24 Tom Tromey <tom@tromey.com>
9220
9221 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9222 (cli_ui_out::do_field_string): Use fputs_filtered.
9223 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9224
9225 2018-04-23 Tom Tromey <tom@tromey.com>
9226
9227 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9228 gdb::unique_xmalloc_ptr.
9229
9230 2018-04-23 Tom Tromey <tom@tromey.com>
9231
9232 * configure: Rebuild.
9233
9234 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9235
9236 PR gdb/23095
9237 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9238 prepare_for_testing. Set normal_bp to r_debug_state if target
9239 is bsd.
9240
9241 2018-04-21 Pedro Alves <palves@redhat.com>
9242 Rajendra SY <rajendra.sy@gmail.com>
9243
9244 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9245 * remote.c (extended_remote_attach): In all-stop mode, mark the
9246 thread as executing.
9247
9248 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9249
9250 * thread.c (thread_apply_all_command): Fix comment.
9251 (thread_command): Fix comment.
9252
9253 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9254
9255 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9256 parameter.
9257 * features/aarch64-core.c (create_feature_aarch64_core):
9258 Regenerate.
9259 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9260 Likewise.
9261 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9262 Likewise.
9263 * features/i386/32bit-avx512.c
9264 (create_feature_i386_32bit_avx512): Likewise.
9265 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9266 Likewise.
9267 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9268 Likewise.
9269 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9270 Likewise.
9271 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9272 Likewise.
9273 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9274 Likewise.
9275 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9276 Likewise.
9277 * features/i386/64bit-avx512.c
9278 (create_feature_i386_64bit_avx512): Likewise.
9279 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9280 Likewise.
9281 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9282 Likewise.
9283 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9284 Likewise.
9285 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9286 Likewise.
9287 * features/i386/64bit-segments.c
9288 (create_feature_i386_64bit_segments): Likewise.
9289 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9290 Likewise.
9291 * features/i386/x32-core.c
9292 (create_feature_i386_x32_core): Likewise.
9293 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9294 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9295 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9296 * target-descriptions.c: In generated code, don't pass xml
9297 filename.
9298
9299 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9300
9301 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9302 (print_xml_feature::visit_post): Likewise.
9303 (print_xml_feature::visit): Likewise.
9304 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9305 (print_xml_feature): Add new class.
9306 * regformats/regdat.sh: Null xmltarget on feature targets.
9307 * target-descriptions.c (struct target_desc): Add xmltarget.
9308 (maintenance_check_tdesc_xml_convert): Add unittest function.
9309 (tdesc_get_features_xml): Add function to get xml.
9310 (maintenance_check_xml_descriptions): Test xml generation.
9311 * xml-tdesc.c (string_read_description_xml): Add function.
9312 * xml-tdesc.h (string_read_description_xml): Add declaration.
9313
9314 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9315
9316 * features/Makefile: Add feature marker to targets with new style
9317 target descriptions.
9318 * regformats/aarch64.dat: Regenerate.
9319 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9320 * regformats/i386/amd64-avx-linux.dat: Likewise.
9321 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9322 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9323 * regformats/i386/amd64-linux.dat: Likewise.
9324 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9325 * regformats/i386/amd64.dat: Likewise.
9326 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9327 * regformats/i386/i386-avx-linux.dat: Likewise.
9328 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9329 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9330 * regformats/i386/i386-linux.dat: Likewise.
9331 * regformats/i386/i386-mmx-linux.dat: Likewise.
9332 * regformats/i386/i386-mpx-linux.dat: Likewise.
9333 * regformats/i386/i386.dat: Likewise.
9334 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9335 * regformats/i386/x32-avx-linux.dat: Likewise.
9336 * regformats/i386/x32-linux.dat: Likewise.
9337 * regformats/tic6x-c62x-linux.dat: Likewise.
9338 * regformats/tic6x-c64x-linux.dat: Likewise.
9339 * regformats/tic6x-c64xp-linux.dat: Likewise.
9340 * regformats/regdat.sh: Parse feature marker.
9341
9342 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9343
9344 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9345 (tdesc_osabi_name): Likewise.
9346 * target-descriptions.c (tdesc_architecture_name): Add new
9347 function.
9348 (tdesc_osabi_name): Likewise.
9349
9350 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9351
9352 * common/tdesc.c (tdesc_predefined_type): Move to here.
9353 (tdesc_named_type): Likewise.
9354 (tdesc_create_vector): Likewise.
9355 (tdesc_create_struct): Likewise.
9356 (tdesc_set_struct_size): Likewise.
9357 (tdesc_create_union): Likewise.
9358 (tdesc_create_flags): Likewise.
9359 (tdesc_create_enum): Likewise.
9360 (tdesc_add_field): Likewise.
9361 (tdesc_add_typed_bitfield): Likewise.
9362 (tdesc_add_bitfield): Likewise.
9363 (tdesc_add_flag): Likewise.
9364 (tdesc_add_enum_value): Likewise.
9365 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9366 (struct tdesc_type_vector): Likewise.
9367 (struct tdesc_type_field): Likewise.
9368 (struct tdesc_type_with_fields): Likewise.
9369 (tdesc_create_enum): Add declaration.
9370 (tdesc_add_typed_bitfield): Likewise.
9371 (tdesc_add_enum_value): Likewise.
9372 * target-descriptions.c (tdesc_type_field): Move from here.
9373 (tdesc_type_builtin): Likewise.
9374 (tdesc_type_vector): Likewise.
9375 (tdesc_type_with_fields): Likewise.
9376 (tdesc_predefined_types): Likewise.
9377 (tdesc_named_type): Likewise.
9378 (tdesc_create_vector): Likewise.
9379 (tdesc_create_struct): Likewise.
9380 (tdesc_set_struct_size): Likewise.
9381 (tdesc_create_union): Likewise.
9382 (tdesc_create_flags): Likewise.
9383 (tdesc_create_enum): Likewise.
9384 (tdesc_add_field): Likewise.
9385 (tdesc_add_typed_bitfield): Likewise.
9386 (tdesc_add_bitfield): Likewise.
9387 (tdesc_add_flag): Likewise.
9388 (tdesc_add_enum_value): Likewise.
9389 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9390 (tdesc_add_typed_bitfield): Likewise.
9391 (tdesc_add_enum_value): Likewise.
9392
9393 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9394
9395 * common/tdesc.c (tdesc_feature::accept): Move to here.
9396 (tdesc_feature::operator==): Likewise.
9397 (tdesc_create_reg): Likewise.
9398 * common/tdesc.h (tdesc_type_kind): Likewise.
9399 (struct tdesc_type): Likewise.
9400 (struct tdesc_feature): Likewise.
9401 * regformats/regdat.sh: Create a feature.
9402 * target-descriptions.c (tdesc_type_kind): Move from here.
9403 (tdesc_type): Likewise.
9404 (tdesc_type_up): Likewise.
9405 (tdesc_feature): Likewise.
9406 (tdesc_create_reg): Likewise.
9407
9408 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9409
9410 * Makefile.in: Add arch/tdesc.c
9411 * common/tdesc.c: New file.
9412 * common/tdesc.h (tdesc_element_visitor): Move to here.
9413 (tdesc_element): Likewise.
9414 (tdesc_reg): Likewise.
9415 (tdesc_reg_up): Likewise.
9416 * regformats/regdef.h (reg): Add offset to constructors.
9417 * target-descriptions.c (tdesc_element_visitor): Move from here.
9418 (tdesc_element): Likewise.
9419 (tdesc_reg): Likewise.
9420 (tdesc_reg_up): Likewise.
9421
9422 2018-04-17 Tom Tromey <tom@tromey.com>
9423
9424 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9425 discriminant field.
9426
9427 2018-04-17 Tom Tromey <tom@tromey.com>
9428
9429 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9430
9431 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9432
9433 * symtab.c (print_symbol_info): Skip printing filename and line
9434 number when `last' is NULL.
9435 (symtab_symbol_info): Use empty string instead of NULL for first
9436 invocation of print_symbol_info.
9437 (rbreak_command): Pass NULL to `last' parameter of
9438 print_symbol_info.
9439
9440 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9441
9442 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9443 instead of nullptr.
9444
9445 2018-04-16 Pedro Alves <palves@redhat.com>
9446
9447 * MAINTAINERS (sh): Remove.
9448 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9449 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9450 (ALLDEPFILES): Remove sh64-tdep.c.
9451 * NEWS: Mentions that support for SH-5/SH64 is removed.
9452 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9453 (sh*-*-openbsd*): Ditto.
9454 (sh64-*-elf*): Remove.
9455 (sh*): Remove.
9456 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9457 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9458 * sh-tdep.c: No longer include "sh64-tdep.h".
9459 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9460 * sh64-tdep.c, sh64-tdep.h: Remove files.
9461
9462 2018-04-16 Pedro Alves <palves@redhat.com>
9463
9464 * MAINTAINERS: Remove m88k.
9465 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9466 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9467 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9468 * NEWS: Mention that support for m88k was removed.
9469 * configure.host (m88*-*-*): Remove support.
9470 * configure.nat (m88k-*-*): Remove support.
9471 * configure.tgt (m88*-*-openbsd*): Remove.
9472 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9473
9474 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9475
9476 * configure.tgt (x86_tobjs): New variable.
9477 (amd64_tobjs, i386_tobjs): Use it.
9478
9479 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9480
9481 * symtab.c (print_symbol_info): Precede the symbol definition by
9482 the line number when available.
9483 * NEWS: Advertise this enhancement.
9484
9485 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9486
9487 * NEWS (New options): announce set/show record btrace cpu.
9488 * btrace.c: Include record-btrace.h.
9489 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9490 the vendor is unknown.
9491 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9492 Maybe overwrite the btrace configuration's cpu.
9493 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9494 (btrace_fetch): Add cpu parameter. Update callers.
9495 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9496 Maybe overwrite the btrace configuration's cpu. Skip enabling
9497 errata workarounds if the vendor is unknown.
9498 * python/py-record-btrace.c: Include record-btrace.h.
9499 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9500 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9501 * record-btrace.c (record_btrace_cpu_state_kind): New.
9502 (record_btrace_cpu): New.
9503 (set_record_btrace_cpu_cmdlist): New.
9504 (record_btrace_get_cpu): New.
9505 (require_btrace_thread, record_btrace_info)
9506 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9507 (cmd_set_record_btrace_cpu_none): New.
9508 (cmd_set_record_btrace_cpu_auto): New.
9509 (cmd_set_record_btrace_cpu): New.
9510 (cmd_show_record_btrace_cpu): New.
9511 (_initialize_record_btrace): Initialize set/show record btrace cpu
9512 commands.
9513 * record-btrace.h (record_btrace_get_cpu): New.
9514
9515 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9516
9517 * record.c (set_record_command): Fix typo in message.
9518
9519 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9520
9521 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9522
9523 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9524
9525 * infrun.c (process_event_stop_test): Call
9526 gdbarch_in_indirect_branch_thunk.
9527 * gdbarch.sh (in_indirect_branch_thunk): New.
9528 * gdbarch.c: Regenerated.
9529 * gdbarch.h: Regenerated.
9530 * x86-tdep.h: New.
9531 * x86-tdep.c: New.
9532 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9533 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9534 (ALLDEPFILES): Add x86-tdep.c.
9535 * arch-utils.h (default_in_indirect_branch_thunk): New.
9536 * arch-utils.c (default_in_indirect_branch_thunk): New.
9537 * i386-tdep: Include x86-tdep.h.
9538 (i386_in_indirect_branch_thunk): New.
9539 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9540 function.
9541 * amd64-tdep: Include x86-tdep.h.
9542 (amd64_in_indirect_branch_thunk): New.
9543 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9544
9545 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9546
9547 PR gdb/23053
9548 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9549 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9550 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9551 regression.
9552
9553 2018-04-12 Tom Tromey <tom@tromey.com>
9554
9555 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9556 (rust_evaluate_subexp): Likewise.
9557
9558 2018-04-12 Pedro Alves <palves@redhat.com>
9559
9560 * procfs.c (procfs_detach): Make forward declaration's prototype
9561 match definition's protototype.
9562 (proc_get_LDT_entry): Remove stale do_cleanups call.
9563
9564 2018-04-12 Pedro Alves <palves@redhat.com>
9565
9566 * target.h (target_ops::to_has_exited): Delete.
9567 (target_has_exited): Delete.
9568 * target-delegates.c: Regenerate.
9569
9570 2018-04-11 Pedro Alves <palves@redhat.com>
9571
9572 * target.c (fileio_fh_t::t): Add comment.
9573 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9574 (target_fileio_close): Handle a NULL target.
9575 (invalidate_fileio_fh): New.
9576 (target_close): Call it.
9577 * remote.c (remote_hostio_send_command): No longer check whether
9578 remote_desc is open.
9579
9580 2018-04-11 Pedro Alves <palves@redhat.com>
9581
9582 * target.c (fileio_fh_t): Make it a named struct instead of a
9583 typedef.
9584 (fileio_fh_t::is_closed): New method.
9585 (DEF_VEC_O (fileio_fh_t)): Remove.
9586 (fileio_fhandles): Now a std::vector.
9587 (is_closed_fileio_fh): Delete.
9588 (acquire_fileio_fd): Adjust. Rename parameters.
9589 (release_fileio_fd): Adjust.
9590 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9591 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9592 (target_fileio_close): Adjust.
9593
9594 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
9595
9596 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9597 index.
9598
9599 2018-04-10 Pedro Alves <palves@redhat.com>
9600
9601 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9602 (scoped_finish_thread_state): New class.
9603 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9604 cleanup.
9605 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9606 (fetch_inferior_event, normal_stop): Likewise.
9607 * thread.c (finish_thread_state_cleanup): Delete.
9608
9609 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9610 Pedro Alves <palves@redhat.com>
9611
9612 * value.c: Include "selftest.h" and "common/array-view.h".
9613 (struct range) <operator ==>: New.
9614 (test_ranges_contain): New.
9615 (check_ranges_vector): New.
9616 (test_insert_into_bit_range_vector): New.
9617 (_initialize_values): Register selftests.
9618 * common/array-view.h (operator==, operator!=): New.
9619
9620 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9621
9622 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9623 an iterator.
9624 * inline-frame.c: Include <algorithm>.
9625 (struct inline_state): Add constructor.
9626 (inline_state_s): Remove.
9627 (DEF_VEC_O(inline_state_s)): Remove.
9628 (inline_states): Change type to std::vector.
9629 (find_inline_frame_state): Adjust to std::vector.
9630 (allocate_inline_frame_state): Remove.
9631 (clear_inline_frame_state): Adjust to std::vector.
9632 (skip_inline_frames): Adjust to std::vector.
9633
9634 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9635
9636 * tracepoint.h (struct trace_state_variable): Add constructor.
9637 <name>: Change type to std::string.
9638 * tracepoint.c (tsv_s): Remove.
9639 (DEF_VEC_O(tsv_s)): Remove.
9640 (tvariables): Change to std::vector.
9641 (create_trace_state_variable): Adjust to std::vector.
9642 (find_trace_state_variable): Likewise.
9643 (find_trace_state_variable_by_number): Likewise.
9644 (delete_trace_state_variable): Likewise.
9645 (trace_variable_command): Adjust to std::string.
9646 (delete_trace_variable_command): Likewise.
9647 (tvariables_info_1): Adjust to std::vector.
9648 (save_trace_state_variables): Likewise.
9649 (start_tracing): Likewise.
9650 (merge_uploaded_trace_state_variables): Adjust to std::vector
9651 and std::string.
9652 * target.h (struct target_ops)
9653 <to_download_trace_state_variable>: Pass reference to
9654 trace_state_variable.
9655 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9656 * target-delegates.c: Re-generate.
9657 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9658 (mi_tsv_deleted): Likewise.
9659 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9660 * remote.c (remote_download_trace_state_variable): Change
9661 pointer to reference and adjust.
9662 * make-target-delegates (parse_argtypes): Handle references.
9663 (write_function_header): Likewise.
9664 (munge_type): Likewise.
9665
9666 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9667
9668 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9669 string_view-selftests.c.
9670 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9671 testsuite.
9672 * unittests/basic_string_view/cons/char/1.cc: Likewise.
9673 * unittests/basic_string_view/cons/char/2.cc: Likewise.
9674 * unittests/basic_string_view/cons/char/3.cc: Likewise.
9675 * unittests/basic_string_view/element_access/char/1.cc:
9676 Likewise.
9677 * unittests/basic_string_view/element_access/char/empty.cc:
9678 Likewise.
9679 * unittests/basic_string_view/element_access/char/front_back.cc:
9680 Likewise.
9681 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9682 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9683 Likewise.
9684 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9685 Likewise.
9686 * unittests/basic_string_view/modifiers/swap/char/1.cc:
9687 Likewise.
9688 * unittests/basic_string_view/operations/compare/char/1.cc:
9689 Likewise.
9690 * unittests/basic_string_view/operations/compare/char/13650.cc:
9691 Likewise.
9692 * unittests/basic_string_view/operations/copy/char/1.cc:
9693 Likewise.
9694 * unittests/basic_string_view/operations/data/char/1.cc:
9695 Likewise.
9696 * unittests/basic_string_view/operations/find/char/1.cc:
9697 Likewise.
9698 * unittests/basic_string_view/operations/find/char/2.cc:
9699 Likewise.
9700 * unittests/basic_string_view/operations/find/char/3.cc:
9701 Likewise.
9702 * unittests/basic_string_view/operations/find/char/4.cc:
9703 Likewise.
9704 * unittests/basic_string_view/operations/rfind/char/1.cc:
9705 Likewise.
9706 * unittests/basic_string_view/operations/rfind/char/2.cc:
9707 Likewise.
9708 * unittests/basic_string_view/operations/rfind/char/3.cc:
9709 Likewise.
9710 * unittests/basic_string_view/operations/substr/char/1.cc:
9711 Likewise.
9712 * unittests/basic_string_view/operators/char/2.cc: Likewise.
9713 * unittests/string_view-selftests.c: New file.
9714
9715 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9716
9717 * unittests/basic_string_view/capacity/1.cc: New file.
9718 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9719 * unittests/basic_string_view/cons/char/1.cc: New file.
9720 * unittests/basic_string_view/cons/char/2.cc: New file.
9721 * unittests/basic_string_view/cons/char/3.cc: New file.
9722 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9723 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9724 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9725 * unittests/basic_string_view/element_access/char/1.cc: New file.
9726 * unittests/basic_string_view/element_access/char/2.cc: New file.
9727 * unittests/basic_string_view/element_access/char/empty.cc: New file.
9728 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9729 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9730 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9731 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9732 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9733 * unittests/basic_string_view/include.cc: New file.
9734 * unittests/basic_string_view/inserters/char/1.cc: New file.
9735 * unittests/basic_string_view/inserters/char/2.cc: New file.
9736 * unittests/basic_string_view/inserters/char/3.cc: New file.
9737 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9738 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9739 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9740 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9741 * unittests/basic_string_view/literals/types.cc: New file.
9742 * unittests/basic_string_view/literals/values.cc: New file.
9743 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9744 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9745 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9746 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9747 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9748 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9749 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9750 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9751 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9752 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9753 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9754 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9755 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9756 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9757 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9758 * unittests/basic_string_view/operations/data/char/1.cc: New file.
9759 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9760 * unittests/basic_string_view/operations/find/char/1.cc: New file.
9761 * unittests/basic_string_view/operations/find/char/2.cc: New file.
9762 * unittests/basic_string_view/operations/find/char/3.cc: New file.
9763 * unittests/basic_string_view/operations/find/char/4.cc: New file.
9764 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9765 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9766 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9767 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9768 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9769 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9770 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9771 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9772 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9773 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9774 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9775 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9776 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9777 * unittests/basic_string_view/operators/char/2.cc: New file.
9778 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9779 * unittests/basic_string_view/range_access/char/1.cc: New file.
9780 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9781 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9782 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9783 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9784 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9785 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9786 * unittests/basic_string_view/requirements/typedefs.cc: New file.
9787 * unittests/basic_string_view/typedefs.cc: New file.
9788 * unittests/basic_string_view/types/1.cc: New file.
9789
9790 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9791
9792 * common/gdb_string_view.h: Remove libstdc++ implementation
9793 details, adjust to gdb reality.
9794 * common/gdb_string_view.tcc: Likewise.
9795 * cli/cli-script.c (struct string_view): Remove.
9796 (user_args) <m_args>: Change element type to gdb::string_view.
9797 (user_args::insert_args): Adjust.
9798
9799 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9800
9801 * common/gdb_string_view.h: New file.
9802 * common/gdb_string_view.tcc: New file.
9803
9804 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9805
9806 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9807 * configure: Re-generate.
9808
9809 2018-04-09 Pedro Alves <palves@redhat.com>
9810
9811 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9812 (set_target_gdbarch): Call
9813 gdb::observers::architecture_changed.notify instead of
9814 observer_notify_architecture_changed.
9815
9816 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9817
9818 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9819 (do_restore_current_traceframe_cleanup): Remove.
9820 (restore_current_traceframe_cleanup_dtor): Remove.
9821 (make_cleanup_restore_current_traceframe): Remove.
9822 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9823 New.
9824 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9825 * infrun.c (fetch_inferior_event): Use
9826 scoped_restore_current_traceframe.
9827
9828 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9829
9830 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9831 Remove.
9832 <n_allocated_type_units>: Remove.
9833 <all_type_units>: Change to std::vector.
9834 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9835 to std::vector change.
9836 (dwarf2_per_objfile::get_cutu): Likewise.
9837 (dwarf2_per_objfile::get_tu): Likewise.
9838 (create_signatured_type_table_from_index): Likewise.
9839 (create_signatured_type_table_from_debug_names): Likewise.
9840 (dw2_symtab_iter_next): Likewise.
9841 (dw2_print_stats): Likewise.
9842 (dw2_expand_all_symtabs): Likewise.
9843 (dw2_expand_marked_cus): Likewise.
9844 (dw2_debug_names_iterator::next): Likewise.
9845 (dwarf2_initialize_objfile): Likewise.
9846 (add_signatured_type_cu_to_table): Likewise.
9847 (create_all_type_units): Likewise.
9848 (add_type_unit): Likewise.
9849 (struct tu_abbrev_offset): Add constructor.
9850 (build_type_psymtabs_1): Adjust to std::vector change.
9851 (print_tu_stats): Likewise.
9852 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9853 (write_debug_names): Likewise.
9854
9855 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9856
9857 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9858 Make an std::vector.
9859 <n_comp_units>: Remove.
9860 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9861 to std::vector change.
9862 (dwarf2_per_objfile::get_cutu): Likewise.
9863 (dwarf2_per_objfile::get_cu): Likewise.
9864 (create_cus_from_index): Likewise.
9865 (create_addrmap_from_index): Likewise.
9866 (create_addrmap_from_aranges): Likewise.
9867 (dwarf2_read_index): Likewise.
9868 (dw2_find_last_source_symtab): Likewise.
9869 (dw2_map_symtabs_matching_filename): Likewise.
9870 (dw2_symtab_iter_next): Likewise.
9871 (dw2_print_stats): Likewise.
9872 (dw2_expand_all_symtabs): Likewise.
9873 (dw2_expand_symtabs_with_fullname): Likewise.
9874 (dw2_expand_marked_cus): Likewise.
9875 (dw2_map_symbol_filenames): Likewise.
9876 (create_cus_from_debug_names): Likewise.
9877 (dwarf2_read_debug_names): Likewise.
9878 (dw2_debug_names_iterator::next): Likewise.
9879 (dwarf2_initialize_objfile): Likewise.
9880 (set_partial_user): Likewise.
9881 (dwarf2_build_psymtabs_hard): Likewise.
9882 (read_comp_units_from_section): Remove arguments, adjust to
9883 std::vector change.
9884 (create_all_comp_units): Adjust to std::vector and
9885 read_comp_units_from_section changes.
9886 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9887 change.
9888 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9889 (psyms_seen_size): Likewise.
9890 (write_gdbindex): Likewise.
9891 (write_debug_names): Likewise.
9892
9893 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9894
9895 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9896 with dwarf2_per_objfile.
9897 (create_cus_from_index): Likewise.
9898 (create_signatured_type_table_from_index): Likewise.
9899 (dwarf2_read_index): Likewise.
9900 (dwarf2_initialize_objfile): Likewise.
9901 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9902 per_cu rather than get_dwarf2_per_objfile.
9903
9904 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9905
9906 * dwarf2read.h (struct signatured_type): Forward declare.
9907 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9908 New methods.
9909 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9910 (dw2_get_cutu): ...this.
9911 (dwarf2_per_objfile::get_cu): Rename from...
9912 (dw2_get_cu): ...this.
9913 (dwarf2_per_objfile::get_tu): New.
9914 (create_addrmap_from_index): Adjust.
9915 (create_addrmap_from_aranges): Adjust.
9916 (dw2_find_last_source_symtab): Adjust.
9917 (dw2_map_symtabs_matching_filename): Adjust.
9918 (dw2_symtab_iter_next): Adjust.
9919 (dw2_print_stats): Adjust.
9920 (dw2_expand_all_symtabs): Adjust.
9921 (dw2_expand_symtabs_with_fullname): Adjust.
9922 (dw2_expand_marked_cus): Adjust.
9923 (dw_expand_symtabs_matching_file_matcher): Adjust.
9924 (dw2_map_symbol_filenames): Adjust.
9925 (dw2_debug_names_iterator::next): Adjust.
9926 (dwarf2_initialize_objfile): Adjust.
9927 (set_partial_user): Adjust.
9928 (dwarf2_build_psymtabs_hard): Adjust.
9929
9930 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9931
9932 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9933 Remove unused variables.
9934 (dw2_map_symtabs_matching_filename): Likewise.
9935 (dwarf2_record_block_ranges): Likewise.
9936 (dwarf2_read_addr_index): Likewise.
9937 (follow_die_offset): Likewise.
9938
9939 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9940
9941 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9942 to symbol_file_add_main.
9943
9944 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9945
9946 PR mi/22299
9947 * mi/mi-console.c (do_fputc_async_safe): New.
9948 (mi_console_file::write_async_safe): New.
9949 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9950 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9951 New.
9952 * ui-file.c (ui_file::putstrn): Adjust call to
9953 fputstrn_unfiltered.
9954 * utils.c (printchar): Replace do_fputs and do_fprintf
9955 parameters by do_fputc.
9956 (fputstr_filtered): Adjust call to printchar.
9957 (fputstr_unfiltered): Likewise.
9958 (fputstrn_filtered): Likewise.
9959 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9960 printchar.
9961 * utils.h (do_fputc_ftype): New typedef.
9962 (fputstrn_unfiltered): Add do_fputc parameter.
9963
9964 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9965
9966 * regformats/i386/i386-avx.dat: Remove.
9967
9968 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9969
9970 PR gdb/22979
9971 * amd64-tdep.c (amd64_none_init_abi): New function.
9972 (amd64_x32_none_init_abi): New function.
9973 (_initialize_amd64_tdep): Register handlers for x86-64 and
9974 x64_32 with GDB_OSABI_NONE.
9975 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9976 GDB_OSABI_NONE osabi.
9977
9978 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9979
9980 PR gdb/22980
9981 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9982 GDB_OSABI_NONE.
9983 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9984 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9985
9986 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9987
9988 * common/byte-vector.h (char_vector): New type.
9989 * target.h (target_read_alloc): Return
9990 gdb::optional<byte_vector>.
9991 (target_read_stralloc): Return gdb::optional<char_vector>.
9992 (target_get_osdata): Return gdb::optional<char_vector>.
9993 * target.c (target_read_alloc_1): Templatize. Replacement
9994 manual memory management with vector.
9995 (target_read_alloc): Change return type, adjust.
9996 (target_read_stralloc): Change return type, adjust.
9997 (target_get_osdata): Change return type, adjust.
9998 * auxv.c (struct auxv_info) <length>: Remove.
9999 <data>: Change type to gdb::optional<byte_vector>.
10000 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10001 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10002 (target_auxv_search): Adjust.
10003 (fprint_target_auxv): Adjust.
10004 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10005 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10006 (linux_make_corefile_notes): Adjust.
10007 * osdata.c (get_osdata): Adjust.
10008 * remote.c (remote_get_threads_with_qxfer): Adjust.
10009 (remote_memory_map): Adjust.
10010 (remote_traceframe_info): Adjust.
10011 (btrace_read_config): Adjust.
10012 (remote_read_btrace): Adjust.
10013 (remote_pid_to_exec_file): Adjust.
10014 * solib-aix.c (solib_aix_get_library_list): Adjust.
10015 * solib-dsbt.c (decode_loadmap): Don't free buf.
10016 (dsbt_get_initial_loadmaps): Adjust.
10017 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10018 * solib-target.c (solib_target_current_sos): Adjust.
10019 * tracepoint.c (sdata_make_value): Adjust.
10020 * xml-support.c (xinclude_start_include): Adjust.
10021 (xml_fetch_content_from_file): Adjust.
10022 * xml-support.h (xml_fetch_another): Change return type.
10023 (xml_fetch_content_from_file): Change return type.
10024 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10025 * xml-tdesc.c (file_read_description_xml): Adjust.
10026 (fetch_available_features_from_target): Change return type.
10027 (target_fetch_description_xml): Adjust.
10028 (target_read_description_xml): Adjust.
10029
10030 2018-04-06 Tom Tromey <tom@tromey.com>
10031
10032 * value.c (~value): Update.
10033 (struct value) <contents>: Now unique_xmalloc_ptr.
10034 (value_contents_bits_eq, allocate_value_contents)
10035 (value_contents_raw, value_contents_all_raw)
10036 (value_contents_for_printing, value_contents_for_printing_const)
10037 (set_value_enclosing_type): Update.
10038
10039 2018-04-06 Tom Tromey <tom@tromey.com>
10040
10041 * value.c (range_s): Remove typedef, VEC.
10042 (struct range): Add operator<.
10043 (range_lessthan): Remove.
10044 (ranges_contain): Change type.
10045 (~value): Update.
10046 (struct value) <unavailable, optimized_out>: Now std::vector.
10047 (value_entirely_available)
10048 (value_entirely_covered_by_range_vector)
10049 (value_entirely_unavailable, value_entirely_optimized_out):
10050 Update.
10051 (insert_into_bit_range_vector): Change argument type.
10052 (find_first_range_overlap): Likewise.
10053 (struct ranges_and_idx, value_contents_bits_eq)
10054 (require_not_optimized_out, require_available): Update.
10055 (ranges_copy_adjusted): Change argument types.
10056 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10057
10058 2018-04-06 Tom Tromey <tom@tromey.com>
10059
10060 * value.c (~value): Update.
10061 (struct value) <parent>: Now a value_ref_ptr.
10062 (value_parent, set_value_parent, value_address, value_copy):
10063 Update.
10064
10065 2018-04-06 Tom Tromey <tom@tromey.com>
10066
10067 * value.c (struct value): Add constructor, destructor, and member
10068 initializers.
10069 (allocate_value_lazy, value_decref): Update.
10070
10071 2018-04-06 Tom Tromey <tom@tromey.com>
10072
10073 * value.c (struct value) <released, next>: Remove.
10074 (all_values): Now a std::vector.
10075 (allocate_value_lazy): Update.
10076 (value_next): Remove.
10077 (value_mark, value_free_to_mark, release_value)
10078 (value_release_to_mark): Update.
10079
10080 2018-04-06 Tom Tromey <tom@tromey.com>
10081
10082 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10083 (free_value_chain): Remove.
10084 * value.c (free_value_chain): Remove.
10085 (value_release_to_mark): Return a std::vector.
10086 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10087 std::vector.
10088 (check_condition): Update.
10089 * eval.c (fetch_subexp_value): Change "val_chain" to a
10090 std::vector.
10091 * breakpoint.c (update_watchpoint): Update.
10092 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10093
10094 2018-04-06 Tom Tromey <tom@tromey.com>
10095
10096 * value.h (free_all_values): Remove.
10097 * value.c (free_all_values): Remove.
10098
10099 2018-04-06 Tom Tromey <tom@tromey.com>
10100
10101 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10102 (value_history_chain, value_history_count): Remove.
10103 (value_history): New global.
10104 (record_latest_value, access_value_history, show_values)
10105 (preserve_values): Update.
10106
10107 2018-04-06 Tom Tromey <tom@tromey.com>
10108
10109 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10110 * varobj.c (varobj_set_display_format, varobj_set_value)
10111 (install_default_visualizer, construct_visualizer)
10112 (install_new_value, ~varobj, varobj_get_value_type)
10113 (my_value_of_variable, varobj_editable_p): Update.
10114 * c-varobj.c (c_describe_child, c_value_of_variable)
10115 (cplus_number_of_children, cplus_describe_child): Update.
10116 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10117 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10118 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10119
10120 2018-04-06 Tom Tromey <tom@tromey.com>
10121
10122 * printcmd.c (last_examine_address): Change type to
10123 value_ref_ptr.
10124 (do_examine, x_command): Update.
10125
10126 2018-04-06 Tom Tromey <tom@tromey.com>
10127
10128 * value.c (release_value): Update.
10129 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10130 (struct bpstats) <val>: Now a value_ref_ptr.
10131 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10132 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10133 (~watchpoint, print_it_watchpoint, watch_command_1)
10134 (invalidate_bp_value_on_memory_change): Update.
10135
10136 2018-04-06 Tom Tromey <tom@tromey.com>
10137
10138 * varobj.c (varobj_clear_saved_item)
10139 (update_dynamic_varobj_children, install_new_value, ~varobj):
10140 Update.
10141 * value.h (value_incref): Move declaration earlier.
10142 (value_decref): Rename from value_free.
10143 (struct value_ref_policy): New.
10144 (value_ref_ptr): New typedef.
10145 (struct value_deleter): Remove.
10146 (gdb_value_up): Remove typedef.
10147 (release_value): Change return type.
10148 (release_value_or_incref): Remove.
10149 * value.c (set_value_parent): Update.
10150 (value_incref): Change return type.
10151 (value_decref): Rename from value_free.
10152 (value_free_to_mark, free_all_values, free_value_chain): Update.
10153 (release_value): Return value_ref_ptr.
10154 (release_value_or_incref): Remove.
10155 (record_latest_value, set_internalvar, clear_internalvar):
10156 Update.
10157 * stack.c (info_frame_command): Don't call value_free.
10158 * python/py-value.c (valpy_dealloc, valpy_new)
10159 (value_to_value_object): Update.
10160 * printcmd.c (do_examine): Update.
10161 * opencl-lang.c (lval_func_free_closure): Update.
10162 * mi/mi-main.c (register_changed_p): Don't call value_free.
10163 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10164 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10165 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10166 value_free.
10167 * guile/scm-value.c (vlscm_free_value_smob)
10168 (vlscm_scm_from_value): Update.
10169 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10170 (frame_unwind_register_unsigned, get_frame_register_bytes)
10171 (put_frame_register_bytes): Don't call value_free.
10172 * findvar.c (address_from_register): Don't call value_free.
10173 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10174 * dwarf2loc.c (entry_data_value_free_closure)
10175 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10176 (dwarf2_evaluate_loc_desc_full): Update.
10177 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10178 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10179 (~watchpoint, watch_command_1)
10180 (invalidate_bp_value_on_memory_change): Update.
10181 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10182
10183 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10184
10185 PR gdb/23022
10186 * warning.m4: Add -Wno-error=deprecated-register.
10187 * configure: Re-generate.
10188
10189 2018-04-05 Tom Tromey <tom@tromey.com>
10190
10191 * linespec.h: Remove include of "vec.h".
10192
10193 2018-04-05 Tom Tromey <tom@tromey.com>
10194
10195 * linespec.c (typep): Remove typedef.
10196 (find_methods, find_superclass_methods): Take a std::vector.
10197 (find_method): Use std::vector.
10198
10199 2018-04-05 Tom Tromey <tom@tromey.com>
10200
10201 * utils.c (compare_strings): Remove.
10202 * utils.h (compare_strings): Remove.
10203 * objc-lang.h (find_imps): Update.
10204 * objc-lang.c (find_methods): Take a std::vector.
10205 (uniquify_strings, find_imps): Likewise.
10206 * linespec.c (find_methods): Take a std::vector.
10207 (decode_objc): Use std::vector.
10208 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10209 a std::vector.
10210 (find_method, find_function_symbols): Use std::vector.
10211
10212 2018-04-05 Tom Tromey <tom@tromey.com>
10213
10214 * completer.c (completion_tracker::completion_tracker): Remove
10215 cast.
10216 (completion_tracker::discard_completions): Likewise.
10217 * breakpoint.c (ambiguous_names_p): Remove cast.
10218 * ada-lang.c (_initialize_ada_language): Remove cast.
10219 * utils.h (streq): Update.
10220 (streq_hash): Add new declaration.
10221 * utils.c (streq): Return bool.
10222 (streq_hash): New function.
10223
10224 2018-04-05 Tom Tromey <tom@tromey.com>
10225
10226 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10227 Remove a string copy.
10228
10229 2018-04-05 Tom Tromey <tom@tromey.com>
10230
10231 * linespec.c (filter_results): Use std::vector.
10232 (decode_line_2, decode_line_full): Update.
10233
10234 2018-04-05 Tom Tromey <tom@tromey.com>
10235
10236 * linespec.c (canonical_to_fullform): Return std::string.
10237 (filter_results): Update.
10238 (struct decode_line_2_item): Add constructor.
10239 <fullform, displayform>: Now std::string.
10240 (decode_line_2_compare_items): Now a std::sort comparator.
10241 (decode_line_2): Update.
10242
10243 2018-04-05 Tom Tromey <tom@tromey.com>
10244
10245 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10246 (unexpected_linespec_error): Update.
10247 (linespec_parse_basic, parse_linespec): Update.
10248
10249 2018-04-05 Tom Tromey <tom@tromey.com>
10250
10251 * linespec.c (linespec_parse_basic): Reindent.
10252
10253 2018-04-05 Tom Tromey <tom@tromey.com>
10254
10255 * minsyms.h (iterate_over_minimal_symbols): Update.
10256 * minsyms.c (iterate_over_minimal_symbols): Take a
10257 gdb::function_view.
10258 * linespec.c (struct collect_minsyms): Remove.
10259 (compare_msyms): Now a std::sort comparator.
10260 (add_minsym): Add parameters.
10261 (search_minsyms_for_name): Update. Use std::vector.
10262
10263 2018-04-03 Tom Tromey <tom@tromey.com>
10264
10265 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10266 gdb::byte_vector.
10267
10268 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10269
10270 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10271
10272 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10273
10274 PR gdb/16959
10275 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10276 printing static type.
10277
10278 2018-04-01 Tom Tromey <tom@tromey.com>
10279
10280 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10281 (rs6000_xfer_shared_libraries): Update.
10282
10283 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10284
10285 * common/gdb_vecs.h (char_ptr): Remove.
10286 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10287
10288 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10289
10290 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10291 with std::vector.
10292 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10293
10294 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10295
10296 * tracepoint.h (struct uploaded_tp): Initialize fields.
10297 <actions, step_actions, cmd_strings>: Change type to
10298 std::vector<char *>.
10299 * tracepoint.c (get_uploaded_tp): Allocate with new.
10300 (free_uploaded_tps): Free with delete.
10301 (parse_tracepoint_definition): Adjust to std::vector change.
10302 * breakpoint.c (read_uploaded_action): Likewise.
10303 (create_tracepoint_from_upload): Likewise.
10304 * ctf.c (ctf_write_uploaded_tp): Likewise.
10305 (SET_ARRAY_FIELD): Likewise.
10306 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10307
10308 2018-03-30 Tom Tromey <tom@tromey.com>
10309
10310 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10311 std::unique_ptr.
10312 (svr4_keep_data_in_core): Update.
10313 (svr4_read_so_list): Update.
10314
10315 2018-03-30 Tom Tromey <tom@tromey.com>
10316
10317 * windows-nat.c (handle_output_debug_string, handle_exception):
10318 Update.
10319 * target.h (target_read_string): Update.
10320 * target.c (target_read_string): Change "string" to
10321 unique_xmalloc_ptr.
10322 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10323 Update.
10324 * solib-frv.c (frv_current_sos): Update.
10325 * solib-dsbt.c (dsbt_current_sos): Update.
10326 * solib-darwin.c (darwin_current_sos): Update.
10327 * linux-thread-db.c (inferior_has_bug): Update.
10328 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10329 Update. Remove alloca.
10330 * ada-lang.c (ada_main_name): Update.
10331
10332 2018-03-30 Tom Tromey <tom@tromey.com>
10333
10334 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10335 (struct dwo_file_deleter): New.
10336 (dwo_file_up): New typedef.
10337 (open_and_init_dwo_file): Use dwo_file_up.
10338 (free_dwo_file_cleanup): Remove.
10339
10340 2018-03-30 Tom Tromey <tom@tromey.com>
10341
10342 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10343 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10344
10345 2018-03-30 Tom Tromey <tom@tromey.com>
10346
10347 * dwarf2read.c (class free_cached_comp_units): New class.
10348 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10349 (free_cached_comp_units): Remove function.
10350
10351 2018-03-30 Tom Tromey <tom@tromey.com>
10352
10353 * utils.h (make_cleanup_unpush_target): Remove.
10354 * inf-ptrace.c (struct target_unpusher): New.
10355 (target_unpush_up) New typedef.
10356 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10357 target_unpush_up.
10358 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10359
10360 2018-03-27 Tom Tromey <tom@tromey.com>
10361
10362 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10363
10364 2018-03-27 Pedro Alves <palves@redhat.com>
10365 Tom Tromey <tom@tromey.com>
10366
10367 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10368 destructor. Now a class.
10369 (gdb_readline_wrapper_cleanup): Remove function.
10370 (gdb_readline_wrapper): Remove cleanups.
10371
10372 2018-03-27 Tom Tromey <tom@tromey.com>
10373
10374 * typeprint.h (struct type_print_options) <local_typedefs,
10375 global_typedefs>: Remove "struct" keyword.
10376 (class typedef_hash_table): New class.
10377 (recursively_update_typedef_hash, add_template_parameters)
10378 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10379 (find_typedef_in_hash): Don't declare.
10380 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10381 (typedef_hash_table::recursively_update): Rename from
10382 recursively_update_typedef_hash. Now a member.
10383 (typedef_hash_table::add_template_parameters): Rename from
10384 add_template_parameters. Now a member.
10385 (typedef_hash_table::typedef_hash_table): Now a constructor;
10386 rename from create_typedef_hash.
10387 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10388 rename from free_typedef_hash.
10389 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10390 (do_free_global_table): Remove.
10391 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10392 from copy_type_recursive.
10393 (create_global_typedef_table): Remove.
10394 (typedef_hash_table::find_global_typedef): Now a member of
10395 typedef_hash_table.
10396 (typedef_hash_table::find_typedef): Rename from
10397 find_typedef_in_hash; now a member.
10398 (whatis_exp): Update.
10399 * extension.h (struct ext_lang_type_printers): Add constructor and
10400 destructor.
10401 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10402 declare.
10403 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10404 Now a constructor; rename from start_ext_lang_type_printers.
10405 (ext_lang_type_printers): Now a destructor; rename from
10406 free_ext_lang_type_printers.
10407 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10408 Update.
10409 (c_type_print_base_struct_union): Update. Remove cleanups.
10410
10411 2018-03-27 Tom Tromey <tom@tromey.com>
10412
10413 * dwarf-index-write.c: Include <cmath>.
10414
10415 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10416
10417 * NEWS: Add entry describing new "set|show varsize-limit" command.
10418 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10419 command.
10420 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10421 "set variable".
10422
10423 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10424
10425 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10426 dwarf-index-write.c
10427 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10428 * dwarf-index-common.c: New file.
10429 * dwarf-index-common.h: New file.
10430 * dwarf-index-write.c: New file.
10431 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10432 (struct dwarf2_section_info): Move from here.
10433 (dwarf2_section_info_def): Likewise.
10434 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10435 (offset_type): Likewise.
10436 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10437 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10438 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10439 (byte_swap): Likewise.
10440 (MAYBE_SWAP): Likewise.
10441 (dwarf2_per_cu_ptr): Likewise.
10442 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10443 (struct tu_stats): Likewise.
10444 (struct dwarf2_per_objfile): Likewise.
10445 (struct dwarf2_per_cu_data): Likewise.
10446 (struct signatured_type): Likewise.
10447 (sig_type_ptr): Likewise.
10448 (DEF_VEC_P (sig_type_ptr)): Likewise.
10449 (INDEX4_SUFFIX): Likewise.
10450 (INDEX5_SUFFIX): Likewise.
10451 (DEBUG_STR_SUFFIX): Likewise.
10452 (dwarf2_read_section): Make non-static.
10453 (mapped_index_string_hash): Move from here.
10454 (dwarf5_djb_hash): Likewise.
10455 (file_write): Likewise.
10456 (class data_buf): Likewise.
10457 (struct symtab_index_entry): Likewise.
10458 (struct mapped_symtab): Likewise.
10459 (find_slot): Likewise.
10460 (hash_expand): Likewise.
10461 (add_index_entry): Likewise.
10462 (uniquify_cu_indices): Likewise.
10463 (class c_str_view): Likewise.
10464 (class c_str_view_hasher): Likewise.
10465 (class vector_hasher): Likewise.
10466 (write_hash_table): Likewise.
10467 (psym_index_map): Likewise.
10468 (struct addrmap_index_data): Likewise.
10469 (add_address_entry): Likewise.
10470 (add_address_entry_worker): Likewise.
10471 (write_address_map): Likewise.
10472 (symbol_kind): Likewise.
10473 (write_psymbols): Likewise.
10474 (struct signatured_type_index_data): Likewise.
10475 (write_one_signatured_type): Likewise.
10476 (recursively_count_psymbols): Likewise.
10477 (recursively_write_psymbols): Likewise.
10478 (class debug_names): Likewise.
10479 (check_dwarf64_offsets): Likewise.
10480 (psyms_seen_size): Likewise.
10481 (write_gdbindex): Likewise.
10482 (write_debug_names): Likewise.
10483 (assert_file_size): Likewise.
10484 (write_psymtabs_to_index): Likewise.
10485 (save_gdb_index_command): Likewise.
10486 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10487 command.
10488 * dwarf2read.h: New file.
10489
10490 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10491
10492 PR gdb/22670
10493 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10494 symbol name if the CU's language stores symbol names in linkage
10495 format.
10496 * language.h (struct language_defn)
10497 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10498 all instances of this struct.
10499
10500 2018-03-26 Tom Tromey <tom@tromey.com>
10501
10502 * stack.c (backtrace_command_1): Remove verbose code.
10503
10504 2018-03-26 Tom Tromey <tom@tromey.com>
10505
10506 * python/py-framefilter.c (py_print_type): Don't catch
10507 exceptions. Return void.
10508 (py_print_value): Likewise.
10509 (py_print_single_arg): Likewise.
10510 (enumerate_args): Don't catch exceptions.
10511 (py_print_args): Likewise.
10512 (py_print_frame): Likewise.
10513 (gdbpy_apply_frame_filter): Catch exceptions here.
10514
10515 2018-03-26 Tom Tromey <tom@tromey.com>
10516
10517 * stack.c (_initialize_stack): Remove trailing newlines from help
10518 text. Add "Usage" line to "backtrace" help.
10519
10520 2018-03-26 Tom Tromey <tom@tromey.com>
10521
10522 PR python/16486:
10523 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10524
10525 2018-03-26 Tom Tromey <tom@tromey.com>
10526
10527 * python/py-framefilter.c (py_print_single_arg): Return
10528 EXT_LANG_BT_ERROR from catch.
10529
10530 2018-03-26 Tom Tromey <tom@tromey.com>
10531
10532 PR backtrace/15584:
10533 * stack.c (backtrace_command_1): Move some code into no-filters
10534 "if".
10535
10536 2018-03-26 Tom Tromey <tom@tromey.com>
10537
10538 * python/py-framefilter.c (throw_quit_or_print_exception): New
10539 function.
10540 (gdbpy_apply_frame_filter): Use it.
10541
10542 2018-03-26 Tom Tromey <tom@tromey.com>
10543
10544 PR cli/17716:
10545 * python/py-framefilter.c (py_print_type, py_print_value)
10546 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10547 RETURN_MASK_ERROR.
10548
10549 2018-03-26 Tom Tromey <tom@tromey.com>
10550
10551 * python/py-framefilter.c (enumerate_args): Use
10552 gdb::unique_xmalloc_ptr.
10553
10554 2018-03-26 Tom Tromey <tom@tromey.com>
10555
10556 * python/py-framefilter.c (py_print_frame): Return
10557 EXT_LANG_BT_OK.
10558 (gdbpy_apply_frame_filter): Update comment.
10559 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10560 Remove.
10561 <EXT_LANG_BT_NO_FILTERS>: Change value.
10562
10563 2018-03-26 Tom Tromey <tom@tromey.com>
10564
10565 PR backtrace/15582:
10566 * stack.c (backtrace_command): Parse "hide" argument.
10567 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10568 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10569 constant.
10570
10571 2018-03-26 Tom Tromey <tom@tromey.com>
10572
10573 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10574 add "flags".
10575 (backtrace_command): Remove "fulltrace", add "flags".
10576
10577 2018-03-26 Tom Tromey <tom@tromey.com>
10578
10579 * stack.c (backtrace_command): Rewrite command line parsing.
10580
10581 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10582
10583 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10584
10585 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10586
10587 * filename-seen-cache.h: Add include guard.
10588
10589 2018-03-26 Keith Seitz <keiths@redhat.com>
10590
10591 * symfile.c (place_section): Remove "struct" from section_addr_info
10592 in comment.
10593 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10594 "struct" keyword from section_addr_info.
10595
10596 2018-03-26 Alan Hayward <alan.hayward@arm.com>
10597
10598 * regformats/regdef.h (reg): Add constructors.
10599
10600 2018-03-25 Pedro Alves <palves@redhat.com>
10601
10602 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10603 if then/else bodies in var_func_name extraction.
10604
10605 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
10606
10607 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10608 lookup_minimal_symbol() to find symbol entry.
10609 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10610
10611 2018-03-23 Keith Seitz <keiths@redhat.com>
10612
10613 PR c++/22968
10614 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10615 nested type definitions for C++, too.
10616
10617 2018-03-23 Tom Tromey <tom@tromey.com>
10618
10619 * machoread.c (struct oso_el): Add a constructor. Don't define as
10620 a typedef.
10621 (macho_register_oso): Remove.
10622 (macho_symtab_read): Take a std::vector.
10623 (oso_el_compare_name): Now a std::sort comparator.
10624 (macho_symfile_read_all_oso): Take a std::vector.
10625 (macho_symfile_read): Use std::vector. Remove cleanups.
10626
10627 2018-03-22 Tom Tromey <tom@tromey.com>
10628
10629 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10630 (record_full_goto_bookmark): Use std::string.
10631
10632 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10633
10634 PR tdep/18295
10635 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10636 a single mask.
10637
10638 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10639
10640 * rs6000-tdep.c (store_insn_p): New function.
10641 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10642 and cr_reg to their unshifted values. Use store_insn_p to
10643 match LR saves using either R1 or fdata->alloca_reg. Use
10644 store_insn_p to match CR saves. Set alloca_reg_offset
10645 when alloca_reg and framep are set. Remove lr_reg shift
10646 when assigning to fdata->lr_register.
10647
10648 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
10649
10650 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10651 command line args instead of emitting a warning.
10652
10653 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10654
10655 * tracepoint.h (struct static_tracepoint_marker): Initialize
10656 fields, define default constructor, move constructor and move
10657 assignment, disable the rest.
10658 <str_id, extra>: Make std::string.
10659 (release_static_tracepoint_marker): Remove.
10660 (free_current_marker): Remove.
10661 * tracepoint.c (free_current_marker): Remove.
10662 (parse_static_tracepoint_marker_definition): Adjust to
10663 std::string, use new hex2str overload.
10664 (release_static_tracepoint_marker): Remove.
10665 (print_one_static_tracepoint_marker): Get marker by reference
10666 and adjust to std::string.
10667 (info_static_tracepoint_markers_command): Adjust to std::vector
10668 changes
10669 * target.h (static_tracepoint_marker_p): Remove typedef.
10670 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10671 (struct target_ops) <to_static_tracepoint_marker_at>: Return
10672 bool.
10673 <to_static_tracepoint_markers_by_strid>: Return std::vector.
10674 * target-debug.h
10675 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10676 (target_debug_print_std_vector_static_tracepoint_marker): New.
10677 (target_debug_print_struct_static_tracepoint_marker_p): Rename
10678 to...
10679 (target_debug_print_static_tracepoint_marker_p): ... this.
10680 * target-delegates.c: Re-generate.
10681 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10682 Make std::string.
10683 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10684 (decode_static_tracepoint_spec): Adjust to std::vector.
10685 (tracepoint_print_one_detail): Adjust to std::string.
10686 (strace_marker_decode_location): Adjust to std::string.
10687 (update_static_tracepoint): Adjust to std::string, remove call
10688 to release_static_tracepoint_marker.
10689 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10690 Adjust to std::vector.
10691 * remote.c (remote_static_tracepoint_marker_at): Return bool.
10692 (remote_static_tracepoint_markers_by_strid): Adjust to
10693 std::vector.
10694 * common/rsp-low.h (hex2str): New overload with explicit count
10695 of bytes.
10696 * common/rsp-low.c (hex2str): New overload with explicit count
10697 of bytes.
10698 * unittests/rsp-low-selftests.c (test_hex2str): New function.
10699 (_initialize_rsp_low_selftests): Add test_hex2str test.
10700 * unittests/tracepoint-selftests.c
10701 (test_parse_static_tracepoint_marker_definition): Adjust to
10702 std::string.
10703
10704 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10705
10706 * tracepoint.c (parse_static_tracepoint_marker_definition):
10707 Consider case where the definition is followed by more
10708 definitions.
10709 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10710 tracepoint-selftests.c.
10711 * unittests/tracepoint-selftests.c: New.
10712
10713 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10714
10715 * MAINTAINERS (Write After Approval): Add Pedro Franco de
10716 Carvalho.
10717
10718 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10719
10720 * symtab.c (find_pc_sect_line): fixed indentation.
10721
10722 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10723
10724 * symtab.c (find_pc_sect_line): now uses binary search.
10725
10726 2018-03-19 Tom Tromey <tom@tromey.com>
10727
10728 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10729 "IDENT" production.
10730
10731 2018-03-19 Pedro Alves <palves@redhat.com>
10732 Tom Tromey <tom@tromey.com>
10733
10734 * unittests/observable-selftests.c: New file.
10735 * common/observable.h: New file.
10736 * observable.h: New file.
10737 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10738 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10739 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10740 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10741 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10742 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10743 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10744 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10745 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10746 python/py-breakpoint.c, python/py-finishbreakpoint.c,
10747 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10748 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10749 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10750 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10751 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10752 tui/tui-interp.c, valops.c: Update all users.
10753 * tui/tui-hooks.c (tui_bp_created_observer)
10754 (tui_bp_deleted_observer, tui_bp_modified_observer)
10755 (tui_inferior_exit_observer, tui_before_prompt_observer)
10756 (tui_normal_stop_observer, tui_register_changed_observer):
10757 Remove.
10758 (tui_observers_token): New global.
10759 (attach_or_detach, tui_attach_detach_observers): New functions.
10760 (tui_install_hooks, tui_remove_hooks): Use
10761 tui_attach_detach_observers.
10762 * record-btrace.c (record_btrace_thread_observer): Remove.
10763 (record_btrace_thread_observer_token): New global.
10764 * observer.sh: Remove.
10765 * observer.c: Rename to observable.c.
10766 * observable.c (namespace gdb_observers): Define new objects.
10767 (observer_debug): Move into gdb_observers namespace.
10768 (struct observer, struct observer_list, xalloc_observer_list_node)
10769 (xfree_observer_list_node, generic_observer_attach)
10770 (generic_observer_detach, generic_observer_notify): Remove.
10771 (_initialize_observer): Update.
10772 Don't include observer.inc.
10773 * Makefile.in (generated_files): Remove observer.h, observer.inc.
10774 (clean mostlyclean): Likewise.
10775 (observer.h, observer.inc): Remove targets.
10776 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10777 (COMMON_SFILES): Use observable.c, not observer.c.
10778 * .gitignore: Remove observer.h.
10779
10780 2018-03-18 Tom Tromey <tom@tromey.com>
10781
10782 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10783 gdb::def_vector.
10784 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10785
10786 2018-03-17 Tom Tromey <tom@tromey.com>
10787
10788 * auto-load.c (auto_load_objfile_script_1): Use std::string.
10789
10790 2018-03-17 Tom Tromey <tom@tromey.com>
10791
10792 * target.c (class scoped_target_fd): New.
10793 (target_fileio_close_cleanup): Remove.
10794 (target_fileio_read_alloc_1): Use scoped_target_fd.
10795
10796 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
10797
10798 * silent-rules.mk: New.
10799 * Makefile.in: Include silent-rules.mk
10800 (srcdir, VPATH, top_srcdir): Move up.
10801 (COMPILE): Add ECHO_CXX.
10802 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10803 (init.c): Add ECHO_INIT_C.
10804 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10805 (version.c): Add ECHO_GEN.
10806 (printcmd.o): Add ECHO_CXX.
10807 (target-float.o): Add ECHO_CXX.
10808 (ada-exp.o): Add ECHO_CXX.
10809 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10810 (insight$(EXEEXT)): Add ECHO_CXXLD.
10811 * gnulib/configure.ac: Add AM_SILENT_RULES.
10812 * gnulib/aclocal.m4: Re-generate.
10813 * gnulib/configure: Re-generate.
10814 * gnulib/import/Makefile.in: Re-generate.
10815
10816 2018-03-16 Tom Tromey <tom@tromey.com>
10817
10818 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10819 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10820 * utils.c (do_free_section_addr_info)
10821 (make_cleanup_free_section_addr_info): Remove.
10822 * symfile.h (struct other_sections): Add constructor.
10823 (struct section_addr_info): Remove.
10824 (section_addr_info): New typedef.
10825 (struct sym_fns) <sym_offsets>: Change type of parameter.
10826 (build_section_addr_info_from_objfile)
10827 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10828 (default_symfile_offsets, symbol_file_add)
10829 (symbol_file_add_from_bfd)
10830 (build_section_addr_info_from_section_table): Update.
10831 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10832 * symfile.c (alloc_section_addr_info): Remove.
10833 (build_section_addr_info_from_section_table): Change return type.
10834 Update.
10835 (build_section_addr_info_from_bfd)
10836 (build_section_addr_info_from_objfile): Likewise.
10837 (free_section_addr_info): Remove.
10838 (relative_addr_info_to_section_offsets): Change type of "addrs".
10839 (addrs_section_compar): Now a std::sort comparator.
10840 (addrs_section_sort): Change return type.
10841 (addr_info_make_relative): Change type of "addrs". Update.
10842 (default_symfile_offsets, syms_from_objfile_1)
10843 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10844 (symbol_file_add_separate): Update.
10845 (symbol_file_add): Change type of "addrs". Update.
10846 (add_symbol_file_command): Update. Remove cleanups.
10847 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10848 cleanups.
10849 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10850 * solib.c (solib_read_symbols): Update.
10851 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10852 * machoread.c (macho_symfile_offsets): Update.
10853 * jit.c (jit_bfd_try_read_symtab): Update.
10854
10855 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10856
10857 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10858 unittests/utils-selftests.c.
10859 * unittests/utils-selftests.c: New file.
10860
10861 2018-03-14 Tom Tromey <tom@tromey.com>
10862
10863 PR cli/14977:
10864 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10865 for NULL.
10866
10867 2018-03-14 Tom Tromey <tom@tromey.com>
10868
10869 PR cli/19918:
10870 * printcmd.c (printf_pointer): Allow "-" in format.
10871
10872 2018-03-14 Tom Tromey <tom@tromey.com>
10873
10874 * printcmd.c (_initialize_printcmd): Add usage to printf.
10875
10876 2018-03-14 Yao Qi <qiyao@sourceware.org>
10877
10878 * MAINTAINERS: Update my email address.
10879
10880 2018-03-13 Tom Tromey <tom@tromey.com>
10881
10882 * machoread.c (macho_check_dsym): Change filenamep to a
10883 std::string*.
10884 (macho_symfile_read): Update.
10885 * symfile.c (load_command): Use std::string.
10886
10887 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10888
10889 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10890 to error message string.
10891 (riscv_register_name): Use xsnprintf instead of sprintf.
10892 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10893 internal_error.
10894 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10895 error.
10896 (riscv_push_dummy_call): Likewise.
10897
10898 2018-03-12 Tom Tromey <tom@tromey.com>
10899
10900 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10901 Use gdb::byte_vector.
10902 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10903
10904 2018-03-12 Yao Qi <yao.qi@linaro.org>
10905
10906 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10907 parameter type to readable_regcache.
10908 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10909 the declaration.
10910
10911 2018-03-11 Tom Tromey <tom@tromey.com>
10912
10913 * dwarf2read.c (struct nextfield): Add initializers.
10914 (struct nextfnfield): Remove.
10915 (struct fnfieldlist): Add initializers. Remove "length" and
10916 "head", use std::vector.
10917 (struct decl_field_list): Remove.
10918 (struct field_info): Add initializers.
10919 <fields, baseclasses>: Now std::vector.
10920 <nbaseclasses, nfnfields, typedef_field_list_count,
10921 nested_types_list_count>: Remove.
10922 (dwarf2_add_field, dwarf2_add_type_defn)
10923 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10924 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10925 (process_structure_scope): Update.
10926
10927 2018-03-11 Tom Tromey <tom@tromey.com>
10928
10929 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10930 for use by std::sort.
10931 (build_type_psymtabs_1): Use std::vector.
10932
10933 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10934
10935 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10936 and LIBMPFR in the printed configuration.
10937
10938 2018-03-08 Tom Tromey <tom@tromey.com>
10939
10940 * source.c (get_filename_and_charpos): Use scoped_fd.
10941 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10942 (procfs_pidlist): Likewise.
10943 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10944 (iterate_over_mappings): Likewise.
10945
10946 2018-03-08 Tom Tromey <tom@tromey.com>
10947
10948 * infcall.c (struct call_return_meta_info)
10949 <stack_temporaries_enabled>: Remove.
10950 (get_call_return_value, call_function_by_hand_dummy): Update.
10951 * thread.c (disable_thread_stack_temporaries): Remove.
10952 (enable_thread_stack_temporaries): Remove.
10953 (thread_stack_temporaries_enabled_p): Return bool.
10954 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10955 (get_last_thread_stack_temporary): Update.
10956 * eval.c (evaluate_subexp): Update.
10957 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10958 class, not a function.
10959 (value_ptr, value_vec): Remove typedefs.
10960 (class thread_info) <stack_temporaries_enabled>: Now bool.
10961 <stack_temporaries>: Now a std::vector.
10962 (thread_stack_temporaries_enabled_p)
10963 (value_in_thread_stack_temporaries): Return bool.
10964
10965 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10966
10967 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10968 (getpkt_or_notif_sane_1): Likewise.
10969
10970 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10971
10972 * build-id.c (build_id_to_debug_bfd): Use std::string.
10973
10974 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10975
10976 * build-id.c (find_separate_debug_file_by_buildid): Return
10977 std::string.
10978 * build-id.h (find_separate_debug_file_by_buildid): Return
10979 std::string.
10980 * coffread.c (coff_symfile_read): Adjust to std::string.
10981 * elfread.c (elf_symfile_read): Adjust to std::string.
10982 * symfile.c (separate_debug_file_exists): Change parameter to
10983 std::string.
10984 (find_separate_debug_file): Return std::string.
10985 (find_separate_debug_file_by_debuglink): Return std::string.
10986 * symfile.h (find_separate_debug_file_by_debuglink): Return
10987 std::string.
10988
10989 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10990
10991 * common/xml-utils.c (xml_escape_text): Move code to...
10992 (xml_escape_text_append): ... this new function.
10993 * common/xml-utils.h (xml_escape_text_append): New declaration.
10994 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10995 New function.
10996 (_initialize_xml_utils): register test_xml_escape_text_append as
10997 a selftest.
10998
10999 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11000
11001 * defs.h: Remove MAX_REGISTER_SIZE.
11002 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11003 asserts.
11004 * python/py-unwind.c (pyuw_sniffer): Likewise.
11005
11006 2018-03-07 Tom Tromey <tom@tromey.com>
11007
11008 * linux-tdep.c (linux_info_proc): Update.
11009 * target.h (struct target_ops) <to_fileio_readlink>: Return
11010 optional<string>.
11011 (target_fileio_readlink): Return optional<string>.
11012 * remote.c (remote_hostio_readlink): Return optional<string>.
11013 * inf-child.c (inf_child_fileio_readlink): Return
11014 optional<string>.
11015 * target.c (target_fileio_readlink): Return optional<string>.
11016
11017 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11018
11019 * regcache.c (cooked_read_test): Add riscv to the list of
11020 architectures that have a save_reggroup.
11021
11022 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11023
11024 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11025 value is not a dynamic class object.
11026
11027 2018-03-06 Tom Tromey <tom@tromey.com>
11028
11029 * rust-exp.y: Formatting fixes.
11030
11031 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11032
11033 * riscv-tdep.c (riscv_register_name): Remove target description
11034 support.
11035 (riscv_gdbarch_init): Remove target description check.
11036
11037 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11038
11039 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11040 comment.
11041 * riscv-tdep.h: Likewise.
11042
11043 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11044
11045 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11046 (riscv_pseudo_register_write): Delete.
11047 (riscv_gdbarch_init): Remove all use of pseudo registers.
11048
11049 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11050
11051 * record-btrace.c (btrace_print_lines): Replace cleanup
11052 parameter with RAII equivalents.
11053 (btrace_insn_history): Replace cleanup with RAII equivalents.
11054 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11055 make_cleanup_ui_out_tuple_begin_end): Remove.
11056 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11057 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11058 make_cleanup_ui_out_list_begin_end): Remove.
11059
11060 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11061
11062 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11063 parameter types to std::vector. Use bool.
11064 (record_btrace_wait): Replace VEC(tp_t) with
11065 std::vector<thread_info *>.
11066 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11067
11068 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11069
11070 * record-btrace.c (record_btrace_disable_callback): Remove.
11071 (struct scoped_btrace_disable): New.
11072 (record_btrace_open): Use scoped_btrace_disable.
11073
11074 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11075
11076 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11077 reading values from registers.
11078
11079 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11080
11081 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11082 where appropriate.
11083
11084 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11085
11086 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11087 change parameter type. Use GDB's print functions, and use
11088 core_addr_to_string where appropriate.
11089 (riscv_push_dummy_call): Use core_addr_to_string where
11090 appropriate, update call to riscv_print_arg_location, and reindent
11091 a few lines.
11092 (riscv_return_value): Update call to riscv_print_arg_location.
11093
11094 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11095 Tim Newsome <tim@sifive.com>
11096 Albert Ou <a0u@eecs.berkeley.edu>
11097 Darius Rad <darius@bluespec.com>
11098
11099 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11100 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11101 (ALLDEPFILES): Add riscv-tdep.c
11102 * configure.tgt: Add riscv support.
11103 * riscv-tdep.c: New file.
11104 * riscv-tdep.h: New file.
11105 * NEWS: Mention new target.
11106 * MAINTAINERS: Add entry for riscv.
11107
11108 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11109
11110 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11111 fields within aggregates.
11112
11113 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11114
11115 * record-btrace.c (btrace_print_lines): Change type of flags to
11116 gdb_disassembly_flags.
11117
11118 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11119
11120 * fbsd-nat.c: Include "inf-ptrace.h".
11121 (USE_SIGTRAP_SIGINFO): Conditionally define.
11122 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11123 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11124 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11125 function.
11126 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11127 Likewise.
11128 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11129 Likewise.
11130 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11131 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11132 "supports_stopped_by_hw_breakpoint" target methods.
11133
11134 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11135
11136 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11137 * fbsd-nat.c (debug_fbsd_nat): New variable.
11138 (show_fbsd_nat_debug): New function.
11139 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11140 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11141
11142 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11143
11144 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11145 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11146 prototype.
11147 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11148 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11149 method.
11150
11151 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11152
11153 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11154 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11155
11156 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11157
11158 * charset.c (struct charset_vector): New.
11159 (charsets): Change type to charset_vector.
11160 (find_charset_names): Adjust.
11161 (add_one): Adjust.
11162 (_initialize_charset): Adjust.
11163
11164 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11165
11166 * progspace.h (struct program_space) <deleted_solibs>: Change
11167 type to std::vector<std::string>.
11168 * progspace.c (clear_program_space_solib_cache): Adjust.
11169 * breakpoint.c (print_solib_event): Adjust.
11170 (check_status_catch_solib): Adjust.
11171 * solib.c (update_solib_list): Adjust.
11172 * ui-out.h (class ui_out) <field_string>: New overload.
11173 * ui-out.c (ui_out::field_string): New overload.
11174
11175 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11176
11177 * progspace.h (struct program_space): Add constructor and
11178 destructor, initialize fields.
11179 (add_program_space): Remove.
11180 * progspace.c (add_program_space): Rename to...
11181 (program_space::program_space): ... this.
11182 (release_program_space): Rename to...
11183 (program_space::~program_space): ... this.
11184 (delete_program_space): Use delete to delete program_space.
11185 (initialize_progspace): Use new to allocate program_space.
11186 * inferior.c (add_inferior_with_spaces): Likewise.
11187 (clone_inferior_command): Likewise.
11188 * infrun.c (follow_fork_inferior): Likewise.
11189 (handle_vfork_child_exec_or_exit): Likewise.
11190
11191 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11192
11193 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11194 (delim_string_to_char_ptr_vec): Return std::vector of
11195 gdb::unique_xmalloc_ptr.
11196 (dirnames_to_char_ptr_vec_append): Take std::vector of
11197 gdb::unique_xmalloc_ptr.
11198 (dirnames_to_char_ptr_vec): Return std::vector of
11199 gdb::unique_xmalloc_ptr.
11200 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11201 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11202 (delim_string_to_char_ptr_vec): Return an std::vector of
11203 gdb::unique_xmalloc_ptr, adjust the code.
11204 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11205 gdb::unique_xmalloc_ptr, adjust the code.
11206 (dirnames_to_char_ptr_vec): Return an std::vector of
11207 gdb::unique_xmalloc_ptr, adjust the code.
11208 * auto-load.c (auto_load_safe_path_vec): Change type to
11209 std::vector of gdb::unique_xmalloc_ptr.
11210 (auto_load_expand_dir_vars): Return an std::vector of
11211 gdb::unique_xmalloc_ptr, adjust the code.
11212 (auto_load_safe_path_vec_update): Adjust.
11213 (filename_is_in_auto_load_safe_path_vec): Adjust.
11214 (auto_load_objfile_script_1): Adjust.
11215 * build-id.c (build_id_to_debug_bfd): Adjust.
11216 * linux-thread-db.c (thread_db_load_search): Adjust.
11217 * source.c (add_path): Adjust.
11218 (openp): Adjust.
11219 * symfile.c (find_separate_debug_file): Adjust.
11220 * utils.c (do_free_char_ptr_vec): Remove.
11221 (make_cleanup_free_char_ptr_vec): Remove.
11222
11223 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11224
11225 PR gdb/22907
11226 * common/pathstuff.c: Conditionally include "<windows.h>".
11227
11228 2018-03-01 Georg Sauthoff <mail@georg.so>
11229
11230 PR gdb/22888
11231 * gcore.in: Quote variables and switch interpreter to bash.
11232
11233 2018-03-01 Tom Tromey <tom@tromey.com>
11234
11235 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11236 assertion. Add assertion for discriminant_index.
11237 (quirk_rust_enum): Use correct base type name in univariant case.
11238
11239 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11240
11241 * record.c (get_call_history_modifiers): Return a
11242 record_print_flags.
11243 (cmd_record_call_history): Adjust.
11244 * record-btrace.c (record_btrace_call_history): Adjust.
11245 (record_btrace_call_history_range): Adjust.
11246 (record_btrace_call_history_from): Adjust.
11247 * target-debug.h (target_debug_print_record_print_flags): New.
11248 * target-delegates.c: Re-generate.
11249 * target.c (target_call_history): Change flags type.
11250 (target_call_history_from): Likewise.
11251 (target_call_history_range): Likewise.
11252 * target.h (struct target_ops) <target_call_history>: Likewise.
11253 (target_call_history_from): Likewise.
11254 (target_call_history_range): Likewise.
11255
11256 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11257 Simon Marchi <simon.marchi@polymtl.ca>
11258
11259 * common/common-utils.c: Include "sys/stat.h".
11260 (is_regular_file): Move here from "source.c"; change return
11261 type to "bool".
11262 * common/common-utils.h (is_regular_file): New prototype.
11263 * common/pathstuff.c (contains_dir_separator): New function.
11264 * common/pathstuff.h (contains_dir_separator): New prototype.
11265 * source.c: Don't include "sys/stat.h".
11266 (is_regular_file): Move to "common/common-utils.c".
11267
11268 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11269
11270 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11271 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11272 * auto-load.c: Include "common/pathstuff.h".
11273 * common/common-def.h (current_directory): Move here.
11274 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11275 function.
11276 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11277 prototype.
11278 * common/pathstuff.c: New file.
11279 * common/pathstuff.h: New file.
11280 * compile/compile.c: Include "common/pathstuff.h".
11281 * defs.h (current_directory): Move to "common/common-defs.h".
11282 * dwarf2read.c: Include "common/pathstuff.h".
11283 * exec.c: Likewise.
11284 * guile/scm-safe-call.c: Likewise.
11285 * linux-thread-db.c: Likewise.
11286 * main.c: Likewise.
11287 * nto-tdep.c: Likewise.
11288 * objfiles.c: Likewise.
11289 * source.c: Likewise.
11290 * symtab.c: Likewise.
11291 * utils.c: Include "common/pathstuff.h".
11292 (gdb_realpath): Move to "common/pathstuff.c".
11293 (gdb_realpath_keepfile): Likewise.
11294 (gdb_abspath): Likewise.
11295 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11296 (gdb_realpath_keepfile): Likewise.
11297 (gdb_abspath): Likewise.
11298
11299 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11300
11301 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11302 wildcard process pid for super_resume for kernels with a
11303 specific bug.
11304
11305 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11306
11307 * compile/compile.c (get_args): Add additional comments
11308 explaining function.
11309
11310 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11311 Tom Tromey <tom@tromey.com>
11312
11313 * target.h (memory_write_request_s): Remove typedef. Don't define
11314 VEC.
11315 (target_write_memory_blocks): Change argument to std::vector.
11316 (struct memory_write_request): Add constructor.
11317 * target-memory.c (compare_block_starting_address): Return bool.
11318 Change argument types.
11319 (claim_memory): Change arguments to use std::vector.
11320 (split_regular_and_flash_blocks, blocks_to_erase)
11321 (compute_garbled_blocks): Likewise.
11322 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11323 (target_write_memory_blocks): Change argument to std::vector.
11324 * symfile.c (struct load_section_data): Add constructor and
11325 destructor. Use std::vector for "requests".
11326 (struct load_progress_data): Add initializers.
11327 (load_section_callback): Update. Use "new".
11328 (clear_memory_write_data): Remove.
11329 (generic_load): Update.
11330
11331 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11332
11333 * arch/aarch64.h: Use common/tdesc.h.
11334
11335 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11336
11337 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11338 architecture with a 64-bit ABI.
11339
11340 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11341
11342 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11343 ahead of target description loading.
11344
11345 2018-02-26 Tom Tromey <tom@tromey.com>
11346
11347 * stack.c (backtrace_command_1): Update.
11348 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11349 of "flags".
11350 * python/py-framefilter.c (py_print_frame)
11351 (gdbpy_apply_frame_filter): Change type of "flags".
11352 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11353 of "flags".
11354 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11355 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11356 * extension.h (enum frame_filter_flag): Rename from
11357 frame_filter_flags.
11358 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11359 (apply_ext_lang_frame_filter): Change type of "flags".
11360 * extension.c (apply_ext_lang_frame_filter): Change type of
11361 "flags".
11362 * extension-priv.h (struct extension_language_ops)
11363 <apply_frame_filter>: Change type of "flags".
11364
11365 2018-02-26 Tom Tromey <tom@tromey.com>
11366
11367 PR python/16497:
11368 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11369 off-by-one in py_end computation.
11370 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11371 PRINT_MORE_FRAMES.
11372 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11373 constant.
11374
11375 2018-02-26 Tom Tromey <tom@tromey.com>
11376
11377 * dwarf2read.c (struct variant_field): New.
11378 (struct nextfield) <variant>: New field.
11379 (dwarf2_add_field): Handle DW_TAG_variant_part.
11380 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11381 discriminated union.
11382 (read_structure_type): Handle DW_TAG_variant_part.
11383 (handle_struct_member_die): New function, extracted from
11384 process_structure_scope. Handle DW_TAG_variant.
11385 (process_structure_scope): Handle discriminated unions. Call
11386 handle_struct_member_die.
11387
11388 2018-02-26 Tom Tromey <tom@tromey.com>
11389
11390 * rust-lang.h (rust_last_path_segment): Declare.
11391 * rust-lang.c (rust_last_path_segment): Now public. Change
11392 contract.
11393 (struct disr_info): Remove.
11394 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11395 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11396 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11397 (rust_enum_p, rust_enum_variant): New function.
11398 (rust_underscore_fields): Remove "offset" parameter.
11399 (rust_print_enum): New function.
11400 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11401 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11402 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11403 enums.
11404 (rust_internal_print_type): New function, from rust_print_type.
11405 Remove enum code.
11406 (rust_print_type): Call rust_internal_print_type.
11407 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11408 Update enum handling.
11409 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11410 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11411 (rust_union_quirks): New functions.
11412 (process_full_comp_unit, process_full_type_unit): Call
11413 rust_union_quirks.
11414 (process_structure_scope): Update rust_unions if necessary.
11415
11416 2018-02-26 Tom Tromey <tom@tromey.com>
11417
11418 * value.h (value_union_variant): Declare.
11419 * valops.c (value_union_variant): New function.
11420 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11421 (struct discriminant_info): New.
11422 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11423 enumerator.
11424 (struct main_type) <flag_discriminated_union>: New field.
11425
11426 2018-02-26 Tom Tromey <tom@tromey.com>
11427
11428 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11429 unittests/unpack-selftests.c.
11430 * unittests/unpack-selftests.c: New file.
11431 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11432
11433 2018-02-26 Yao Qi <yao.qi@linaro.org>
11434
11435 * dwarf2read.c (struct partial_die_info) <read>: New method.
11436 (read_partial_die): Remove the declaration.
11437 (load_partial_dies): Update.
11438 (partial_die_info::partial_die_info):
11439 (read_partial_die): Change it to partial_die_info::read.
11440
11441 2018-02-26 Yao Qi <yao.qi@linaro.org>
11442
11443 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11444 (fixup_partial_die): Remove declaration.
11445 (scan_partial_symbols): Update.
11446 (partial_die_parent_scope): Likewise.
11447 (partial_die_full_name): Likewise.
11448 (fixup_partial_die): Change it to partial_die_info::fixup.
11449
11450 2018-02-26 Yao Qi <yao.qi@linaro.org>
11451
11452 * dwarf2read.c (read_partial_die): Update the declaration.
11453 (load_partial_dies): Caller update.
11454 (read_partial_die): Remove one argument abbrev_len.
11455
11456 2018-02-26 Yao Qi <yao.qi@linaro.org>
11457
11458 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11459 assignment operator.
11460 (load_partial_dies): Use ctor and copy ctor.
11461 (read_partial_die): Update.
11462 (dwarf2_cu::find_partial_die): Use ctor.
11463
11464 2018-02-26 Yao Qi <yao.qi@linaro.org>
11465
11466 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11467 (find_partial_die_in_comp_unit): Change it to
11468 dwarf2_cu::find_partial_die.
11469 (find_partial_die): Update.
11470
11471 2018-02-26 Yao Qi <yao.qi@linaro.org>
11472
11473 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11474 is NULL.
11475
11476 2018-02-26 Yao Qi <yao.qi@linaro.org>
11477
11478 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11479
11480 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11481
11482 * arch/amd64.h: Use common/tdesc.h.
11483 * arch/i386.c: Likewise.
11484 * arch/i386.h: Likewise.
11485 * arch/tic6x.c: Likewise.
11486 * arch/tdesc.h: Move file from here...
11487 * common/tdesc.h: ...to here.
11488 * features/aarch64-core.c: Regenerate.
11489 * features/aarch64-fpu.c: Regenerate.
11490 * features/i386/32bit-avx.c: Regenerate.
11491 * features/i386/32bit-avx512.c: Regenerate.
11492 * features/i386/32bit-core.c: Regenerate.
11493 * features/i386/32bit-linux.c: Regenerate.
11494 * features/i386/32bit-mpx.c: Regenerate.
11495 * features/i386/32bit-pkeys.c: Regenerate.
11496 * features/i386/32bit-sse.c: Regenerate.
11497 * features/i386/64bit-avx.c: Regenerate.
11498 * features/i386/64bit-avx512.c: Regenerate.
11499 * features/i386/64bit-core.c: Regenerate.
11500 * features/i386/64bit-linux.c: Regenerate.
11501 * features/i386/64bit-mpx.c: Regenerate.
11502 * features/i386/64bit-pkeys.c: Regenerate.
11503 * features/i386/64bit-segments.c: Regenerate.
11504 * features/i386/64bit-sse.c: Regenerate.
11505 * features/i386/x32-core.c: Regenerate.
11506 * features/tic6x-c6xp.c: Regenerate.
11507 * features/tic6x-core.c: Regenerate.
11508 * features/tic6x-gp.c: Regenerate.
11509 * target-descriptions.c: Use common/tdesc.h.
11510 * target-descriptions.h: Likewise.
11511
11512 2018-02-24 Tom Tromey <tom@tromey.com>
11513
11514 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11515 (try_thread_db_load_from_dir, thread_db_load_search): Use
11516 std::string.
11517 (info_auto_load_libthread_db_compare): Return bool. Change
11518 argument types.
11519 (info_auto_load_libthread_db): Use std::vector, std::string.
11520 Remove cleanups.
11521
11522 2018-02-24 Tom Tromey <tom@tromey.com>
11523
11524 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11525 std::string.
11526 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11527 std::string*.
11528 * gdbarch.c: Rebuild.
11529 * gdbarch.h: Rebuild.
11530 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11531 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11532 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11533 std::string*.
11534
11535 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11536
11537 * gdbtypes.h (sect_offset): Change type to uint64_t.
11538 (sect_offset_str): New function.
11539 * dwarf2read.c (create_addrmap_from_aranges): Use
11540 sect_offset_str.
11541 (error_check_comp_unit_head): Likewise.
11542 (create_debug_type_hash_table): Likewise.
11543 (read_cutu_die_from_dwo): Likewise.
11544 (init_cutu_and_read_dies): Likewise.
11545 (init_cutu_and_read_dies_no_follow): Likewise.
11546 (process_psymtab_comp_unit_reader): Likewise.
11547 (partial_die_parent_scope): Likewise.
11548 (peek_die_abbrev): Likewise.
11549 (process_queue): Likewise.
11550 (dwarf2_physname): Likewise.
11551 (read_namespace_alias): Likewise.
11552 (read_import_statement): Likewise.
11553 (create_dwo_cu_reader): Likewise.
11554 (create_cus_hash_table): Likewise.
11555 (lookup_dwo_cutu): Likewise.
11556 (inherit_abstract_dies): Likewise.
11557 (read_func_scope): Likewise.
11558 (read_call_site_scope): Likewise.
11559 (dwarf2_add_member_fn): Likewise.
11560 (read_common_block): Likewise.
11561 (read_module_type): Likewise.
11562 (read_typedef): Likewise.
11563 (read_subrange_type): Likewise.
11564 (load_partial_dies): Likewise.
11565 (read_partial_die): Likewise.
11566 (find_partial_die): Likewise.
11567 (read_str_index): Likewise.
11568 (dwarf2_string_attr): Likewise.
11569 (build_error_marker_type): Likewise.
11570 (lookup_die_type): Likewise.
11571 (dump_die_shallow): Likewise.
11572 (follow_die_ref): Likewise.
11573 (dwarf2_fetch_die_loc_sect_off): Likewise.
11574 (dwarf2_fetch_constant_bytes): Likewise.
11575 (follow_die_sig): Likewise.
11576 (get_signatured_type): Likewise.
11577 (get_DW_AT_signature_type): Likewise.
11578 (dwarf2_find_containing_comp_unit): Likewise.
11579 (set_die_type): Likewise.
11580
11581 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11582
11583 * arch/aarch64.c: Include "common-defs.h".
11584 * arch/amd64.c: Likewise.
11585 * arch/i386.c: Likewise.
11586
11587 2018-02-21 Tom Tromey <tom@tromey.com>
11588
11589 * value.h: (extract_field_op): Update.
11590 * eval.c (extract_field_op): Return a const char *.
11591 * expression.h (parse_expression_for_completion): Update.
11592 * completer.c (complete_expression): Update.
11593 (add_struct_fields): Make fieldname const.
11594 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11595 (mark_completion_tag, parse_exp_in_context_1): Update.
11596 (parse_expression_for_completion): Change "name" to
11597 unique_xmalloc_ptr*.
11598
11599 2018-02-21 Tom Tromey <tom@tromey.com>
11600
11601 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11602
11603 2018-02-21 Yao Qi <yao.qi@linaro.org>
11604
11605 * avr-tdep.c (avr_read_pc): Change parameter type to
11606 readable_regcache.
11607 * gdbarch.sh (read_pc): Likewise.
11608 * gdbarch.c: Re-generated.
11609 * gdbarch.h: Re-generated.
11610 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11611 readable_regcache.
11612 * ia64-tdep.c (ia64_read_pc): Likewise.
11613 * mips-tdep.c (mips_read_pc): Likewise.
11614 * spu-tdep.c (spu_read_pc): Likewise.
11615
11616 2018-02-21 Yao Qi <yao.qi@linaro.org>
11617
11618 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11619 * regcache-dump.c: New file.
11620 * regcache.c: Move register_dump to regcache-dump.c.
11621 (maintenance_print_registers): Likewise.
11622 (maintenance_print_raw_registers): Likewise.
11623 (maintenance_print_cooked_registers): Likewise.
11624 (maintenance_print_register_groups): Likewise.
11625 (maintenance_print_remote_registers): Likewise.
11626 (_initialize_regcache): Likewise.
11627 * regcache.h (register_dump): Moved from regcache.c.
11628
11629 2018-02-21 Yao Qi <yao.qi@linaro.org>
11630
11631 * regcache.c (regcache::regcache): Update.
11632 (regcache::invalidate): Move it to detached_regcache::invalidate.
11633 (get_thread_arch_aspace_regcache): Update.
11634 (regcache::raw_update): Update.
11635 (regcache::cooked_read): Remove some code.
11636 (regcache::cooked_read_value): Likewise.
11637 (regcache::raw_write): Remove assert on m_readonly_p.
11638 (regcache::raw_supply_integer): Move it to
11639 detached_regcache::raw_supply_integer.
11640 (regcache::raw_supply_zeroed): Likewise.
11641 * regcache.h (detached_regcache) <raw_supply_integer>: New
11642 declaration.
11643 <raw_supply_zeroed, invalidate>: Likewise.
11644 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11645 <invalidate>: Likewise.
11646 <m_readonly_p>: Removed.
11647
11648 2018-02-21 Yao Qi <yao.qi@linaro.org>
11649
11650 * infcmd.c (get_return_value): Let stop_regs point to
11651 get_current_regcache.
11652 * regcache.c (regcache::regcache): Remove.
11653 (register_dump_reg_buffer): New class.
11654 (regcache_print): Adjust.
11655 * regcache.h (regcache): Remove constructors.
11656
11657 2018-02-21 Yao Qi <yao.qi@linaro.org>
11658
11659 * regcache.c (class register_dump): New class.
11660 (register_dump_regcache, register_dump_none): New class.
11661 (register_dump_remote, register_dump_groups): New class.
11662 (regcache_print): Update.
11663 * regcache.h (regcache_dump_what): Move it to regcache.c.
11664 (regcache) <dump>: Remove.
11665
11666 2018-02-21 Yao Qi <yao.qi@linaro.org>
11667
11668 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11669 reg_buffer_rw *.
11670 (jit_unwind_reg_set_impl): Call raw_supply.
11671 (jit_frame_sniffer): Use reg_buffer_rw.
11672 * record-full.c (record_full_core_regbuf): Change its type.
11673 (record_full_core_open_1): Use reg_buffer_rw.
11674 (record_full_close): Likewise.
11675 (record_full_core_fetch_registers): Use regcache->raw_supply.
11676 (record_full_core_store_registers): Likewise.
11677 * regcache.c (regcache::get_register_status): Move it to
11678 reg_buffer.
11679 (regcache_raw_set_cached_value): Remove.
11680 (regcache::raw_set_cached_value): Remove.
11681 (regcache::raw_write): Call raw_supply.
11682 (regcache::raw_supply): Move it to reg_buffer_rw.
11683 * regcache.h (regcache_raw_set_cached_value): Remove.
11684 (reg_buffer_rw): New class.
11685
11686 2018-02-21 Yao Qi <yao.qi@linaro.org>
11687
11688 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11689 readonly_detached_regcache.
11690 (dummy_frame_prev_register): Use regcache->cooked_read.
11691 * frame.c (frame_save_as_regcache): Change return type.
11692 (frame_pop): Update.
11693 * frame.h (frame_save_as_regcache): Update declaration.
11694 * inferior.h (get_infcall_suspend_state_regcache): Update
11695 declaration.
11696 * infrun.c (infcall_suspend_state) <registers>: use
11697 readonly_detached_regcache.
11698 (save_infcall_suspend_state): Don't use regcache_dup.
11699 (get_infcall_suspend_state_regcache): Change return type.
11700 * linux-fork.c (struct fork_info) <savedregs>: Change to
11701 readonly_detached_regcache.
11702 <pc>: New field.
11703 (fork_save_infrun_state): Don't use regcache_dup.
11704 (info_checkpoints_command): Adjust.
11705 * mi/mi-main.c (register_changed_p): Update declaration.
11706 (mi_cmd_data_list_changed_registers): Use
11707 readonly_detached_regcache.
11708 (register_changed_p): Change parameter type to
11709 readonly_detached_regcache.
11710 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11711 readonly_detached_regcache.
11712 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11713 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11714 New.
11715 (regcache::save): Move it to reg_buffer.
11716 (regcache::restore): Change parameter type.
11717 (regcache_dup): Remove.
11718 * regcache.h (reg_buffer) <save>: New method.
11719 (readonly_detached_regcache): New class.
11720 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11721 readonly_detached_regcache.
11722 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11723
11724 2018-02-21 Yao Qi <yao.qi@linaro.org>
11725
11726 * frame.c (frame_save_as_regcache): Use regcache method save.
11727 (frame_pop): Use regcache method restore.
11728 * infrun.c (restore_infcall_suspend_state): Likewise.
11729 * linux-fork.c (fork_load_infrun_state): Likewise.
11730 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11731 save.
11732 * regcache.c (regcache_save): Remove.
11733 (regcache::restore): More asserts.
11734 (regcache_cpy): Remove.
11735 * regcache.h (regcache_save): Remove the declaration.
11736 (regcache::restore): Move from private to public.
11737 Remove the friend declaration of regcache_cpy.
11738 (regcache_cpy): Remove declaration.
11739
11740 2018-02-21 Yao Qi <yao.qi@linaro.org>
11741
11742 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11743 parameter type to 'readable_regcache *'.
11744 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11745 * arm-tdep.c (arm_neon_quad_read): Likewise.
11746 (arm_pseudo_read): Likewise.
11747 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11748 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11749 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11750 * gdbarch.c: Re-generated.
11751 * gdbarch.h: Re-generated.
11752 * gdbarch.sh (pseudo_register_read): Change parameter type to
11753 'readable_regcache *'.
11754 (pseudo_register_read_value): Likewise.
11755 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11756 (h8300_pseudo_register_read): Likewise.
11757 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11758 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11759 (i386_pseudo_register_read_into_value): Likewise.
11760 (i386_pseudo_register_read_value): Likewise.
11761 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11762 declaration.
11763 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11764 * m32c-tdep.c (m32c_raw_read): Likewise.
11765 (m32c_read_flg): Likewise.
11766 (m32c_banked_register): Likewise.
11767 (m32c_banked_read): Likewise.
11768 (m32c_sb_read): Likewise.
11769 (m32c_part_read): Likewise.
11770 (m32c_cat_read): Likewise.
11771 (m32c_r3r2r1r0_read): Likewise.
11772 (m32c_pseudo_register_read): Likewise.
11773 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11774 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11775 (mep_pseudo_cr64_read): Likewise.
11776 (mep_pseudo_register_read): Likewise.
11777 * mips-tdep.c (mips_pseudo_register_read): Likewise.
11778 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11779 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11780 * regcache.c (regcache::raw_read): Move it to readable_regcache.
11781 (regcache::cooked_read): Likewise.
11782 (regcache::cooked_read_value): Likewise.
11783 (regcache_cooked_read_signed):
11784 (regcache::cooked_read): Likewise.
11785 * regcache.h (readable_regcache): New class.
11786 (regcache): Inherit readable_regcache. Move some methods to
11787 readable_regcache.
11788 * rl78-tdep.c (rl78_pseudo_register_read): Change
11789 parameter type to 'readable_regcache *'.
11790 * rs6000-tdep.c (do_regcache_raw_read): Remove.
11791 (e500_pseudo_register_read): Change parameter type to
11792 'readable_regcache *'.
11793 (dfp_pseudo_register_read): Likewise.
11794 (vsx_pseudo_register_read): Likewise.
11795 (efpr_pseudo_register_read): Likewise.
11796 * s390-tdep.c (s390_pseudo_register_read): Likewise.
11797 * sh-tdep.c (sh_pseudo_register_read): Likewise.
11798 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11799 (sh64_pseudo_register_read): Likewise.
11800 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11801 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11802 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11803 (spu_pseudo_register_read): Likewise.
11804 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11805 (xtensa_pseudo_register_read): Likewise.
11806
11807 2018-02-21 Yao Qi <yao.qi@linaro.org>
11808
11809 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11810 (regcache::arch): Move it to reg_buffer::arch.
11811 (regcache::register_buffer): Likewise.
11812 (regcache::assert_regnum): Likewise.
11813 (regcache::num_raw_registers): Likewise.
11814 * regcache.h (reg_buffer): New class.
11815 (regcache): Inherit reg_buffer.
11816
11817 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11818
11819 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11820 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11821
11822 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11823
11824 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11825
11826 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11827
11828 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11829 (SFILES): Remove common/*.c files.
11830 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11831 * common/common.host: Add common reference.
11832 * configure.ac: Likewise.
11833 * configure: Regenerate.
11834
11835 2018-02-16 Yao Qi <yao.qi@linaro.org>
11836
11837 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11838 (block_initialize_namespace): Use new.
11839 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11840 (dwarf2_free_objfile): Use delete.
11841 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11842 (copy_type_recursive): Use new.
11843 * gdb_obstack.h (allocate_on_obstack): New.
11844
11845 2018-02-15 Yao Qi <yao.qi@linaro.org>
11846
11847 PR gdb/22849
11848 * inferior.c (exit_inferior_1): Reset inf->control.
11849
11850 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11851
11852 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11853 declaration.
11854
11855 2018-02-14 Pedro Alves <palves@redhat.com>
11856
11857 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11858 frame_cleanup_after_sniffer on exception.
11859
11860 2018-02-14 Tom Tromey <tom@tromey.com>
11861
11862 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11863 const.
11864 (solib_bfd_open): Make pathname const.
11865 * solib.c (solib_bfd_open): Make pathname const.
11866 * solib-spu.c (spu_bfd_fopen): Make name const.
11867 (spu_bfd_open): Make pathname const.
11868 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11869 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11870
11871 2018-02-14 Tom Tromey <tom@tromey.com>
11872
11873 * symfile.c (symfile_bfd_open): Update.
11874 * source.h (openp, source_full_path_of, find_and_open_source):
11875 Change argument type to unique_xmalloc_ptr.
11876 * source.c (openp): Take a unique_xmalloc_ptr.
11877 (source_full_path_of, find_and_open_source): Likewise.
11878 (open_source_file, symtab_to_fullname): Update.
11879 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11880 unique_xmalloc_ptr.
11881 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11882 (exec_file_find): Update.
11883 * psymtab.c (psymtab_to_fullname): Update.
11884 * nto-tdep.h (nto_find_and_open_solib): Update.
11885 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11886 unique_xmalloc_ptr.
11887 * exec.c (exec_file_attach): Update.
11888 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11889 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11890
11891 2018-02-14 Tom Tromey <tom@tromey.com>
11892
11893 * solib.c: Include source.h.
11894 * nto-tdep.c: Include source.h.
11895 * mi/mi-cmd-env.c: Include source.h.
11896 * infcmd.c: Include source.h.
11897 * exec.c: Include source.h.
11898 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11899 (add_path, directory_switch, source_path, init_source_path): Move
11900 declarations...
11901 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11902 (add_path, directory_switch, source_path, init_source_path):
11903 ...here.
11904
11905 2018-02-14 Tom Tromey <tom@tromey.com>
11906
11907 * solist.h (exec_file_find, solib_find): Return
11908 unique_xmalloc_ptr.
11909 (solib_bfd_fopen): Take a const char *.
11910 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11911 (exec_file_find, solib_find): Likewise.
11912 (solib_bfd_fopen): Do not take ownership of "pathname".
11913 (solib_bfd_open): Use unique_xmalloc_ptr.
11914 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11915 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11916 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11917 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11918
11919 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11920
11921 * ada-lang.c (name_match_type_from_name): Remove reference to
11922 ada_name_for_lookup in function's documentation.
11923 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11924
11925 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11926
11927 * defs.h (enum openp_flags): New enum.
11928 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11929 Move to enum openp_flags.
11930 (openp_flags): New enum flags.
11931 (openp): Change parameter type to openp_flags.
11932 * source.c (openp): Change parameter type to openp_flags.
11933 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11934 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11935
11936 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11937
11938 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11939 per-command.
11940
11941 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11942
11943 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11944 into...
11945 (class dwarf2_queue_guard): ...the destructor of this new class.
11946 (dw2_do_instantiate_symtab): Create instance of the new class
11947 dwarf2_queue_guard, remove cleanup.
11948
11949 2018-02-09 Tom Tromey <tom@tromey.com>
11950
11951 * source.c (find_source_lines): Don't reference past the end of
11952 the vector.
11953
11954 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11955
11956 * remote.c (remote_btrace_maybe_reopen): Change error message.
11957 * btrace.c (btrace_enable): Likewise.
11958 (parse_xml_btrace): Likewise.
11959 (parse_xml_btrace_conf): Likewise.
11960
11961 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11962
11963 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11964 (linux_enable_pt, linux_enable_bts): Call
11965 diagnose_perf_event_open_fail.
11966
11967 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11968
11969 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11970 Remove parameter and change return type. Update callers. Move it.
11971 (linux_enable_bts, linux_enable_pt): Improve error message.
11972 (linux_enable_pt): Remove zero buffer size check.
11973 (linux_enable_btrace): Improve error messages. Remove NULL return
11974 check.
11975
11976 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11977
11978 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11979 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11980 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11981 (linux_supports_pt, linux_supports_btrace): Remove.
11982 (linux_enable_bts): Call cpu_supports_bts.
11983 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11984 * remote.c (remote_supports_btrace): Remove.
11985 (init_remote_ops): Remove remote_supports_btrace.
11986 * target-delegates.c: Regenerated.
11987 * target.c (target_supports_btrace): Remove.
11988 * target.h (target_ops) <to_supports_btrace>: Remove
11989 (target_supports_btrace): Remove.
11990 * x86-linux-nat.c (x86_linux_create_target): Remove
11991 linux_supports_btrace.
11992
11993 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11994
11995 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11996 btrace failed.
11997 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11998 exception and use message in own exception.
11999
12000 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12001
12002 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12003 (perf_event_pt_event_type): Use gdb_file_up.
12004 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12005 scoped_fd, and scoped_mmap.
12006
12007 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12008
12009 * common/scoped_mmap.h: New.
12010 * unittests/scoped_mmap-selftest.c: New.
12011 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12012 unittests/scoped_mmap-selftest.c.
12013
12014 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12015
12016 * common/scoped_fd.h: New.
12017 * unittests/scoped_fd-selftest.c: New.
12018 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12019 unittests/scoped_fd-selftest.c.
12020
12021 2018-02-09 Tom Tromey <tom@tromey.com>
12022
12023 * auto-load.c (auto_load_section_scripts): Use
12024 gdb::unique_xmalloc_ptr.
12025
12026 2018-02-09 Tom Tromey <tom@tromey.com>
12027
12028 * auto-load.c (execute_script_contents): Use std::string.
12029
12030 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12031
12032 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12033 Python function, rather than a new command.
12034
12035 2018-02-08 Tom Tromey <tom@tromey.com>
12036
12037 * solib.c (solib_find_1): Use std::string.
12038 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12039
12040 2018-02-08 Tom Tromey <tom@tromey.com>
12041
12042 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12043
12044 2018-02-08 Tom Tromey <tom@tromey.com>
12045
12046 * source.c (find_source_lines): Use gdb::def_vector.
12047
12048 2018-02-08 Tom Tromey <tom@tromey.com>
12049
12050 * macrocmd.c (struct temporary_macro_definition): New.
12051 (macro_define_command): Use temporary_macro_definition. Remove
12052 cleanups.
12053 (free_macro_definition_ptr): Remove.
12054
12055 2018-02-08 Tom Tromey <tom@tromey.com>
12056
12057 * macroexp.c (maybe_expand): Use std::string.
12058
12059 2018-02-08 Tom Tromey <tom@tromey.com>
12060
12061 * macroexp.c (struct macro_buffer): Add initializers for some
12062 members.
12063 (init_buffer, init_shared_buffer, free_buffer)
12064 (free_buffer_return_text): Remove.
12065 (macro_buffer): New constructors.
12066 (~macro_buffer): New destructor.
12067 (macro_buffer::set_shared): New method.
12068 (macro_buffer::resize_buffer, macro_buffer::appendc)
12069 (macro_buffer::appendmem): Now methods, not free functions.
12070 (set_token, append_tokens_without_splicing, stringify)
12071 (macro_stringify): Update.
12072 (gather_arguments): Change return type. Remove argc_p argument,
12073 add args_ptr argument. Use std::vector.
12074 (substitute_args): Remove argc argument. Accept std::vector.
12075 (expand): Update. Use std::vector.
12076 (scan, macro_expand, macro_expand_next): Update.
12077
12078 2018-02-08 Tom Tromey <tom@tromey.com>
12079
12080 * symtab.c (default_collect_symbol_completion_matches_break_on):
12081 Use unique_xmalloc_ptr.
12082 * macroscope.h: (sal_macro_scope, user_macro_scope)
12083 (default_macro_scope): Return unique_xmalloc_ptr.
12084 * macroscope.c (sal_macro_scope, user_macro_scope)
12085 (default_macro_scope): Return unique_xmalloc_ptr.
12086 * macroexp.h (macro_expand, macro_expand_once): Return
12087 unique_xmalloc_ptr.
12088 * macroexp.c (macro_expand, macro_expand_once): Return
12089 unique_xmalloc_ptr.
12090 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12091 (info_macro_command, info_macros_command): Use
12092 unique_xmalloc_ptr.
12093 * compile/compile-c-support.c (write_macro_definitions): Use
12094 unique_xmalloc_ptr.
12095 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12096
12097 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12098
12099 * value.c (value_static_field): Assign field type instead of
12100 containing type when returning an optimized out value.
12101
12102 2018-02-06 Yao Qi <yao.qi@linaro.org>
12103
12104 * ft32-tdep.c (ft32_read_pc): Remove.
12105 (ft32_write_pc): Remove.
12106 (ft32_gdbarch_init): Update.
12107 * m32r-tdep.c (m32r_read_pc): Remove.
12108 (m32r_gdbarch_init): Update.
12109 * mep-tdep.c (mep_read_pc): Remove.
12110 (mep_gdbarch_init): Update.
12111 * microblaze-tdep.c (microblaze_write_pc): Remove.
12112 (microblaze_gdbarch_init): Update.
12113 * mn10300-tdep.c (mn10300_read_pc): Remove.
12114 (mn10300_write_pc): Remove.
12115 (mn10300_gdbarch_init): Update.
12116 * moxie-tdep.c (moxie_read_pc): Remove.
12117 (moxie_write_pc): Remove.
12118 (moxie_gdbarch_init): Update.
12119
12120 2018-02-06 Yao Qi <yao.qi@linaro.org>
12121
12122 * expprint.c (print_subexp_standard): Handle
12123 OP_F77_UNDETERMINED_ARGLIST.
12124 (dump_subexp_body_standard): Likewise.
12125
12126 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12127
12128 * target-descriptions.c (tdesc_element_visitor) Add empty
12129 implementations.
12130 (tdesc_type): Move make_gdb_type from here.
12131 (tdesc_type_builtin): Likewise.
12132 (tdesc_type_vector): Likewise.
12133 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12134 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12135 (make_gdb_type_union): Likewise.
12136 (make_gdb_type_flags): Likewise.
12137 (make_gdb_type_enum): Likewise.
12138 (make_gdb_type): New function.
12139 (tdesc_register_type): Use static make_gdb_type.
12140
12141 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12142
12143 * infcmd.c (default_print_one_register_info): Align natural-format
12144 column values consistently one under another.
12145 (pad_to_column): New function.
12146
12147 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12148
12149 * dwarf2read.c (dwarf2_physname): Move commment.
12150
12151 2018-02-01 Leszek Swirski <leszeks@google.com>
12152
12153 * varobj.c (varobj_formatted_print_options): Allow recursive
12154 pretty printing if pretty printing is enabled.
12155
12156 2018-02-01 Leszek Swirski <leszeks@google.com>
12157
12158 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12159 names after a structop as a filename.
12160
12161 2018-02-01 Yao Qi <yao.qi@linaro.org>
12162
12163 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12164 (arm_record_coproc_data_proc): Likewise.
12165
12166 2018-02-01 Yao Qi <yao.qi@linaro.org>
12167
12168 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12169
12170 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12171
12172 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12173 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12174
12175 2018-01-31 Pedro Alves <palves@redhat.com>
12176
12177 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12178 * inflow.c (child_terminal_save_inferior): Wrap reference to
12179 tcgetpgrp in HAVE_TERMIOS_H.
12180 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12181 _WIN32.
12182 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12183 always iterate over all inferiors.
12184 (gdbsim_cntrl_c): Adjust.
12185 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12186
12187 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12188
12189 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12190 index type is objfile-owned if the element type is as well.
12191
12192 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12193
12194 GDB 8.1 released.
12195
12196 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12197
12198 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12199 "features/s390x-linux64.c".
12200 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12201 s390_linux32 and s390x_linux64.
12202 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12203 default tdesc.
12204 * s390-tdep.c: Include "features/s390-linux32.c" and
12205 "features/s390x-linux64.c".
12206 (s390_tdesc_valid): Add check for tdesc_has_registers.
12207 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12208 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12209 tdesc_s390x_linux64.
12210 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12211 tdesc_s390x_linux64 to...
12212 * s390-tdep.h: ...here.
12213
12214 2018-01-30 Pedro Alves <palves@redhat.com>
12215
12216 PR gdb/13211
12217 * config.in, configure: Regenerate.
12218 * configure.ac: Check for getpgid.
12219 * go32-nat.c (go32_pass_ctrlc): New.
12220 (go32_target): Install it.
12221 * inf-child.c (inf_child_target): Install
12222 child_terminal_save_inferior, child_pass_ctrlc and
12223 child_interrupt.
12224 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12225 (inf_ptrace_target): No longer install it.
12226 * infcmd.c (interrupt_target_1): Adjust.
12227 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12228 (child_interrupt): Declare.
12229 (inferior::terminal_state): New.
12230 * inflow.c (struct terminal_info): Update comments.
12231 (inferior_process_group): Delete.
12232 (terminal_is_ours): Delete.
12233 (gdb_tty_state): New.
12234 (child_terminal_init): Adjust.
12235 (is_gdb_terminal, sharing_input_terminal_1)
12236 (sharing_input_terminal): New functions.
12237 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12238 Set the process's actual process group in the foreground if
12239 possible. Handle is_ours_for_output/is_ours distinction. Don't
12240 mark terminal as the inferior's if not sharing GDB's terminal.
12241 Don't check attach_flag.
12242 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12243 pass down a target_terminal_state.
12244 (child_terminal_save_inferior): New, factored out from ...
12245 (child_terminal_ours_1): ... this. Handle
12246 target_terminal_state::is_ours_for_output.
12247 (child_interrupt, child_pass_ctrlc): New.
12248 (inflow_inferior_exit): Clear the inferior's terminal_state.
12249 (copy_terminal_info): Copy the inferior's terminal state.
12250 (_initialize_inflow): Remove reference to terminal_is_ours.
12251 * inflow.h (inferior_process_group): Delete.
12252 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12253 * procfs.c (procfs_target): Don't install procfs_interrupt.
12254 (procfs_interrupt): Delete.
12255 * remote.c (remote_serial_quit_handler): Adjust.
12256 (remote_interrupt): Remove ptid parameter. Adjust.
12257 * target-delegates.c: Regenerate.
12258 * target.c: Include "terminal.h".
12259 (target_terminal::terminal_state): Rename to ...
12260 (target_terminal::m_terminal_state): ... this.
12261 (target_terminal::init): Adjust.
12262 (target_terminal::inferior): Adjust to per-inferior
12263 terminal_state.
12264 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12265 (target_terminal::ours, target_terminal::ours_for_output): Use
12266 target_terminal_is_ours_kind.
12267 (target_interrupt): Remove ptid parameter. Adjust.
12268 (default_target_pass_ctrlc): Adjust.
12269 * target.h (target_ops::to_terminal_save_inferior): New field.
12270 (target_ops::to_interrupt): Remove ptid_t parameter.
12271 (target_interrupt): Remove ptid_t parameter. Update comment.
12272 (target_pass_ctrlc): Update comment.
12273 * target/target.h (target_terminal_state): New scoped enum,
12274 factored out of ...
12275 (target_terminal::terminal_state): ... here.
12276 (target_terminal::inferior): Update comments.
12277 (target_terminal::restore_inferior): New.
12278 (target_terminal::is_inferior, target_terminal::is_ours)
12279 (target_terminal::is_ours_for_output): Adjust.
12280 (target_terminal::scoped_restore_terminal_state): Adjust to
12281 rename, and call restore_inferior() instead of inferior().
12282 (target_terminal::scoped_restore_terminal_state::m_state): Change
12283 type.
12284 (target_terminal::terminal_state): Rename to ...
12285 (target_terminal::m_terminal_state): ... this and change type.
12286
12287 2018-01-30 Pedro Alves <palves@redhat.com>
12288
12289 * linux-nat.c (wait_for_signal): New function.
12290 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12291 directly.
12292 (async_terminal_is_ours)
12293 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12294 (linux_nat_add_target): Don't override
12295 to_terminal_inferior/to_terminal_ours.
12296
12297 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12298
12299 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12300
12301 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12302
12303 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12304 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12305 dwarf2_per_objfile_free here.
12306 (dwarf2_per_objfile_free): Remove.
12307 (_initialize_dwarf2_read): Don't register
12308 dwarf2_per_objfile_free as a registry cleanup.
12309
12310 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12311
12312 Avoid compilation errors in MinGW native builds
12313
12314 The error is triggered by including python-internal.h, and the
12315 error message is:
12316
12317 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12318 from build-gnulib/import/math.h:27,
12319 from d:/usr/Python26/include/pyport.h:235,
12320 from d:/usr/Python26/include/Python.h:58,
12321 from python/python-internal.h:94,
12322 from python/py-arch.c:24:
12323 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12324 using ::hypot;
12325 ^~~~~
12326
12327 This happens because Python headers define 'hypot' to expand t
12328 '_hypot' in the Windows builds.
12329 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12330 'hypoth'. This avoids a compilation error.
12331
12332 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12333
12334 * MAINTAINERS (Write After Approval): Fix ordering.
12335
12336 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12337
12338 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12339
12340 2018-01-26 Alan Modra <amodra@gmail.com>
12341
12342 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12343 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12344 Remove nop. Make const. Comment.
12345 (powerpc32_plt_stub_so_2): New.
12346 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12347 Correct count. Update uses.
12348 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12349 Move common code reading PLT entry word. Correct
12350 powerpc32_plt_stub PLT address calculation.
12351 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12352 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12353 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12354 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12355 (ppc64_standard_linkage8): Likewise.
12356 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12357 Correct insns description.
12358 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12359
12360 2018-01-24 Pedro Alves <palves@redhat.com>
12361
12362 GCC PR libstdc++/83906
12363 * gdbtypes.c (operator==(const dynamic_prop &,
12364 const dynamic_prop &)): New.
12365 (operator==(const range_bounds &, const range_bounds &)): New.
12366 (check_types_equal): Use them instead of memcmp.
12367 * gdbtypes.h (operator==(const dynamic_prop &,
12368 const dynamic_prop &)): Declare.
12369 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12370 (operator==(const range_bounds &, const range_bounds &)): Declare.
12371 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12372
12373 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12374
12375 * s390-linux-tdep.c (s390_record_address_mask)
12376 (s390_record_calc_disp_common, s390_record_calc_disp)
12377 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12378 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12379 (s390_process_record): Move to s390-tdep.c.
12380 (s390_linux_init_abi_any): Adjust.
12381 * s390-tdep.c (s390_record_address_mask)
12382 (s390_record_calc_disp_common, s390_record_calc_disp)
12383 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12384 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12385 (s390_process_record): Moved from s390-linux-tdep.c
12386 (s390_gdbarch_init): Adjust.
12387
12388 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12389
12390 * s390-linux-nat.c (s390-tdep.h): New include.
12391 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12392 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12393 (ALLDEPFILES): Add s390-tdep.c.
12394 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12395 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12396 * s390-tdep.h: ...this. New file.
12397 * s390-linux-tdep.c (s390-tdep.h): New include.
12398 (_initialize_s390_tdep): Rename to...
12399 (_initialize_s390_linux_tdep): ...this and adjust.
12400 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12401 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12402 s390-tdep.h.
12403 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12404 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12405 (s390_is_partial_instruction, s390_software_single_step)
12406 (is_non_branch_ril, s390_displaced_step_copy_insn)
12407 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12408 (s390_prologue_data, s390_addr, s390_store, s390_load)
12409 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12410 (s390_register_call_saved, s390_guess_tracepoint_registers)
12411 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12412 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12413 (s390_pseudo_register_name, s390_pseudo_register_type)
12414 (s390_pseudo_register_read, s390_pseudo_register_write)
12415 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12416 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12417 (s390_addr_bits_remove, s390_address_class_type_flags)
12418 (s390_address_class_type_flags_to_name)
12419 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12420 (s390_function_arg_float, s390_function_arg_vector)
12421 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12422 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12423 (s390_frame_align, s390_register_return_value, s390_return_value)
12424 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12425 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12426 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12427 (s390_trad_frame_prev_register, s390_unwind_cache)
12428 (s390_prologue_frame_unwind_cache)
12429 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12430 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12431 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12432 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12433 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12434 (s390_frame_base_address, s390_local_base_address)
12435 (s390_frame_base, s390_gcc_target_options)
12436 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12437 (s390_validate_reg_range, s390_tdesc_valid)
12438 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12439 * s390-tdep.c: ...this. New file.
12440
12441 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12442
12443 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12444 (s390_process_record, s390_gdbarch_tdep_alloc)
12445 (s390_linux_init_abi_any): Use/set new hook.
12446
12447 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12448
12449 * s390-linux-tdep.c (osabi.h): New include.
12450 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12451 (s390_linux_init_abi_any): New functions.
12452 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12453
12454 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12455
12456 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12457 tdesc_has_registers check
12458
12459 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12460
12461 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12462 (s390_validate_reg_range): New macro.
12463 (s390_gdbarch_init): Adjust.
12464
12465 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12466
12467 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12468 (s390_gdbarch_tdep_alloc): Adjust.
12469 (s390_gdbarch_init): Adjust.
12470
12471 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12472
12473 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12474 <have_tdb>: Change type to bool.
12475 (s390_gdbarch_tdep_alloc): Adjust.
12476 (s390_gdbarch_init): Adjust.
12477
12478 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12479
12480 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12481 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12482 (s390_gdbarch_tdep_alloc): New function.
12483 (s390_gdbarch_init): Allocate tdep at start and use its fields
12484 instead of separate variables.
12485
12486 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12487
12488 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12489 when looking for cached gdbarch and add comment for remaining.
12490
12491 2018-01-22 Pedro Alves <palves@redhat.com>
12492 Sergio Durigan Junior <sergiodj@redhat.com>
12493
12494 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12495 case.
12496
12497 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12498
12499 * MAINTAINERS: Update my company e-mail address.
12500
12501 2018-01-22 Yao Qi <yao.qi@linaro.org>
12502
12503 * regcache.c (cooked_write_test): New function.
12504 (_initialize_regcache): Register the test.
12505
12506 2018-01-22 Yao Qi <yao.qi@linaro.org>
12507
12508 * ia64-tdep.c (ia64_pseudo_register_read): Call
12509 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12510 * m32c-tdep.c (m32c_cat_read): Likewise.
12511 (m32c_r3r2r1r0_read): Likewise.
12512 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12513 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12514
12515 2018-01-22 Yao Qi <yao.qi@linaro.org>
12516
12517 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12518 method raw_read instead of regcache_raw_read.
12519 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12520 * arm-tdep.c (arm_neon_quad_read): Likewise.
12521 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12522 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12523 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12524 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12525 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12526 (i386_pseudo_register_read_into_value): Likewise.
12527 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12528 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12529 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12530 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12531 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12532 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12533 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12534 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12535 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12536
12537 2018-01-22 Yao Qi <yao.qi@linaro.org>
12538
12539 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12540 * configure.tgt: Remove target mt.
12541 * mt-tdep.c: Remove.
12542 * regcache.c (cooked_read_test): Remove the check for mt.
12543
12544 2018-01-22 Yao Qi <yao.qi@linaro.org>
12545
12546 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12547 instead of gdbarch_pseudo_register_read_value.
12548
12549 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12550
12551 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12552 language is Ada.
12553
12554 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12555
12556 * linespec.c (create_sals_line_offset): Remove code that preserved
12557 the symtab_and_line's line number.
12558
12559 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12560
12561 * varobj.c (varobj_create): Don't set valid_block when creating a
12562 floating varobj.
12563
12564 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12565
12566 * varobj.c (varobj_create): Remove out of date comment.
12567
12568 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12569
12570 PR mi/20395
12571 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12572 updating innermost block.
12573 * parse.c (innermost_block_tracker::update): Take extra type
12574 parameter, and check types match before updating innermost block.
12575 (write_dollar_variable): Update innermost block for registers.
12576 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12577 (innermost_block_tracker::innermost_block_tracker): Initialise
12578 m_types member.
12579 (innermost_block_tracker::reset): Take type parameter.
12580 (innermost_block_tracker::update): Take type parameter, and pass
12581 type through as needed.
12582 (innermost_block_tracker::m_types): New member.
12583 * varobj.c (varobj_create): Pass type when reseting innermost
12584 block.
12585
12586 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12587
12588 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12589 * ada-lang.c (resolve_subexp): Likewise.
12590 * breakpoint.c (set_breakpoint_condition) Likewise.
12591 (watch_command_1) Likewise.
12592 * c-exp.y (variable): Likewise.
12593 * d-exp.y (PrimaryExpression): Likewise.
12594 * f-exp.y (variable): Likewise.
12595 * go-exp.y (variable): Likewise.
12596 * m2-exp.y (variable): Likewise.
12597 * objfiles.c (objfile::~objfile): Likewise.
12598 * p-exp.y (variable): Likewise.
12599 * parse.c (innermost_block): Change type.
12600 * parser-defs.h (class innermost_block_tracker): New.
12601 (innermost_block): Change to innermost_block_tracker.
12602 * printcmd.c (display_command): Switch to innermost_block API.
12603 (do_one_display): Likewise.
12604 * rust-exp.y (do_one_display): Likewise.
12605 * symfile.c (clear_symtab_users): Likewise.
12606 * varobj.c (varobj_create): Switch to innermost_block API, replace
12607 use of innermost_block with block stored on varobj object.
12608
12609 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12610
12611 * expression.h (innermost_block): Remove declaration.
12612 * varobj.c: Add 'parser-defs.h' include.
12613
12614 2018-01-19 Tom Tromey <tom@tromey.com>
12615
12616 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12617 symbols in the static and global blocks.
12618
12619 2018-01-19 James Clarke <jrtc27@jrtc27.com>
12620
12621 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12622 gdb_ptrace.h, and move including gdb_wait.h ...
12623 * nat/linux-ptrace.h: ... to here.
12624
12625 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12626
12627 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12628 inf_ptrace_detach_success.
12629 (inf_ptrace_detach_success): Add inferior parameter, use it
12630 instead of inferior_ptid, pass it to detach_inferior.
12631 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12632 parameter.
12633 * inferior.c (detach_inferior): Add overload that takes an
12634 inferior object.
12635 * inferior.h (detach_inferior): Likewise.
12636 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12637 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12638 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12639
12640 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12641
12642 * target.h (struct target_ops) <to_detach>: Add inferior
12643 parameter.
12644 (target_detach): Likewise.
12645 * target.c (dispose_inferior): Pass inferior down.
12646 (target_detach): Pass inferior down. Assert that it is equal to
12647 the current inferior.
12648 * aix-thread.c (aix_thread_detach): Pass inferior down.
12649 * corefile.c (core_file_command): Pass current_inferior() down.
12650 * corelow.c (core_detach): Add inferior parameter.
12651 * darwin-nat.c (darwin_detach): Likewise.
12652 * gnu-nat.c (gnu_detach): Likewise.
12653 * inf-ptrace.c (inf_ptrace_detach): Likewise.
12654 * infcmd.c (detach_command): Pass current_inferior() down to
12655 target_detach.
12656 * infrun.c (follow_fork_inferior): Pass parent_inf to
12657 target_detach.
12658 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12659 target_detach.
12660 * linux-nat.c (linux_nat_detach): Add inferior parameter.
12661 * linux-thread-db.c (thread_db_detach): Likewise.
12662 * nto-procfs.c (procfs_detach): Likewise.
12663 * procfs.c (procfs_detach): Likewise.
12664 * record.c (record_detach): Likewise.
12665 * record.h (struct inferior): Forward-declare.
12666 (record_detach): Add inferior parameter.
12667 * remote-sim.c (gdbsim_detach): Likewise.
12668 * remote.c (remote_detach_1): Likewise.
12669 (remote_detach): Likewise.
12670 (extended_remote_detach): Likewise.
12671 * sol-thread.c (sol_thread_detach): Likewise.
12672 * target-debug.h (target_debug_print_inferior_p): New macro.
12673 * target-delegates.c: Re-generate.
12674 * top.c (kill_or_detach): Pass inferior down to target_detach.
12675 * windows-nat.c (windows_detach): Add inferior parameter.
12676
12677 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12678
12679 * target.h (struct target_ops) <to_detach>: Remove args
12680 parameter.
12681 (target_detach): Likewise.
12682 * target.c (dispose_inferior): Adjust.
12683 (target_detach): Remove args parameter, adjust.
12684 * aix-thread.c (aix_thread_detach): Adjust.
12685 * corefile.c (core_file_command): Adjust.
12686 * corelow.c (core_detach): Adjust.
12687 * darwin-nat.c (darwin_detach): Adjust.
12688 * gnu-nat.c (gnu_detach): Adjust.
12689 * inf-ptrace.c (inf_ptrace_detach): Adjust.
12690 * infcmd.c (detach_command): Adjust
12691 * infrun.c (follow_fork_inferior): Adjust.
12692 (handle_vfork_child_exec_or_exit): Adjust.
12693 * linux-fork.c (linux_fork_detach): Remove args parameter.
12694 * linux-fork.h (linux_fork_detach): Likewise.
12695 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12696 * linux-thread-db.c (thread_db_detach): Likewise.
12697 * nto-procfs.c (procfs_detach): Likewise.
12698 * procfs.c (procfs_detach): Likewise.
12699 (do_detach): Remove signo parameter.
12700 * record.c (record_detach): Remove args parameter.
12701 * record.h (record_detach): Likewise.
12702 * remote-sim.c (gdbsim_detach): Likewise.
12703 * remote.c (remote_detach_1): Likewise.
12704 (remote_detach): Likewise.
12705 (extended_remote_detach): Likewise.
12706 * sol-thread.c (sol_thread_detach): Likewise.
12707 * target-delegates.c: Re-generate.
12708 * top.c (struct qt_args) <args>: Remove field.
12709 (kill_or_detach): Don't pass args.
12710 (quit_force): Don't set args.
12711 * windows-nat.c (windows_detach): Remove args parameter.
12712
12713 2018-01-19 Yao Qi <yao.qi@linaro.org>
12714
12715 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12716 (arm_linux_init_abi): Install it.
12717
12718 2018-01-19 Yao Qi <yao.qi@linaro.org>
12719
12720 * osabi.c (gdb_osabi_names): Extend the regexp for
12721 arm-linux-gnueabihf.
12722
12723 2018-01-18 Yao Qi <yao.qi@linaro.org>
12724
12725 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12726 m_abbrevs.
12727 (abbrev_table::add_abbrev): Update.
12728 (abbrev_table::lookup_abbrev): Update.
12729
12730 2018-01-18 Yao Qi <yao.qi@linaro.org>
12731
12732 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12733
12734 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
12735
12736 * compile/compile.c (compile_to_object): Convert "triplet_rx"
12737 to "std::string".
12738
12739 2018-01-17 Tom Tromey <tom@tromey.com>
12740
12741 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
12742
12743 2018-01-17 Tom Tromey <tom@tromey.com>
12744
12745 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12746 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12747 (create_array_type_with_stride): Update.
12748 * dwarf2read.c (set_die_type): Update.
12749
12750 2018-01-17 Tom Tromey <tom@tromey.com>
12751
12752 * dwarf2read.c (delayed_method_info): Remove typedef.
12753 (dwarf2_cu::method_info): Now a std::vector.
12754 (add_to_method_list): Update.
12755 (free_delayed_list): Remove.
12756 (compute_delayed_physnames): Update.
12757 (process_full_comp_unit, process_full_type_unit): Clear the method
12758 list. Remove cleanups.
12759 (psymtab_include_file_name): Add name_holder parameter. Use
12760 unique_xmalloc_ptr.
12761 (dwarf_decode_lines): Update.
12762
12763 2018-01-17 Tom Tromey <tom@tromey.com>
12764 Simon Marchi <simon.marchi@ericsson.com>
12765
12766 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12767 (dwarf2_per_objfile::free_cached_comp_units)
12768 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12769 (init_cutu_and_read_dies_no_follow): Update.
12770 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12771 (dwarf2_cu::~dwarf2_cu): New.
12772 (free_heap_comp_unit, free_stack_comp_unit): Remove.
12773 (age_cached_comp_units, free_one_cached_comp_unit): Update.
12774
12775 2018-01-17 Tom Tromey <tom@tromey.com>
12776 Simon Marchi <simon.marchi@ericsson.com>
12777
12778 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12779 (struct die_reader_specs) <abbrev_table>: New member.
12780 (struct abbrev_table): Add constructor.
12781 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12782 <abbrev_obstack>: Now an auto_obstack.
12783 (abbrev_table_up): New typedef.
12784 (init_cu_die_reader): Add abbrev_table parameter.
12785 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12786 Add result_dwo_abbrev_table.
12787 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12788 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12789 Update.
12790 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12791 parameter.
12792 (skip_children): Update.
12793 (abbrev_table::alloc_abbrev): Rename from
12794 abbrev_table_alloc_abbrev.
12795 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12796 (abbrev_table::lookup_abbrev): Rename from
12797 abbrev_table_lookup_abbrev.
12798 (abbrev_table_read_table): Return abbrev_table_up.
12799 (abbrev_table_free, abbrev_table_free_cleanup)
12800 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12801 (load_partial_dies): Update.
12802
12803 2018-01-17 Tom Tromey <tom@tromey.com>
12804
12805 * dwarf2read.c (dwarf2_compute_name): Update comment.
12806 (read_func_scope, read_variable): Update.
12807 (new_symbol): Remove.
12808 (new_symbol_full): Rename to new_symbol.
12809
12810 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12811
12812 PR gdb/16577
12813 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12814 a warning instead of throwing an error, set section size to 0 and return
12815 NULL.
12816 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12817
12818 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12819
12820 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12821 std::string.
12822 (linux_ptrace_attach_fail_reason_string): Likewise.
12823 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12824 Likewise.
12825 (linux_ptrace_attach_fail_reason_string): Likewise.
12826 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12827
12828 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12829
12830 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12831
12832 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12833
12834 PR gdb/21559
12835 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12836 checking for fs_base/gs_base fields in struct user_regs_struct.
12837 * configure: Regenerate.
12838
12839 2018-01-17 Yao Qi <yao.qi@linaro.org>
12840
12841 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12842 function.
12843 (aarch64_linux_init_abi): Install it to gdbarch hook
12844 gcc_target_options.
12845
12846 2018-01-15 Pedro Alves <palves@redhat.com>
12847
12848 * common/signals-state-save-restore.c
12849 (save_original_signals_state): Fix typos.
12850
12851 2017-01-12 Tom Tromey <tom@tromey.com>
12852 Sergio Durigan Junior <sergiodj@redhat.com>
12853
12854 * Makefile.in (install-only): Install gdb-add-index.
12855
12856 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12857
12858 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12859
12860 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12861
12862 * infrun.c (keep_going_pass_signal): Clear step-over info when
12863 insert_breakpoints fails.
12864
12865 2018-01-11 Pedro Alves <palves@redhat.com>
12866
12867 PR gdb/22583
12868 * infrun.c (resume): Rename to ...
12869 (resume_1): ... this.
12870 (resume): Reimplement as wrapper around resume_1.
12871
12872 2018-01-11 Pedro Alves <palves@redhat.com>
12873
12874 PR remote/22597
12875 * remote.c (remote_parse_stop_reply): Default to the last-set
12876 general thread instead of to 'magic_null_ptid'.
12877
12878 2018-01-10 Pedro Alves <palves@redhat.com>
12879
12880 * language.h (language_get_symbol_name_matcher): Rename ...
12881 (get_symbol_name_matcher): ... this.
12882 * language.c (language_get_symbol_name_matcher): Ditto.
12883 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12884 callers adjusted.
12885
12886 2018-01-10 Pedro Alves <palves@redhat.com>
12887
12888 PR gdb/22670
12889 * dwarf2read.c
12890 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12891 Adjust to use language_get_symbol_name_matcher instead of
12892 language_defn::la_get_symbol_name_matcher.
12893 * language.c (language_get_symbol_name_matcher): If in Ada mode
12894 and the lookup name is a verbatim match, return Ada's matcher.
12895 * language.h (language_get_symbol_name_matcher): Adjust comment.
12896 (ada_lookup_name_info::verbatim_p):: New method.
12897
12898 2018-01-10 Pedro Alves <palves@redhat.com>
12899
12900 PR gdb/22670
12901 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12902 minsym's language is language_auto or language_cplus, pass down
12903 language_ada instead.
12904 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12905
12906 2018-01-10 Pedro Alves <palves@redhat.com>
12907
12908 PR gdb/22670
12909 * minsyms.c (linkage_name_str): New function.
12910 (iterate_over_minimal_symbols): Use it.
12911
12912 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12913
12914 * NEWS: Document that 'info proc' now works on FreeBSD.
12915
12916 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12917
12918 * configure.ac: Check for kinfo_getfile in libutil.
12919 * configure: Regenerate.
12920 * config.in: Regenerate.
12921 * fbsd-nat.c: Include "fbsd-tdep.h".
12922 (fbsd_fetch_cmdline): New.
12923 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12924 rather than calling error.
12925 (fbsd_info_proc): New.
12926 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12927 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12928 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12929
12930 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12931
12932 * fbsd-nat.c (struct free_deleter): Remove.
12933 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12934
12935 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12936
12937 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12938 NULL for an empty pathname.
12939
12940 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12941
12942 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12943 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12944 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12945 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12946 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12947 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12948 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12949 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12950 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12951 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12952 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12953 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12954 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12955 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12956 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12957
12958 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12959
12960 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12961 (gnu_xfer_auxv): New function.
12962 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12963 TARGET_OBJECT_AUXV.
12964
12965 2018-01-08 Yao Qi <yao.qi@linaro.org>
12966 Simon Marchi <simon.marchi@ericsson.com>
12967
12968 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12969 common/selftest.c.
12970 (COMMON_OBS): Remove selftest.o.
12971 * configure.ac: Append selftest-arch.c and common/selftest.c to
12972 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12973 * configure: Re-generated.
12974 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12975 GDB_SELF_TEST.
12976 (maintenance_info_selftests): Likewise.
12977
12978 2018-01-08 Xavier Roirand <roirand@adacore.com>
12979
12980 * ada-valprint.c (val_print_packed_array_elements): Use
12981 proper number of elements when printing an array indexed
12982 by an enumeration type.
12983
12984 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12985
12986 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12987 (dw2_get_file_names_reader): Adjust.
12988 (lookup_dwo_signatured_type): Adjust.
12989 (lookup_dwp_signatured_type): Adjust.
12990 (lookup_signatured_type): Adjust.
12991 (create_type_unit_group): Adjust.
12992 (get_type_unit_group): Adjust.
12993 (process_psymtab_comp_unit_reader): Adjust.
12994 (build_type_psymtabs_reader): Adjust.
12995 (scan_partial_symbols): Adjust.
12996 (add_partial_symbol): Adjust.
12997 (add_partial_subprogram): Adjust.
12998 (peek_die_abbrev): Adjust.
12999 (fixup_go_packaging): Adjust.
13000 (process_imported_unit_die): Adjust.
13001 (dwarf2_compute_name): Adjust.
13002 (dwarf2_physname): Adjust.
13003 (read_import_statement): Adjust.
13004 (handle_DW_AT_stmt_list): Adjust.
13005 (read_file_scope): Adjust.
13006 (read_func_scope): Adjust.
13007 (read_lexical_block_scope): Adjust.
13008 (read_call_site_scope): Adjust.
13009 (read_variable): Adjust.
13010 (dwarf2_rnglists_process): Adjust.
13011 (dwarf2_ranges_process): Adjust.
13012 (dwarf2_ranges_read): Adjust.
13013 (dwarf2_get_pc_bounds): Adjust.
13014 (dwarf2_record_block_ranges): Adjust.
13015 (dwarf2_add_field): Adjust.
13016 (dwarf2_add_member_fn): Adjust.
13017 (read_structure_type): Adjust.
13018 (process_structure_scope): Adjust.
13019 (read_enumeration_type): Adjust.
13020 (read_array_type): Adjust.
13021 (mark_common_block_symbol_computed): Adjust.
13022 (read_common_block): Adjust.
13023 (read_namespace_type): Adjust.
13024 (read_namespace): Adjust.
13025 (read_module_type): Adjust.
13026 (read_tag_pointer_type): Adjust.
13027 (read_tag_ptr_to_member_type): Adjust.
13028 (read_tag_string_type): Adjust.
13029 (read_subroutine_type): Adjust.
13030 (read_typedef): Adjust.
13031 (read_base_type): Adjust.
13032 (attr_to_dynamic_prop): Adjust.
13033 (read_subrange_type): Adjust.
13034 (read_unspecified_type): Adjust.
13035 (dwarf2_read_abbrevs): Adjust.
13036 (load_partial_dies): Adjust.
13037 (read_partial_die): Adjust.
13038 (find_partial_die): Adjust.
13039 (guess_partial_die_structure_name): Adjust.
13040 (fixup_partial_die): Adjust.
13041 (read_attribute_value): Adjust.
13042 (read_addr_index): Adjust.
13043 (read_addr_index_from_leb128): Adjust.
13044 (read_str_index): Adjust.
13045 (dwarf2_string_attr): Adjust.
13046 (get_debug_line_section): Adjust.
13047 (dwarf_decode_line_header): Adjust.
13048 (lnp_state_machine::check_line_address): Adjust.
13049 (dwarf_decode_lines_1): Adjust.
13050 (dwarf_decode_lines): Adjust.
13051 (dwarf2_start_symtab): Adjust.
13052 (var_decode_location): Adjust.
13053 (new_symbol_full): Adjust.
13054 (dwarf2_const_value_data): Adjust.
13055 (dwarf2_const_value_attr): Adjust.
13056 (dwarf2_const_value): Adjust.
13057 (die_type): Adjust.
13058 (die_containing_type): Adjust.
13059 (build_error_marker_type): Adjust.
13060 (lookup_die_type): Adjust.
13061 (guess_full_die_structure_name): Adjust.
13062 (anonymous_struct_prefix): Adjust.
13063 (determine_prefix): Adjust.
13064 (dwarf2_name): Adjust.
13065 (follow_die_ref_or_sig): Adjust.
13066 (follow_die_offset): Adjust.
13067 (follow_die_ref): Adjust.
13068 (follow_die_sig_1): Adjust.
13069 (follow_die_sig): Adjust.
13070 (get_signatured_type): Adjust.
13071 (get_DW_AT_signature_type): Adjust.
13072 (decode_locdesc): Adjust.
13073 (dwarf_decode_macros): Adjust.
13074 (cu_debug_loc_section): Adjust.
13075 (fill_in_loclist_baton): Adjust.
13076 (dwarf2_symbol_mark_computed): Adjust.
13077 (init_one_comp_unit): Don't assign
13078 dwarf2_cu::dwarf2_per_objfile.
13079 (set_die_type): Adjust.
13080
13081 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13082
13083 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13084 <dwarf2_per_objfile>: New field.
13085 (dwarf2_per_objfile): Remove global.
13086 (get_dwarf2_per_objfile): New function.
13087 (set_dwarf2_per_objfile): New function.
13088 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13089 dwarf2_per_objfile.
13090 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13091 (read_abbrev_offset): Likewise.
13092 (read_indirect_string): Likewise.
13093 (read_indirect_line_string): Likewise.
13094 (read_indirect_string_at_offset): Likewise.
13095 (read_indirect_string_from_dwz): Likewise.
13096 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13097 dwarf2_per_objfile.
13098 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13099 (create_all_comp_units): Change objfile parameter to
13100 dwarf2_per_objfile.
13101 (create_all_type_units): Likewise.
13102 (process_queue): Add dwarf2_per_objfile parameter.
13103 (read_and_check_comp_unit_head): Likewise.
13104 (lookup_dwo_unit_in_dwp): Likewise.
13105 (get_dwp_file): Likewise.
13106 (process_cu_includes): Likewise.
13107 (struct free_dwo_file_cleanup_data): New struct.
13108 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13109 set_dwarf2_per_objfile.
13110 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13111 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13112 context, adjust calls.
13113 (dw2_instantiate_symtab): Likewise.
13114 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13115 (dw2_get_cu): Likewise.
13116 (create_cu_from_index_list): Change objfile parameter to
13117 dwarf2_per_objfile.
13118 (create_cus_from_index_list): Get dwarf2_per_objfile from
13119 context, adjust calls.
13120 (create_cus_from_index): Likewise.
13121 (create_signatured_type_table_from_index): Change objfile
13122 parameter to dwarf2_per_objfile.
13123 (create_signatured_type_table_from_debug_names): Change objfile
13124 parameter to dwarf2_per_objfile.
13125 (create_addrmap_from_index): Likewise.
13126 (create_addrmap_from_aranges): Likewise.
13127 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13128 (dw2_setup): Remove.
13129 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13130 context.
13131 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13132 get_dwarf2_per_objfile.
13133 (dw2_forget_cached_source_info): Likewise.
13134 (dw2_map_symtabs_matching_filename): Likewise.
13135 (struct dw2_symtab_iterator) <index>: Remove.
13136 <dwarf2_per_objfile>: New field.
13137 (dw2_symtab_iter_init): Replace index parameter with
13138 dwarf2_per_objfile.
13139 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13140 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13141 (dw2_print_stats): Likewise.
13142 (dw2_dump): Likewise.
13143 (dw2_expand_symtabs_for_function): Likewise.
13144 (dw2_expand_all_symtabs): Likewise.
13145 (dw2_expand_symtabs_with_fullname): Likewise.
13146 (dw2_expand_marked_cus): Replace index and objfile parameters
13147 with dwarf2_per_objfile.
13148 (dw_expand_symtabs_matching_file_matcher): Add
13149 dwarf2_per_objfile parameter and adjust calls.
13150 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13151 adjust calls.
13152 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13153 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13154 adjust calls.
13155 (create_cus_from_debug_names_list): Replace objfile parameter
13156 with dwarf2_per_objfile and adjust calls.
13157 (create_cus_from_debug_names): Likewise.
13158 (dwarf2_read_debug_names): Likewise.
13159 (mapped_debug_names::namei_to_name): Adjust call.
13160 (dw2_debug_names_iterator::next): Likewise.
13161 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13162 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13163 (dw2_debug_names_dump): Likewise.
13164 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13165 (dw2_debug_names_expand_symtabs_matching): Likewise.
13166 (dwarf2_initialize_objfile): Likewise.
13167 (dwarf2_build_psymtabs): Likewise.
13168 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13169 this_cu.
13170 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13171 (read_and_check_comp_unit_head): Likewise.
13172 (read_abbrev_offset): Likewise.
13173 (create_debug_type_hash_table): Likewise.
13174 (create_debug_types_hash_table): Likewise.
13175 (create_all_type_units): Replace objfile parameter with
13176 dwarf2_per_objfile.
13177 (add_type_unit): Add dwarf2_per_objfile parameter.
13178 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13179 with dwarf2_per_objfile.
13180 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13181 (lookup_dwp_signatured_type): Likewise.
13182 (lookup_signatured_type): Likewise.
13183 (read_cutu_die_from_dwo): Likewise.
13184 (init_tu_and_read_dwo_dies): Likewise.
13185 (init_cutu_and_read_dies): Likewise.
13186 (init_cutu_and_read_dies_no_follow): Likewise.
13187 (allocate_type_unit_groups_table): Add objfile parameter.
13188 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13189 (get_type_unit_group): Likewise.
13190 (process_psymtab_comp_unit): Update call.
13191 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13192 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13193 (print_tu_stats): Likewise.
13194 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13195 in void* parameter.
13196 (build_type_psymtabs): Change objfile parameter to
13197 dwarf2_per_objfile.
13198 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13199 passed in void* parameter.
13200 (process_skeletonless_type_units): Change objfile parameter to
13201 dwarf2_per_objfile.
13202 (set_partial_user): Likewise.
13203 (dwarf2_build_psymtabs_hard): Likewise.
13204 (read_comp_units_from_section): Likewise.
13205 (create_all_comp_units): Likewise.
13206 (scan_partial_symbols): Update calls.
13207 (add_partial_symbol): Likewise.
13208 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13209 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13210 (process_queue): Add dwarf2_per_objfile parameter.
13211 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13212 (compute_compunit_symtab_includes): Likewise.
13213 (process_cu_includes): Add dwarf2_per_objfile parameter.
13214 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13215 (process_full_type_unit): Likewise.
13216 (process_imported_unit_die): Update call.
13217 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13218 (read_file_scope): Likewise.
13219 (allocate_dwo_file_hash_table): Add objfile parameter.
13220 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13221 (create_cus_hash_table): Likewise.
13222 (create_dwp_hash_table): Likewise.
13223 (create_dwo_unit_in_dwp_v1): Likewise.
13224 (create_dwp_v2_section): Likewise.
13225 (create_dwo_unit_in_dwp_v2): Likewise.
13226 (lookup_dwo_unit_in_dwp): Likewise.
13227 (try_open_dwop_file): Likewise.
13228 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13229 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13230 cleanup to include a reference to dwarf2_per_objfile.
13231 (open_dwp_file): Add dwarf2_per_objfile parameter.
13232 (open_and_init_dwp_file): Likewise.
13233 (get_dwp_file): Likewise.
13234 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13235 (queue_and_load_all_dwo_tus): Update call.
13236 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13237 data.
13238 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13239 (dwarf2_ranges_process): Likewise.
13240 (dwarf2_get_pc_bounds): Likewise.
13241 (mark_common_block_symbol_computed): Likewise.
13242 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13243 (dwarf2_read_abbrevs): Update call.
13244 (read_partial_die): Use dwarf2_per_objfile from cu.
13245 (find_partial_die): Likewise.
13246 (fixup_partial_die): Likewise.
13247 (read_attribute_value): Likewise.
13248 (read_indirect_string_at_offset_from): Add objfile parameter.
13249 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13250 parameter.
13251 (read_indirect_string_from_dwz): Add objfile parameter.
13252 (read_indirect_string): Add objfile parameter.
13253 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13254 (read_addr_index): Use dwarf2_per_objfile from cu.
13255 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13256 call dw2_setup.
13257 (read_str_index): Use dwarf2_per_objfile from cu.
13258 (get_debug_line_section): Likewise.
13259 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13260 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13261 (new_symbol_full): Use dwarf2_per_objfile from cu.
13262 (build_error_marker_type): Likewise.
13263 (lookup_die_type): Likewise.
13264 (determine_prefix): Likewise.
13265 (follow_die_offset): Likewise.
13266 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13267 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13268 (dwarf2_fetch_die_type_sect_off): Likewise.
13269 (dwarf2_get_die_type): Likewise.
13270 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13271 (get_signatured_type): Likewise.
13272 (get_DW_AT_signature_type): Likewise.
13273 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13274 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13275 (cu_debug_loc_section): Likewise.
13276 (fill_in_loclist_baton): Likewise.
13277 (dwarf2_symbol_mark_computed): Likewise.
13278 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13279 dwarf2_per_objfile.
13280 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13281 parameter.
13282 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13283 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13284 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13285 (set_die_type): Use dwarf2_free_objfile from cu.
13286 (get_die_type_at_offset): Likewise.
13287 (dwarf2_per_objfile_free): Don't assign global variable.
13288 (debug_names) <constructor>: Add dwarf2_per_objfile
13289 parameter, update m_debugstrlookup construction.
13290 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13291 parameter.
13292 <m_dwarf2_per_objfile>: New field.
13293 <lookup>: Use m_dwarf2_per_objfile.
13294 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13295 (psyms_seen_size): Likewise.
13296 (write_gdbindex): Replace objfile parameter with
13297 dwarf2_per_objfile.
13298 (write_debug_names): Likewise.
13299 (write_psymtabs_to_index): Likewise.
13300 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13301 calls.
13302
13303 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13304
13305 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13306 <dwarf2_per_objfile>: New field.
13307 (struct dwarf2_per_cu_data) <objfile>: Remove.
13308 <dwarf2_per_objfile>: New field.
13309 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13310 of objfile.
13311 (create_signatured_type_table_from_index): Likewise.
13312 (create_debug_type_hash_table): Likewise.
13313 (fill_in_sig_entry_from_dwo_entry): Likewise.
13314 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13315 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13316 objfile.
13317 (create_partial_symtab): Access objfile through
13318 dwarf2_per_objfile.
13319 (process_psymtab_comp_unit_reader): Likewise.
13320 (read_comp_units_from_section): Likewise.
13321 (scan_partial_symbols): Likewise.
13322 (add_partial_symbol): Likewise.
13323 (add_partial_subprogram): Likewise.
13324 (peek_die_abbrev): Likewise.
13325 (fixup_go_packaging): Likewise.
13326 (process_full_comp_unit): Likewise.
13327 (process_full_type_unit): Likewise.
13328 (process_imported_unit_die): Likewise.
13329 (dwarf2_compute_name): Likewise.
13330 (dwarf2_physname): Likewise.
13331 (read_import_statement): Likewise.
13332 (create_cus_hash_table): Assign dwarf2_physname instead of
13333 objfile.
13334 (read_func_scope): Access objfile through dwarf2_per_objfile.
13335 (read_lexical_block_scope): Likewise.
13336 (read_call_site_scope): Likewise.
13337 (read_variable): Likewise.
13338 (dwarf2_rnglists_process): Likewise.
13339 (dwarf2_ranges_process): Likewise.
13340 (dwarf2_ranges_read): Likewise.
13341 (dwarf2_record_block_ranges): Likewise.
13342 (dwarf2_add_field): Likewise.
13343 (dwarf2_add_member_fn): Likewise.
13344 (read_structure_type): Likewise.
13345 (process_structure_scope): Likewise.
13346 (read_enumeration_type): Likewise.
13347 (read_array_type): Likewise.
13348 (read_common_block): Likewise.
13349 (read_namespace_type): Likewise.
13350 (read_namespace): Likewise.
13351 (read_module_type): Likewise.
13352 (read_tag_pointer_type): Likewise.
13353 (read_tag_ptr_to_member_type): Likewise.
13354 (read_tag_string_type): Likewise.
13355 (read_subroutine_type): Likewise.
13356 (read_typedef): Likewise.
13357 (read_base_type): Likewise.
13358 (attr_to_dynamic_prop): Likewise.
13359 (read_subrange_type): Likewise.
13360 (read_unspecified_type): Likewise.
13361 (load_partial_dies): Likewise.
13362 (read_partial_die): Likewise.
13363 (find_partial_die): Likewise.
13364 (guess_partial_die_structure_name): Likewise.
13365 (fixup_partial_die): Likewise.
13366 (read_attribute_value): Likewise.
13367 (read_addr_index_from_leb128): Likewise.
13368 (dwarf2_read_addr_index): Likewise.
13369 (dwarf2_string_attr): Likewise.
13370 (lnp_state_machine::check_line_address): Likewise.
13371 (dwarf_decode_lines_1): Likewise.
13372 (dwarf_decode_lines): Likewise.
13373 (dwarf2_start_symtab): Likewise.
13374 (var_decode_location): Likewise.
13375 (new_symbol_full): Likewise.
13376 (dwarf2_const_value_data): Likewise.
13377 (dwarf2_const_value_attr): Likewise.
13378 (dwarf2_const_value): Likewise.
13379 (die_type): Likewise.
13380 (die_containing_type): Likewise.
13381 (lookup_die_type): Likewise.
13382 (guess_full_die_structure_name): Likewise.
13383 (anonymous_struct_prefix): Likewise.
13384 (dwarf2_name): Likewise.
13385 (follow_die_ref_or_sig): Likewise.
13386 (follow_die_offset): Likewise.
13387 (follow_die_ref): Likewise.
13388 (dwarf2_fetch_die_loc_sect_off): Likewise.
13389 (dwarf2_fetch_constant_bytes): Likewise.
13390 (dwarf2_fetch_die_type_sect_off): Likewise.
13391 (dwarf2_get_die_type): Likewise.
13392 (follow_die_sig): Likewise.
13393 (decode_locdesc): Likewise.
13394 (dwarf2_per_cu_objfile): Likewise.
13395 (dwarf2_per_cu_text_offset): Likewise.
13396 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13397 objfile.
13398 (set_die_type): Access objfile through
13399 dwarf2_per_objfile.
13400
13401 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13402
13403 * valprint.c (converted_character_d): Remove typedef.
13404 (DEF_VEC_O (converted_character_d)): Remove.
13405 (count_next_character): Use std::vector.
13406 (print_converted_chars_to_obstack): Likewise.
13407 (generic_printstr): Likewise.
13408
13409 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13410
13411 * xml-support.h (struct gdb_xml_value): Add constructor.
13412 <value>: Change type to unique_xmalloc_ptr.
13413 (gdb_xml_value_s): Remove typedef.
13414 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13415 (gdb_xml_element_start_handler): Change parameter type to
13416 std::vector.
13417 (xml_find_attribute): Likewise.
13418 * xml-support.c (xml_find_attribute): Change parameter type to
13419 std::vector and adjust.
13420 (gdb_xml_values_cleanup): Remove.
13421 (gdb_xml_parser::start_element): Adjust to std::vector.
13422 (xinclude_start_include): Change paraeter type to std::vector
13423 and adjust.
13424 * btrace.c (check_xml_btrace_version): Likewise.
13425 (parse_xml_btrace_block): Likewise.
13426 (parse_xml_btrace_pt_config_cpu): Likewise.
13427 (parse_xml_btrace_pt): Likewise.
13428 (parse_xml_btrace_conf_bts): Likewise.
13429 (parse_xml_btrace_conf_pt): Likewise.
13430 * memory-map.c (memory_map_start_memory): Likewise.
13431 (memory_map_start_property): Likewise.
13432 * osdata.c (osdata_start_osdata): Likewise.
13433 (osdata_start_item): Likewise.
13434 (osdata_start_column): Likewise.
13435 * remote.c (start_thread): Likewise.
13436 * solib-aix.c (library_list_start_library): Likewise.
13437 (library_list_start_list): Likewise.
13438 * solib-svr4.c (library_list_start_library): Likewise.
13439 (svr4_library_list_start_list): Likewise.
13440 * solib-target.c (library_list_start_segment): Likewise.
13441 (library_list_start_section): Likewise.
13442 (library_list_start_library): Likewise.
13443 (library_list_start_list): Likewise.
13444 * tracepoint.c (traceframe_info_start_memory): Likewise.
13445 (traceframe_info_start_tvar): Likewise.
13446 * xml-syscall.c (syscall_start_syscall): Likewise.
13447 * xml-tdesc.c (tdesc_start_target): Likewise.
13448 (tdesc_start_feature): Likewise.
13449 (tdesc_start_reg): Likewise.
13450 (tdesc_start_union): Likewise.
13451 (tdesc_start_struct): Likewise.
13452 (tdesc_start_flags): Likewise.
13453 (tdesc_start_enum): Likewise.
13454 (tdesc_start_field): Likewise.
13455 (tdesc_start_enum_value): Likewise.
13456 (tdesc_start_vector): Likewise.
13457
13458 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13459
13460 * extension.h (struct xmethod_worker) <clone>: Remove.
13461 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13462 Remove.
13463 (python_xmethod_worker::clone): Remove.
13464 * valops.c (find_overload_match): Use std::move instead of
13465 clone.
13466
13467 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13468
13469 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13470 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13471 <free_xmethod_worker_data>: Remove.
13472 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13473 <get_xmethod_arg_types>: Remove.
13474 <get_xmethod_result_type>: Remove.
13475 <invoke_xmethod>: Remove.
13476 * extension.c (new_xmethod_worker): Remove.
13477 (clone_xmethod_worker): Remove.
13478 (get_matching_xmethod_workers): Return void, pass std::vector by
13479 pointer.
13480 (get_xmethod_arg_types): Rename to...
13481 (xmethod_worker::get_arg_types): ... this, and adjust.
13482 (get_xmethod_result_type): Rename to...
13483 (xmethod_worker::get_result_type): ... this, and adjust.
13484 (invoke_xmethod): Remove.
13485 (free_xmethod_worker): Remove.
13486 (free_xmethod_worker_vec): Remove.
13487 * extension.h (enum ext_lang_rc): Move here from
13488 extension-priv.h.
13489 (struct xmethod_worker): Add constructor and destructor.
13490 <data>: Remove.
13491 <value>: Remove.
13492 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13493 virtual pure methods.
13494 <get_arg_types, get_result_type>: New methods.
13495 (xmethod_worker_ptr): Remove typedef.
13496 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13497 (xmethod_worker_vec): Remove typedef.
13498 (xmethod_worker_up): New typedef.
13499 (invoke_xmethod): Remove.
13500 (clone_xmethod_worker): Remove.
13501 (free_xmethod_worker): Remove.
13502 (free_xmethod_worker_vec): Remove.
13503 (get_xmethod_arg_types): Remove.
13504 (get_xmethod_result_type): Remove.
13505 * valops.c (find_method_list): Use std::vector, don't use
13506 intermediate vector.
13507 (value_find_oload_method_list): Use std::vector.
13508 (find_overload_match): Use std::vector.
13509 (find_oload_champ): Use std::vector.
13510 * value.c (value_free): Use operator delete.
13511 (value_of_xmethod): Rename to...
13512 (value_from_xmethod): ... this. Don't assign
13513 xmethod_worker::value, take rvalue-reference.
13514 (result_type_of_xmethod): Adjust.
13515 (call_xmethod): Adjust.
13516 * value.h: Include extension.h.
13517 (struct xmethod_worker): Don't forward-declare.
13518 (value_of_xmethod): Rename to...
13519 (value_from_xmethod): ... this, take rvalue-reference.
13520 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13521 (struct python_xmethod_worker): ... this, add constructor and
13522 destructor.
13523 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13524 (gdbpy_free_xmethod_worker_data): Rename to...
13525 (python_xmethod_worker::~python_xmethod_worker): ... this and
13526 adjust.
13527 (gdbpy_clone_xmethod_worker_data): Rename to...
13528 (python_xmethod_worker::clone): ... this and adjust.
13529 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13530 temporary vector.
13531 (gdbpy_get_xmethod_arg_types): Rename to...
13532 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13533 (gdbpy_get_xmethod_result_type): Rename to...
13534 (python_xmethod_worker::do_get_result_type): ... this and
13535 adjust.
13536 (gdbpy_invoke_xmethod): Rename to...
13537 (python_xmethod_worker::invoke): ... this and adjust.
13538 (new_python_xmethod_worker): Rename to...
13539 (python_xmethod_worker::python_xmethod_worker): ... this and
13540 adjust.
13541 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13542 Remove.
13543 (gdbpy_free_xmethod_worker_data): Remove.
13544 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13545 (gdbpy_get_xmethod_arg_types): Remove.
13546 (gdbpy_get_xmethod_result_type): Remove.
13547 (gdbpy_invoke_xmethod): Remove.
13548 * python/python.c (python_extension_ops): Remove obsolete
13549 callbacks.
13550
13551 2018-01-05 Pedro Alves <palves@redhat.com>
13552
13553 PR gdb/18653
13554 * common/signals-state-save-restore.c
13555 (save_original_signals_state): New parameter 'quiet'. Warn if we
13556 find a custom handler preinstalled, instead of internal erroring.
13557 But only warn if !quiet.
13558 * common/signals-state-save-restore.h
13559 (save_original_signals_state): New parameter 'quiet'.
13560 * main.c (captured_main_1): Move save_original_signals_state call
13561 after option handling, and pass QUIET.
13562
13563 2018-01-05 Pedro Alves <palves@redhat.com>
13564
13565 * spu-tdep.c (spu_catch_start): Pass
13566 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13567
13568 2018-01-05 Pedro Alves <palves@redhat.com>
13569
13570 PR gdb/22670
13571 * ada-lang.c (literal_symbol_name_matcher): New function.
13572 (ada_get_symbol_name_matcher): Use it for
13573 symbol_name_match_type::SEARCH_NAME.
13574 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13575 it down instead of assuming symbol_name_match_type::FULL.
13576 * block.h (block_lookup_symbol): New parameter 'match_type'.
13577 * c-valprint.c (print_unpacked_pointer): Use
13578 lookup_symbol_search_name instead of lookup_symbol.
13579 * compile/compile-object-load.c (get_out_value_type): Pass down
13580 symbol_name_match_type::SEARCH_NAME.
13581 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13582 symbol_name_match_type::FULL.
13583 * cp-support.c (cp_get_symbol_name_matcher): Handle
13584 symbol_name_match_type::SEARCH_NAME.
13585 * infrun.c (insert_exception_resume_breakpoint): Use
13586 lookup_symbol_search_name.
13587 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13588 * psymtab.c (maintenance_check_psymtabs): Use
13589 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13590 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13591 SYMBOL_SEARCH_NAME.
13592 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13593 if symbol_name_match_type::SEARCH_NAME.
13594 (lookup_symbol_in_language): Pass down
13595 symbol_name_match_type::FULL.
13596 (lookup_symbol_search_name): New.
13597 (lookup_language_this): Pass down
13598 symbol_name_match_type::SEARCH_NAME.
13599 (lookup_symbol_aux, lookup_local_symbol): New parameter
13600 'match_type'. Pass it down.
13601 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13602 (lookup_symbol_search_name): New declaration.
13603 (lookup_symbol_in_block): New 'match_type' parameter.
13604
13605 2018-01-05 Pedro Alves <palves@redhat.com>
13606
13607 PR gdb/22670
13608 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13609 ada_lookup_symbol.
13610 (ada_lookup_symbol): Reimplement in terms of
13611 ada_lookup_symbol_list, bits factored out from
13612 ada_lookup_encoded_symbol.
13613
13614 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13615
13616 * ada-exp.y (write_object_renaming): When subscripting an array
13617 using a symbol as the index, pass the block in call to
13618 ada_lookup_encoded_symbol when looking that symbol up.
13619
13620 2018-01-05 Jerome Guitton <guitton@adacore.com>
13621
13622 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13623 TYPE_INDEX_TYPE.
13624
13625 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13626
13627 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13628 the case where VALUE_LVAL (val0) is not lval_memory.
13629
13630 2018-01-05 Xavier Roirand <roirand@adacore.com>
13631
13632 * ada-valprint.c (print_optional_low_bound): Handle
13633 character-indexed array printing like boolean-indexed array
13634 printing.
13635
13636 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13637
13638 * NEWS: Create a new section for the next release branch.
13639 Rename the section of the current branch, now that it has
13640 been cut.
13641
13642 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13643
13644 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13645 * version.in: Bump version to 8.1.50.DATE-git.
13646
13647 2018-01-03 Xavier Roirand <roirand@adacore.com>
13648
13649 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13650 Add field.
13651 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13652 Add field.
13653 (default_exception_support_info) <catch_handlers_sym>: Add field.
13654 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13655 (ada_exception_name_addr_1): Add "catch handlers" handling.
13656 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13657 Update all callers.
13658 (create_excep_cond_exprs) <ex>: Add parameter.
13659 (re_set_exception): Update create_excep_cond_exprs call.
13660 (print_it_exception, print_one_exception, print_mention_exception)
13661 (print_recreate_exception): Add "catch handler" handling.
13662 (allocate_location_catch_handlers, re_set_catch_handlers)
13663 (check_status_catch_handlers, print_it_catch_handlers)
13664 (print_one_catch_handlers, print_mention_catch_handlers)
13665 (print_recreate_catch_handlers): New function.
13666 (catch_handlers_breakpoint_ops): New variable.
13667 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13668 Add parameter. Add "catch handler" handling.
13669 (ada_exception_sym_name, ada_exception_breakpoint_ops):
13670 Add "catch handler" handling.
13671 (ada_exception_catchpoint_cond_string): Add "catch handler"
13672 handling.
13673 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13674 call.
13675 (catch_ada_handlers_command): New function.
13676 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13677 operations structure.
13678 (_initialize_ada_language): Add "catch handlers" command entry.
13679 * NEWS: Document "catch handlers" feature.
13680
13681 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13682
13683 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13684 account when creating the array type of the slice.
13685 (ada_value_slice): Likewise.
13686
13687 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13688
13689 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13690 New enum value.
13691 (create_array_type_with_stride): Add byte_stride_prop parameter.
13692 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13693 New parameter. Update all callers in this file.
13694 (array_type_has_dynamic_stride): New function.
13695 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13696 of arrays with dynamic byte strides.
13697 * dwarf2read.c (read_array_type): Add support for dynamic
13698 DW_AT_byte_stride attributes.
13699
13700 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13701
13702 * dwarf2read.c (read_unspecified_type): Treat
13703 DW_TAG_enumeration_type DIEs from Ada units as stubs.
13704
13705 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13706
13707 Update copyright year range in all GDB files.
13708
13709 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13710
13711 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13712 and gdb/testsuite/gdb.base/step-line.c.
13713
13714 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13715
13716 * copyright.py (main): Dump the contents of
13717 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13718 even if BY_HAND is empty.
13719
13720 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13721
13722 * top.c (print_gdb_version): Update Copyright year in version
13723 message.
13724
13725 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13726
13727 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13728
13729 For older changes see ChangeLog-2017.
13730 \f
13731 Local Variables:
13732 mode: change-log
13733 left-margin: 8
13734 fill-column: 74
13735 version-control: never
13736 coding: utf-8
13737 End: