]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
e984f53a6675b270144e93037077f524a7065a46
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-17 Tom Tromey <tom@tromey.com>
2
3 PR python/20445:
4 * configure: Rebuild.
5 * configure.ac: Conditionally use -DNDEBUG for Python.
6
7 2018-09-17 Tom Tromey <tom@tromey.com>
8
9 * configure: Rebuild.
10 * configure.ac: Use gmp as a library dependency when checking for
11 mpfr.
12
13 2018-09-17 Pedro Alves <palves@redhat.com>
14
15 * python/py-inferior.c (find_inferior_object): Delete.
16
17 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
18
19 * compile/compile-cplus-types.c
20 (compile_cplus_instance::enter_scope): Don't use new_scope after
21 std::move.
22
23 2018-09-17 Tom Tromey <tom@tromey.com>
24
25 * common/pathstuff.c (get_standard_cache_dir): Use
26 ~/Library/Caches on macOS.
27 * common/pathstuff.h (get_standard_cache_dir): Update comment.
28
29 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
30
31 PR python/23669
32 * breakpoint.c (commands_cmd_element): New.
33 (_initialize_breakpoint): Assign commands_cmd_element.
34 * breakpoint.h (commands_cmd_element): New.
35 * cli/cli-script.c (while_cmd_element, if_command,
36 define_cmd_element): New.
37 (command_name_equals): Remove.
38 (process_next_line): Compare commands by pointer, not by name.
39 (_initialize_cli_script): Assign the various cmd_list_element
40 variables.
41 * compile/compile.c (compile_cmd_element): New.
42 (_initialize_compile): Assign compile_cmd_element.
43 * compile/compile.h (compile_cmd_element): New.
44 * guile/guile.c (guile_cmd_element): New.
45 (install_gdb_commands): Assign guile_cmd_element.
46 * guile/guile.h (guile_cmd_element): New.
47 * python/python.c (python_cmd_element): New.
48 (_initialize_python): Assign python_cmd_element.
49 * python/python.h (python_cmd_element): New.
50 * tracepoint.c (while_stepping_cmd_element): New.
51 (_initialize_tracepoint): Assign while_stepping_cmd_element.
52 * tracepoint.h (while_stepping_cmd_element): New.
53
54 2018-09-17 Tom Tromey <tom@tromey.com>
55
56 * infrun.c (save_infcall_suspend_state): Return
57 infcall_suspend_state_up.
58 (save_infcall_control_state): Return infcall_control_state_up.
59 * inferior.h (save_infcall_suspend_state)
60 (save_infcall_control_state): Declare later. Return unique
61 pointers.
62
63 2018-09-17 Tom Tromey <tom@tromey.com>
64
65 * infrun.c (struct stop_context): Declare constructor,
66 destructor, "changed" method.
67 (stop_context::stop_context): Rename from save_stop_context.
68 (stop_context::~stop_context): Rename from
69 release_stop_context_cleanup.
70 (normal_stop): Update.
71 (stop_context::changed): Rename from stop_context_changed. Return
72 bool.
73
74 2018-09-17 Tom Tromey <tom@tromey.com>
75
76 * inferior.h (struct infcall_suspend_state_deleter): New.
77 (infcall_suspend_state_up): New typedef.
78 (struct infcall_control_state_deleter): New.
79 (infcall_control_state_up): New typedef.
80 (make_cleanup_restore_infcall_suspend_state)
81 (make_cleanup_restore_infcall_control_state): Don't declare.
82 * infcall.c (call_function_by_hand_dummy): Update.
83 * infrun.c (do_restore_infcall_suspend_state_cleanup)
84 (make_cleanup_restore_infcall_suspend_state): Remove.
85 (do_restore_infcall_control_state_cleanup)
86 (make_cleanup_restore_infcall_control_state): Remove.
87
88 2018-09-17 Tom Tromey <tom@tromey.com>
89
90 * gdbthread.h (struct thread_control_state): Add initializer.
91 (class thread_info) <control>: Remove initializer.
92 * inferior.h (struct inferior_control_state): Add initializer.
93 (class inferior) <control>: Remove initializer.
94 (exit_inferior_1): Update.
95 * infrun.c (struct infcall_control_state): Add constructors.
96 (save_infcall_control_state): Use new.
97 (restore_infcall_control_state, discard_infcall_control_state):
98 Use delete.
99
100 2018-09-17 Tom Tromey <tom@tromey.com>
101
102 * infrun.c (struct infcall_suspend_state) <registers>: Now a
103 unique_ptr.
104 <siginfo_data>: Now a unique_xmalloc_ptr.
105 (save_infcall_suspend_state, restore_infcall_suspend_state)
106 (discard_infcall_suspend_state)
107 (get_infcall_suspend_state_regcache): Update.
108
109 2018-09-17 Tom Tromey <tom@tromey.com>
110
111 * gdbthread.h (struct thread_suspend_state): Add initializers.
112 (class thread_info) <suspend>: Remove initializer.
113 * infrun.c (struct infcall_suspend_state): Add initializers.
114 (save_infcall_suspend_state): Use new.
115 (discard_infcall_suspend_state): Use delete.
116
117 2018-09-16 Tom Tromey <tom@tromey.com>
118
119 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
120 Remove.
121 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
122 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
123 (py_varobj_iter_new): Likewise.
124 (py_varobj_get_iterator): Use gdbpy_ref.
125
126 2018-09-16 Tom Tromey <tom@tromey.com>
127
128 * python/py-threadevent.c (py_get_event_thread): Simplify.
129 * python/py-inferior.c (infpy_thread_from_thread_handle):
130 Return immediately after calling thread_to_thread_object. Use
131 Py_RETURN_NONE.
132 (thread_to_thread_object): Set the exception on a NULL return.
133
134 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
135
136 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
137
138 2018-09-16 Tom Tromey <tom@tromey.com>
139
140 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
141 Remove.
142
143 2018-09-16 Tom Tromey <tom@tromey.com>
144
145 * python/python-internal.h (thread_to_thread_object): Change
146 return type.
147 * python/py-inferior.c (thread_to_thread_object): Return a new
148 reference.
149 (infpy_thread_from_thread_handle): Update.
150 * python/py-infthread.c (gdbpy_selected_thread): Update.
151 * python/py-stopevent.c (create_stop_event_object): Update.
152 * python/py-threadevent.c (py_get_event_thread): Return a new
153 reference.
154 (py_get_event_thread): Update.
155 * python/py-event.h (py_get_event_thread): Change return type.
156 * python/py-continueevent.c (create_continue_event_object):
157 Update.
158
159 2018-09-16 Tom Tromey <tom@tromey.com>
160
161 * python/py-progspace.c (pspy_get_objfiles): Update.
162 * python/python-internal.h (objfile_to_objfile_object): Change
163 return type.
164 * python/py-newobjfileevent.c (create_new_objfile_event_object):
165 Update.
166 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
167 Update.
168 * python/python.c (gdbpy_get_current_objfile): Update.
169 (gdbpy_objfiles): Update.
170 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
171 Update.
172 (objfile_to_objfile_object): Return a new reference.
173 * python/py-symtab.c (stpy_get_objfile): Update.
174 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
175 Update.
176
177 2018-09-16 Tom Tromey <tom@tromey.com>
178
179 * python/py-inferior.c (infpy_get_progspace): Update.
180 * python/python-internal.h (pspace_to_pspace_object): Change
181 return type.
182 * python/py-newobjfileevent.c
183 (create_clear_objfiles_event_object): Update.
184 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
185 Update.
186 * python/python.c (gdbpy_get_current_progspace): Update.
187 (gdbpy_progspaces): Update.
188 * python/py-progspace.c (pspace_to_pspace_object): Return a new
189 reference.
190 * python/py-objfile.c (objfpy_get_progspace): Update.
191 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
192 Update.
193
194 2018-09-16 Tom Tromey <tom@tromey.com>
195
196 * python/lib/gdb/__init__.py (current_progspace, objfiles)
197 (solib_name, block_for_pc, find_pc_line): New functions.
198 (execute_unwinders): Update.
199 * python/py-block.c (gdbpy_block_for_pc): Remove.
200 * python/py-inferior.c (infpy_get_progspace): New function.
201 (inferior_object_getset) <progspace>: Add.
202 * python/py-progspace.c (pspy_objfiles): Rewrite.
203 (pspy_solib_name, pspy_block_for_pc)
204 (pspy_find_pc_line, pspy_is_valid): New functions.
205 (progspace_object_methods): Add entries for solib_name,
206 block_for_pc, find_pc_line, is_valid.
207 * python/python-internal.h (gdbpy_block_for_pc)
208 (build_objfiles_list): Don't declare.
209 * python/python.c: Don't include solib.h.
210 (gdbpy_solib_name, gdbpy_find_pc_line)
211 (gdbpy_get_current_progspace, build_objfiles_list)
212 (gdbpy_objfiles): Remove.
213 (GdbMethods) <current_progspace, objfiles, block_for_pc,
214 solib_name, find_pc_line>: Remove entries.
215
216 2018-09-16 Tom Tromey <tom@tromey.com>
217
218 * top.c (new_ui_command): Use GNU style for metasyntactic
219 variables.
220 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
221 variables.
222 * maint.c (maintenance_translate_address): Remove "<>" around
223 text.
224 * interps.c (interpreter_exec_cmd): Use GNU style for
225 metasyntactic variables.
226 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
227 metasyntactic variables.
228 * tracepoint.c (tfind_range_command): Use GNU style for
229 metasyntactic variables.
230 (tfind_outside_command): Likewise.
231 (_initialize_tracepoint): Likewise.
232 * remote.c (extended_remote_target::create_inferior): Use GNU
233 style for metasyntactic variables.
234 * sparc64-tdep.c (adi_examine_command): Use GNU style for
235 metasyntactic variables.
236 (adi_assign_command): Likewise.
237
238 2018-09-16 Tom Tromey <tom@tromey.com>
239
240 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
241 metasyntactic variables. Print message if no disassembler options
242 are available.
243
244 2018-09-15 Tom Tromey <tom@tromey.com>
245
246 * infcmd.c (get_inferior_args): Return const char *.
247 * inferior.h (get_inferior_args): Return type now const.
248 * linux-tdep.c (linux_fill_prpsinfo): Update.
249 * procfs.c (procfs_target::make_corefile_notes): Update.
250
251 2018-09-07 Tom Tromey <tom@tromey.com>
252
253 * python/python.c (execute_gdb_command): Call bpstat_do_actions
254 inside the TRY.
255
256 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
257
258 * nios2-tdep.c (nios2_type_align): New.
259 (nios2_gdb_arch_init): Install type_align hook.
260
261 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
262
263 * eval.c (fake_method::fake_method): Call xzalloc directly for a
264 type that is neither object file owned, nor gdbarch owned.
265 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
266 gdbarch is non-NULL.
267 (alloc_type_instance): Allocate non-objfile owned types on the
268 gdbarch obstack.
269 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
270 using TYPE_ALLOC to ensure memory is allocated on the correct
271 obstack.
272 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
273 obstack, or the gdbarch obstack.
274 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
275
276 2018-09-14 Tom Tromey <tom@tromey.com>
277
278 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
279 block.
280
281 2018-09-14 Tom Tromey <tom@tromey.com>
282
283 * nat/fork-inferior.c (get_startup_shell): Remove "static".
284
285 2018-09-13 Tom Tromey <tom@tromey.com>
286
287 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
288 static.
289
290 2018-09-13 Tom Tromey <tom@tromey.com>
291
292 * exec.c (try_open_exec_file): Use std::string.
293
294 2018-09-13 Tom Tromey <tom@tromey.com>
295
296 * utils.h (gdb_bfd_errmsg): Return std::string.
297 * exec.c (exec_file_attach): Update.
298 * compile/compile-object-load.c (compile_object_load): Update.
299 * utils.c (gdb_bfd_errmsg): Return std::string.
300
301 2018-09-13 Tom Tromey <tom@tromey.com>
302
303 * procfs.c (struct procinfo_deleter): New.
304 (procinfo_up): New typedef.
305 (do_destroy_procinfo_cleanup): Remove.
306 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
307
308 2018-09-13 Tom Tromey <tom@tromey.com>
309
310 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
311
312 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
313 2018-09-13 Tom Tromey <tom@tromey.com>
314
315 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
316 (pspy_get_objfiles): New function.
317 (progspace_object_methods): New.
318 (pspace_object_type): Add tp_methods callback.
319 * python/python-internal.h (build_objfiles_list): New
320 declaration.
321 * python/python.c (build_objfiles_list): New function.
322 (gdbpy_objfiles): Implement using build_objfiles_list.
323 * NEWS: Mention the Progspace.objfiles method.
324
325 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
326
327 * python/py-inferior.c (infpy_get_progspace): New function.
328 (inferior_object_getset): Add progspace property.
329 * NEWS: Mention the new property.
330
331 2018-09-13 Tom Tromey <tom@tromey.com>
332
333 PR rust/23650:
334 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
335
336 2018-09-13 Tom Tromey <tom@tromey.com>
337
338 PR rust/23626:
339 * rust-lang.c (rust_enum_variant): Now static.
340 (rust_empty_enum_p): New function.
341 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
342 Handle empty enum.
343
344 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
345
346 * python/py-inferior.c (infpy_repr): New.
347 (inferior_object_type): Register infpy_repr.
348 * python/py-objfile.c (objfpy_repr): New.
349 (objfile_object_type): Register objfpy_repr.
350
351 2018-09-12 John Baldwin <jhb@FreeBSD.org>
352
353 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
354
355 2018-09-12 John Baldwin <jhb@FreeBSD.org>
356
357 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
358 typo.
359
360 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
361
362 * common/common-utils.c: Don't include '<sys/stat.h>'.
363 (is_regular_file): Move to...
364 * common/filestuff.c (is_regular_file): ... here.
365 * common/common-utils.h (is_regular_file): Move to...
366 * common/filestuff.h (is_regular_file): ... here.
367
368 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
369
370 * skip.c (debug_skip): New variable.
371 (skiplist_entry::do_skip_file_p): Add debug output.
372 (skiplist_entry::do_skip_gfile_p): Likewise.
373 (skiplist_entry::skip_function_p): Likewise.
374 (_initialize_step_skip): Create debug command.
375 * NEWS: Mention set/show debug skip.
376
377 2018-09-11 Xavier Roirand <roirand@adacore.com>
378
379 * darwin-nat.c (should_disable_startup_with_shell):
380 New function.
381 (darwin_nat_target::create_inferior): Add call.
382
383 2018-09-11 Xavier Roirand <roirand@adacore.com>
384
385 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
386 inf_port, msg_state>: Initialize.
387 (struct darwin_thread_info) <signaled, single_step>: Change
388 type and initialize.
389 (struct darwin_thread_info) <event>: Initialize.
390
391 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
392
393 PR gdb/23555
394 PR gdb/23558
395 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
396 guesses.
397
398 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
399
400 Revert:
401 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
402
403 PR gdb/23555
404 PR gdb/23558
405 * gnulib/aclocal.m4: Regenerate.
406 * gnulib/config.in: Regenerate.
407 * gnulib/configure: Regenerate.
408 * gnulib/import/Makefile.am: Update.
409 * gnulib/import/Makefile.in: Update.
410 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
411 * gnulib/import/_Noreturn.h: ... this.
412 * gnulib/import/alloca.in.h: Update.
413 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
414 * gnulib/import/arg-nonnull.h: ... this.
415 * gnulib/import/assure.h: Update.
416 * gnulib/import/at-func.c: Update.
417 * gnulib/import/basename-lgpl.c: Update.
418 * gnulib/import/extra/snippet/c++defs.h: Rename to...
419 * gnulib/import/c++defs.h: ... this.
420 * gnulib/import/canonicalize-lgpl.c: Update.
421 * gnulib/import/cdefs.h: Update.
422 * gnulib/import/chdir-long.c: Update.
423 * gnulib/import/chdir-long.h: Update.
424 * gnulib/import/cloexec.c: Update.
425 * gnulib/import/cloexec.h: Update.
426 * gnulib/import/close.c: Update.
427 * gnulib/import/closedir.c: Update.
428 * gnulib/import/config.charset: Update.
429 * gnulib/import/dirent-private.h: Update.
430 * gnulib/import/dirent.in.h: Update.
431 * gnulib/import/dirfd.c: Update.
432 * gnulib/import/dirname-lgpl.c: Update.
433 * gnulib/import/dirname.h: Update.
434 * gnulib/import/dosname.h: Update.
435 * gnulib/import/dup-safer-flag.c: Update.
436 * gnulib/import/dup-safer.c: Update.
437 * gnulib/import/dup.c: Update.
438 * gnulib/import/dup2.c: Update.
439 * gnulib/import/errno.in.h: Update.
440 * gnulib/import/error.c: Update.
441 * gnulib/import/error.h: Update.
442 * gnulib/import/exitfail.c: Update.
443 * gnulib/import/exitfail.h: Update.
444 * gnulib/import/extra/update-copyright: Update.
445 * gnulib/import/fchdir.c: Update.
446 * gnulib/import/fcntl.c: Update.
447 * gnulib/import/fcntl.in.h: Update.
448 * gnulib/import/fd-hook.c: Update.
449 * gnulib/import/fd-hook.h: Update.
450 * gnulib/import/fd-safer-flag.c: Update.
451 * gnulib/import/fd-safer.c: Update.
452 * gnulib/import/fdopendir.c: Update.
453 * gnulib/import/filename.h: Update.
454 * gnulib/import/filenamecat-lgpl.c: Update.
455 * gnulib/import/filenamecat.h: Update.
456 * gnulib/import/flexmember.h: Update.
457 * gnulib/import/float+.h: Update.
458 * gnulib/import/float.c: Update.
459 * gnulib/import/float.in.h: Update.
460 * gnulib/import/fnmatch.c: Update.
461 * gnulib/import/fnmatch.in.h: Update.
462 * gnulib/import/fnmatch_loop.c: Update.
463 * gnulib/import/fpucw.h: Update.
464 * gnulib/import/frexp.c: Update.
465 * gnulib/import/frexpl.c: Update.
466 * gnulib/import/fstat.c: Update.
467 * gnulib/import/fstatat.c: Update.
468 * gnulib/import/getcwd-lgpl.c: Update.
469 * gnulib/import/getcwd.c: Update.
470 * gnulib/import/getdtablesize.c: Update.
471 * gnulib/import/getlogin_r.c: Update.
472 * gnulib/import/getprogname.c: Update.
473 * gnulib/import/getprogname.h: Update.
474 * gnulib/import/gettext.h: Update.
475 * gnulib/import/gettimeofday.c: Update.
476 * gnulib/import/glob-libc.h: Update.
477 * gnulib/import/glob.c: Update.
478 * gnulib/import/glob.in.h: Update.
479 * gnulib/import/glob_internal.h: Update.
480 * gnulib/import/glob_pattern_p.c: Update.
481 * gnulib/import/globfree.c: Update.
482 * gnulib/import/hard-locale.c: Update.
483 * gnulib/import/hard-locale.h: Update.
484 * gnulib/import/intprops.h: Update.
485 * gnulib/import/inttypes.in.h: Update.
486 * gnulib/import/isnan.c: Update.
487 * gnulib/import/isnand-nolibm.h: Update.
488 * gnulib/import/isnand.c: Update.
489 * gnulib/import/isnanl-nolibm.h: Update.
490 * gnulib/import/isnanl.c: Update.
491 * gnulib/import/itold.c: Update.
492 * gnulib/import/libc-config.h: Update.
493 * gnulib/import/limits.in.h: Update.
494 * gnulib/import/localcharset.c: Update.
495 * gnulib/import/localcharset.h: Update.
496 * gnulib/import/localtime-buffer.c: Update.
497 * gnulib/import/localtime-buffer.h: Update.
498 * gnulib/import/lstat.c: Update.
499 * gnulib/import/m4/00gnulib.m4: Update.
500 * gnulib/import/m4/__inline.m4: Update.
501 * gnulib/import/m4/absolute-header.m4: Update.
502 * gnulib/import/m4/alloca.m4: Update.
503 * gnulib/import/m4/builtin-expect.m4: Update.
504 * gnulib/import/m4/canonicalize.m4: Update.
505 * gnulib/import/m4/chdir-long.m4: Update.
506 * gnulib/import/m4/close.m4: Update.
507 * gnulib/import/m4/closedir.m4: Update.
508 * gnulib/import/m4/configmake.m4: Update.
509 * gnulib/import/m4/d-ino.m4: Update.
510 * gnulib/import/m4/d-type.m4: Update.
511 * gnulib/import/m4/dirent_h.m4: Update.
512 * gnulib/import/m4/dirfd.m4: Update.
513 * gnulib/import/m4/dirname.m4: Update.
514 * gnulib/import/m4/double-slash-root.m4: Update.
515 * gnulib/import/m4/dup.m4: Update.
516 * gnulib/import/m4/dup2.m4: Update.
517 * gnulib/import/m4/eealloc.m4: Update.
518 * gnulib/import/m4/environ.m4: Update.
519 * gnulib/import/m4/errno_h.m4: Update.
520 * gnulib/import/m4/error.m4: Update.
521 * gnulib/import/m4/exponentd.m4: Update.
522 * gnulib/import/m4/exponentl.m4: Update.
523 * gnulib/import/m4/extensions.m4: Update.
524 * gnulib/import/m4/extern-inline.m4: Update.
525 * gnulib/import/m4/fchdir.m4: Update.
526 * gnulib/import/m4/fcntl-o.m4: Update.
527 * gnulib/import/m4/fcntl.m4: Update.
528 * gnulib/import/m4/fcntl_h.m4: Update.
529 * gnulib/import/m4/fdopendir.m4: Update.
530 * gnulib/import/m4/filenamecat.m4: Update.
531 * gnulib/import/m4/flexmember.m4: Update.
532 * gnulib/import/m4/float_h.m4: Update.
533 * gnulib/import/m4/fnmatch.m4: Update.
534 * gnulib/import/m4/fnmatch_h.m4: Update.
535 * gnulib/import/m4/fpieee.m4: Update.
536 * gnulib/import/m4/frexp.m4: Update.
537 * gnulib/import/m4/frexpl.m4: Update.
538 * gnulib/import/m4/fstat.m4: Update.
539 * gnulib/import/m4/fstatat.m4: Update.
540 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
541 * gnulib/import/m4/getcwd-path-max.m4: Update.
542 * gnulib/import/m4/getcwd.m4: Update.
543 * gnulib/import/m4/getdtablesize.m4: Update.
544 * gnulib/import/m4/getlogin.m4: Update.
545 * gnulib/import/m4/getlogin_r.m4: Update.
546 * gnulib/import/m4/getpagesize.m4: Update.
547 * gnulib/import/m4/getprogname.m4: Update.
548 * gnulib/import/m4/gettimeofday.m4: Update.
549 * gnulib/import/m4/glibc21.m4: Update.
550 * gnulib/import/m4/glob.m4: Update.
551 * gnulib/import/m4/glob_h.m4: Update.
552 * gnulib/import/m4/gnulib-cache.m4: Update.
553 * gnulib/import/m4/gnulib-common.m4: Update.
554 * gnulib/import/m4/gnulib-comp.m4: Update.
555 * gnulib/import/m4/gnulib-tool.m4: Update.
556 * gnulib/import/m4/hard-locale.m4: Update.
557 * gnulib/import/m4/include_next.m4: Update.
558 * gnulib/import/m4/inttypes-pri.m4: Update.
559 * gnulib/import/m4/inttypes.m4: Update.
560 * gnulib/import/m4/isnand.m4: Update.
561 * gnulib/import/m4/isnanl.m4: Update.
562 * gnulib/import/m4/largefile.m4: Update.
563 * gnulib/import/m4/limits-h.m4: Update.
564 * gnulib/import/m4/localcharset.m4: Update.
565 * gnulib/import/m4/locale-fr.m4: Update.
566 * gnulib/import/m4/locale-ja.m4: Update.
567 * gnulib/import/m4/locale-zh.m4: Update.
568 * gnulib/import/m4/localtime-buffer.m4: Update.
569 * gnulib/import/m4/longlong.m4: Update.
570 * gnulib/import/m4/lstat.m4: Update.
571 * gnulib/import/m4/malloc.m4: Update.
572 * gnulib/import/m4/malloca.m4: Update.
573 * gnulib/import/m4/math_h.m4: Update.
574 * gnulib/import/m4/mbrtowc.m4: Update.
575 * gnulib/import/m4/mbsinit.m4: Update.
576 * gnulib/import/m4/mbsrtowcs.m4: Update.
577 * gnulib/import/m4/mbstate_t.m4: Update.
578 * gnulib/import/m4/memchr.m4: Update.
579 * gnulib/import/m4/memmem.m4: Update.
580 * gnulib/import/m4/mempcpy.m4: Update.
581 * gnulib/import/m4/memrchr.m4: Update.
582 * gnulib/import/m4/mkdir.m4: Update.
583 * gnulib/import/m4/mkstemp.m4: Update.
584 * gnulib/import/m4/mmap-anon.m4: Update.
585 * gnulib/import/m4/mode_t.m4: Update.
586 * gnulib/import/m4/msvc-inval.m4: Update.
587 * gnulib/import/m4/msvc-nothrow.m4: Update.
588 * gnulib/import/m4/multiarch.m4: Update.
589 * gnulib/import/m4/nocrash.m4: Update.
590 * gnulib/import/m4/off_t.m4: Update.
591 * gnulib/import/m4/onceonly.m4: Update.
592 * gnulib/import/m4/open-cloexec.m4: Update.
593 * gnulib/import/m4/open.m4: Update.
594 * gnulib/import/m4/openat.m4: Update.
595 * gnulib/import/m4/opendir.m4: Update.
596 * gnulib/import/m4/pathmax.m4: Update.
597 * gnulib/import/m4/rawmemchr.m4: Update.
598 * gnulib/import/m4/readdir.m4: Update.
599 * gnulib/import/m4/readlink.m4: Update.
600 * gnulib/import/m4/realloc.m4: Update.
601 * gnulib/import/m4/rename.m4: Update.
602 * gnulib/import/m4/rewinddir.m4: Update.
603 * gnulib/import/m4/rmdir.m4: Update.
604 * gnulib/import/m4/save-cwd.m4: Update.
605 * gnulib/import/m4/secure_getenv.m4: Update.
606 * gnulib/import/m4/setenv.m4: Update.
607 * gnulib/import/m4/signal_h.m4: Update.
608 * gnulib/import/m4/ssize_t.m4: Update.
609 * gnulib/import/m4/stat-time.m4: Update.
610 * gnulib/import/m4/stat.m4: Update.
611 * gnulib/import/m4/std-gnu11.m4: Update.
612 * gnulib/import/m4/stdbool.m4: Update.
613 * gnulib/import/m4/stddef_h.m4: Update.
614 * gnulib/import/m4/stdint.m4: Update.
615 * gnulib/import/m4/stdio_h.m4: Update.
616 * gnulib/import/m4/stdlib_h.m4: Update.
617 * gnulib/import/m4/strchrnul.m4: Update.
618 * gnulib/import/m4/strdup.m4: Update.
619 * gnulib/import/m4/strerror.m4: Update.
620 * gnulib/import/m4/string_h.m4: Update.
621 * gnulib/import/m4/strstr.m4: Update.
622 * gnulib/import/m4/strtok_r.m4: Update.
623 * gnulib/import/m4/sys_socket_h.m4: Update.
624 * gnulib/import/m4/sys_stat_h.m4: Update.
625 * gnulib/import/m4/sys_time_h.m4: Update.
626 * gnulib/import/m4/sys_types_h.m4: Update.
627 * gnulib/import/m4/tempname.m4: Update.
628 * gnulib/import/m4/time_h.m4: Update.
629 * gnulib/import/m4/unistd-safer.m4: Update.
630 * gnulib/import/m4/unistd_h.m4: Update.
631 * gnulib/import/m4/warn-on-use.m4: Update.
632 * gnulib/import/m4/wchar_h.m4: Update.
633 * gnulib/import/m4/wchar_t.m4: Update.
634 * gnulib/import/m4/wctype_h.m4: Update.
635 * gnulib/import/m4/wint_t.m4: Update.
636 * gnulib/import/malloc.c: Update.
637 * gnulib/import/malloc/scratch_buffer.h: Update.
638 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
639 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
640 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
641 * gnulib/import/malloca.c: Update.
642 * gnulib/import/malloca.h: Update.
643 * gnulib/import/malloca.valgrind: Update.
644 * gnulib/import/math.in.h: Update.
645 * gnulib/import/mbrtowc.c: Update.
646 * gnulib/import/mbsinit.c: Update.
647 * gnulib/import/mbsrtowcs-impl.h: Update.
648 * gnulib/import/mbsrtowcs-state.c: Update.
649 * gnulib/import/mbsrtowcs.c: Update.
650 * gnulib/import/memchr.c: Update.
651 * gnulib/import/memmem.c: Update.
652 * gnulib/import/mempcpy.c: Update.
653 * gnulib/import/memrchr.c: Update.
654 * gnulib/import/mkdir.c: Update.
655 * gnulib/import/mkstemp.c: Update.
656 * gnulib/import/msvc-inval.c: Update.
657 * gnulib/import/msvc-inval.h: Update.
658 * gnulib/import/msvc-nothrow.c: Update.
659 * gnulib/import/msvc-nothrow.h: Update.
660 * gnulib/import/open.c: Update.
661 * gnulib/import/openat-die.c: Update.
662 * gnulib/import/openat-priv.h: Update.
663 * gnulib/import/openat-proc.c: Update.
664 * gnulib/import/openat.c: Update.
665 * gnulib/import/openat.h: Update.
666 * gnulib/import/opendir.c: Update.
667 * gnulib/import/pathmax.h: Update.
668 * gnulib/import/pipe-safer.c: Update.
669 * gnulib/import/rawmemchr.c: Update.
670 * gnulib/import/readdir.c: Update.
671 * gnulib/import/readlink.c: Update.
672 * gnulib/import/realloc.c: Update.
673 * gnulib/import/ref-add.sin: Update.
674 * gnulib/import/ref-del.sin: Update.
675 * gnulib/import/rename.c: Update.
676 * gnulib/import/rewinddir.c: Update.
677 * gnulib/import/rmdir.c: Update.
678 * gnulib/import/same-inode.h: Update.
679 * gnulib/import/save-cwd.c: Update.
680 * gnulib/import/save-cwd.h: Update.
681 * gnulib/import/scratch_buffer.h: Update.
682 * gnulib/import/secure_getenv.c: Update.
683 * gnulib/import/setenv.c: Update.
684 * gnulib/import/signal.in.h: Update.
685 * gnulib/import/stat-time.c: Update.
686 * gnulib/import/stat-time.h: Update.
687 * gnulib/import/stat-w32.c: Update.
688 * gnulib/import/stat-w32.h: Update.
689 * gnulib/import/stat.c: Update.
690 * gnulib/import/stdbool.in.h: Update.
691 * gnulib/import/stddef.in.h: Update.
692 * gnulib/import/stdint.in.h: Update.
693 * gnulib/import/stdio.in.h: Update.
694 * gnulib/import/stdlib.in.h: Update.
695 * gnulib/import/str-two-way.h: Update.
696 * gnulib/import/strchrnul.c: Update.
697 * gnulib/import/strdup.c: Update.
698 * gnulib/import/streq.h: Update.
699 * gnulib/import/strerror-override.c: Update.
700 * gnulib/import/strerror-override.h: Update.
701 * gnulib/import/strerror.c: Update.
702 * gnulib/import/string.in.h: Update.
703 * gnulib/import/stripslash.c: Update.
704 * gnulib/import/strnlen1.c: Update.
705 * gnulib/import/strnlen1.h: Update.
706 * gnulib/import/strstr.c: Update.
707 * gnulib/import/strtok_r.c: Update.
708 * gnulib/import/sys_stat.in.h: Update.
709 * gnulib/import/sys_time.in.h: Update.
710 * gnulib/import/sys_types.in.h: Update.
711 * gnulib/import/tempname.c: Update.
712 * gnulib/import/tempname.h: Update.
713 * gnulib/import/time.in.h: Update.
714 * gnulib/import/unistd--.h: Update.
715 * gnulib/import/unistd-safer.h: Update.
716 * gnulib/import/unistd.in.h: Update.
717 * gnulib/import/unsetenv.c: Update.
718 * gnulib/import/verify.h: Update.
719 * gnulib/import/extra/snippet/warn-on-use.h: Update.
720 * gnulib/import/wchar.in.h: Update.
721 * gnulib/import/wctype.in.h: Update.
722 * gnulib/import/xalloc-oversized.h: Update.
723 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
724 "53e2c179f26a890fa6685af4b6c1397ee370433b".
725
726 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
727
728 * record-btrace.c (get_thread_current_frame): Remove
729 old_inferior_ptid.
730
731 2018-09-10 Jerome Guitton <guitton@adacore.com>
732
733 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
734 with check_tag to 1 if and only if the type is tagged and the
735 component being searched cannot been found in the current
736 view. Otherwise, always call ada_to_fixed_type with
737 check_tag to 0.
738
739 2018-09-10 Xavier Roirand <roirand@adacore.com>
740
741 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
742 declaration.
743 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
744 * ada-varobj.c (ada_varobj_get_number_of_children,
745 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
746
747 2018-09-10 Xavier Roirand <roirand@adacore.com>
748
749 * ada-valprint.c (ada_value_print): Use type instead of
750 enclosing type.
751
752 2018-09-10 Xavier Roirand <roirand@adacore.com>
753
754 * ada-lang.c (ada_value_subscript): Handle case when parameter is
755 an array of access to unconstrained array.
756
757 2018-09-10 Xavier Roirand <roirand@adacore.com>
758
759 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
760 (ada_check_typedef): Use it.
761
762 2018-09-10 Xavier Roirand <roirand@adacore.com>
763
764 * ada-varobj.c (ada_varobj_describe_struct_child)
765 (ada_varobj_describe_child): Handle union case like struct one.
766
767 2018-09-10 Tom Tromey <tom@tromey.com>
768
769 PR python/18380:
770 * python/python.c (_initialize_python): Make example in "python"
771 help work in Python 3.
772
773 2018-09-10 Eli Zaretskii <eliz@gnu.org>
774
775 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
776 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
777 $(EXEEXT) to the script, as it is not a program.
778
779 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
780
781 * python/py-prettyprint.c (pretty_print_one_value): Return
782 gdbpy_ref<>.
783 (print_string_repr): Adjust.
784 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
785 * python/python-internal.h (apply_varobj_pretty_printer): Return
786 gdbpy_ref<>.
787 * varobj.c (varobj_value_get_print_value): Adjust.
788
789 2018-09-08 Tom Tromey <tom@tromey.com>
790
791 PR python/16047:
792 * python/py-prettyprint.c (pretty_print_one_value): Check for
793 to_string method.
794
795 2018-09-08 Joel Brobecker <brobecker@adacore.com>
796
797 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
798 replace_operator_with_call.
799
800 2018-09-08 Joel Brobecker <brobecker@adacore.com>
801
802 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
803
804 2018-09-08 Joel Brobecker <brobecker@adacore.com>
805
806 * ada-typeprint.c (print_range): Print the bounds using TYPE
807 rather than its TYPE_TARGET_TYPE.
808
809 2018-09-08 Joel Brobecker <brobecker@adacore.com>
810
811 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
812 call to ada_to_fixed_value_create.
813
814 2018-09-08 Jerome Guitton <guitton@adacore.com>
815
816 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
817
818 2018-09-08 Joel Brobecker <brobecker@adacore.com>
819
820 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
821 by calls to error.
822
823 2018-09-08 Joel Brobecker <brobecker@adacore.com>
824
825 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
826 Move update of loop variable "fi".
827
828 2018-09-08 Joel Brobecker <brobecker@adacore.com>
829
830 * ada-lang.c (value_assign_to_component): In the case of
831 big-endian targets, extract the bits of the given VAL
832 using an src_offset of zero if container is not a scalar.
833
834 2018-09-06 Simon Ser <contact@emersion.fr>
835
836 PR gdb/23105
837 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
838 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
839 * fbsd-tdep.c (fbsd_make_note_desc): New.
840 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
841 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
842 * target.h (enum target_object) Add FreeBSD-specific
843 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
844
845 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
846
847 * compile/compile-c.h (generate_c_for_variable_locations):
848 Change reference to pointer.
849 * compile/compile-c-support.c (compile_program) <compute>:
850 Likewise.
851 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
852 (generate_c_for_for_one_variable): Likewise
853 (generate_c_for_variable_locations): Likewise
854 * compile/compile-c-types.c (compile_c_instance::convert_type):
855 Likewise
856 * compile/compile-cplus-symbols.c (convert_one_symbol):
857 std::move the scope passed to enter_scope.
858 * compile/compile-cplus-types.c
859 (compile_cplus_instance::enter_scope): Make parameter
860 rvalue-reference.
861 (compile_cplus_instance::new_scope): Change reference to
862 pointer.
863 (compile_cplus_instance::convert_type): Likewise
864 (compile_cplus_convert_typedef): std::move the scope passed to
865 enter_scope.
866 (compile_cplus_convert_struct_or_union): Likewise.
867 (compile_cplus_convert_enum): Likewise.
868 (compile_cplus_convert_namespace): Likewise.
869 * compile/compile-cplus.h (compile_cplus_instance)
870 <enter_scope>: Make parameter rvalue-reference.
871 * compile/compile-internal.h (compile_instance)
872 <get_cached_type>: Likewise
873 * compile/compile-loc2c.c (push): Likewise
874 (pushf): Likewise
875 (unary): Likewise
876 (binary): Likewise
877 (print_label): Likewise
878 (pushf_register_address): Likewise
879 (pushf_register): Likewise
880 (do_compile_dwarf_expr_to_c): Likewise
881 (compile_dwarf_expr_to_c): Likewise
882 (compile_dwarf_bounds_to_c): Likewise
883 * compile/compile.c (compile_instance::get_cached_type):
884 Likewise
885 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
886 (compile_dwarf_bounds_to_c): Likewise
887 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
888 (dwarf2_compile_property_to_c): Likewise
889 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
890 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
891 Likewise
892
893 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
894
895 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
896 * tui/tui-data.c (init_content_element): Don't initialize it.
897
898 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
899
900 * tui/tui-data.h (struct tui_win_info)
901 <detail::opaque>: Remove.
902 * tui/tui-data.c (init_win_info): Remove assignment.
903
904 2018-09-05 Tom Tromey <tom@tromey.com>
905
906 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
907 -Wformat-nonliteral.
908 * target-float.c (host_float_ops<T>::to_string)
909 (host_float_ops<T>::from_string): Use
910 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
911 * configure: Rebuild.
912
913 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
914
915 * printcmd.c (printf_c_string): Use
916 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
917 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
918
919 2018-09-05 Tom Tromey <tom@tromey.com>
920
921 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
922
923 2018-09-05 Tom de Vries <tdevries@suse.de>
924
925 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
926 with resolve_abstract_p == true.
927 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
928 defaulting to false. Propagate resolve_abstract_p to
929 dwarf2_fetch_die_loc_sect_off.
930 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
931 parameter, defaulting to false.
932 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
933 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
934 parameter.
935 * dwarf2read.h (struct die_info): Forward-declare.
936 (die_info_ptr): New typedef.
937 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
938
939 2018-09-05 Joel Brobecker <brobecker@adacore.com>
940
941 GDB 8.2 released.
942
943 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
944 Pedro Alves <palves@redhat.com>
945
946 * gnulib/Makefile.in (aclocal_m4_deps): Move to
947 "aclocal-m4-deps.mk". Include file here.
948 $(srcdir)/aclocal.m4: Add "configure.ac".
949 * gnulib/aclocal-m4-deps.mk: New file.
950 * gnulib/update-gnulib.sh: Automatically update
951 "aclocal-m4-deps.mk".
952
953 2018-09-04 Tom Tromey <tom@tromey.com>
954
955 * configure: Rebuild.
956 * configure.ac: Remove multi-ice code.
957
958 2018-09-04 Tom Tromey <tom@tromey.com>
959
960 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
961 (ada-exp.o): Update.
962
963 2018-09-04 Tom Tromey <tom@tromey.com>
964
965 * Makefile.in (printcmd.o, target-float.o): Remove.
966 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
967
968 2018-09-04 Tom Tromey <tom@tromey.com>
969
970 * gnulib/Makefile.in: Remove obsolete comment.
971 * Makefile.in: Remove obsolete comment.
972
973 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
974
975 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
976 line with '+'.
977
978 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
979
980 * riscv-tdep.c: Add 'prologue-value.h' include.
981 (struct riscv_unwind_cache): New struct.
982 (riscv_debug_unwinder): New global.
983 (riscv_scan_prologue): Update arguments, capture register details
984 from prologue scan.
985 (riscv_skip_prologue): Reformat arguments line, move end of
986 prologue calculation into riscv_scan_prologue.
987 (riscv_frame_cache): Update return type, create
988 riscv_unwind_cache, scan the prologue, and fill in remaining cache
989 details.
990 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
991 (riscv_frame_prev_register): Use the trad_frame within the
992 riscv_unwind_cache.
993 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
994 flag.
995
996 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
997
998 * trad-frame.h (trad_frame_set_realreg): Declare.
999 (trad_frame_set_addr): Declare.
1000 * trad-frame.c (trad_frame_set_realreg): Define new function.
1001 (trad_frame_set_addr): Define new function.
1002 (trad_frame_set_reg_realreg): Use new function.
1003 (trad_frame_set_reg_addr): Use new function.
1004
1005 2018-09-01 Keith Seitz <keiths@redhat.com>
1006
1007 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1008 pulongest instead of "%lld".
1009 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1010 ATTRIBUTE_UNUSED.
1011
1012 2018-08-31 Tom Tromey <tom@tromey.com>
1013
1014 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1015 variant part type.
1016
1017 2018-08-31 Pedro Alves <palves@redhat.com>
1018
1019 * gdbarch.h: Regenerate.
1020
1021 2018-08-31 Pedro Alves <palves@redhat.com>
1022
1023 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1024 * target.h (Hardware watchpoint interfaces): Describe
1025 continuable/steppable/non-steppable watchpoints.
1026 * gdbarch.h, gdbarch.c: Regenerate.
1027
1028 2018-08-31 Pedro Alves <palves@redhat.com>
1029
1030 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1031 Delete.
1032 * s390-linux-nat.c
1033 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1034 * target.h (target_ops::have_continuable_watchpoint): Delete.
1035 (target_have_continuable_watchpoint): Delete.
1036 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1037 * target-delegates.c: Regenerate.
1038
1039 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1040
1041 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1042 the files present in "gnulib/import/m4/".
1043
1044 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1045
1046 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1047 c.sw, c.swsp, and c.sdsp.
1048
1049 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1050
1051 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1052 (riscv_read_misa_reg): Don't cache value read into inferior data.
1053 (riscv_new_inferior_data): Delete.
1054 (riscv_inferior_data_cleanup): Delete.
1055 (riscv_inferior_data): Delete.
1056 (riscv_invalidate_inferior_data): Delete.
1057 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1058
1059 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1060
1061 * compile/compile-cplus-types.c
1062 (compile_cplus_instance::leave_scope): Take the address of scope
1063 object.
1064 (compile_cplus_instance::convert_qualified_base): Compare quals
1065 to 0.
1066
1067 2018-08-30 Keith Seitz <keiths@redhat.com>
1068
1069 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1070 Use "%s" and host_address_to_string instead of "%p" in printf.
1071
1072 2018-08-29 Keith Seitz <keiths@redhat.com>
1073
1074 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1075 and compile-cplus-types.c.
1076 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1077 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1078 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1079 Declare.
1080 * compile/compile-c-support.c: Include compile-cplus.h.
1081 (load_libcompile): Templatize.
1082 (get_compile_context): "New" function.
1083 (c_get_compile_context): Use get_compile_context.
1084 (cplus_get_compile_context): New function.
1085 (cplus_push_user_expression, cplus_pop_user_expression)
1086 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1087 (cplus_compute_program): Define new structs/functions.
1088 * compile/compile-cplus-symmbols.c: New file.
1089 * compile/compile-cplus-types.c: New file.
1090 * compile/compile-cplus.h: New file.
1091 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1092 Declare.
1093 * compile/compile-object-load.c (get_out_value_type): Use
1094 strncmp_iw when comparing symbol names.
1095 (compile_object_load): Add mst_bss and mst_data.
1096 * compile/compile.c (_initialize_compile): Remove
1097 -Wno-implicit-function-declaration from `compile_args'.
1098 * compile/gcc-cp-plugin.h: New file.
1099 * NEWS: Mention C++ compile support and new debug options.
1100
1101 2018-08-29 Keith Seitz <keiths@redhat.com>
1102
1103 * linespec.c (collect_info::add_symbol): Make virtual.
1104 (struct symbol_searcher_collect_info): New struct.
1105 (symbol_searcher::find_all_symbols): New method.
1106 * symtab.h (class symbol_searcher): New class.
1107
1108 2018-08-29 Keith Seitz <keiths@redhat.com>
1109
1110 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1111 Change to vector of block_symbol. Update all users.
1112 (struct collect_info) <symbols>: Likewise.
1113 (collect_info::add_symbol): Take block_symbol as argument.
1114 Update all callers.
1115 (decode_compound_collector) <m_symbols>: Change type to vector
1116 of block_symbol. Update all users.
1117 (decode_compound_collector::operator ()): Change parameter type
1118 to block_symbol.
1119 (find_method, find_function_symbols, find_linespec_symbols)
1120 (find_label_symbols_in_block, find_label_symbols): Change symbol
1121 vectors to block_symbol vectors.
1122 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1123 block_symbol.
1124
1125 2018-08-29 Keith Seitz <keiths@redhat.com>
1126
1127 * linespec.c (symbolp): Remove typedef and VEC definitions.
1128 (bound_minimal_symbol_d): Likewise.
1129
1130 2018-08-29 Keith Seitz <keiths@redhat.com>
1131
1132 * linespec.c (decode_compound_collector::decode_compound_collector):
1133 Remove initialization for `m_symtabs'.
1134 (decode_compound_collector::release_symbols): Change return type
1135 to std::vector. Update all callers.
1136 (class decode_compound_collector) <m_symbols>: Change type to
1137 std::vector.
1138 (lookup_prefix_sym): Change return type to std::vector. Update all
1139 callers.
1140 (compare_symbols): Remove.
1141 (std_compare_symbols): Rename to `compare_symbols'.
1142 (find_method): Change `sym_classes' parameter to std::vector.
1143 Update all callers. Use std::sort to sort sym_classes.
1144 (find_linespec_symbols): Remove cleanup.
1145
1146 2018-08-29 Keith Seitz <keiths@redhat.com>
1147
1148 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1149 std::vector. Update all users.
1150 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1151 (struct collect_info) <minimal_symbols>: Likewise.
1152 (compare_msymbols): Return bool. Change parameters to const
1153 bound_minimal_symbol references.
1154 (find_method, find_function_symbols, find_linespec_symbols): Change
1155 `minsyms' parameter to std::vector. Update all callers.
1156
1157 2018-08-29 Keith Seitz <keiths@redhat.com>
1158
1159 * linespec.c (struct linespec) <label_symbols>: Change type to
1160 std::vector. Update all users.
1161 (find_label_symbols_in_block): Change `result' parameter to
1162 std::vector. Update all callers.
1163 (find_label_symbols): Return std::vector. Update all callers.
1164
1165 2018-08-29 Keith Seitz <keiths@redhat.com>
1166
1167 * linespec.c (struct linespec) <function_symbols>: Change type to
1168 std::vector. Update all users.
1169 (struct collect_info) <function_symbols>: Likewise.
1170 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1171 (std_compare_symbols): New function.
1172 (find_method, find_function_symbols, find_linespec_symbols)
1173 (find_label_symbols_in_block): Change `symbols' parameter to
1174 std::vector. Update all callers.
1175 (find_label_symbols): Likewise for `function_symbols' and
1176 `label_funcs_ret'.
1177
1178 2018-08-29 Keith Seitz <keiths@redhat.com>
1179
1180 * linespec.c (symtab_vector_up): Define.
1181 (struct linespec) <file_symtabs>: Change type to std::vector *.
1182 Update all uses.
1183 (struct collect_info) <file_symtabs>: Likewise.
1184 (collect_symtabs_from_filename): Return symtab_vector_up.
1185 Update all callers.
1186 (decode_objc): Remove cleanup.
1187 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1188 (symtab_collector::release_symtabs): Return symtab_vector_up.
1189 Update all callers.
1190 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1191 Update all users.
1192 (collect_symtabs_from_filename, symtabs_from_filename): Return
1193 symtab_vector_up. Update all callers.
1194
1195 2018-08-29 Tom Tromey <tom@tromey.com>
1196
1197 * csky-tdep.c (csky_analyze_prologue): Use
1198 core_addr_to_string_nz.
1199
1200 2018-08-29 Tom Tromey <tom@tromey.com>
1201
1202 * windows-nat.c (struct xlate_exception) <them>: Change type to
1203 DWORD.
1204 (xlate): Fix formatting. Remove last entry.
1205 (struct xlate_exception, xlate): Comment out.
1206 (windows_nat_target::resume): Use ranged for.
1207
1208 2018-08-29 Jim Wilson <jimw@sifive.com>
1209
1210 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1211 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1212 of NT_PRFPREG.
1213 (riscv_linux_nat_target::store_registers): Likewise.
1214
1215 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1216
1217 PR gdb/23555
1218 PR gdb/23558
1219 * gnulib/aclocal.m4: Regenerate.
1220 * gnulib/config.in: Regenerate.
1221 * gnulib/configure: Regenerate.
1222 * gnulib/import/Makefile.am: Update.
1223 * gnulib/import/Makefile.in: Update.
1224 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1225 * gnulib/import/_Noreturn.h: ... this.
1226 * gnulib/import/alloca.in.h: Update.
1227 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1228 * gnulib/import/arg-nonnull.h: ... this.
1229 * gnulib/import/assure.h: Update.
1230 * gnulib/import/at-func.c: Update.
1231 * gnulib/import/basename-lgpl.c: Update.
1232 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1233 * gnulib/import/c++defs.h: ... this.
1234 * gnulib/import/canonicalize-lgpl.c: Update.
1235 * gnulib/import/cdefs.h: Update.
1236 * gnulib/import/chdir-long.c: Update.
1237 * gnulib/import/chdir-long.h: Update.
1238 * gnulib/import/cloexec.c: Update.
1239 * gnulib/import/cloexec.h: Update.
1240 * gnulib/import/close.c: Update.
1241 * gnulib/import/closedir.c: Update.
1242 * gnulib/import/config.charset: Update.
1243 * gnulib/import/dirent-private.h: Update.
1244 * gnulib/import/dirent.in.h: Update.
1245 * gnulib/import/dirfd.c: Update.
1246 * gnulib/import/dirname-lgpl.c: Update.
1247 * gnulib/import/dirname.h: Update.
1248 * gnulib/import/dosname.h: Update.
1249 * gnulib/import/dup-safer-flag.c: Update.
1250 * gnulib/import/dup-safer.c: Update.
1251 * gnulib/import/dup.c: Update.
1252 * gnulib/import/dup2.c: Update.
1253 * gnulib/import/errno.in.h: Update.
1254 * gnulib/import/error.c: Update.
1255 * gnulib/import/error.h: Update.
1256 * gnulib/import/exitfail.c: Update.
1257 * gnulib/import/exitfail.h: Update.
1258 * gnulib/import/extra/update-copyright: Update.
1259 * gnulib/import/fchdir.c: Update.
1260 * gnulib/import/fcntl.c: Update.
1261 * gnulib/import/fcntl.in.h: Update.
1262 * gnulib/import/fd-hook.c: Update.
1263 * gnulib/import/fd-hook.h: Update.
1264 * gnulib/import/fd-safer-flag.c: Update.
1265 * gnulib/import/fd-safer.c: Update.
1266 * gnulib/import/fdopendir.c: Update.
1267 * gnulib/import/filename.h: Update.
1268 * gnulib/import/filenamecat-lgpl.c: Update.
1269 * gnulib/import/filenamecat.h: Update.
1270 * gnulib/import/flexmember.h: Update.
1271 * gnulib/import/float+.h: Update.
1272 * gnulib/import/float.c: Update.
1273 * gnulib/import/float.in.h: Update.
1274 * gnulib/import/fnmatch.c: Update.
1275 * gnulib/import/fnmatch.in.h: Update.
1276 * gnulib/import/fnmatch_loop.c: Update.
1277 * gnulib/import/fpucw.h: Update.
1278 * gnulib/import/frexp.c: Update.
1279 * gnulib/import/frexpl.c: Update.
1280 * gnulib/import/fstat.c: Update.
1281 * gnulib/import/fstatat.c: Update.
1282 * gnulib/import/getcwd-lgpl.c: Update.
1283 * gnulib/import/getcwd.c: Update.
1284 * gnulib/import/getdtablesize.c: Update.
1285 * gnulib/import/getlogin_r.c: Update.
1286 * gnulib/import/getprogname.c: Update.
1287 * gnulib/import/getprogname.h: Update.
1288 * gnulib/import/gettext.h: Update.
1289 * gnulib/import/gettimeofday.c: Update.
1290 * gnulib/import/glob-libc.h: Update.
1291 * gnulib/import/glob.c: Update.
1292 * gnulib/import/glob.in.h: Update.
1293 * gnulib/import/glob_internal.h: Update.
1294 * gnulib/import/glob_pattern_p.c: Update.
1295 * gnulib/import/globfree.c: Update.
1296 * gnulib/import/hard-locale.c: Update.
1297 * gnulib/import/hard-locale.h: Update.
1298 * gnulib/import/intprops.h: Update.
1299 * gnulib/import/inttypes.in.h: Update.
1300 * gnulib/import/isnan.c: Update.
1301 * gnulib/import/isnand-nolibm.h: Update.
1302 * gnulib/import/isnand.c: Update.
1303 * gnulib/import/isnanl-nolibm.h: Update.
1304 * gnulib/import/isnanl.c: Update.
1305 * gnulib/import/itold.c: Update.
1306 * gnulib/import/libc-config.h: Update.
1307 * gnulib/import/limits.in.h: Update.
1308 * gnulib/import/localcharset.c: Update.
1309 * gnulib/import/localcharset.h: Update.
1310 * gnulib/import/localtime-buffer.c: Update.
1311 * gnulib/import/localtime-buffer.h: Update.
1312 * gnulib/import/lstat.c: Update.
1313 * gnulib/import/m4/00gnulib.m4: Update.
1314 * gnulib/import/m4/__inline.m4: Update.
1315 * gnulib/import/m4/absolute-header.m4: Update.
1316 * gnulib/import/m4/alloca.m4: Update.
1317 * gnulib/import/m4/builtin-expect.m4: Update.
1318 * gnulib/import/m4/canonicalize.m4: Update.
1319 * gnulib/import/m4/chdir-long.m4: Update.
1320 * gnulib/import/m4/close.m4: Update.
1321 * gnulib/import/m4/closedir.m4: Update.
1322 * gnulib/import/m4/configmake.m4: Update.
1323 * gnulib/import/m4/d-ino.m4: Update.
1324 * gnulib/import/m4/d-type.m4: Update.
1325 * gnulib/import/m4/dirent_h.m4: Update.
1326 * gnulib/import/m4/dirfd.m4: Update.
1327 * gnulib/import/m4/dirname.m4: Update.
1328 * gnulib/import/m4/double-slash-root.m4: Update.
1329 * gnulib/import/m4/dup.m4: Update.
1330 * gnulib/import/m4/dup2.m4: Update.
1331 * gnulib/import/m4/eealloc.m4: Update.
1332 * gnulib/import/m4/environ.m4: Update.
1333 * gnulib/import/m4/errno_h.m4: Update.
1334 * gnulib/import/m4/error.m4: Update.
1335 * gnulib/import/m4/exponentd.m4: Update.
1336 * gnulib/import/m4/exponentl.m4: Update.
1337 * gnulib/import/m4/extensions.m4: Update.
1338 * gnulib/import/m4/extern-inline.m4: Update.
1339 * gnulib/import/m4/fchdir.m4: Update.
1340 * gnulib/import/m4/fcntl-o.m4: Update.
1341 * gnulib/import/m4/fcntl.m4: Update.
1342 * gnulib/import/m4/fcntl_h.m4: Update.
1343 * gnulib/import/m4/fdopendir.m4: Update.
1344 * gnulib/import/m4/filenamecat.m4: Update.
1345 * gnulib/import/m4/flexmember.m4: Update.
1346 * gnulib/import/m4/float_h.m4: Update.
1347 * gnulib/import/m4/fnmatch.m4: Update.
1348 * gnulib/import/m4/fnmatch_h.m4: Update.
1349 * gnulib/import/m4/fpieee.m4: Update.
1350 * gnulib/import/m4/frexp.m4: Update.
1351 * gnulib/import/m4/frexpl.m4: Update.
1352 * gnulib/import/m4/fstat.m4: Update.
1353 * gnulib/import/m4/fstatat.m4: Update.
1354 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1355 * gnulib/import/m4/getcwd-path-max.m4: Update.
1356 * gnulib/import/m4/getcwd.m4: Update.
1357 * gnulib/import/m4/getdtablesize.m4: Update.
1358 * gnulib/import/m4/getlogin.m4: Update.
1359 * gnulib/import/m4/getlogin_r.m4: Update.
1360 * gnulib/import/m4/getpagesize.m4: Update.
1361 * gnulib/import/m4/getprogname.m4: Update.
1362 * gnulib/import/m4/gettimeofday.m4: Update.
1363 * gnulib/import/m4/glibc21.m4: Update.
1364 * gnulib/import/m4/glob.m4: Update.
1365 * gnulib/import/m4/glob_h.m4: Update.
1366 * gnulib/import/m4/gnulib-cache.m4: Update.
1367 * gnulib/import/m4/gnulib-common.m4: Update.
1368 * gnulib/import/m4/gnulib-comp.m4: Update.
1369 * gnulib/import/m4/gnulib-tool.m4: Update.
1370 * gnulib/import/m4/hard-locale.m4: Update.
1371 * gnulib/import/m4/include_next.m4: Update.
1372 * gnulib/import/m4/inttypes-pri.m4: Update.
1373 * gnulib/import/m4/inttypes.m4: Update.
1374 * gnulib/import/m4/isnand.m4: Update.
1375 * gnulib/import/m4/isnanl.m4: Update.
1376 * gnulib/import/m4/largefile.m4: Update.
1377 * gnulib/import/m4/limits-h.m4: Update.
1378 * gnulib/import/m4/localcharset.m4: Update.
1379 * gnulib/import/m4/locale-fr.m4: Update.
1380 * gnulib/import/m4/locale-ja.m4: Update.
1381 * gnulib/import/m4/locale-zh.m4: Update.
1382 * gnulib/import/m4/localtime-buffer.m4: Update.
1383 * gnulib/import/m4/longlong.m4: Update.
1384 * gnulib/import/m4/lstat.m4: Update.
1385 * gnulib/import/m4/malloc.m4: Update.
1386 * gnulib/import/m4/malloca.m4: Update.
1387 * gnulib/import/m4/math_h.m4: Update.
1388 * gnulib/import/m4/mbrtowc.m4: Update.
1389 * gnulib/import/m4/mbsinit.m4: Update.
1390 * gnulib/import/m4/mbsrtowcs.m4: Update.
1391 * gnulib/import/m4/mbstate_t.m4: Update.
1392 * gnulib/import/m4/memchr.m4: Update.
1393 * gnulib/import/m4/memmem.m4: Update.
1394 * gnulib/import/m4/mempcpy.m4: Update.
1395 * gnulib/import/m4/memrchr.m4: Update.
1396 * gnulib/import/m4/mkdir.m4: Update.
1397 * gnulib/import/m4/mkstemp.m4: Update.
1398 * gnulib/import/m4/mmap-anon.m4: Update.
1399 * gnulib/import/m4/mode_t.m4: Update.
1400 * gnulib/import/m4/msvc-inval.m4: Update.
1401 * gnulib/import/m4/msvc-nothrow.m4: Update.
1402 * gnulib/import/m4/multiarch.m4: Update.
1403 * gnulib/import/m4/nocrash.m4: Update.
1404 * gnulib/import/m4/off_t.m4: Update.
1405 * gnulib/import/m4/onceonly.m4: Update.
1406 * gnulib/import/m4/open-cloexec.m4: Update.
1407 * gnulib/import/m4/open.m4: Update.
1408 * gnulib/import/m4/openat.m4: Update.
1409 * gnulib/import/m4/opendir.m4: Update.
1410 * gnulib/import/m4/pathmax.m4: Update.
1411 * gnulib/import/m4/rawmemchr.m4: Update.
1412 * gnulib/import/m4/readdir.m4: Update.
1413 * gnulib/import/m4/readlink.m4: Update.
1414 * gnulib/import/m4/realloc.m4: Update.
1415 * gnulib/import/m4/rename.m4: Update.
1416 * gnulib/import/m4/rewinddir.m4: Update.
1417 * gnulib/import/m4/rmdir.m4: Update.
1418 * gnulib/import/m4/save-cwd.m4: Update.
1419 * gnulib/import/m4/secure_getenv.m4: Update.
1420 * gnulib/import/m4/setenv.m4: Update.
1421 * gnulib/import/m4/signal_h.m4: Update.
1422 * gnulib/import/m4/ssize_t.m4: Update.
1423 * gnulib/import/m4/stat-time.m4: Update.
1424 * gnulib/import/m4/stat.m4: Update.
1425 * gnulib/import/m4/std-gnu11.m4: Update.
1426 * gnulib/import/m4/stdbool.m4: Update.
1427 * gnulib/import/m4/stddef_h.m4: Update.
1428 * gnulib/import/m4/stdint.m4: Update.
1429 * gnulib/import/m4/stdio_h.m4: Update.
1430 * gnulib/import/m4/stdlib_h.m4: Update.
1431 * gnulib/import/m4/strchrnul.m4: Update.
1432 * gnulib/import/m4/strdup.m4: Update.
1433 * gnulib/import/m4/strerror.m4: Update.
1434 * gnulib/import/m4/string_h.m4: Update.
1435 * gnulib/import/m4/strstr.m4: Update.
1436 * gnulib/import/m4/strtok_r.m4: Update.
1437 * gnulib/import/m4/sys_socket_h.m4: Update.
1438 * gnulib/import/m4/sys_stat_h.m4: Update.
1439 * gnulib/import/m4/sys_time_h.m4: Update.
1440 * gnulib/import/m4/sys_types_h.m4: Update.
1441 * gnulib/import/m4/tempname.m4: Update.
1442 * gnulib/import/m4/time_h.m4: Update.
1443 * gnulib/import/m4/unistd-safer.m4: Update.
1444 * gnulib/import/m4/unistd_h.m4: Update.
1445 * gnulib/import/m4/warn-on-use.m4: Update.
1446 * gnulib/import/m4/wchar_h.m4: Update.
1447 * gnulib/import/m4/wchar_t.m4: Update.
1448 * gnulib/import/m4/wctype_h.m4: Update.
1449 * gnulib/import/m4/wint_t.m4: Update.
1450 * gnulib/import/malloc.c: Update.
1451 * gnulib/import/malloc/scratch_buffer.h: Update.
1452 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1453 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1454 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1455 * gnulib/import/malloca.c: Update.
1456 * gnulib/import/malloca.h: Update.
1457 * gnulib/import/malloca.valgrind: Update.
1458 * gnulib/import/math.in.h: Update.
1459 * gnulib/import/mbrtowc.c: Update.
1460 * gnulib/import/mbsinit.c: Update.
1461 * gnulib/import/mbsrtowcs-impl.h: Update.
1462 * gnulib/import/mbsrtowcs-state.c: Update.
1463 * gnulib/import/mbsrtowcs.c: Update.
1464 * gnulib/import/memchr.c: Update.
1465 * gnulib/import/memmem.c: Update.
1466 * gnulib/import/mempcpy.c: Update.
1467 * gnulib/import/memrchr.c: Update.
1468 * gnulib/import/mkdir.c: Update.
1469 * gnulib/import/mkstemp.c: Update.
1470 * gnulib/import/msvc-inval.c: Update.
1471 * gnulib/import/msvc-inval.h: Update.
1472 * gnulib/import/msvc-nothrow.c: Update.
1473 * gnulib/import/msvc-nothrow.h: Update.
1474 * gnulib/import/open.c: Update.
1475 * gnulib/import/openat-die.c: Update.
1476 * gnulib/import/openat-priv.h: Update.
1477 * gnulib/import/openat-proc.c: Update.
1478 * gnulib/import/openat.c: Update.
1479 * gnulib/import/openat.h: Update.
1480 * gnulib/import/opendir.c: Update.
1481 * gnulib/import/pathmax.h: Update.
1482 * gnulib/import/pipe-safer.c: Update.
1483 * gnulib/import/rawmemchr.c: Update.
1484 * gnulib/import/readdir.c: Update.
1485 * gnulib/import/readlink.c: Update.
1486 * gnulib/import/realloc.c: Update.
1487 * gnulib/import/ref-add.sin: Update.
1488 * gnulib/import/ref-del.sin: Update.
1489 * gnulib/import/rename.c: Update.
1490 * gnulib/import/rewinddir.c: Update.
1491 * gnulib/import/rmdir.c: Update.
1492 * gnulib/import/same-inode.h: Update.
1493 * gnulib/import/save-cwd.c: Update.
1494 * gnulib/import/save-cwd.h: Update.
1495 * gnulib/import/scratch_buffer.h: Update.
1496 * gnulib/import/secure_getenv.c: Update.
1497 * gnulib/import/setenv.c: Update.
1498 * gnulib/import/signal.in.h: Update.
1499 * gnulib/import/stat-time.c: Update.
1500 * gnulib/import/stat-time.h: Update.
1501 * gnulib/import/stat-w32.c: Update.
1502 * gnulib/import/stat-w32.h: Update.
1503 * gnulib/import/stat.c: Update.
1504 * gnulib/import/stdbool.in.h: Update.
1505 * gnulib/import/stddef.in.h: Update.
1506 * gnulib/import/stdint.in.h: Update.
1507 * gnulib/import/stdio.in.h: Update.
1508 * gnulib/import/stdlib.in.h: Update.
1509 * gnulib/import/str-two-way.h: Update.
1510 * gnulib/import/strchrnul.c: Update.
1511 * gnulib/import/strdup.c: Update.
1512 * gnulib/import/streq.h: Update.
1513 * gnulib/import/strerror-override.c: Update.
1514 * gnulib/import/strerror-override.h: Update.
1515 * gnulib/import/strerror.c: Update.
1516 * gnulib/import/string.in.h: Update.
1517 * gnulib/import/stripslash.c: Update.
1518 * gnulib/import/strnlen1.c: Update.
1519 * gnulib/import/strnlen1.h: Update.
1520 * gnulib/import/strstr.c: Update.
1521 * gnulib/import/strtok_r.c: Update.
1522 * gnulib/import/sys_stat.in.h: Update.
1523 * gnulib/import/sys_time.in.h: Update.
1524 * gnulib/import/sys_types.in.h: Update.
1525 * gnulib/import/tempname.c: Update.
1526 * gnulib/import/tempname.h: Update.
1527 * gnulib/import/time.in.h: Update.
1528 * gnulib/import/unistd--.h: Update.
1529 * gnulib/import/unistd-safer.h: Update.
1530 * gnulib/import/unistd.in.h: Update.
1531 * gnulib/import/unsetenv.c: Update.
1532 * gnulib/import/verify.h: Update.
1533 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1534 * gnulib/import/wchar.in.h: Update.
1535 * gnulib/import/wctype.in.h: Update.
1536 * gnulib/import/xalloc-oversized.h: Update.
1537 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1538 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1539
1540 2018-08-16 Gary Benson <gbenson@redhat.com>
1541
1542 PR gdb/13000:
1543 * gdb/main.c (captured_main_1): Exit with nonzero status
1544 in batch mode if the last command to be executed failed.
1545 * NEWS: Mention the above.
1546
1547 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1548
1549 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1550 end of warning message.
1551
1552 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1553
1554 PR gdb/22943:
1555 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1556 (aarch64_extract_return_value): Use
1557 aapcs_is_vfp_call_or_return_candidate.
1558 (aarch64_return_in_memory): Likewise.
1559 (aarch64_store_return_value): Likewise.
1560
1561 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1562
1563 * aarch64-tdep.c
1564 (aapcs_is_vfp_call_or_return_candidate): Make static
1565 (pass_in_v_or_stack): Remove function.
1566 (pass_in_v_vfp_candidate): New function.
1567 (aarch64_push_dummy_call): Check for float register candidates.
1568
1569 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1570
1571 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1572 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1573 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1574
1575 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1576
1577 PR build/23399
1578 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1579 (struct ipa_sym_addresses): Rename to...
1580 (struct ipa_sym_addresses_common): ... this.
1581 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1582
1583 2018-08-28 Tom Tromey <tom@tromey.com>
1584
1585 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1586 (token_fifo): Now a std::vector.
1587 (yylex, c_parse): Update.
1588 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1589 (token_fifo): Now a std::vector.
1590 (yylex, d_parse): Update.
1591 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1592 (token_fifo): Now a std::vector.
1593 (yylex, go_parse): Update.
1594
1595 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
1596
1597 * parser-defs.h (struct type_stack) <elements>: Change type to
1598 std::vector<union type_stack_elt>.
1599 <depth, size>: Remove.
1600 * parse.c (parse_exp_in_context_1): Adjust.
1601 (type_stack_reserve): Remove.
1602 (check_type_stack_depth): Remove.
1603 (insert_into_type_stack): Adjust to std::vector.
1604 (insert_type): Likewise.
1605 (push_type): Likewise.
1606 (push_type_int): Likewise.
1607 (insert_type_address_space): Likewise.
1608 (pop_type): Likewise.
1609 (pop_type_int): Likewise.
1610 (pop_typelist): Likewise.
1611 (pop_type_stack): Likewise.
1612 (append_type_stack): Likewise.
1613 (push_type_stack): Likewise.
1614 (get_type_stack): Likewise.
1615 (type_stack_cleanup): Likewise.
1616 (push_typelist): Likewise.
1617 (follow_types): Likewise.
1618 (_initialize_parse): Likewise.
1619
1620 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
1621
1622 * NEWS: Mention csky target.
1623
1624 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
1625 Hafiz Abid Qadeer <abidh@codesourcery.com>
1626 Don Breazeal <donb@codesourcery.com>
1627
1628 * csky-linux-tdep.c: New file.
1629 * csky-tdep.c: Likewise.
1630 * csky-tdep.h: Likewise.
1631 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1632 csky-tdep.o.
1633 (HFILES_NO_SRCDIR): Add csky-tdep.h.
1634 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1635 * configure.tgt: Add csky support.
1636
1637 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
1638
1639 * python/py-framefilter.c (py_print_frame): Print frame architecture
1640 when printing on an MI output.
1641
1642 2018-08-27 Tom Tromey <tom@tromey.com>
1643
1644 PR build/23087:
1645 * configure: Rebuild.
1646 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1647
1648 2018-08-27 Tom Tromey <tom@tromey.com>
1649
1650 * aarch64-linux-tdep.c
1651 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1652 casts to int.
1653
1654 2018-08-27 Tom Tromey <tom@tromey.com>
1655
1656 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1657 unsigned.
1658 (ppc64_standard_linkage1, ppc64_standard_linkage2)
1659 (ppc64_standard_linkage3, ppc64_standard_linkage4)
1660 (ppc64_standard_linkage5, ppc64_standard_linkage6)
1661 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1662 unsigned.
1663
1664 2018-08-27 Tom Tromey <tom@tromey.com>
1665
1666 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1667 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1668
1669 2018-08-27 Tom Tromey <tom@tromey.com>
1670
1671 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1672 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1673 ULONGEST_MAX.
1674 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1675 ULONGEST_MAX.
1676 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1677 ULONGEST_MAX.
1678 * sparc-linux-tdep.c (sparc32_linux_sigframe)
1679 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1680 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1681 ULONGEST_MAX.
1682 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1683 (ppc64_linux_sigaction_tramp_frame)
1684 (ppc32_linux_sighandler_tramp_frame)
1685 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1686 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1687 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1688 * mn10300-linux-tdep.c (am33_linux_sigframe)
1689 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1690 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1691 * mips-linux-tdep.c (mips_linux_o32_sigframe)
1692 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1693 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1694 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1695 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1696 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1697 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1698 * microblaze-linux-tdep.c
1699 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1700 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1701 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1702 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1703 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1704 * common/common-types.h (ULONGEST_MAX): New define.
1705 (CORE_ADDR_MAX): Fix formatting.
1706 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1707 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1708 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1709 (arm_linux_rt_sigreturn_tramp_frame)
1710 (arm_eabi_linux_sigreturn_tramp_frame)
1711 (arm_eabi_linux_rt_sigreturn_tramp_frame)
1712 (thumb2_eabi_linux_sigreturn_tramp_frame)
1713 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1714 (arm_linux_restart_syscall_tramp_frame)
1715 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1716 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1717 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1718 ULONGEST_MAX.
1719 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1720
1721 2018-08-27 Tom Tromey <tom@tromey.com>
1722
1723 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1724 CORE_ADDR_MAX.
1725 * mips-tdep.c (mips_deal_with_atomic_sequence)
1726 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1727 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1728 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1729 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1730 CORE_ADDR_MAX.
1731 * aarch64-tdep.c (aarch64_software_single_step): Use
1732 CORE_ADDR_MAX.
1733
1734 2018-08-27 Tom Tromey <tom@tromey.com>
1735
1736 * linespec.c (complete_linespec_component): Add cast to "char".
1737 * completer.c (completion_tracker::build_completion_result): Add
1738 cast to "char".
1739
1740 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1741
1742 * solist.h (struct solist, struct target_so_ops): Fix
1743 indentation.
1744
1745 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1746
1747 * ada-tasks.c (ada_task_info_s): Remove typedef.
1748 (DEF_VEC_O(ada_task_info_s)): Remove.
1749 (struct ada_tasks_inferior_data): Initialize fields.
1750 <task_list>: Make an std::vector.
1751 (get_ada_tasks_inferior_data): Allocate with new.
1752 (ada_get_task_number): Adjust.
1753 (get_task_number_from_id): Likewise.
1754 (valid_task_id): Likewise.
1755 (ada_get_task_info_from_ptid): Likewise.
1756 (iterate_over_live_ada_tasks): Likewise.
1757 (add_ada_task): Likewise.
1758 (read_known_tasks): Likewise.
1759 (ada_build_task_list): Likewise.
1760 (print_ada_task_info): Likewise.
1761 (info_task): Likewise.
1762 (task_command_1): Likewise.
1763
1764 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1765
1766 * ada-lang.c (add_angle_brackets): Return std::string.
1767
1768 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1769
1770 * python/py-threadevent.c (py_get_event_thread): Initialize
1771 pythread.
1772
1773 2018-08-24 Pedro Alves <palves@redhat.com>
1774
1775 * python/py-bpevent.c (create_breakpoint_event_object): Use
1776 copy-initialization.
1777 * python/py-continueevent.c (emit_continue_event): Use
1778 copy-initialization.
1779 * python/py-exitedevent.c (create_exited_event_object): Return a
1780 gdbpy_ref<>.
1781 (emit_exited_event): Use copy-initialization.
1782 * python/py-inferior.c (python_new_inferior)
1783 (python_inferior_deleted, add_thread_object): Use
1784 copy-initialization.
1785 * python/py-infevents.c (create_inferior_call_event_object)
1786 (create_register_changed_event_object)
1787 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1788 (emit_inferior_call_event, emit_memory_changed_event)
1789 (emit_register_changed_event): Use copy-initialization.
1790 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1791 Return a gdbpy_ref<>.
1792 (emit_new_objfile_event): Use copy-initialization.
1793 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1794 (emit_clear_objfiles_event): Use copy-initialization.
1795 * python/py-signalevent.c (create_signal_event_object): Use
1796 copy-initialization.
1797 * python/py-threadevent.c (create_thread_event_object): Use
1798 copy-initialization.
1799
1800 2018-08-24 Pedro Alves <palves@redhat.com>
1801 Simon Marchi <simon.marchi@ericsson.com>
1802
1803 PR gdb/23379
1804 * python/py-continueevent.c: Include "gdbthread.h".
1805 (create_continue_event_object): Add intro comment. Add 'ptid'
1806 parameter. Use it to find thread to pass to
1807 create_thread_event_object.
1808 (emit_continue_event): Pass PTID down to
1809 create_continue_event_object.
1810 * python/py-event.h (py_get_event_thread): Declare.
1811 (create_thread_event_object): Remove default from 'thread'
1812 parameter.
1813 * python/py-stopevent.c (create_stop_event_object): Use
1814 py_get_event_thread.
1815 * python/py-threadevent.c (get_event_thread): Rename to ...
1816 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1817 and use it to find the thread.
1818 (create_thread_event_object): Assert that THREAD isn't null.
1819 Don't find the event thread here.
1820
1821 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1822
1823 * block.h (blockrange, blockranges): New struct declarations.
1824 (struct block): Add new field named `ranges'.
1825 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1826 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1827 macros for accessing ranges in struct block.
1828 (make_blockranges): New declaration.
1829 block.c (make_blockranges): New function.
1830 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1831 for block.
1832 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1833 * blockframe.c (cache_pc_function_block): New static global.
1834 (clear_pc_function_cache): Clear cache_pc_function_block.
1835 (find_pc_partial_function): Move comment to symtab.h. Add
1836 support for non-contiguous blocks.
1837 * cli/cli-cmds.c (block.h): Include.
1838 (print_disassembly): Handle printing of non-contiguous blocks.
1839 (disassemble_current_function): Likewise.
1840 (disassemble_command): Likewise.
1841
1842 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1843 BLOCK_START.
1844 * blockframe.c (get_pc_function_start): Likewise.
1845 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1846 (gcc_symbol_address): Likewise.
1847 * compile/compile-object-run.c (compile_object_run): Likewise.
1848 * compile/compile.c (get_expr_block_and_pc): Likewise.
1849 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1850 (func_addr_to_tail_call_list): Likewise.
1851 * findvar.c (default_read_var_value): Likewise.
1852 * inline-frame.c (inline_frame_this_id): Likewise.
1853 (skip-inline_frames): Likewise.
1854 * infcmd.c (until_next_command): Likewise.
1855 * linespec.c (convert_linespec_to_sals): Likewise.
1856 * parse.c (parse_exp_in_context_1): Likewise.
1857 * printcmd.c (build_address_symbolic): likewise.
1858 (info_address_command): Likewise.
1859 symtab.c (find_function_start_sal): Likewise.
1860 (skip_prologue_sal): Likewise.
1861 (find_function_alias_target): Likewise.
1862 (find_gnu_ifunc): Likewise.
1863 * stack.c (find_frame_funname): Likewise.
1864 * symtab.c (fixup_symbol_section): Likewise.
1865 (find_function_start_sal): Likewise.
1866 (skip_prologue_sal): Likewsie.
1867 (find_function_alias_target): Likewise.
1868 (find_gnu_ifunc): Likewise.
1869 * tracepoint.c (info_scope_command): Likewise.
1870 * value.c (value_fn_field): Likewise.
1871
1872 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1873 in place of find_pc_partial_function.
1874 * blockframe.c (find_function_entry_range_from_pc): New function.
1875 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1876 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1877 for each range in a block.
1878
1879
1880 2018-08-23 Xavier Roirand <roirand@adacore.com>
1881
1882 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1883 incrementation.
1884
1885 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1886
1887 * solib-svr4.c (read_program_headers_from_bfd): Return
1888 gdb::optional<gdb::byte_vector>.
1889 (svr4_exec_displacement): Adjust.
1890
1891 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1892
1893 * solib-svr4.c (read_program_header): Return
1894 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1895 (find_program_interpreter): Return
1896 gdb::optional<gdb::byte_vector>.
1897 (scan_dyntag_auxv): Adjust.
1898 (enable_break): Adjust.
1899 (svr4_exec_displacement): Adjust.
1900
1901 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1902
1903 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1904 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1905
1906 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1907
1908 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1909 string_vprintf.
1910 * guile/scm-utils.c (gdbscm_printf): Likewise.
1911 * serial.c (serial_printf): Likewise.
1912 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1913
1914 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1915
1916 * stack.c (print_frame): Print frame architecture when printing on
1917 an MI output.
1918 * NEWS: Mention new "arch" attribute in frame output.
1919
1920 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1921
1922 * arch/aarch64.h (aarch64_regnum): Update comment.
1923
1924 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1925
1926 * NEWS: Add SVE to 8.2 section.
1927
1928 2018-08-21 Pedro Alves <palves@redhat.com>
1929
1930 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1931 out from gdbscm_parse_function_args.
1932 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1933 gdbscm_parse_function_args_1.
1934
1935 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1936
1937 PR gdb/17816
1938 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1939 operator.
1940
1941 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1942
1943 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1944
1945 2018-08-19 Michael Spang <spang@google.com>
1946
1947 PR gdb/11786
1948 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1949 for PT_TLS segments.
1950
1951 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1952
1953 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1954 dwarf_variable_value.
1955 * dwarf2-frame.c (class dwarf_expr_executor):
1956 Add override for dwarf_variable_value.
1957 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1958 (class symbol_needs_eval_context): Likewise.
1959 (indirect_synthetic_pointer): Add forward declaration.
1960 (sect_variable_value): New function.
1961 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1962 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1963 for DW_OP_GNU_variable_value.
1964
1965 2018-08-16 Tom Tromey <tom@tromey.com>
1966
1967 * top.c (read_command_file): Update.
1968 (command_line_input): Remove "repeat" argument.
1969 * ada-lang.c (get_selections): Update.
1970 * linespec.c (decode_line_2): Update.
1971 * defs.h (command_line_input): Remove argument.
1972 * cli/cli-script.c (read_next_line): Update.
1973 * python/py-gdb-readline.c: Update.
1974
1975 2018-08-17 Tom Tromey <tom@tromey.com>
1976
1977 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1978 command_line_input.
1979
1980 2018-08-15 Tom Tromey <tom@tromey.com>
1981
1982 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1983
1984 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1985
1986 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1987 If used, use find_pc_partial_function to find address range
1988 to disassemble.
1989 * mi/mi-main.c (mi_cmd_list_features): Report
1990 "data-disassemble-a-option" feature.
1991 * NEWS: Mention new -data-disassemble option -a.
1992
1993 2018-08-13 Tom Tromey <tom@tromey.com>
1994
1995 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1996
1997 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1998
1999 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2000 (aarch64_linux_collect_sve_regset): Likewise.
2001 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2002 * regcache.h (regcache_map_entry_size): New function.
2003
2004 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2005
2006 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2007 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2008 (SVE_HEADER_VL_LENGTH): Likewise.
2009 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2010 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2011 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2012 (SVE_HEADER_SIZE_OFFSET): Likewise.
2013 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2014 (SVE_HEADER_VL_OFFSET): Likewise.
2015 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2016 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2017 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2018 (SVE_HEADER_SIZE): Likewise.
2019 (aarch64_linux_core_read_vq): Add function.
2020 (aarch64_linux_core_read_description): Check for SVE section.
2021
2022 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2023
2024 * aarch64-fbsd-tdep.c
2025 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2026 collect_size.
2027 * aarch64-linux-tdep.c
2028 (aarch64_linux_iterate_over_regset_sections): Likewise.
2029 * alpha-linux-tdep.c
2030 (alpha_linux_iterate_over_regset_sections):
2031 * alpha-nbsd-tdep.c
2032 (alphanbsd_iterate_over_regset_sections): Likewise.
2033 * amd64-fbsd-tdep.c
2034 (amd64fbsd_iterate_over_regset_sections): Likewise.
2035 * amd64-linux-tdep.c
2036 (amd64_linux_iterate_over_regset_sections): Likewise.
2037 * arm-bsd-tdep.c
2038 (armbsd_iterate_over_regset_sections): Likewise.
2039 * arm-fbsd-tdep.c
2040 (arm_fbsd_iterate_over_regset_sections): Likewise.
2041 * arm-linux-tdep.c
2042 (arm_linux_iterate_over_regset_sections): Likewise.
2043 * corelow.c (get_core_registers_cb): Likewise.
2044 (core_target::fetch_registers): Likewise.
2045 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2046 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2047 * gdbarch.h (void): Regenerate.
2048 * gdbarch.sh: Add supply_size and collect_size.
2049 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2050 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2051 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2052 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2053 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2054 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2055 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2056 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2057 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2058 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2059 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2060 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2061 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2062 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2063 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2064 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2065 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2066 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2067 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2068 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2069 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2070 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2071 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2072 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2073 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2074 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2075 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2076 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2077 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2078 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2079
2080 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2081
2082 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2083 with string_printf.
2084
2085 2018-08-10 Keith Seitz <keiths@redhat.com>
2086
2087 * compile/compile-c-support.c (add_code_header, add_code_footer):
2088 Move into policy class.
2089 (c_push_user_expression, pop_user_expression_nop)
2090 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2091 (compile_program): New host class.
2092 (c_compile_program): New typedef.
2093 (c_compute_porgram): Use c_compile_program.
2094
2095 2018-08-10 Keith Seitz <keiths@redhat.com>
2096
2097 * compile/compile-internal.h (compile_instance::~compile_instance):
2098 Remove calls to htab_delete.
2099 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2100 * compile.c (compile_instance::compile_instance): Initialize
2101 htab unique pointers.
2102 (compile_instance::get_cached_type, compile_instance::insert_type)
2103 (compile_instance::error_symbol_once): Update for unique_ptr.
2104
2105 2018-08-10 Keith Seitz <keiths@redhat.com>
2106
2107 * compile/compile-c-symbols.c (struct symbol_error)
2108 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2109 (compile_instance::insert_symbol_error)
2110 (compile_instance::error_symbol_once): Move to ...
2111 * compile/compile.c: ... here.
2112
2113 2018-08-10 Keith Seitz <keiths@redhat.com>
2114
2115 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2116 instead of `new_compile_instance'.
2117 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2118 Update description.
2119 If the symbol error map is not initialized, create it.
2120 (generate_c_for_for_one_symbol): Do not check/initialize
2121 the symbol error map.
2122 * compile/compile-c-types.c (compile_c_instance): Make a class.
2123 Update all callers.
2124 (compile_instance::compile_instance): Initialize the type cache.
2125 (get_cached_type): New function.
2126 (insert_type): Update description.
2127 (compile_c_instance::m_default_cflags): Define.
2128 (convert_type): Update description. Use get_cached_type.
2129 (delete_instance): Moved to destructor.
2130 (new_compile_instance): Moved to constructor.
2131 * compile/compile-c.h (compile_c_instance): Make class inheriting
2132 from compile_instance.
2133 <base>: Remove field.
2134 <type_map, symbol_err_map>: Move to base class.
2135 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2136 * compile/compile-internal.h (compile_instance): Make class.
2137 <type_map_t, symbol_err_map_t>: Define.
2138 <fe>: Rename to `m_gcc_fe'.
2139 <scope, block, gcc_target_options>: Add `m_' prefix.
2140 <m_type_map, m_symbol_err_map>: New fields, moved from
2141 compile_c_instance.
2142 <destroy>: Remove.
2143 (convert_type, new_compile_instance): Remove.
2144 * compile/compile.c (cleanup_compile_instance): Remove.
2145 (compile_to_object): Use unique_ptr to eliminate cleanups.
2146 (compile_instance::set_print_callback, compile_instance::version)
2147 (compile_instance::set_verbose)
2148 (compile_instance::set_driver_filename)
2149 (compile_instance::set_triplet_regexp)
2150 (compile_instance::set_arguments)
2151 (compile_instance::set_source_file)
2152 (compile_instance::compile): Define.
2153
2154 2018-08-10 Keith Seitz <keiths@redhat.com>
2155
2156 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2157 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2158 gcc-c-fe.def to define C plugin.
2159 (delete_instance): Delete `c_plugin'.
2160 (new_compile_instance): Initialize `c_plugin'.
2161 * compile/compile-c.h: Include gcc_c_plugin.h.
2162 (struct compile_c_instance) <c_plugin>: New member.
2163 * gcc-c-plugin.h: New file.
2164 Update all callers with API change.
2165
2166 2018-08-10 Keith Seitz <keiths@redhat.com>
2167
2168 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2169 (HFILES_NO_SRCDIR): ... to here.
2170 Add compile-internal.h and compile-c.h.
2171 * compile/compile-c-support.c: Include compile-c.h.
2172 * compile/compile-c-symbols.c: Include compile-c.h.
2173 (generate_c_for_variable_locations): Update comment.
2174 * compile/compile-c-types.c: Include compile-c.h.
2175 * compile/compile-c.h: New file -- moved C language declarations
2176 from other files here.
2177 * compile/compile-internal.h: Do not include hashtab.h or
2178 common/enum-flags.h.
2179 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2180 (gcc_convert_symbol, gcc_symbol_address)
2181 (generate_c_for_variable_locations, c_get_mode_for_size)
2182 (c_get_range_decl_name): Definitions moved to compile-c.h.
2183 * compile/compile-loc2c.c: Include compile-c.h.
2184
2185 2018-08-10 Keith Seitz <keiths@redhat.com>
2186
2187 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2188 (c_symbol_substitution_name): ... this.
2189 Update all callers.
2190
2191 2018-08-10 Keith Seitz <keiths@redhat.com>
2192
2193 * compile/compile-c-support.c (c_compute_program): Use
2194 unique_xmalloc_ptr to eliminate cleanup.
2195 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2196 Return a unique_xmalloc_ptr and eliminate cleanup.
2197 * compile/compile-internal.h (generate_c_for_variable_locations):
2198 Return unique_xmalloc_ptr and update description.
2199
2200 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2201
2202 * corelow.c (core_target::get_core_register_section): Rename
2203 min_size to section_min_size.
2204
2205 2018-08-09 Jim Wilson <jimw@sifive.com>
2206
2207 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2208 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2209 * NEWS: Mention new GNU/Linux RISC-V target.
2210 * configure.host: Add riscv*-*-linux*.
2211 * configure.nat: Add riscv*.
2212 * configure.tgt: Add riscv*-*-linux*.
2213 * riscv-linux-nat.c: New file.
2214 * riscv-linux-tdep.c: New file.
2215
2216 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2217
2218 * infrun.c (resume): Make static, add forward declaration.
2219 (proceed): Update header comment.
2220 * infrun.h (resume): Delete declaration.
2221
2222 2018-08-09 Tom Tromey <tom@tromey.com>
2223
2224 * riscv-tdep.h: Minor formatting fixes.
2225
2226 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2227
2228 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2229 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2230 (test_mkdir_recursive): Likewise.
2231 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2232
2233 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2234
2235 * valarith.c (value_subscripted_rvalue): If an array is not in
2236 memory, and we don't know the upper bound, then we can't know that
2237 the requested element exists or not.
2238
2239 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2240
2241 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2242 (target_options_to_string): Add comment.
2243
2244 2018-08-08 Tom Tromey <tom@tromey.com>
2245
2246 * unittests/scoped_mmap-selftests.c: Check result of "write".
2247
2248 2018-08-08 Jim Wilson <jimw@sifive.com>
2249
2250 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2251 (decode_register_index_short): New.
2252 (decode_j_type_insn, decode_cj_type_insn): New.
2253 (decode_b_type_insn, decode_cb_type_insn): New.
2254 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2255 local xlen. Check xlen when decoding ambiguous compressed insns. In
2256 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2257 is_c_sw_insn instead of is_sw_insn.
2258 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2259 (riscv_software_single_step): New.
2260 * riscv-tdep.h (riscv_software_single_step): Declare.
2261
2262 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2263 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2264
2265 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2266
2267 PR gdb/18050:
2268 * target.c (dispose_inferior): Don't dispose of inferiors that are
2269 already killed.
2270
2271 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2272
2273 * remote.c (remote_target::download_tracepoint): Change char* to
2274 const char*.
2275
2276 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2277
2278 * target.h (target_options_to_string): Return an std::string.
2279 * target.c (str_comma_list_concat_elem): Return void, use
2280 std::string.
2281 (do_option): Likewise.
2282 (target_options_to_string): Return an std::string.
2283 * linux-nat.c (linux_nat_target::wait): Adjust.
2284 * target-debug.h (target_debug_print_options): Adjust.
2285
2286 2018-08-07 Tom Tromey <tom@tromey.com>
2287
2288 * Makefile.in (CPPFLAGS): New variable.
2289 (INTERNAL_CPPFLAGS): Use it.
2290
2291 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2292
2293 * NEWS: Mention the index cache.
2294
2295 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2296
2297 * common/pathstuff.h (get_standard_cache_dir): New.
2298 * common/pathstuff.c (get_standard_cache_dir): New.
2299 * build-id.h (build_id_to_string): New.
2300 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2301 DEBUG_STR_SUFFIX): Move to here.
2302 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2303 DEBUG_STR_SUFFIX): Move from there.
2304 (write_psymtabs_to_index): Make non-static, add basename
2305 parameter. Write to temporary files, rename when done.
2306 (save_gdb_index_command): Adjust call to
2307 write_psymtabs_to_index.
2308 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2309 field.
2310 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2311 (get_gdb_index_contents_from_cache): New.
2312 (get_gdb_index_contents_from_cache_dwz): New.
2313 (dwarf2_initialize_objfile): Read index from cache.
2314 (dwarf2_build_psymtabs): Save to index.
2315 * dwarf-index-cache.h: New file.
2316 * dwarf-index-cache.c: New file.
2317 * dwarf-index-write.h: New file.
2318
2319 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2320
2321 * gnulib/aclocal.m4: Re-generate.
2322 * gnulib/config.in: Re-generate.
2323 * gnulib/configure: Re-generate.
2324 * gnulib/import/Makefile.am: Re-generate.
2325 * gnulib/import/Makefile.in: Re-generate.
2326 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2327 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2328 * gnulib/import/m4/mkdir.m4: New file.
2329 * gnulib/import/mkdir.c: New file.
2330 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2331 module.
2332
2333 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2334
2335 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2336 * common/scoped_mmap.c: New file.
2337 * common/scoped_mmap.h (destroy): New method.
2338 (~scoped_mmap, reset): Use destroy.
2339 (scoped_mmap): New move constructor.
2340 (mmap_file): New declaration.
2341 * unittests/scoped_mmap-selftests.c (test_normal,
2342 test_invalid_filename, run_tests): New functions.
2343 (_initialize_scoped_mmap_selftests): Register selftest.
2344
2345 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2346
2347 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2348 (read_gdb_index_from_buffer): ... this. Remove section
2349 parameter, add buffer parameter.
2350 (get_gdb_index_contents_ftype,
2351 get_gdb_index_contents_dwz_ftype): New typedefs.
2352 (dwarf2_read_gdb_index): Add callback parameters to get the
2353 index contents.
2354 (get_gdb_index_contents_from_section): New.
2355 (dwarf2_initialize_objfile): Update call to
2356 dwarf2_read_gdb_index.
2357
2358 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2359
2360 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2361 (gdb_open_cloexec): Likewise.
2362 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2363 (commandline_from_pid): Likewise.
2364 (linux_xfer_osdata_threads): Likewise.
2365 (linux_xfer_osdata_fds): Likewise.
2366 * ada-lang.c (is_package_name): Likewise.
2367 * auxv.c (procfs_xfer_auxv): Likewise.
2368 * breakpoint.c (print_one_breakpoint_location): Use
2369 uiout::field_fmt.
2370 (print_one_catch_solib): Use string_printf.
2371 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2372 (add_pe_forwarded_sym): Likewise.
2373 * dwarf2read.c (create_type_unit_group): Likewise.
2374 (build_error_marker_type): Likewise.
2375 * infcall.c (get_function_name): Likewise.
2376 * valprint.c (print_converted_chars_to_obstack): Likewise.
2377 * xtensa-tdep.c (xtensa_register_type): Likewise.
2378
2379 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2380
2381 * remote.c (remote_target::download_tracepoint): Fix format
2382 string errors.
2383
2384 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2385
2386 * tracefile.c: Include common/byte-vector.h.
2387 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2388 with trace_regblock_size if needed. Update uses of buf.
2389
2390 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2391
2392 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2393 std::vector<unsigned char>.
2394 * tracepoint.c (collection_list::collection_list): Remove
2395 m_regs_mask initializer from initializer list. Resize
2396 m_regs_mask using the largest remote register number.
2397 (collection_list::add_remote_register): Remove size check on
2398 m_regs_mask. Use at to access element.
2399 (collection_list::stringify): Change type of temp_buf to
2400 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2401 stringify the register mask. Use pack_hex_byte for the register
2402 mask.
2403
2404 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2405
2406 * tracepoint.h (class collection_list) <add_register>: Remove.
2407 <add_remote_register, add_ax_registers, add_local_register>:
2408 Declare.
2409 <add_memrange>: Add scope parameter.
2410 * tracepoint.c (encode_actions_1): Likewise.
2411 (collection_list::add_register): Rename to ...
2412 (collection_list::add_remote_register): ... this. Update
2413 comment.
2414 (collection_list::add_ax_registers, add_local_register): New
2415 methods.
2416 (collection_list::add_memrange): Add scope parameter. Call
2417 add_local_register instead of add_register.
2418 (finalize_tracepoint_aexpr): New function.
2419 (collection_list::collect_symbol): Update calls to add_memrange.
2420 Call add_local_register instead of add_register. Call
2421 add_ax_registers. Call finalize_tracepoint_aexpr.
2422 (encode_actions_1): Get remote regnos for $reg action. Call
2423 add_remote_register, add_ax_registers, and add_local_register.
2424 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2425 (validate_actionline): Call finalize_tracepoint_aexpr.
2426
2427 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2428
2429 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2430 Replace array buf with gdb::char_vector buf, of size
2431 get_remote_packet_size (). Replace references to buf and
2432 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2433 and xsnprintf with snprintf. Raise errors if the buffer is too
2434 small.
2435
2436 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2437
2438 * remote.c (remote_target::download_tracepoint): Fix the has_more
2439 predicate in the QTDP action list iteration.
2440
2441 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2442
2443 * remote.c (remote_target::download_tracepoint): Fix indentation
2444 in for block.
2445
2446 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2447
2448 * proc-api.c (_initialize_proc_api): Remove c, unused.
2449 * procfs.c (procfs_init_inferior): Remove signals, unused.
2450 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2451 unused.
2452
2453 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2454 Andrew Burgess <andrew.burgess@embecosm.com>
2455
2456 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2457 'W_STOPCODE (0)' as this could be ambiguous.
2458
2459 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2460
2461 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2462 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2463 "ai_socktype").
2464
2465 2018-08-02 Tom Tromey <tom@tromey.com>
2466
2467 PR symtab/16842.
2468 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2469 symbols.
2470 (process_structure_scope): Likewise.
2471
2472 2018-08-02 Xavier Roirand <roirand@adacore.com>
2473
2474 PR gdb/22629:
2475 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2476 kill inferior.
2477
2478 2018-08-02 Tom Tromey <tom@tromey.com>
2479
2480 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2481 (darwin_suspend_inferior, darwin_resume_inferior)
2482 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2483 (darwin_check_new_threads): Check result of get_darwin_inferior.
2484
2485 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2486
2487 GDB 8.1.1 released.
2488
2489 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2490
2491 * varobj.c (varobj_get_path_expr_parent): Report an error if
2492 parent is a dynamic varobj.
2493
2494 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2495
2496 * gnulib/aclocal.m4: Re-generate.
2497 * gnulib/config.in: Re-generate.
2498 * gnulib/configure: Re-generate.
2499 * gnulib/import/Makefile.in: Re-generate.
2500 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2501 * gnulib/import/m4/onceonly.m4: Re-generate.
2502
2503 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2504
2505 * target-descriptions.c (struct xml_test_tdesc): New.
2506 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2507 (record_xml_tdesc): Update.
2508 (maintenance_check_xml_descriptions): Update.
2509 * target-descriptions.h (record_xml_tdesc): Update comment.
2510
2511 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2512
2513 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2514 checking array bounds are defined.
2515
2516 2018-07-30 Tom Tromey <tom@tromey.com>
2517
2518 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2519 irreflexivity violation.
2520
2521 2018-07-30 Tom Tromey <tom@tromey.com>
2522
2523 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2524 * value.c (unpack_long): Remove lint code.
2525 * valops.c (value_ind): Remove lint code.
2526 * valarith.c (value_x_binop, value_x_unop, value_equal)
2527 (value_pos): Remove lint code.
2528
2529 2018-07-28 Tom de Vries <tdevries@suse.de>
2530
2531 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2532 with undefined upper bound as <optimized out>.
2533
2534 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2535
2536 * gcore.in: Rename variable "name" to "prefix". Expand
2537 "usage" text.
2538
2539 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2540
2541 * windows-nat.c (windows_nat_target::create_inferior): Update to
2542 call close() in global namespace.
2543
2544 2018-07-26 Tom Tromey <tom@tromey.com>
2545
2546 * dwarf-index-write.c (add_address_entry): Don't add objfile
2547 offsets.
2548 * dbxread.c (find_stab_function): Rename from
2549 find_stab_function_addr. Return a bound_minimal_symbol.
2550 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2551 Don't add objfile offsets.
2552 (end_psymtab): Use raw_text_low, raw_text_high,
2553 MSYMBOL_VALUE_RAW_ADDRESS.
2554 (read_ofile_symtab): Update.
2555 (process_one_symbol): Update.
2556 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2557 offsets.
2558 (dw2_relocate): Remove.
2559 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2560 searching addrmap.
2561 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2562 Update.
2563 (process_psymtab_comp_unit_reader, add_partial_symbol)
2564 (add_partial_subprogram, dwarf2_ranges_read): Update.
2565 (load_partial_dies): Update.
2566 (add_address_entry): Don't add objfile offsets.
2567 (dwarf2_build_include_psymtabs): Update.
2568 (create_addrmap_from_aranges): Don't add objfile offsets.
2569 (dw2_find_pc_sect_compunit_symtab): Update.
2570 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2571 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2572 Update.
2573 (parse_partial_symbols): Don't add objfile offsets. Use
2574 raw_text_low, raw_text_high. Update.
2575 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2576 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2577 or call 'relocate' quick function. Clear psymbol_map.
2578 * psympriv.h (struct partial_symbol) <address>: Add section
2579 offset.
2580 <set_unrelocated_address>: Rename from set_address.
2581 <raw_text_low, raw_text_high>: New methods.
2582 <text_low, text_high>: Add objfile parameter.
2583 (add_psymbol_to_bcache): Add 'section' parameter. Call
2584 set_unrelocated_address.
2585 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2586 (find_pc_psymbol): Update.
2587 (fixup_psymbol_section, relocate_psymtabs): Remove.
2588 (dump_psymtab, psym_functions): Update.
2589 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2590 parameter.
2591 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2592 (start_psymtab_common): Update.
2593 * symfile-debug.c (debug_qf_relocate): Remove.
2594 (debug_sym_quick_functions): Update.
2595 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2596 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2597 Update.
2598
2599 2018-07-26 Tom Tromey <tromey@redhat.com>
2600
2601 * dbxread.c (end_psymtab): Use text_high_valid and
2602 text_low_valid.
2603 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2604 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2605 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2606 Update comment.
2607 <text_low_valid, text_high_valid>: New fields.
2608 <set_text_low, set_text_high>: Update.
2609 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2610
2611 2018-07-26 Tom Tromey <tom@tromey.com>
2612
2613 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2614 Update.
2615 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2616 textlow and texthigh fields.
2617 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2618 Update.
2619 * mdebugread.c (parse_lines, parse_partial_symbols)
2620 (psymtab_to_symtab_1): Update.
2621 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2622 Rename fields. Update comment. Now private.
2623 <text_low, text_high, set_text_low, set_text_high>: New methods.
2624 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2625 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2626 (start_psymtab_common, maintenance_info_psymtabs)
2627 (maintenance_check_psymtabs): Update.
2628 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2629 texthigh fields.
2630 (scan_xcoff_symtab): Update.
2631
2632 2018-07-26 Tom Tromey <tromey@redhat.com>
2633
2634 * psympriv.h (struct partial_symbol) <unrelocated_address,
2635 address, set_address>: New methods.
2636 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2637 (fixup_psymbol_section, relocate_psymtabs): Update.
2638 (print_partial_symbols): Add 'objfile' parameter. Update.
2639 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2640 Update.
2641
2642 2018-07-26 Tom Tromey <tom@tromey.com>
2643
2644 * dwarf-index-write.c (write_psymbols, debug_names::insert)
2645 (debug_names::write_psymbols): Update.
2646 * psympriv.h (struct partial_symbol): Derive from
2647 general_symbol_info.
2648 <obj_section>: New method.
2649 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2650 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2651 (find_pc_sect_psymbol, fixup_psymbol_section)
2652 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2653 (print_partial_symbols, recursively_search_psymtabs)
2654 (compare_psymbols, psymbol_hash, psymbol_compare)
2655 (add_psymbol_to_bcache, maintenance_check_psymtabs)
2656 (psymbol_name_matches, psym_fill_psymbol_map): Update.
2657
2658 2018-07-26 Tom Tromey <tromey@redhat.com>
2659
2660 * dbxread.c (end_psymtab): Remove dead code.
2661
2662 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
2663
2664 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2665 DWARF unwinders are disabled.
2666 * dwarf2-frame.c: Add dwarf2read.h include.
2667 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2668 disabled.
2669 (dwarf2_frame_unwinders_enabled_p): Define.
2670 (show_dwarf_unwinders_enabled_p): New function.
2671 (_initialize_dwarf2_frame): Register switch to control DWARF
2672 unwinder use.
2673 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2674 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2675 (show_dwarf_cmdlist): Remove static keyword.
2676 * dwarf2read.h (set_dwarf_cmdlist): Declare.
2677 (show_dwarf_cmdlist): Declare.
2678 * NEWS: Document new feature.
2679
2680 2018-07-26 Tom de Vries <tdevries@suse.de>
2681
2682 PR breakpoints/23366
2683 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2684
2685 2018-07-26 Tom de Vries <tdevries@suse.de>
2686
2687 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2688 DW_AT_count can't be translated to a dynamic prop.
2689
2690 2018-07-25 Tom de Vries <tdevries@suse.de>
2691
2692 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2693 try/catch.
2694
2695 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
2696
2697 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2698
2699 2018-07-25 Joel Brobecker <brobecker@adacore.com>
2700
2701 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2702
2703 2018-07-24 Keith Seitz <keiths@redhat.comt
2704
2705 PR symtab/23010
2706 * dwarf2read.c (dw2_add_symbol_to_list): New function.
2707 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2708 instead of add_symbol_to_list.
2709 (read_file_scope): Call prepare_one_comp_unit before reading
2710 any other DIEs.
2711
2712 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
2713
2714 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2715
2716 2018-07-24 Tom Tromey <tom@tromey.com>
2717
2718 * utils.c (malloc, realloc, free): Don't declare.
2719 * configure, config.in: Rebuild.
2720 * configure.ac: Don't check for declarations of free, malloc, or
2721 realloc.
2722
2723 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2724
2725 * aarch64-linux-nat.c
2726 (aarch64_linux_nat_target::stopped_data_address): Remove unused
2727 variable.
2728 * arm-linux-nat.c (fetch_regs): Likewise.
2729 (store_regs): Likewise.
2730 (fetch_vfp_regs): Likewise.
2731 (store_vfp_regs): Likewise.
2732 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2733 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2734 (arm_linux_nat_target::insert_watchpoint): Likewise.
2735 (arm_linux_nat_target::remove_watchpoint): Likewise.
2736 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2737 Likewise.
2738 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2739 Likewise.
2740 * ppc-linux-nat.c (fetch_register): Likewise.
2741 (fetch_all_gp_regs): Likewise.
2742 (fetch_ppc_registers): Likewise.
2743 (store_all_gp_regs): Likewise.
2744 (store_ppc_registers): Likewise.
2745 (hwdebug_insert_point): Likewise.
2746 (can_use_watchpoint_cond_accel): Likewise.
2747 * remote-sim.c (gdb_os_write_stdout): Likewise.
2748
2749 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2750 Tom Tromey <tom@tromey.com>
2751
2752 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2753 test for it.
2754 * configure: Rebuild.
2755
2756 2018-07-22 Tom Tromey <tom@tromey.com>
2757
2758 * regformats/regdat.sh: Define xmltarget_${name} inside
2759 #ifndef IN_PROCESS_AGENT.
2760
2761 2018-07-22 Tom Tromey <tom@tromey.com>
2762
2763 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2764
2765 2018-07-22 Tom Tromey <tom@tromey.com>
2766
2767 * symfile.c (reread_symbols): Notify iter, not objfile.
2768
2769 2018-07-22 Tom Tromey <tom@tromey.com>
2770
2771 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2772 Use arch_ops.
2773 (ravenscar_thread_target::prepare_to_store): Likewise.
2774
2775 2018-07-22 Tom Tromey <tom@tromey.com>
2776
2777 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2778 unused variable. Call value_fetch_lazy when needed.
2779 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2780 Remove unused variable. Call value_fetch_lazy when needed.
2781
2782 2018-07-22 Tom Tromey <tom@tromey.com>
2783
2784 * m32c-tdep.c (mark_dma): Return void.
2785 (make_regs): Remove unused declarations.
2786
2787 2018-07-22 Tom Tromey <tom@tromey.com>
2788
2789 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2790 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2791 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2792 bkscm_get_valid_block_smob_arg_unsafe for effect.
2793
2794 2018-07-22 Tom Tromey <tom@tromey.com>
2795
2796 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2797 value_type.
2798
2799 2018-07-22 Tom Tromey <tom@tromey.com>
2800
2801 * windows-nat.c (saved_context): Conditionally define.
2802 * remote.c (remote_target::remote_btrace_maybe_reopen):
2803 Conditionally declare "warned".
2804 * inflow.c (sigquit_ours): Conditionally define.
2805 (new_tty): Move "tty" declaration inside #if.
2806 * guile/guile.c (guile_datadir): Conditionally define.
2807 * charset.c (set_be_le_names): Move some declarations inside #if.
2808 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2809 #if.
2810 (parse_xml_btrace_conf): Likewise.
2811
2812 2018-07-22 Tom Tromey <tom@tromey.com>
2813
2814 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2815
2816 2018-07-22 Tom Tromey <tom@tromey.com>
2817
2818 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2819 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2820 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2821 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2822 * stack.c (frame_apply_level_command): Remove unused variable.
2823 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2824 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2825 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2826 unused variable.
2827 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2828 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2829 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2830 variable.
2831 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2832 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2833 variable.
2834 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2835 Remove unused variable.
2836 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2837 variable.
2838 * common/tdesc.c (print_xml_feature::visit): Remove unused
2839 variable.
2840 * compile/compile-object-load.c (store_regs): Remove unused
2841 variables.
2842 * complaints.c (clear_complaints): Remove unused variable.
2843 * corelow.c (core_target_open): Remove unused variable.
2844 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2845 variable.
2846 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2847 variable.
2848 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2849 variable.
2850 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2851 variable.
2852 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2853 variable.
2854 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2855 variable.
2856 * ia64-tdep.c (examine_prologue): Remove unused variable.
2857 * infcall.c (run_inferior_call): Remove unused variable.
2858 * inferior.c (exit_inferior): Remove unused variable.
2859 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2860 * linespec.c (decode_line_2): Remove unused variable.
2861 * linux-nat.c (super_close): Remove.
2862 * linux-tdep.c (linux_info_proc): Remove unused variable.
2863 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2864 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2865 Remove unused variable.
2866 * parse.c (find_minsym_type_and_address): Remove unused variable.
2867 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2868 variable.
2869 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2870 variable.
2871 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2872 variables.
2873 * record-btrace.c (record_btrace_target::store_registers): Remove
2874 unused variable.
2875 (cmd_show_record_btrace_cpu): Remove unused variable.
2876 * riscv-tdep.c (riscv_register_reggroup_p)
2877 (riscv_push_dummy_call, riscv_return_value): Remove unused
2878 variable.
2879 * rust-exp.y (literal): Remove unused variable.
2880 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2881 unused variable.
2882 <STRUCTOP_ANONYMOUS>: Likewise.
2883 * s390-linux-tdep.c (s390_linux_init_abi_31)
2884 (s390_linux_init_abi_64): Remove unused variable.
2885 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2886 (file_select_thread, net_windows_open, _initialize_ser_windows):
2887 Remove unused variables.
2888 * symtab.c (find_pc_sect_line): Remove unused variable.
2889 * target-memory.c (compute_garbled_blocks): Remove unused
2890 variable.
2891 (target_write_memory_blocks): Remove unused variable.
2892 * target.c (target_stack::unpush): Remove unused variables.
2893 * tracepoint.c (start_tracing, all_tracepoint_actions)
2894 (merge_uploaded_trace_state_variables)
2895 (print_one_static_tracepoint_marker): Remove unused variable.
2896 * unittests/basic_string_view/element_access/char/1.cc (test01):
2897 Remove unused variable.
2898 * windows-nat.c (windows_continue, windows_add_all_dlls)
2899 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2900 Remove unused variables.
2901
2902 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2903
2904 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2905 attr_profile in HAVE_ELF.
2906 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2907 HAVE_ELF.
2908
2909 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2910
2911 * frame.c (frame_register_unwind): Change parameter name.
2912 (frame_unwind_register): Likewise.
2913 (frame_unwind_register_value): Likewise.
2914 (frame_unwind_register_signed): Likewise.
2915 (frame_unwind_register_unsigned): Likewise.
2916 * frame.h (frame_register_unwind): Likewise.
2917 (frame_unwind_register): Likewise.
2918 (frame_unwind_register_value): Likewise.
2919 (frame_unwind_register_signed): Likewise.
2920 (frame_unwind_register_unsigned): Likewise.
2921 (frame_unwind_arch): Likewise.
2922
2923 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2924
2925 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2926 ISA maintenance.
2927
2928 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2929
2930 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2931 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2932 hand.
2933
2934 2018-07-20 Keith Seitz <keiths@redhat.com>
2935
2936 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2937 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2938 m_compunit_symtab, m_language>: Add "m_" prefix.
2939 Update all uses.
2940 * buildsym.c: Update all uses.
2941
2942 2018-07-20 Tom Tromey <tom@tromey.com>
2943
2944 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2945 * buildsym.h (record_line_ftype): Remove typedef.
2946
2947 2018-07-20 Tom Tromey <tom@tromey.com>
2948
2949 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2950 (end_expandable_symtab): Likewise.
2951 (end_symtab_get_static_block): Likewise.
2952 (end_symtab_from_static_block): Likewise.
2953 * buildsym-legacy.c (augment_type_symtab): Remove.
2954 (end_expandable_symtab): Remove.
2955 (end_symtab_get_static_block): Remove.
2956 (end_symtab_from_static_block): Remove.
2957
2958 2018-07-20 Tom Tromey <tom@tromey.com>
2959
2960 * dwarf2read.c: Include buildsym.h.
2961 (struct dwarf2_cu) <builder>: New method.
2962 (fixup_go_packaging): Update.
2963 (process_full_comp_unit, process_full_type_unit): Update. Don't
2964 use scoped_free_pendings.
2965 (using_directives): Add "cu" parameter, remove "language".
2966 (read_import_statement, setup_type_unit_groups, )
2967 (read_func_scope, read_lexical_block_scope)
2968 (dwarf2_record_block_ranges, read_namespace): Update.
2969 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2970 (lnp_state_machine::handle_end_sequence): Update.
2971 (class lnp_state_machine) <m_cu>: New member.
2972 <m_record_line_callback>: Remove.
2973 <m_currently_recording_lines>: New member.
2974 (lnp_state_machine::handle_set_file): Update.
2975 (noop_record_line): Remove.
2976 (dwarf_record_line_p): Add cu parameter.
2977 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2978 (lnp_state_machine::record_line)
2979 (lnp_state_machine::lnp_state_machine)
2980 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2981 (dwarf_decode_lines): Update.
2982 (dwarf2_start_subfile): Add cu parameter.
2983 (dwarf2_start_symtab, new_symbol): Update.
2984 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2985 Remove dwarf2_per_objfile parameter.
2986 (dwarf_decode_macros): Update.
2987
2988 2018-07-20 Tom Tromey <tom@tromey.com>
2989
2990 * stabsread.c (define_symbol): Update.
2991 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2992 * dwarf2read.c (new_symbol): Update.
2993 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2994 * cp-namespace.c: Include buildsym.h.
2995 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2996 * buildsym-legacy.c (get_buildsym_compunit): New function.
2997
2998 2018-07-20 Tom Tromey <tom@tromey.com>
2999
3000 * xcoffread.c: Include buildsym-legacy.h.
3001 * windows-nat.c: Include buildsym-legacy.h.
3002 * stabsread.c: Include buildsym-legacy.h.
3003 * mdebugread.c: Include buildsym-legacy.h.
3004 * buildsym-legacy.h: New file.
3005 * buildsym-legacy.c: New file, from buildsym.c.
3006 * go32-nat.c: Include buildsym-legacy.h.
3007 * dwarf2read.c: Include buildsym-legacy.h.
3008 * dbxread.c: Include buildsym-legacy.h.
3009 * cp-namespace.c: Include buildsym-legacy.h.
3010 * coffread.c: Include buildsym-legacy.h.
3011 * buildsym.h: Move some contents to buildsym-legacy.h.
3012 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3013 buildsym-legacy.c.
3014 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3015
3016 2018-07-20 Tom Tromey <tom@tromey.com>
3017
3018 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3019 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3020 (buildsym_compunit::buildsym_compunit)
3021 (buildsym_compunit::~buildsym_compunit)
3022 (buildsym_compunit::get_macro_table): Define.
3023
3024 2018-07-20 Tom Tromey <tom@tromey.com>
3025
3026 * buildsym.c (reset_symtab_globals): Remove.
3027 (buildsym_compunit::end_symtab_from_static_block): Update.
3028 (buildsym_compunit::augment_type_symtab): Update.
3029 (end_symtab_from_static_block): Call free_buildsym_compunit.
3030 (augment_type_symtab, end_symtab, end_expandable_symtab):
3031 Likewise.
3032
3033 2018-07-20 Tom Tromey <tom@tromey.com>
3034
3035 * arch-utils.c: Do not include buildsym.h.
3036 * mipsread.c: Do not include buildsym.h.
3037 * machoread.c: Do not include buildsym.h.
3038 * elfread.c: Do not include buildsym.h.
3039
3040 2018-07-20 Tom Tromey <tom@tromey.com>
3041
3042 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3043 initialization.
3044 (buildsym_compunit): Add new constructor.
3045 (struct buildsym_compunit) <get_last_source_file, finish_block,
3046 record_block_range, start_subfile, patch_subfile_names,
3047 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3048 set_last_source_start_addr, get_last_source_start_addr,
3049 get_local_using_directives, set_local_using_directives,
3050 get_global_using_directives, outermost_context_p,
3051 get_current_context_stack, get_context_stack_depth,
3052 get_current_subfile, get_local_symbols, get_file_symbols,
3053 get_global_symbols, record_debugformat, record_producer,
3054 push_context, pop_context, end_symtab_get_static_block,
3055 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3056 New public methods.
3057 <record_pending_block, finish_block_internal, make_blockvector,
3058 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3059 private methods.
3060 Update all users.
3061
3062 2018-05-22 Tom Tromey <tom@tromey.com>
3063
3064 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3065 parameter.
3066 (finish_block_internal): Update.
3067
3068 2018-07-20 Tom Tromey <tom@tromey.com>
3069
3070 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3071 parameter.
3072 (finish_block_internal): Update.
3073
3074 2018-07-20 Tom Tromey <tom@tromey.com>
3075
3076 * buildsym.h (EXTERN): Don't define or undef.
3077 * buildsym.c (EXTERN): Don't define.
3078
3079 2018-07-20 Tom Tromey <tom@tromey.com>
3080
3081 * buildsym.c: Remove TODO comment.
3082
3083 2018-07-20 Tom Tromey <tom@tromey.com>
3084
3085 * coffread.c (coff_symtab_read): Update.
3086 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3087 (xcoff_new_init): Update.
3088 * mipsread.c (mipscoff_new_init): Update.
3089 * mdebugread.c (mdebug_build_psymtabs): Update.
3090 * elfread.c (elf_new_init): Update.
3091 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3092 Update.
3093 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3094 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3095 (stabsect_build_psymtabs): Update.
3096 * buildsym.h (buildsym_init): Don't declare.
3097 * buildsym.c: Update comment.
3098 (prepare_for_building): Remove.
3099 (start_symtab, restart_symtab): Update.
3100 (reset_symtab_globals): Update comment.
3101 (buildsym_init): Remove.
3102
3103 2018-07-20 Tom Tromey <tom@tromey.com>
3104
3105 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3106 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3107 (read_enum_type, common_block_start, common_block_end)
3108 (cleanup_undefined_types_1, finish_global_stabs): Update.
3109 * mdebugread.c (psymtab_to_symtab_1): Update.
3110 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3111 (read_lexical_block_scope, new_symbol): Update.
3112 * dbxread.c (process_one_symbol): Update.
3113 * coffread.c (coff_symtab_read, process_coff_symbol)
3114 (coff_read_enum_type): Update.
3115 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3116 declare.
3117 (get_local_symbols, get_file_symbols, get_global_symbols): New
3118 functions.
3119 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3120 m_global_symbols.
3121 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3122 (~scoped_free_pendings): Update.
3123 (finish_block, prepare_for_building, reset_symtab_globals)
3124 (end_symtab_get_static_block, end_symtab_with_blockvector)
3125 (augment_type_symtab, push_context): Update.
3126 (get_local_symbols, get_file_symbols, get_global_symbols): New
3127 functions.
3128 (buildsym_init): Update.
3129
3130 2018-07-20 Tom Tromey <tom@tromey.com>
3131
3132 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3133 (process_full_type_unit): Likewise.
3134 (dwarf2_start_symtab): Set list_in_scope.
3135
3136 2018-07-20 Tom Tromey <tom@tromey.com>
3137
3138 * dwarf2read.c (process_psymtab_comp_unit_reader)
3139 (build_type_psymtabs_reader): Do not set list_in_scope.
3140
3141 2018-07-20 Tom Tromey <tom@tromey.com>
3142
3143 * buildsym.c (free_pendings): Remove.
3144 (add_symbol_to_list, scoped_free_pendings)
3145 (finish_block_internal, buildsym_init): Update.
3146
3147 2018-07-20 Tom Tromey <tom@tromey.com>
3148
3149 * xcoffread.c (read_xcoff_symtab): Update.
3150 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3151 Update.
3152 * dbxread.c (process_one_symbol): Update.
3153 * coffread.c (coff_symtab_read): Update.
3154 * buildsym.h (finish_block): Update.
3155 * buildsym.c (finish_block): Remove "listhead" argument.
3156 (end_symtab_get_static_block): Update.
3157
3158 2018-07-20 Tom Tromey <tom@tromey.com>
3159
3160 * buildsym.h (class scoped_free_pendings): Remove constructor.
3161 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3162 method.
3163 <m_pending_block_obstack, m_pending_blocks>: New members.
3164 (pending_block_obstack, pending_blocks): Remove.
3165 (scoped_free_pendings::scoped_free_pendings): Default.
3166 (~scoped_free_pendings): Update.
3167 (free_pending_blocks): Remove.
3168 (finish_block_internal, record_pending_block, make_blockvector)
3169 (end_symtab_get_static_block, augment_type_symtab, push_context)
3170 (buildsym_init): Update.
3171
3172 2018-07-20 Tom Tromey <tom@tromey.com>
3173
3174 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3175 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3176 members.
3177 (pending_addrmap, pending_addrmap_obstack)
3178 (pending_addrmap_interesting): Remove.
3179 (scoped_free_pendings, record_block_range, make_blockvector)
3180 (prepare_for_building, reset_symtab_globals, buildsym_init):
3181 Update.
3182
3183 2018-07-20 Tom Tromey <tom@tromey.com>
3184
3185 * xcoffread.c (process_linenos): Update.
3186 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3187 * mdebugread.c (psymtab_to_symtab_1): Update.
3188 * dwarf2read.c (setup_type_unit_groups)
3189 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3190 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3191 * dbxread.c (process_one_symbol): Update.
3192 * coffread.c (coff_symtab_read, enter_linenos)
3193 (process_coff_symbol): Update.
3194 * buildsym.h (current_subfile): Don't declare.
3195 (get_current_subfile): Declare.
3196 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3197 member.
3198 (start_subfile, free_buildsym_compunit, push_subfile)
3199 (prepare_for_building, start_symtab): Update.
3200 (get_current_subfile): New function.
3201
3202 2018-07-20 Tom Tromey <tom@tromey.com>
3203
3204 * coffread.c (coff_symtab_read): Update.
3205 * xcoffread.c (read_xcoff_symtab): Update.
3206 * dwarf2read.c (new_symbol): Update.
3207 (read_func_scope, read_lexical_block_scope): Update.
3208 * dbxread.c (process_one_symbol): Update.
3209 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3210 (outermost_context_p): Remove macro.
3211 (outermost_context_p, get_current_context_stack)
3212 (get_context_stack_depth): Declare.
3213 (pop_context): Return struct context_stack.
3214 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3215 member.
3216 (context_stack_size): Remove.
3217 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3218 (prepare_for_building, end_symtab_get_static_block)
3219 (augment_type_symtab, push_context): Update.
3220 (pop_context): Return struct context_stack.
3221 (outermost_context_p, get_current_context_stack)
3222 (get_context_stack_depth): New functions.
3223 (buildsym_init): Update.
3224
3225 2018-07-20 Tom Tromey <tom@tromey.com>
3226
3227 * rust-exp.y: Now a pure parser. Update all rules.
3228 (%union): Move earlier.
3229 (current_parser, work_obstack): Remove globals.
3230 (rust_parser, ~rust_parser): Update.
3231 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3232 lex_character, lex_number, lex_string, lex_identifier,
3233 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3234 convert_name, convert_params_to_expression,
3235 convert_ast_to_expression, ast_basic_type, ast_operation,
3236 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3237 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3238 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3239 ast_array_type, ast_slice_type, ast_reference_type,
3240 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3241 (rust_parse): Update.
3242 (rustyyerror, rustyylex): Add parser parameter.
3243 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3244 (rust_lex_stringish_test, rust_lex_test_sequence)
3245 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3246 (rust_lex_test_push_back, rust_lex_tests): Update.
3247
3248 2018-07-19 Pedro Alves <palves@redhat.com>
3249
3250 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3251 gdb::unique_xmalloc_ptr.
3252 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3253 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3254 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3255 copy-initialization.
3256 * guile/scm-pretty-print.c (ppscm_print_children): Use
3257 gdb::unique_xmalloc_ptr instead of cleanups.
3258 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3259 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3260 gdb::unique_xmalloc_ptr.
3261 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3262 Adjust to use gdb::unique_xmalloc_ptr.
3263 * guile/scm-utils.c (extract_arg): Adjust.
3264 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3265 gdb::unique_xmalloc_ptr instead of a cleanup.
3266
3267 2018-07-19 Tom Tromey <tom@tromey.com>
3268
3269 * utils.c (do_value_free_to_mark)
3270 (make_cleanup_value_free_to_mark): Remove.
3271 * utils.h (make_cleanup_value_free_to_mark): Remove.
3272
3273 2018-07-19 Pedro Alves <palves@redhat.com>
3274
3275 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3276 forwarding reference.
3277
3278 2018-07-18 Pedro Alves <palves@redhat.com>
3279
3280 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3281 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3282 cleanup.
3283
3284 2018-07-18 Pedro Alves <palves@redhat.com>
3285
3286 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3287 exceptions.
3288 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3289 (gdbscm_wrap): New.
3290 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3291 directly instead of a cleanup.
3292 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3293 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3294 (vlscm_binop_gdbthrow): New, factored out from ...
3295 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3296 (vlscm_rich_compare): Use gdbscm_wrap.
3297 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3298 instead of a cleanup.
3299 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3300 cleanup.
3301 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3302 Use xfree directly instead of a cleanup.
3303 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3304 Adjust to use gdbscm_wrap and scoped_value_mark.
3305 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3306 (gdbscm_value_address, gdbscm_value_dereference)
3307 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3308 scoped_value_mark.
3309 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3310 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3311 scoped_value_mark.
3312 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3313 gdbscm_wrap and scoped_value_mark.
3314 (gdbscm_value_to_string): Use xfree directly instead of a
3315 cleanup. Move 'buffer' unique_ptr to TRY scope.
3316 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3317 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3318 scoped_value_mark.
3319 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3320 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3321 scoped_value_mark.
3322 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3323 gdbscm_wrap.
3324
3325 2018-07-18 Tom de Vries <tdevries@suse.de>
3326
3327 * findvar.c (default_read_var_value): Also resolve dynamic type for
3328 LOC_OPTIMIZED_OUT vars.
3329
3330 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3331
3332 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3333 decoding.
3334
3335 2018-07-17 Tom Tromey <tom@tromey.com>
3336
3337 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3338 (compute_enum_list, pascm_set_param_value_x)
3339 (gdbscm_parameter_value): Update.
3340 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3341 (gdbscm_scm_to_host_string): Update.
3342 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3343 Update.
3344 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3345 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3346 * guile/scm-string.c (gdbscm_scm_to_string): Return
3347 unique_xmalloc_ptr.
3348 (gdbscm_scm_to_host_string): Likewise.
3349
3350 2018-07-17 Tom Tromey <tom@tromey.com>
3351
3352 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3353 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3354 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3355 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3356 unique_xmalloc_ptr.
3357
3358 2018-07-17 Tom Tromey <tom@tromey.com>
3359
3360 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3361 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3362 Update.
3363 * guile/scm-cmd.c (cmdscm_function): Update.
3364 * guile/scm-pretty-print.c
3365 (ppscm_print_exception_unless_memory_error): Update.
3366 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3367 Return unique_xmalloc_ptr.
3368
3369 2018-07-17 Tom Tromey <tom@tromey.com>
3370
3371 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3372 Use string_printf.
3373
3374 2018-07-17 Jim Wilson <jimw@sifive.com>
3375
3376 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3377 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3378 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3379 unecessary braces after EF_RISCV_RVC test. Delete call to
3380 set_gdbarch_decr_pc_after_break.
3381
3382 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3383 RISCV_LAST_FP_REGNUM + 1.
3384 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3385
3386 2018-07-17 Tom Tromey <tom@tromey.com>
3387
3388 * configure.ac: Remove --disable-gdbcli.
3389 * configure: Rebuild.
3390 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3391 (SUBDIR_CLI_CFLAGS): Remove.
3392 (SFILES): Use SUBDIR_CLI_SRCS.
3393 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3394
3395 2018-07-17 Tom Tromey <tom@tromey.com>
3396
3397 PR gdb/18624:
3398 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3399
3400 2018-07-16 Jim Wilson <jimw@sifive.com>
3401
3402 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3403
3404 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3405
3406 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3407 variable.
3408 (libunwind_frame_sniffer): Likewise.
3409 (libunwind_frame_prev_register): Likewise.
3410 (libunwind_sigtramp_frame_sniffer): Likewise.
3411 * ia64-tdep.c (ia64_access_reg): Likewise.
3412 (ia64_access_rse_reg): Likewise.
3413 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3414 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3415
3416 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3417
3418 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3419
3420 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3421
3422 * remote-sim.c (gdbsim_target::close,
3423 gdbsim_target::mourn_inferior): Remove unused variables.
3424
3425 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3426
3427 * ia64-tdep.c (ktab_buf): New global.
3428 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3429 (get_kernel_table): Adjust.
3430
3431 2018-07-16 Tom Tromey <tom@tromey.com>
3432
3433 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3434 * dwarf2read.c (using_directives, new_symbol): Use
3435 outermost_context_p.
3436 * dbxread.c (process_one_symbol): Use outermost_context_p.
3437 * coffread.c (coff_symtab_read): Use outermost_context_p.
3438
3439 2018-07-16 Tom Tromey <tom@tromey.com>
3440
3441 * dwarf2read.c (using_directives, read_func_scope)
3442 (read_lexical_block_scope): Update.
3443 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3444 * buildsym.h (local_using_directives, global_using_directives):
3445 Don't declare.
3446 (get_local_using_directives, set_local_using_directives)
3447 (get_global_using_directives): Declare.
3448 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3449 m_global_using_directives>: New members.
3450 (finish_block_internal, prepare_for_building)
3451 (reset_symtab_globals, end_symtab_get_static_block)
3452 (push_context): Update.
3453 (get_local_using_directives, set_local_using_directives)
3454 (get_global_using_directives): New functions.
3455 (buildsym_init): Update.
3456
3457 2018-07-16 Tom Tromey <tom@tromey.com>
3458
3459 * xcoffread.c (xcoff_initial_scan): Don't call
3460 free_pending_blocks.
3461 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3462 * buildsym.h (class scoped_free_pendings): Add constructor.
3463 (free_pending_blocks): Don't declare.
3464 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3465 (free_pending_blocks): Now static.
3466
3467 2018-07-16 Tom Tromey <tom@tromey.com>
3468
3469 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3470 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3471 member.
3472 (struct subfile_stack): Remove.
3473 (subfile_stack): Remove.
3474 (push_subfile, pop_subfile, buildsym_init): Update.
3475
3476 2018-07-16 Tom Tromey <tom@tromey.com>
3477
3478 * buildsym.c (push_subfile): Use gdb_assert.
3479 (pop_subfile): Use gdb_assert.
3480
3481 2018-07-16 Tom Tromey <tom@tromey.com>
3482
3483 * buildsym.h (merge_symbol_lists): Remove.
3484 * buildsym.c (merge_symbol_lists): Remove.
3485
3486 2018-07-16 Tom Tromey <tom@tromey.com>
3487
3488 * stabsread.c (scan_file_globals): Update comment.
3489 * stabsread.h (scan_file_globals): Move from buildsym.h.
3490 * buildsym.h (scan_file_globals): Move to stabsread.h.
3491
3492 2018-07-16 Tom Tromey <tom@tromey.com>
3493
3494 * xcoffread.c (xcoff_new_init): Update.
3495 * mipsread.c (mipscoff_new_init): Update.
3496 * mdebugread.c (mdebug_build_psymtabs): Update.
3497 * elfread.c (elf_new_init): Update.
3498 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3499 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3500 * buildsym.h (buildsym_new_init): Don't declare.
3501 * buildsym.c (buildsym_new_init): Remove.
3502
3503 2018-07-16 Tom Tromey <tom@tromey.com>
3504
3505 * stabsread.h (within_function): Move from buildsym.h.
3506 * stabsread.c (start_stabs): Clear within_function.
3507 * coffread.c (coff_start_symtab): Clear within_function.
3508 * buildsym.h (within_function): Move to stabsread.h.
3509 * buildsym.c (prepare_for_building): Update.
3510
3511 2018-07-16 Tom Tromey <tom@tromey.com>
3512
3513 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3514 * dwarf2read.c (dwarf2_start_symtab): Don't set
3515 processing_gcc_compilation.
3516 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3517
3518 2018-07-16 Tom Tromey <tom@tromey.com>
3519
3520 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3521 (next_symbol_text_func): Move from buildsym.h.
3522 * stabsread.c (hashname): Move from buildsym.c.
3523 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3524 (next_symbol_text_func, hashname): Move to stabsread.h.
3525 * buildsym.c: Don't include bcache.h
3526 (hashname): Move to stasbread.c.
3527
3528 2018-07-16 Tom Tromey <tom@tromey.com>
3529
3530 * buildsym.h (context_stack_size): Don't declare.
3531 * buildsym.c (context_stack_size): New global.
3532
3533 2018-07-16 Tom Tromey <tom@tromey.com>
3534
3535 * dbxread.c (processing_acc_compilation): New global.
3536 * buildsym.h (processing_acc_compilation): Don't declare.
3537
3538 2018-07-16 Tom Tromey <tom@tromey.com>
3539
3540 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3541 * dbxread.c (read_ofile_symtab): Update.
3542 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3543 * buildsym.h (last_source_start_addr): Remove.
3544 (set_last_source_start_addr, get_last_source_start_addr):
3545 Declare.
3546 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3547 parameter.
3548 (struct buildsym_compunit) <m_last_source_start_addr>: New
3549 member.
3550 (prepare_for_building): Remove start_addr parameter.
3551 (start_symtab, restart_symtab, end_symtab_get_static_block)
3552 (end_symtab_with_blockvector): Update.
3553 (set_last_source_start_addr, get_last_source_start_addr): New
3554 functions.
3555
3556 2018-07-16 Tom Tromey <tom@tromey.com>
3557
3558 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3559 member.
3560 (have_line_numbers): Remove.
3561 (record_line, prepare_for_building, end_symtab_get_static_block)
3562 (augment_type_symtab): Update.
3563
3564 2018-07-16 Tom Tromey <tom@tromey.com>
3565
3566 * buildsym.c (~buildsym_compunit): Free the macro table.
3567 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3568 methods.
3569 <m_pending_macros>: New member.
3570 (pending_macros): Remove.
3571 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3572 (reset_symtab_globals, end_symtab_get_static_block)
3573 (end_symtab_with_blockvector, augment_type_symtab)
3574 (buildsym_init): Update.
3575
3576 2018-07-16 Tom Tromey <tom@tromey.com>
3577
3578 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3579 parameter.
3580 (buildsym_compunit::set_last_source_file): New method.
3581 <m_last_source_file>: New member.
3582 (prepare_for_building): Remove "name" parameter.
3583 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3584 (last_source_file): Remove.
3585 (set_last_source_file, get_last_source_file): Update.
3586
3587 2018-07-16 Tom Tromey <tom@tromey.com>
3588
3589 * buildsym.c (prepare_for_building): Add assert.
3590
3591 2018-07-16 Tom Tromey <tom@tromey.com>
3592
3593 * buildsym.c (~buildsym_compunit): Update.
3594 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3595 (start_subfile, patch_subfile_names)
3596 (end_symtab_with_blockvector): Update.
3597
3598 2018-07-16 Tom Tromey <tom@tromey.com>
3599
3600 * buildsym.c (struct buildsym_compunit): Add constructor,
3601 destructor, initializers.
3602 (start_buildsym_compunit): Remove.
3603 (free_buildsym_compunit): Use "delete".
3604 (start_symtab, restart_symtab): Use "new".
3605
3606 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
3607
3608 * symfile.c (set_objfile_default_section_offset): Remove struct
3609 keyword.
3610
3611 2018-07-14 Stafford Horne <shorne@gmail.com>
3612
3613 * (Responsible Maintainers): Add myself as or1k maintainer.
3614
3615 2018-07-13 Tom Tromey <tom@tromey.com>
3616
3617 * symfile.c (set_objfile_default_section_offset): Use extra braces
3618 around initializer.
3619
3620 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3621
3622 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3623 non-branching basr.
3624
3625 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3626
3627 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3628 unittests/cli-utils-selftests.c
3629 * unittests/cli-utils-selftests.c: New file.
3630
3631 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3632
3633 * NEWS: Mention new commands. Mention change to 'thread apply'.
3634
3635 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3636
3637 * thread.c (thr_try_catch_cmd): New function.
3638 (thread_apply_all_command): Handle qcs flags.
3639 (thread_apply_command): Handle qcs flags.
3640 (taas_command): New function.
3641 (tfaas_command): New function.
3642 (_initialize_thread): Update to setup the new commands 'taas
3643 and 'tfaas'. Change doc string for 'thread apply'.
3644
3645 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3646
3647 * stack.c: (trailing_outermost_frame): New function, mostly
3648 extracted from backtrace_command_1.
3649 (leading_innermost_frame): New function.
3650 (backtrace_command_1): Update to call trailing_outermost_frame.
3651 (frame_apply_command_count): New function.
3652 (frame_apply_level_command): New function.
3653 (frame_apply_all_command): New function.
3654 (frame_apply_command): New function.
3655 (faas_command): New function.
3656 (frame_cmd_list): New variable.
3657 (_initialize_stack): Update to setup the new commands 'frame apply'
3658 and 'faas'.
3659
3660 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3661
3662 * cli-utils.c (number_or_range_parser::get_number): Only handle
3663 numbers or convenience var as numbers.
3664 (parse_flags): New function.
3665 (parse_flags_qcs): New function.
3666 (number_or_range_parser::finished): Ensure parsing end is detected
3667 before end of string.
3668 * cli-utils.h (parse_flags): New function.
3669 (parse_flags_qcs): New function.
3670 (number_or_range_parser): Remove m_finished bool.
3671 (number_or_range_parser::skip_range): Set m_in_range to false.
3672
3673 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
3674
3675 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3676 on Windows.
3677
3678 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3679 Jan Kratochvil <jan.kratochvil@redhat.com>
3680 Paul Fertser <fercerpav@gmail.com>
3681 Tsutomu Seki <sekiriki@gmail.com>
3682 Pedro Alves <palves@redhat.com>
3683
3684 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3685 'unittests/parse-connection-spec-selftests.c'.
3686 (COMMON_SFILES): Add 'common/netstuff.c'.
3687 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3688 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3689 * common/netstuff.c: New file.
3690 * common/netstuff.h: New file.
3691 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3692 (wait_for_connect): Update comment. New parameter
3693 'gdb::optional<int> sock' instead of 'struct serial *scb'.
3694 Use 'sock' directly instead of 'scb->fd'.
3695 (try_connect): New function, with code from 'net_open'.
3696 (net_open): Rewrite main loop to deal with multiple
3697 sockets/addresses. Handle IPv6-style hostnames; implement
3698 support for IPv6 connections.
3699 * unittests/parse-connection-spec-selftests.c: New file.
3700
3701 2018-07-11 Pedro Alves <palves@redhat.com>
3702
3703 PR gdb/23377
3704 * remote.c (remote_target::remote_detach_pid): Call
3705 set_current_process.
3706
3707 2018-07-11 Pedro Alves <palves@redhat.com>
3708
3709 * h8300-tdep.c (h8300_gdbarch_init): Remove
3710 set_gdbarch_ecoff_reg_to_regnum calls.
3711
3712 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3713
3714 PR c++/23373
3715 * c-typeprint.c (c_type_print_base_struct_union): Don't print
3716 offsets/sizes for static members of a class/struct.
3717
3718 2018-07-11 Alan Hayward <alan.hayward@arm.com>
3719
3720 * target-descriptions.c (tdesc_register_bitsize): Rename.
3721 * target-descriptions.h (tdesc_register_bitsize): Likewise.
3722 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3723 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3724
3725 2018-07-10 Tom Tromey <tom@tromey.com>
3726
3727 * breakpoint.c (moribund_locations): Now static and a
3728 std::vector.
3729 (breakpoint_init_inferior, moribund_breakpoint_here_p)
3730 (build_bpstat_chain, update_global_location_list)
3731 (breakpoint_retire_moribund): Update.
3732 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
3733 VEC.
3734
3735 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3736
3737 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3738 (riscv_register_reggroup_p): Use new function, remove unneeded
3739 parenthesis.
3740 (riscv_push_dummy_call): Extend assert to compare against xlen or
3741 flen based on register type.
3742
3743 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3744
3745 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3746
3747 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
3748
3749 * remote.c (show_hardware_watchpoint_limit): New function.
3750 (show_hardware_watchpoint_length_limit): New function.
3751 (show_hardware_breakpoint_limit): New function.
3752 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3753 where appropriate, update help text.
3754
3755 2018-07-09 Tom Tromey <tom@tromey.com>
3756
3757 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3758 (CLIBS): Don't mention NAT_CLIBS.
3759
3760 2018-07-09 Tom Tromey <tom@tromey.com>
3761
3762 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3763 (LIBGDB_OBS, clean mostlyclean): Update.
3764 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3765
3766 2018-07-09 Tom Tromey <tom@tromey.com>
3767
3768 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3769 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3770 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3771
3772 2018-07-09 Tom Tromey <tom@tromey.com>
3773
3774 * Makefile.in (ALLDEPFILES): Remove exec.c.
3775 (COMMON_OBS): Remove exec.o.
3776 (COMMON_SFILES): Add exec.c.
3777
3778 2018-07-09 Tom Tromey <tom@tromey.com>
3779
3780 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3781
3782 2018-07-09 Tom Tromey <tom@tromey.com>
3783
3784 * Makefile.in (clean mostlyclean): Remove stamp-version.
3785 (version.c): Depend on stamp-version.
3786 (stamp-version): New rule, from version.c rule.
3787
3788 2018-07-09 Tom Tromey <tom@tromey.com>
3789
3790 * Makefile.in (init.c): Depend on stamp-init.
3791 (stamp-init): New rule, from init.c rule.
3792 (clean mostlyclean): Remove stamp-init.
3793
3794 2018-07-09 Tom Tromey <tom@tromey.com>
3795
3796 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3797 SUBDIR_GCC_COMPILE_SRCS.
3798
3799 2018-07-09 Tom Tromey <tom@tromey.com>
3800
3801 * Makefile.in (init.c): Remove some unused sed rules.
3802
3803 2018-07-09 Tom Tromey <tom@tromey.com>
3804
3805 * Makefile.in (TSOBS): Remove.
3806 (INIT_FILES): Update.
3807 (LIBGDB_OBS): Update.
3808 (COMMON_SFILES): Add inflow.c.
3809 (SFILES): Remove inflow.c.
3810
3811 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3812
3813 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3814
3815 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3816
3817 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3818 get_saveloc_name, is_signal_frame_name, step_name,
3819 init_remote_name, create_addr_space_name,
3820 destroy_addr_space_name, search_unwind_table_name,
3821 find_dyn_list_name): Constify.
3822
3823 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3824
3825 * darwin-nat.c (darwin_pthread_kill): New function.
3826 (darwin_resume_thread): Use darwin_pthread_kill.
3827
3828 2018-07-05 Tom de Vries <tdevries@suse.de>
3829
3830 * macroexp.c (macro_buffer) <operator=>: New member function.
3831
3832 2018-07-04 Tom Tromey <tom@tromey.com>
3833
3834 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3835
3836 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3837
3838 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3839 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3840 * maint.c: Likewise.
3841 * top.c: Likewise.
3842
3843 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3844
3845 * NEWS: Create a new section for the next release branch.
3846 Rename the section of the current branch, now that it has
3847 been cut.
3848
3849 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3850
3851 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3852 * version.in: Bump version to 8.2.50.DATE-git.
3853
3854 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3855 Pedro Alves <palves@redhat.com>
3856
3857 * linux-nat.c (linux_init_ptrace): Rename to ...
3858 (linux_init_ptrace_procfs): ... this. Call
3859 linux_proc_init_warnings.
3860 (linux_nat_target::post_attach)
3861 (linux_nat_target::post_startup_inferior): Adjust.
3862 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3863 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3864
3865 2018-07-04 Tom de Vries <tdevries@suse.de>
3866
3867 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3868 check ...
3869 (read_comp_unit_head): ... here.
3870
3871 2018-07-03 Tom Tromey <tom@tromey.com>
3872
3873 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3874 (stop_tracing, tstatus_command)
3875 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3876 (print_one_static_tracepoint_marker): Update.
3877 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3878 std::vector.
3879 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3880 VEC.
3881 (all_tracepoints, static_tracepoints_here): Return std::vector.
3882
3883 2018-07-03 Tom Tromey <tom@tromey.com>
3884
3885 * common/ptid.c (ptid_equal): Remove.
3886 * common/ptid.h (ptid_equal): Don't declare.
3887 * ada-tasks.c: Update.
3888 * breakpoint.c: Update.
3889 * common/agent.c: Update.
3890 * corelow.c: Update.
3891 * darwin-nat-info.c: Update.
3892 * darwin-nat.c: Update.
3893 * dcache.c: Update.
3894 * dtrace-probe.c: Update.
3895 * dummy-frame.c: Update.
3896 * fbsd-nat.c: Update.
3897 * frame.c: Update.
3898 * gdbthread.h: Update.
3899 * gnu-nat.c: Update.
3900 * go32-nat.c: Update.
3901 * inf-loop.c: Update.
3902 * inf-ptrace.c: Update.
3903 * infcall.c: Update.
3904 * infcmd.c: Update.
3905 * inflow.c: Update.
3906 * infrun.c: Update.
3907 * linux-fork.c: Update.
3908 * linux-nat.c: Update.
3909 * linux-thread-db.c: Update.
3910 * mi/mi-cmd-var.c: Update.
3911 * mi/mi-interp.c: Update.
3912 * mi/mi-main.c: Update.
3913 * nto-procfs.c: Update.
3914 * ppc-linux-tdep.c: Update.
3915 * procfs.c: Update.
3916 * python/py-inferior.c: Update.
3917 * python/py-record-btrace.c: Update.
3918 * python/py-record.c: Update.
3919 * ravenscar-thread.c: Update.
3920 * regcache.c: Update.
3921 * remote-sim.c: Update.
3922 * remote.c: Update.
3923 * sol-thread.c: Update.
3924 * solib.c: Update.
3925 * target.c: Update.
3926 * tui/tui-stack.c: Update.
3927 * varobj.c: Update.
3928 * windows-nat.c: Update.
3929 * windows-tdep.c: Update.
3930
3931 2018-07-03 Tom Tromey <tom@tromey.com>
3932
3933 * common/ptid.c (ptid_match): Remove.
3934 * common/ptid.h (ptid_match): Don't declare.
3935 * fbsd-nat.c: Update.
3936 * infcmd.c: Update.
3937 * infrun.c: Update.
3938 * linux-nat.c: Update.
3939 * record-btrace.c: Update.
3940 * regcache.c: Update.
3941 * remote.c: Update.
3942
3943 2018-07-03 Tom Tromey <tom@tromey.com>
3944
3945 * common/ptid.c (ptid_tid_p): Remove.
3946 * common/ptid.h (ptid_tid_p): Don't declare.
3947 * sol-thread.c: Update.
3948
3949 2018-07-03 Tom Tromey <tom@tromey.com>
3950
3951 * common/ptid.c (ptid_lwp_p): Remove.
3952 * common/ptid.h (ptid_lwp_p): Don't declare.
3953 * fbsd-nat.c: Update.
3954 * linux-nat.c: Update.
3955 * nat/linux-procfs.c: Update.
3956 * nat/x86-linux-dregs.c: Update.
3957 * sol-thread.c: Update.
3958
3959 2018-07-03 Tom Tromey <tom@tromey.com>
3960
3961 * common/ptid.c (ptid_is_pid): Remove.
3962 * common/ptid.h (ptid_is_pid): Don't declare.
3963 * infrun.c: Update.
3964 * linux-nat.c: Update.
3965 * mi/mi-interp.c: Update.
3966 * remote.c: Update.
3967 * thread.c: Update.
3968
3969 2018-07-03 Tom Tromey <tom@tromey.com>
3970
3971 * common/ptid.c (ptid_get_tid): Remove.
3972 * common/ptid.h (ptid_get_tid): Don't declare.
3973 * ada-tasks.c: Update.
3974 * aix-thread.c: Update.
3975 * bsd-uthread.c: Update.
3976 * darwin-nat.c: Update.
3977 * fbsd-nat.c: Update.
3978 * i386-darwin-nat.c: Update.
3979 * infrun.c: Update.
3980 * linux-tdep.c: Update.
3981 * nto-procfs.c: Update.
3982 * ppc-ravenscar-thread.c: Update.
3983 * python/py-infthread.c: Update.
3984 * ravenscar-thread.c: Update.
3985 * sol-thread.c: Update.
3986 * sparc-ravenscar-thread.c: Update.
3987 * windows-nat.c: Update.
3988
3989 2018-07-03 Tom Tromey <tom@tromey.com>
3990
3991 * common/ptid.c (ptid_get_lwp): Remove.
3992 * common/ptid.h (ptid_get_lwp): Don't declare.
3993 * aarch64-linux-nat.c: Update.
3994 * ada-tasks.c: Update.
3995 * aix-thread.c: Update.
3996 * amd64-linux-nat.c: Update.
3997 * arm-linux-nat.c: Update.
3998 * corelow.c: Update.
3999 * fbsd-nat.c: Update.
4000 * fbsd-tdep.c: Update.
4001 * gnu-nat.c: Update.
4002 * i386-cygwin-tdep.c: Update.
4003 * i386-gnu-nat.c: Update.
4004 * i386-linux-nat.c: Update.
4005 * ia64-linux-nat.c: Update.
4006 * inf-ptrace.c: Update.
4007 * infrun.c: Update.
4008 * linux-fork.c: Update.
4009 * linux-nat.c: Update.
4010 * linux-tdep.c: Update.
4011 * linux-thread-db.c: Update.
4012 * mips-linux-nat.c: Update.
4013 * nat/aarch64-linux-hw-point.c: Update.
4014 * nat/aarch64-linux.c: Update.
4015 * nat/linux-btrace.c: Update.
4016 * nat/linux-osdata.c: Update.
4017 * nat/linux-procfs.c: Update.
4018 * nat/x86-linux-dregs.c: Update.
4019 * obsd-nat.c: Update.
4020 * ppc-fbsd-nat.c: Update.
4021 * ppc-linux-nat.c: Update.
4022 * procfs.c: Update.
4023 * python/py-infthread.c: Update.
4024 * ravenscar-thread.c: Update.
4025 * remote.c: Update.
4026 * s390-linux-nat.c: Update.
4027 * sol-thread.c: Update.
4028 * sol2-tdep.c: Update.
4029 * spu-linux-nat.c: Update.
4030 * x86-linux-nat.c: Update.
4031 * xtensa-linux-nat.c: Update.
4032
4033 2018-07-03 Tom Tromey <tom@tromey.com>
4034
4035 * common/ptid.c (ptid_get_pid): Remove.
4036 * common/ptid.h (ptid_get_pid): Don't declare.
4037 * aarch64-linux-nat.c: Update.
4038 * ada-lang.c: Update.
4039 * aix-thread.c: Update.
4040 * alpha-bsd-nat.c: Update.
4041 * amd64-fbsd-nat.c: Update.
4042 * amd64-linux-nat.c: Update.
4043 * arm-linux-nat.c: Update.
4044 * arm-nbsd-nat.c: Update.
4045 * auxv.c: Update.
4046 * break-catch-syscall.c: Update.
4047 * breakpoint.c: Update.
4048 * bsd-uthread.c: Update.
4049 * corelow.c: Update.
4050 * ctf.c: Update.
4051 * darwin-nat.c: Update.
4052 * fbsd-nat.c: Update.
4053 * fbsd-tdep.c: Update.
4054 * gcore.c: Update.
4055 * gnu-nat.c: Update.
4056 * hppa-nbsd-nat.c: Update.
4057 * hppa-obsd-nat.c: Update.
4058 * i386-fbsd-nat.c: Update.
4059 * ia64-linux-nat.c: Update.
4060 * inf-ptrace.c: Update.
4061 * infcmd.c: Update.
4062 * inferior.c: Update.
4063 * inferior.h: Update.
4064 * inflow.c: Update.
4065 * infrun.c: Update.
4066 * linux-fork.c: Update.
4067 * linux-nat.c: Update.
4068 * linux-tdep.c: Update.
4069 * linux-thread-db.c: Update.
4070 * m68k-bsd-nat.c: Update.
4071 * mi/mi-interp.c: Update.
4072 * mi/mi-main.c: Update.
4073 * mips-linux-nat.c: Update.
4074 * mips-nbsd-nat.c: Update.
4075 * mips64-obsd-nat.c: Update.
4076 * nat/aarch64-linux-hw-point.c: Update.
4077 * nat/aarch64-linux.c: Update.
4078 * nat/linux-btrace.c: Update.
4079 * nat/linux-osdata.c: Update.
4080 * nat/linux-procfs.c: Update.
4081 * nat/x86-linux-dregs.c: Update.
4082 * nto-procfs.c: Update.
4083 * obsd-nat.c: Update.
4084 * ppc-linux-nat.c: Update.
4085 * ppc-nbsd-nat.c: Update.
4086 * ppc-obsd-nat.c: Update.
4087 * proc-service.c: Update.
4088 * procfs.c: Update.
4089 * python/py-inferior.c: Update.
4090 * python/py-infthread.c: Update.
4091 * ravenscar-thread.c: Update.
4092 * record.c: Update.
4093 * remote-sim.c: Update.
4094 * remote.c: Update.
4095 * rs6000-nat.c: Update.
4096 * s390-linux-nat.c: Update.
4097 * sh-nbsd-nat.c: Update.
4098 * sol-thread.c: Update.
4099 * sparc-nat.c: Update.
4100 * sparc64-tdep.c: Update.
4101 * spu-linux-nat.c: Update.
4102 * spu-tdep.c: Update.
4103 * target-debug.h: Update.
4104 * target.c: Update.
4105 * thread.c: Update.
4106 * tid-parse.c: Update.
4107 * tracefile-tfile.c: Update.
4108 * vax-bsd-nat.c: Update.
4109 * windows-nat.c: Update.
4110 * x86-linux-nat.c: Update.
4111 * x86-nat.c: Update.
4112
4113 2018-07-03 Tom Tromey <tom@tromey.com>
4114
4115 * common/ptid.c (pid_to_ptid): Remove.
4116 * common/ptid.h (pid_to_ptid): Don't declare.
4117 * aix-thread.c: Update.
4118 * arm-linux-nat.c: Update.
4119 * common/ptid.c: Update.
4120 * common/ptid.h: Update.
4121 * corelow.c: Update.
4122 * ctf.c: Update.
4123 * darwin-nat.c: Update.
4124 * fbsd-nat.c: Update.
4125 * fork-child.c: Update.
4126 * gnu-nat.c: Update.
4127 * go32-nat.c: Update.
4128 * inf-ptrace.c: Update.
4129 * infcmd.c: Update.
4130 * inferior.c: Update.
4131 * infrun.c: Update.
4132 * linux-fork.c: Update.
4133 * linux-nat.c: Update.
4134 * nat/aarch64-linux-hw-point.c: Update.
4135 * nat/fork-inferior.c: Update.
4136 * nat/x86-linux-dregs.c: Update.
4137 * nto-procfs.c: Update.
4138 * obsd-nat.c: Update.
4139 * procfs.c: Update.
4140 * progspace.c: Update.
4141 * remote.c: Update.
4142 * rs6000-nat.c: Update.
4143 * s390-linux-nat.c: Update.
4144 * sol-thread.c: Update.
4145 * spu-linux-nat.c: Update.
4146 * target.c: Update.
4147 * top.c: Update.
4148 * tracefile-tfile.c: Update.
4149 * windows-nat.c: Update.
4150
4151 2018-07-03 Tom Tromey <tom@tromey.com>
4152
4153 * common/ptid.h (ptid_build): Don't declare.
4154 * common/ptid.c (ptid_build): Remove.
4155 * aix-thread.c: Update.
4156 * bsd-kvm.c: Update.
4157 * bsd-uthread.c: Update.
4158 * common/agent.c: Update.
4159 * common/ptid.c: Update.
4160 * common/ptid.h: Update.
4161 * corelow.c: Update.
4162 * darwin-nat.c: Update.
4163 * fbsd-nat.c: Update.
4164 * gnu-nat.c: Update.
4165 * linux-fork.c: Update.
4166 * linux-nat.c: Update.
4167 * linux-thread-db.c: Update.
4168 * nat/linux-osdata.c: Update.
4169 * nat/linux-procfs.c: Update.
4170 * nto-procfs.c: Update.
4171 * obsd-nat.c: Update.
4172 * proc-service.c: Update.
4173 * procfs.c: Update.
4174 * ravenscar-thread.c: Update.
4175 * remote-sim.c: Update.
4176 * remote.c: Update.
4177 * sol-thread.c: Update.
4178 * target.c: Update.
4179 * windows-nat.c: Update.
4180
4181 2018-07-03 Tom Tromey <tom@tromey.com>
4182
4183 * infrun.c (follow_exec): Use exit_inferior_silent.
4184 * inferior.c (exit_inferior_num_silent): Remove.
4185 * inferior.h (exit_inferior_num_silent): Don't declare.
4186
4187 2018-07-03 Tom Tromey <tom@tromey.com>
4188
4189 PR cli/23340:
4190 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4191 inferior_ptid on error.
4192
4193 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4194 Simon Marchi <simon.marchi@polymtl.ca>
4195
4196 PR tdep/8282
4197 * disasm.h (gdb_disassembler): Add
4198 `m_disassembler_options_holder'. member
4199 * disasm.c (get_all_disassembler_options): New function.
4200 (gdb_disassembler::gdb_disassembler): Use it.
4201 (gdb_buffered_insn_length_init_dis): Likewise.
4202 (gdb_buffered_insn_length): Adjust accordingly.
4203 (set_disassembler_options): Handle options with arguments.
4204 (show_disassembler_options_sfunc): Likewise. Add a leading new
4205 line if showing options with descriptions.
4206 (disassembler_options_completer): Adapt to using the
4207 `disasm_options_and_args_t' structure.
4208 * mips-tdep.c (mips_disassembler_options): New variable.
4209 (mips_disassembler_options_o32): Likewise.
4210 (mips_disassembler_options_n32): Likewise.
4211 (mips_disassembler_options_n64): Likewise.
4212 (gdb_print_insn_mips): Don't set `disassembler_options'.
4213 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4214 functions.
4215 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4216 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4217 `gdbarch_disassembler_options_implicit' and
4218 `gdbarch_valid_disassembler_options'.
4219 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4220 `disasm_options_and_args_t' structure.
4221 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4222 method.
4223 (valid_disassembler_options): Switch from `disasm_options_t' to
4224 the `disasm_options_and_args_t' structure.
4225 * NEWS: Document `set disassembler-options' support for the MIPS
4226 target.
4227 * gdbarch.h: Regenerate.
4228 * gdbarch.c: Regenerate.
4229
4230 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4231
4232 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4233
4234 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4235
4236 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4237 parameter in call to amd64_target_description.
4238 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4239 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4240 (amd64fbsd_init_abi): Likewise.
4241 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4242 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4243 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4244 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4245
4246 2018-06-29 Pedro Alves <palves@redhat.com>
4247
4248 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4249 "segments" parameter.
4250 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4251 (_initialize_amd64_tdep): Update call to
4252 amd64_create_target_description.
4253 (amd64_target_description): Add "segments" parameter. Adjust
4254 the implementation to use it.
4255 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4256 call to amd64_create_target_description.
4257 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4258 * gdb/arch/amd64.h (amd64_create_target_description): Add
4259 "segments" register.
4260 * gdb/arch/amd64.c (amd64_create_target_description): Add
4261 "segments" parameter. Call create_feature_i386_64bit_segments
4262 only if SEGMENTS is true.
4263 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4264 call to amd64_create_target_description.
4265
4266 2018-06-29 Pedro Alves <palves@redhat.com>
4267
4268 * thread.c (thread_target_id_str): New, factored out from ...
4269 (print_thread_info_1): ... here. Use it to compute the max
4270 "Target Id" column width.
4271
4272 2018-06-29 Pedro Alves <palves@redhat.com>
4273
4274 * remote.c (remote_target::extra_thread_info): Delete
4275 'display_buf' and 'n' locals. from the cache, regardless of
4276 packet mechanims is in use. Use cache for qThreadExtra and qP
4277 methods too.
4278
4279 2018-06-29 Pedro Alves <palves@redhat.com>
4280
4281 * blockframe.c (find_pc_sect_containing_function): New function.
4282 * breakpoint.c (print_breakpoint_location): Don't call
4283 find_pc_sect_function.
4284 * linespec.c (create_sals_line_offset): Record the location's
4285 symbol in the sal.
4286 * linespec.c (convert_address_location_to_sals): Fill in sal's
4287 symbol with find_pc_sect_containing_function.
4288 * symtab.c (find_function_start_sal): Rename to ...
4289 (find_function_start_sal_1): ... this.
4290 (find_function_start_sal): Reimplement as wrapper around
4291 find_function_start_sal_1, and use
4292 find_pc_sect_containing_function to fill in the sal's symbol.
4293 (find_function_start_sal(symbol*, bool)): Adjust.
4294 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4295 comments.
4296 (find_pc_sect_containing_function): Declare.
4297
4298 2018-06-29 Pedro Alves <palves@redhat.com>
4299
4300 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4301 true if the the location has no symbol.
4302
4303 2018-06-28 Tom Tromey <tom@tromey.com>
4304
4305 * NEWS: Mention --enable-codesign.
4306 * silent-rules.mk (ECHO_SIGN): New variable.
4307 * configure.ac: Add --enable-codesign.
4308 * configure: Rebuild.
4309 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4310 (gdb$(EXEEXT)): Optionally invoke codesign.
4311
4312 2018-06-28 Pedro Alves <palves@redhat.com>
4313
4314 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4315 comments.
4316 (switch_to_thread_no_regs): Adjust comment.
4317 * infcmd.c (stop_pc): Delete.
4318 (post_create_inferior, info_program_command): Replace references
4319 to stop_pc with references to thread_info->suspend.stop_pc.
4320 * inferior.h (stop_pc): Delete declaration.
4321 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4322 (handle_inferior_event_1, handle_signal_stop)
4323 (process_event_stop_test, keep_going_stepped_thread)
4324 (handle_step_into_function, handle_step_into_function_backward)
4325 (print_stop_location): Replace references to stop_pc with
4326 references to thread_info->suspend.stop_pc.
4327 (struct infcall_suspend_state) <stop_pc>: Delete field.
4328 (save_infcall_suspend_state, restore_infcall_suspend_state):
4329 Remove references to inf_stat->stop_pc.
4330 * linux-fork.c (fork_load_infrun_state): Likewise.
4331 * record-btrace.c (record_btrace_set_replay): Likewise.
4332 * record-full.c (record_full_goto_entry): Likewise.
4333 * remote.c (print_one_stopped_thread): Likewise.
4334 * target.c (target_resume): Extend comment.
4335 * thread.c (set_executing_thread): New.
4336 (set_executing): Use it.
4337 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4338 Remove references to stop_pc.
4339
4340 2018-06-28 Pedro Alves <palves@redhat.com>
4341
4342 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4343 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4344
4345 2018-06-28 Tom Tromey <tom@tromey.com>
4346
4347 * coffread.c (coff_symfile_finish): Update.
4348 * xcoffread.c (xcoff_symfile_finish): Update.
4349 * elfread.c (elf_symfile_finish): Update.
4350 * symfile.h (dwarf2_free_objfile): Don't declare.
4351 * dwarf2read.c (_initialize_dwarf2_read): Use
4352 register_objfile_data_with_cleanup.
4353 (dwarf2_free_objfile): Now static. Change signature.
4354
4355 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4356
4357 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4358 option "-o" to add-symbol-file-load to add an offset to each
4359 section's load address.
4360 * symfile.c (set_objfile_default_section_offset): New function.
4361
4362 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4363
4364 * symfile.c (add_symbol_file_command): Make sure that sections
4365 with the same name are sorted in the same order.
4366
4367 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4368
4369 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4370 require the second argument. If omitted, load sections at the
4371 addresses specified in the file.
4372
4373 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4374
4375 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4376 (_initialize_symfile): Add option "-o" to symbol-file to add an
4377 offset to each section of the symbol file.
4378
4379 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4380
4381 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4382
4383 2018-06-27 Tom Tromey <tom@tromey.com>
4384
4385 * stack.c (_initialize_stack): Update "func" help text.
4386
4387 2018-06-27 Tom Tromey <tom@tromey.com>
4388
4389 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4390 std::vector.
4391 (unwind_infopy_str, pyuw_create_unwind_info)
4392 (unwind_infopy_add_saved_register, pyuw_sniffer)
4393 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4394 Update.
4395 (struct saved_reg): Add constructor.
4396 <value>: Now a gdbpy_ref<>.
4397
4398 2018-06-27 Tom Tromey <tom@tromey.com>
4399
4400 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4401
4402 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4403
4404 * gdb-gdb.py.in: Format using autopep8.
4405
4406 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4407
4408 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4409 (type_lookup_function): Recognize CORE_ADDR values.
4410
4411 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4412
4413 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4414 print tag_name.
4415
4416 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4417
4418 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4419 <__lt__>: Add.
4420
4421 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4422
4423 * gdb-gdb.py: Move to...
4424 * gdb-gdb.py.in: ... here.
4425 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4426 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4427 dependencies.
4428 (distclean): Remove gdb-gdb.py when cleaning.
4429 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4430 * configure: Re-generate.
4431
4432 2018-06-27 Pedro Alves <palves@redhat.com>
4433
4434 * proc-service.c (get_ps_regcache): New.
4435 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4436 (ps_lsetfpregs): Use it.
4437
4438 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4439
4440 PR gdb/21695
4441 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4442 (dwarf_decode_lines_1): Adjust.
4443
4444 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4445
4446 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4447 override.
4448 <info_proc>: Likewise.
4449
4450 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4451
4452 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4453 to windows_fetch_one_register, and only handle the case of
4454 fetching one register. Move the code that reloads the context
4455 and iterates over all registers if R is negative to...
4456 (windows_nat_target::fetch_registers): ... here.
4457 (do_windows_store_inferior_registers): Rename to
4458 windows_store_one_register, and only handle the case of storing
4459 one register. Move the code that handles the case where r is
4460 negative to...
4461 (windows_nat_target::store_registers) ... here.
4462
4463 2018-06-26 Tom Tromey <tom@tromey.com>
4464
4465 PR rust/22574:
4466 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4467 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4468 Update.
4469 (rust_internal_print_type): Add podata parameter.
4470 (rust_print_type): Update.
4471
4472 2018-06-26 Tom Tromey <tom@tromey.com>
4473
4474 * typeprint.h (struct print_offset_data) <update, finish,
4475 maybe_print_hole>: New methods.
4476 <indentation>: New constant.
4477 * typeprint.c (print_offset_data::indentation): Define.
4478 (print_offset_data::maybe_print_hole, print_offset_data::update)
4479 (print_offset_data::finish): Move from c-typeprint.c and rename.
4480 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4481 (print_spaces_filtered_with_print_options): Update.
4482 (c_print_type_union_field_offset, maybe_print_hole)
4483 (c_print_type_struct_field_offset): Move to typeprint.c and
4484 rename.
4485 (c_type_print_base_struct_union): Update.
4486
4487 2018-06-25 Pedro Alves <palves@redhat.com>
4488
4489 * gdbthread.h (thread_info_ref, delete_thread)
4490 (delete_thread_silent, first_thread_of_inferior)
4491 (any_thread_of_inferior, switch_to_thread)
4492 (enable_thread_stack_temporaries)
4493 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4494 (get_last_thread_stack_temporary)
4495 (value_in_thread_stack_temporaries, can_access_registers_thread):
4496 Spell out "struct thread_info" instead of just "thread_info".
4497 * inferior.h (notice_new_inferior): Likewise.
4498
4499 2018-06-25 Pedro Alves <palves@redhat.com>
4500
4501 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4502 pass thread_info pointer to delete_thread.
4503 (windows_nat_target::detach): Pass inferior pointer to
4504 detach_inferior.
4505 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4506 delete_thread.
4507 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4508 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4509 and pass a thread_info pointer to delete_thread.
4510 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4511 pass thread_info pointer to delete_thread.
4512 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4513 delete_thread_silent call.
4514 * procfs.c (procfs_target::detach): Pass inferior pointer to
4515 detach_inferior.
4516 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4517 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4518 delete_thread_silent call.
4519 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4520 pass thread_info pointer to delete_thread.
4521 (windows_nat_target::detach): Pass inferior pointer to
4522 delete_inferior.
4523
4524 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4525
4526 * regcache.c (readable_regcache::read_part): Fix asserts.
4527 (reg_buffer::raw_collect_part): New function.
4528 (regcache::write_part): Fix asserts.
4529 (reg_buffer::raw_supply_part): New function.
4530 (regcache::transfer_regset_register): New helper function.
4531 (regcache::transfer_regset): Call new functions.
4532 (regcache_supply_regset): Use gdb_byte*.
4533 (regcache::supply_regset): Likewise.
4534 (regcache_collect_regset): Likewise.
4535 (regcache::collect_regset): Likewise.
4536 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4537 (reg_buffer::raw_supply_part): Likewise.
4538 (regcache::transfer_regset_register): Likewise.
4539 (regcache::transfer_regset): Use gdb_byte*.
4540
4541 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4542
4543 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4544
4545 2018-06-21 Pedro Alves <palves@redhat.com>
4546
4547 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4548 instead of a ptid_t. All callers adjusted.
4549 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4550 adjusted.
4551 (print_ada_task_info, display_current_task_id, task_command_1):
4552 Adjust.
4553 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4554 inferior_thread.
4555 (breakpoint_kind): Adjust.
4556 (remove_breakpoints_pid): Rename to ...
4557 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4558 pointer. All callers adjusted.
4559 (bpstat_clear_actions): Use inferior_thread.
4560 (get_bpstat_thread): New.
4561 (bpstat_do_actions): Use it.
4562 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4563 to take a thread_info pointer. All callers adjusted.
4564 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4565 (breakpoint_re_set_thread): Use inferior_thread.
4566 * breakpoint.h (struct inferior): Forward declare.
4567 (bpstat_stop_status): Update.
4568 (remove_breakpoints_pid): Delete.
4569 (remove_breakpoints_inf): New.
4570 * bsd-uthread.c (bsd_uthread_target::wait)
4571 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4572 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4573 (maint_btrace_packet_history_cmd)
4574 (maint_btrace_clear_packet_history_cmd): Adjust.
4575 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4576 inferior_thread.
4577 * cli/cli-interp.c: Include "inferior.h".
4578 * common/refcounted-object.h (struct
4579 refcounted_object_ref_policy): New.
4580 * compile/compile-object-load.c: Include gdbthread.h.
4581 (store_regs): Use inferior_thread.
4582 * corelow.c (core_target::close): Use current_inferior.
4583 (core_target_open): Adjust to use first_thread_of_inferior and use
4584 the current inferior.
4585 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4586 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4587 <thread>: ... this new field. All references adjusted.
4588 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4589 Take a thread_info pointer instead of a ptid_t.
4590 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4591 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4592 thread_info pointer instead of a ptid_t.
4593 * elfread.c: Include "inferior.h".
4594 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4595 Use inferior_thread.
4596 * eval.c (evaluate_subexp): Likewise.
4597 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4598 inferior_thread.
4599 * gdb_proc_service.h (struct thread_info): Forward declare.
4600 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4601 <thread>: ... this new field. All references adjusted.
4602 * gdbarch.h, gdbarch.c: Regenerate.
4603 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4604 'thread' parameter. All implementations and callers adjusted.
4605 * gdbthread.h (thread_info) <set_running>: New method.
4606 (delete_thread, delete_thread_silent): Take a thread_info pointer
4607 instead of a ptid.
4608 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4609 (first_thread_of_process): Delete, replaced by ...
4610 (first_thread_of_inferior): ... this new function. All callers
4611 adjusted.
4612 (any_live_thread_of_process): Delete, replaced by ...
4613 (any_live_thread_of_inferior): ... this new function. All callers
4614 adjusted.
4615 (switch_to_thread, switch_to_no_thread): Declare.
4616 (is_executing): Delete.
4617 (enable_thread_stack_temporaries): Update comment.
4618 <enable_thread_stack_temporaries>: Take a thread_info pointer
4619 instead of a ptid_t. Incref the thread.
4620 <~enable_thread_stack_temporaries>: Decref the thread.
4621 <m_ptid>: Delete
4622 <m_thr>: New.
4623 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4624 (get_last_thread_stack_temporary)
4625 (value_in_thread_stack_temporaries, can_access_registers_thread):
4626 Take a thread_info pointer instead of a ptid_t. All callers
4627 adjusted.
4628 * infcall.c (get_call_return_value): Use inferior_thread.
4629 (run_inferior_call): Work with thread pointers instead of ptid_t.
4630 (call_function_by_hand_dummy): Work with thread pointers instead
4631 of ptid_t. Use thread_info_ref.
4632 * infcmd.c (proceed_thread_callback): Access thread's state
4633 directly.
4634 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4635 access thread's state directly.
4636 (continue_command): Use inferior_thread.
4637 (info_program_command): Use find_thread_ptid and access thread
4638 state directly.
4639 (proceed_after_attach_callback): Use thread state directly.
4640 (notice_new_inferior): Take a thread_info pointer instead of a
4641 ptid_t. All callers adjusted.
4642 (exit_inferior): Take an inferior pointer instead of a pid. All
4643 callers adjusted.
4644 (exit_inferior_silent): New.
4645 (detach_inferior): Delete.
4646 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4647 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4648 (detach_inferior_command, kill_inferior_command): Use
4649 find_inferior_id instead of valid_gdb_inferior_id and
4650 gdb_inferior_id_to_pid.
4651 (inferior_command): Use inferior and thread pointers.
4652 * inferior.h (struct thread_info): Forward declare.
4653 (notice_new_inferior): Take a thread_info pointer instead of a
4654 ptid_t. All callers adjusted.
4655 (detach_inferior): Delete declaration.
4656 (exit_inferior, exit_inferior_silent): Take an inferior pointer
4657 instead of a pid. All callers adjusted.
4658 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4659 (valid_gdb_inferior_id): Delete.
4660 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4661 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4662 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4663 ...
4664 <inf>: ... this new field.
4665 <step_ptid>: Delete, replaced by ...
4666 <step_thread>: ... this new field.
4667 (get_displaced_stepping_state): Take an inferior pointer instead
4668 of a pid. All callers adjusted.
4669 (displaced_step_in_progress_any_inferior): Adjust.
4670 (displaced_step_in_progress_thread): Take a thread pointer instead
4671 of a ptid_t. All callers adjusted.
4672 (displaced_step_in_progress, add_displaced_stepping_state): Take
4673 an inferior pointer instead of a pid. All callers adjusted.
4674 (get_displaced_step_closure_by_addr): Adjust.
4675 (remove_displaced_stepping_state): Take an inferior pointer
4676 instead of a pid. All callers adjusted.
4677 (displaced_step_prepare_throw, displaced_step_prepare)
4678 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4679 All callers adjusted.
4680 (start_step_over): Adjust.
4681 (infrun_thread_ptid_changed): Remove bit updating ptids in the
4682 displaced step queue.
4683 (do_target_resume): Adjust.
4684 (fetch_inferior_event): Use inferior_thread.
4685 (context_switch, get_inferior_stop_soon): Take an
4686 execution_control_state pointer instead of a ptid_t. All callers
4687 adjusted.
4688 (switch_to_thread_cleanup): Delete.
4689 (stop_all_threads): Use scoped_restore_current_thread.
4690 * inline-frame.c: Include "gdbthread.h".
4691 (inline_state) <inline_state>: Take a thread pointer instead of a
4692 ptid_t. All callers adjusted.
4693 <ptid>: Delete, replaced by ...
4694 <thread>: ... this new field.
4695 (find_inline_frame_state): Take a thread pointer instead of a
4696 ptid_t. All callers adjusted.
4697 (skip_inline_frames, step_into_inline_frame)
4698 (inline_skipped_frames, inline_skipped_symbol): Take a thread
4699 pointer instead of a ptid_t. All callers adjusted.
4700 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4701 (inline_skipped_frames, inline_skipped_symbol): Likewise.
4702 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4703 pointers directly.
4704 * linux-nat.c (get_detach_signal): Likewise.
4705 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4706 (thread_db_notice_clone): Adjust.
4707 (thread_db_find_new_threads_silently)
4708 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4709 a thread pointer instead of a ptid_t. All callers adjusted.
4710 * mi/mi-cmd-var.c: Include "inferior.h".
4711 (mi_cmd_var_update_iter): Update to use thread pointers.
4712 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4713 inferior directly.
4714 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4715 out to ...
4716 (mi_output_running): ... this new function.
4717 (mi_on_resume_1): Adjust to use it.
4718 (mi_user_selected_context_changed): Adjust to use inferior_thread.
4719 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4720 directly.
4721 (interrupt_thread_callback): : Adjust to use thread and inferior
4722 pointers.
4723 * proc-service.c: Include "gdbthread.h".
4724 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4725 * progspace-and-thread.c: Include "inferior.h".
4726 * progspace.c: Include "inferior.h".
4727 * python/py-exitedevent.c (create_exited_event_object): Adjust to
4728 hold a reference to an inferior_object.
4729 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4730 inferior_thread.
4731 * python/py-inferior.c (struct inferior_object): Give the type a
4732 tag name instead of a typedef.
4733 (python_on_normal_stop): No need to check if the current thread is
4734 listed.
4735 (inferior_to_inferior_object): Change return type to
4736 inferior_object. All callers adjusted.
4737 (find_thread_object): Delete, bits factored out to ...
4738 (thread_to_thread_object): ... this new function.
4739 * python/py-infthread.c (create_thread_object): Use
4740 inferior_to_inferior_object.
4741 (thpy_is_stopped): Use thread pointer directly.
4742 (gdbpy_selected_thread): Use inferior_thread.
4743 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4744 field, replaced with ...
4745 <thread>: ... this new field. All users adjusted.
4746 (btpy_insn_or_gap_new): Drop const.
4747 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
4748 callers adjusted.
4749 * python/py-record.c: Include "gdbthread.h".
4750 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4751 a ptid_t. All callers adjusted.
4752 (gdbpy_current_recording): Use inferior_thread.
4753 * python/py-record.h (recpy_record_object) <ptid>: Delete
4754 field, replaced with ...
4755 <thread>: ... this new field. All users adjusted.
4756 (recpy_element_object) <ptid>: Delete
4757 field, replaced with ...
4758 <thread>: ... this new field. All users adjusted.
4759 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4760 a ptid_t. All callers adjusted.
4761 * python/py-threadevent.c: Include "gdbthread.h".
4762 (get_event_thread): Use thread_to_thread_object.
4763 * python/python-internal.h (struct inferior_object): Forward
4764 declare.
4765 (find_thread_object, find_inferior_object): Delete declarations.
4766 (thread_to_thread_object, inferior_to_inferior_object): New
4767 declarations.
4768 * record-btrace.c: Include "inferior.h".
4769 (require_btrace_thread): Use inferior_thread.
4770 (record_btrace_frame_sniffer)
4771 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4772 (get_thread_current_frame): Use scoped_restore_current_thread and
4773 switch_to_thread.
4774 (get_thread_current_frame): Use thread pointer directly.
4775 (record_btrace_replay_at_breakpoint): Use thread's inferior
4776 pointer directly.
4777 * record-full.c: Include "inferior.h".
4778 * regcache.c: Include "gdbthread.h".
4779 (get_thread_arch_regcache): Use the inferior's address space
4780 directly.
4781 (get_thread_regcache, registers_changed_thread): New.
4782 * regcache.h (get_thread_regcache(thread_info *thread)): New
4783 overload.
4784 (registers_changed_thread): New.
4785 (remote_target) <remote_detach_1>: Swap order of parameters.
4786 (remote_add_thread): <remote_add_thread>: Return the new thread.
4787 (get_remote_thread_info(ptid_t)): New overload.
4788 (remote_target::remote_notice_new_inferior): Use thread pointers
4789 directly.
4790 (remote_target::process_initial_stop_replies): Use
4791 thread_info::set_running.
4792 (remote_target::remote_detach_1, remote_target::detach)
4793 (extended_remote_target::detach): Adjust.
4794 * stack.c (frame_show_address): Use inferior_thread.
4795 * target-debug.h (target_debug_print_thread_info_pp): New.
4796 * target-delegates.c: Regenerate.
4797 * target.c (default_thread_address_space): Delete.
4798 (memory_xfer_partial_1): Use current_inferior.
4799 (target_detach): Use current_inferior.
4800 (target_thread_address_space): Delete.
4801 (generic_mourn_inferior): Use current_inferior.
4802 * target.h (struct target_ops) <thread_address_space>: Delete.
4803 (target_thread_address_space): Delete.
4804 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4805 pointers directly.
4806 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4807 thread pointer instead of a ptid_t. Adjust all callers.
4808 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4809 (first_thread_of_process): Delete, replaced by ...
4810 (first_thread_of_inferior): ... this new function. All callers
4811 adjusted.
4812 (any_thread_of_process): Rename to ...
4813 (any_thread_of_inferior): ... this, and take an inferior pointer.
4814 (any_live_thread_of_process): Rename to ...
4815 (any_live_thread_of_inferior): ... this, and take an inferior
4816 pointer.
4817 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4818 (value_in_thread_stack_temporaries)
4819 (get_last_thread_stack_temporary): Take a thread pointer instead
4820 of a ptid_t. Adjust all callers.
4821 (thread_info::set_running): New.
4822 (validate_registers_access): Use inferior_thread.
4823 (can_access_registers_ptid): Rename to ...
4824 (can_access_registers_thread): ... this, and take a thread
4825 pointer.
4826 (print_thread_info_1): Adjust to compare thread pointers instead
4827 of ptids.
4828 (switch_to_no_thread, switch_to_thread): Make extern.
4829 (scoped_restore_current_thread::~scoped_restore_current_thread):
4830 Use m_thread pointer directly.
4831 (scoped_restore_current_thread::scoped_restore_current_thread):
4832 Use inferior_thread.
4833 (thread_command): Use thread pointer directly.
4834 (thread_num_make_value_helper): Use inferior_thread.
4835 * top.c (execute_command): Use inferior_thread.
4836 * tui/tui-interp.c: Include "inferior.h".
4837 * varobj.c (varobj_create): Use inferior_thread.
4838 (value_of_root_1): Use find_thread_global_id instead of
4839 global_thread_id_to_ptid.
4840
4841 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4842
4843 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4844 possible.
4845 (regcache::write_part): Likewise.
4846 (readable_regcache::cooked_read_part): Update comment.
4847 (readable_regcache::cooked_write_part): Likewise.
4848 * regcache.h: (readable_regcache::read_part): Likewise.
4849 (regcache::write_part): Likewise.
4850
4851 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4852 Dirk Schubert <dirk.schubert@arm.com>
4853
4854 * aarch64-linux-nat.c (post_attach): New.
4855 (aarch64_linux_nat_target::post_attach): Override post_attach to
4856 record the number of hardware debug registers.
4857
4858 2018-06-20 Tom Tromey <tom@tromey.com>
4859
4860 * python/py-param.c (add_setshow_generic): Make parameters const.
4861 (parmpy_init): Update.
4862
4863 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4864
4865 * regcache.h (regcache_cooked_read_ftype): Rename to...
4866 (register_read_ftype): ...this, change type to function_view.
4867 (class reg_buffer) <save>: Remove src parameter.
4868 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4869 parameter non-const in first overload. Remove src parameter in
4870 second overload.
4871 * regcache.c (do_cooked_read): Remove.
4872 (readonly_detached_regcache::readonly_detached_regcache): Make
4873 parameter non-const, adjust call to other constructor.
4874 (reg_buffer::save): Remove src parameter.
4875 * frame.c (do_frame_register_read): Remove.
4876 (frame_save_as_regcache): Use lambda function.
4877 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4878 parameter to ppu2spu_data *.
4879 (ppu2spu_sniffer): Use lambda function.
4880
4881 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4882
4883 * record-full.c (record_full_target::insert_breakpoint): Remove
4884 "struct" keyword, add const.
4885
4886 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4887
4888 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4889 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4890 * configure.ac: Remove AC_PREREQ, add missing quoting.
4891 * gnulib/configure.ac: Modernize usage of
4892 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4893 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4894 (AUTOMAKE_VERSION): Bump to 1.15.1.
4895 * configure: Re-generate.
4896 * config.in: Re-generate.
4897 * aclocal.m4: Re-generate.
4898 * gnulib/aclocal.m4: Re-generate.
4899 * gnulib/config.in: Re-generate.
4900 * gnulib/configure: Re-generate.
4901 * gnulib/import/Makefile.in: Re-generate.
4902
4903 2018-06-19 Pedro Alves <palves@redhat.com>
4904
4905 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4906 (lookup_minimal_symbol_by_pc_section): ... here with
4907 gdb_assert_not_reached added.
4908
4909 2018-06-19 Pedro Alves <palves@redhat.com>
4910
4911 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4912 parameter with a block parameter. Compare location's block symbol
4913 with the frame's block instead of addresses.
4914 (skip_inline_frames): Pass the current block instead of the
4915 frame's address. Break out as soon as we determine the frame
4916 should not be skipped.
4917
4918 2018-06-18 Tom Tromey <tom@tromey.com>
4919
4920 * solib-aix.c (solib_aix_get_section_offsets): Return
4921 unique_xmalloc_ptr.
4922 (solib_aix_solib_create_inferior_hook): Update.
4923
4924 2018-06-18 Tom Tromey <tom@tromey.com>
4925
4926 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4927
4928 2018-06-18 Tom Tromey <tom@tromey.com>
4929
4930 * solib-frv.c (frv_relocate_main_executable): Use
4931 unique_xmalloc_ptr.
4932 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4933 unique_xmalloc_ptr.
4934
4935 2018-06-18 Tom Tromey <tom@tromey.com>
4936
4937 * objfiles.h (inhibit_section_map_updates): Update.
4938 (resume_section_map_updates, resume_section_map_updates_cleanup):
4939 Remove.
4940 * solib-svr4.c (svr4_handle_solib_event): Update.
4941 * objfiles.c (inhibit_section_map_updates): Return
4942 scoped_restore_tmpl<int>.
4943 (resume_section_map_updates, resume_section_map_updates_cleanup):
4944 Remove.
4945
4946 2018-06-18 Tom Tromey <tom@tromey.com>
4947
4948 * valprint.h (read_string): Update.
4949 * valprint.c (read_string): Change type of "buffer".
4950 (val_print_string): Update.
4951 * python/py-value.c (valpy_string): Update.
4952 * language.h (struct language_defn) <la_get_string>: Change
4953 type of "buffer".
4954 (default_get_string, c_get_string): Update.
4955 * language.c (default_get_string): Change type of "buffer".
4956 * guile/scm-value.c (gdbscm_value_to_string): Update.
4957 * c-lang.c (c_get_string): Change type of "buffer".
4958
4959 2018-06-18 Tom Tromey <tom@tromey.com>
4960
4961 * ser-mingw.c (struct pipe_state_destroyer): New.
4962 (pipe_state_up): New typedef.
4963 (cleanup_pipe_state): Remove.
4964 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4965
4966 2018-06-18 Tom Tromey <tom@tromey.com>
4967
4968 * rust-lang.h (rust_yyerror): Don't declare.
4969 * rust-lang.c (rust_language_defn): Update.
4970 * rust-exp.y (yyerror): Now static.
4971 * parse.c (parse_exp_in_context_1): Update.
4972 * p-lang.h (p_yyerror): Don't declare.
4973 * p-lang.c (p_language_defn): Update.
4974 * p-exp.y (yyerror): Now static.
4975 * opencl-lang.c (opencl_language_defn): Update.
4976 * objc-lang.c (objc_language_defn): Update.
4977 * m2-lang.h (m2_yyerror): Don't declare.
4978 * m2-lang.c (m2_language_defn): Update.
4979 * m2-exp.y (yyerror): Now static.
4980 * language.h (struct language_defn) <la_error>: Remove.
4981 * language.c (unk_lang_error): Remove.
4982 (unknown_language_defn, auto_language_defn): Remove.
4983 * go-lang.h (go_yyerror): Don't declare.
4984 * go-lang.c (go_language_defn): Update.
4985 * go-exp.y (yyerror): Now static.
4986 * f-lang.h (f_yyerror): Don't declare.
4987 * f-lang.c (f_language_defn): Update.
4988 * f-exp.y (yyerror): Now static.
4989 * d-lang.h (d_yyerror): Don't declare.
4990 * d-lang.c (d_language_defn): Update.
4991 * d-exp.y (yyerror): Now static.
4992 * c-lang.h (c_yyerror): Don't declare.
4993 * c-lang.c (c_language_defn, cplus_language_defn)
4994 (asm_language_defn, minimal_language_defn): Update.
4995 * c-exp.y (yyerror): Now static.
4996 * ada-lang.h (ada_yyerror): Don't declare.
4997 * ada-lang.c (ada_language_defn): Update.
4998 * ada-exp.y (yyerror): Now static.
4999
5000 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5001
5002 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5003 (store_sveregs_to_thread): Likewise.
5004 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5005 (aarch64_linux_store_inferior_registers): Likewise.
5006 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5007 function.
5008 (aarch64_sve_regs_copy_to_regcache): Likewise.
5009 (aarch64_sve_regs_copy_from_regcache): Likewise.
5010 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5011 declaration.
5012 (aarch64_sve_regs_copy_to_regcache): Likewise.
5013 (aarch64_sve_regs_copy_from_regcache): Likewise.
5014 (sve_context): Structure from Linux headers.
5015 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5016 (SVE_SIG_ZREG_SIZE): Likewise.
5017 (SVE_SIG_PREG_SIZE): Likewise.
5018 (SVE_SIG_FFR_SIZE): Likewise.
5019 (SVE_SIG_REGS_OFFSET): Likewise.
5020 (SVE_SIG_ZREGS_OFFSET): Likewise.
5021 (SVE_SIG_ZREG_OFFSET): Likewise.
5022 (SVE_SIG_ZREGS_SIZE): Likewise.
5023 (SVE_SIG_PREGS_OFFSET): Likewise.
5024 (SVE_SIG_PREG_OFFSET): Likewise.
5025 (SVE_SIG_PREGS_SIZE): Likewise.
5026 (SVE_SIG_FFR_OFFSET): Likewise.
5027 (SVE_SIG_REGS_SIZE): Likewise.
5028 (SVE_SIG_CONTEXT_SIZE): Likewise.
5029 (SVE_PT_REGS_MASK): Likewise.
5030 (SVE_PT_REGS_FPSIMD): Likewise.
5031 (SVE_PT_REGS_SVE): Likewise.
5032 (SVE_PT_VL_INHERIT): Likewise.
5033 (SVE_PT_VL_ONEXEC): Likewise.
5034 (SVE_PT_REGS_OFFSET): Likewise.
5035 (SVE_PT_FPSIMD_OFFSET): Likewise.
5036 (SVE_PT_FPSIMD_SIZE): Likewise.
5037 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5038 (SVE_PT_SVE_PREG_SIZE): Likewise.
5039 (SVE_PT_SVE_FFR_SIZE): Likewise.
5040 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5041 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5042 (__SVE_SIG_TO_PT): Likewise.
5043 (SVE_PT_SVE_OFFSET): Likewise.
5044 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5045 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5046 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5047 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5048 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5049 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5050 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5051 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5052 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5053 (SVE_PT_SVE_SIZE): Likewise.
5054 (SVE_PT_SIZE): Likewise.
5055 (HAS_SVE_STATE): New define.
5056
5057 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5058
5059 * nat/aarch64-sve-linux-sigcontext.h: New file.
5060 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5061 new files.
5062 (SVE_VQ_MIN): Likewise.
5063 (SVE_VQ_MAX): Likewise.
5064 (SVE_VL_MIN): Likewise.
5065 (SVE_VL_MAX): Likewise.
5066 (SVE_NUM_ZREGS): Likewise.
5067 (SVE_NUM_PREGS): Likewise.
5068 (sve_vl_valid): Likewise.
5069 (struct user_sve_header): Likewise.
5070
5071 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5072 Richard Bunt <Richard.Bunt@arm.com>
5073
5074 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5075 was requested by GDB.
5076
5077 2018-06-15 Tom de Vries <tdevries@suse.de>
5078
5079 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5080
5081 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5082
5083 * gnulib/update-gnulib.sh: Print expected versions of
5084 autoconf/aclocal.
5085
5086 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5087
5088 * arch-utils.c (default_type_align): Use type_length_units.
5089 * gdbtypes.c (type_align): Use type_length_units.
5090
5091 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5092
5093 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5094 of 'define' command.
5095
5096 2018-06-14 Tom de Vries <tdevries@suse.de>
5097
5098 PR cli/22573
5099 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5100 get_no_prettyformat_print_options.
5101
5102 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5103
5104 * sparc-nat.h: Include target.h.
5105 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5106 <fetch_registers>: Remove this argument in function call.
5107 <store_registers>: Remove this argument in function call, remove
5108 extra semicolon.
5109 <low_forget_process>: Call sparc64_forget_process instead of
5110 sparc_forget_process.
5111
5112 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5113
5114 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5115 (procfs_target::make_corefile_notes): Adjust to new
5116 target_read_alloc return type.
5117
5118 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5119 Stephen Roberts <stephen.roberts@arm.com>
5120
5121 PR gdb/22882
5122 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5123 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5124 Move should_notify_stop local into more inner scope.
5125
5126 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5127 Stephen Roberts <stephen.roberts@arm.com>
5128
5129 PR gdb/22882
5130 * infrun.c (resume_1): Add call to mark_async_event_handler.
5131
5132 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5133
5134 * infrun.c (do_target_wait): Change old version of $pc printed.
5135
5136 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5137
5138 * dwarf2read.c (read_index_from_section): Rename to...
5139 (read_gdb_index_from_section): ... this, update all callers.
5140 (dwarf2_read_index): Rename to...
5141 (dwarf2_read_gdb_index): ... this, update all callers.
5142
5143 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5144
5145 * gdb/hppa-linux-nat.c
5146 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5147 hppa_linux_nat_target::fetch_registers.
5148
5149 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5150
5151 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5152 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5153 (AARCH64_DWARF_SVE_FFR): Likewise.
5154 (AARCH64_DWARF_SVE_P0): Likewise.
5155 (AARCH64_DWARF_SVE_Z0): Likewise.
5156
5157 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5158
5159 * common/common-regcache.h (raw_compare): New function.
5160 * regcache.c (regcache::raw_compare): Likewise.
5161 * regcache.h (regcache::raw_compare): New declaration.
5162
5163 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5164
5165 * common/common-regcache.h (reg_buffer_common): New structure.
5166 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5167 (reg_buffer::raw_supply): Likewise.
5168 (reg_buffer::raw_supply_integer): Likewise.
5169 (reg_buffer::raw_supply_zeroed): Likewise.
5170 (reg_buffer::raw_collect): Likewise.
5171 (reg_buffer::raw_collect_integer): Likewise.
5172 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5173 (reg_buffer::raw_supply): Likewise.
5174 (reg_buffer::raw_supply_integer): Likewise.
5175 (reg_buffer::raw_supply_zeroed): Likewise.
5176 (reg_buffer::raw_collect): Likewise.
5177 (reg_buffer::raw_collect_integer): Likewise.
5178
5179 2018-06-10 Tom Tromey <tom@tromey.com>
5180
5181 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5182 (class remote_state) <stop_reply_queue>: Now std::vector.
5183 (remote_state::~remote_state)
5184 (remote_target::stop_reply_queue_length): Update.
5185 (struct queue_iter_param, remove_child_of_pending_fork)
5186 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5187 (check_pending_event_prevents_wildcard_vcont_callback)
5188 (remove_stop_reply_for_inferior)
5189 (remove_stop_reply_of_remote_state)
5190 (remote_notif_remove_once_on_match)
5191 (stop_reply_match_ptid_and_ws)
5192 (remote_kill_child_of_pending_fork): Remove.
5193 (remote_target::remove_new_fork_children)
5194 (remote_target::check_pending_events_prevent_wildcard_vcont)
5195 (remote_target::discard_pending_stop_replies)
5196 (remote_target::discard_pending_stop_replies_in_queue)
5197 (remote_target::remote_notif_remove_queued_reply)
5198 (remote_target::queued_stop_reply)
5199 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5200 (remote_target::wait, remote_target::kill_new_fork_children)
5201 (remote_target::async): Update.
5202
5203 2018-06-10 Tom Tromey <tom@tromey.com>
5204
5205 * record-full.c (record_full_arch_list_cleanups): Remove.
5206 (record_full_message): Use try/catch.
5207 (record_full_wait_cleanups): Remove.
5208 (record_full_wait_1): Use try/catch.
5209 (record_full_restore): Likewise.
5210
5211 2018-06-10 Tom Tromey <tom@tromey.com>
5212
5213 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5214 declare VEC. Add constructor.
5215 <in_target_beneath>: Now bool.
5216 (record_full_breakpoints): Now a std::vector, static.
5217 (record_full_sync_record_breakpoints)
5218 (record_full_init_record_breakpoints)
5219 (record_full_target::insert_breakpoint)
5220 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5221
5222 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5223
5224 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5225 * serial.c (serial_interface_lookup): Remove struct keyword.
5226
5227 2018-06-10 Tom Tromey <tom@tromey.com>
5228
5229 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5230 method.
5231 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5232 a method.
5233 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5234 method.
5235 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5236 "beneath" as a method.
5237 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5238 Use "beneath" as a method.
5239
5240 2018-06-10 Tom Tromey <tom@tromey.com>
5241
5242 * tracefile.c (struct trace_file_writer_deleter): New.
5243 <operator()>: Rename from trace_file_writer_xfree.
5244 (trace_file_writer_up): New typedef.
5245 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5246
5247 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5248
5249 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5250 <m_registers, m_register_status>: Change type to
5251 std::unique_ptr.
5252 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5253 XCNEWVEC.
5254
5255 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5256
5257 * common/common-regcache.h (enum register_status): Add
5258 underlying type "signed char".
5259 * regcache.h (reg_buffer) <m_register_status>: Change type to
5260 register_status *.
5261 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5262 register_status instead of signed char.
5263 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5264 (reg_buffer::get_register_status): Remove cast.
5265 (readable_regcache::raw_read): Remove cast.
5266 (readable_regcache::cooked_read): Remove cast.
5267
5268 2018-06-09 Tom Tromey <tom@tromey.com>
5269
5270 * source.c (reverse_search_command, forward_search_command): Use
5271 scoped_fd.
5272
5273 2018-06-09 Tom Tromey <tom@tromey.com>
5274
5275 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5276 (serial_ops_list): Now static, std::vector.
5277 (serial_interface_lookup, serial_add_interface): Update.
5278
5279 2018-06-09 Tom Tromey <tom@tromey.com>
5280
5281 * dwarf2read.c (process_cu_includes): Update.
5282 (process_full_comp_unit): Update.
5283 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5284 std::vector.
5285
5286 2018-06-08 Paul Koning <paul_koning@dell.com>
5287
5288 PR gdb/23252
5289
5290 * python/python.c (do_start_initialization):
5291 Avoid call to internal Python API.
5292 (init__gdb_module): New function.
5293
5294 2018-06-08 Gary Benson <gbenson@redhat.com>
5295
5296 * linux-thread-db.c (valprint.h): New include.
5297 (struct check_thread_db_info): New structure.
5298 (check_thread_db_on_load, tdb_testinfo): New static globals.
5299 (check_thread_db, check_thread_db_callback): New functions.
5300 (try_thread_db_load_1): Run integrity checks if requested.
5301 (maintenance_check_libthread_db): New function.
5302 (_initialize_thread_db): Register "maint check libthread-db"
5303 and "maint set/show check-libthread-db".
5304 * NEWS: Mention the above new commands.
5305
5306 2018-06-08 Tom Tromey <tom@tromey.com>
5307
5308 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5309 now a method.
5310
5311 2018-06-08 Tom Tromey <tom@tromey.com>
5312
5313 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5314
5315 2018-06-08 Tom Tromey <tom@tromey.com>
5316
5317 * common/btrace-common.h (struct btrace_data): Add constructor,
5318 destructor, move assignment operator.
5319 <empty, clear, fini>: New methods.
5320 <format>: Initialize.
5321 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5322 (btrace_data_empty): Don't declare.
5323 * common/btrace-common.c (btrace_data_init): Remove.
5324 (btrace_data::fini): Rename from btrace_data_fini.
5325 (btrace_data::empty): Rename from btrace_data_empty.
5326 (btrace_data::clear): Rename from btrace_data_clear. Return
5327 bool.
5328 * btrace.h (make_cleanup_btrace_data): Don't declare.
5329 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5330 (parse_xml_btrace): Update.
5331 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5332 (maint_btrace_clear_packet_history_cmd): Update.
5333
5334 2018-06-07 Pedro Alves <palves@redhat.com>
5335
5336 * target.h (target_ops) <beneath>: Now a method. All references
5337 updated.
5338 (class target_stack): New.
5339 * target.c (g_target_stack): New.
5340 (g_current_top_target): Delete.
5341 (current_top_target): Get the top target out of g_target_stack.
5342 (target_stack::push, target_stack::unpush): New.
5343 (push_target, unpush_target): Reimplement.
5344 (target_is_pushed): Reimplement in terms of g_target_stack.
5345 (target_ops::beneath, target_stack::find_beneath): New.
5346
5347 2018-06-07 Pedro Alves <palves@redhat.com>
5348
5349 * target.h (find_target_beneath): Delete declaration.
5350 * target.c (find_target_beneath): Delete definition.
5351 * aix-thread.c: All callers of find_target_beneath adjusted to
5352 call target_ops::beneath instead.
5353 * bsd-uthread.c: Likewise.
5354 * linux-thread-db.c: Likewise.
5355 * ravenscar-thread.c: Likewise.
5356 * sol-thread.c: Likewise.
5357 * spu-multiarch.c: Likewise.
5358
5359 2018-06-07 Pedro Alves <palves@redhat.com>
5360
5361 * target.h (target_ops) <beneath>: Now a method. All references
5362 updated.
5363 (target_ops) <m_beneath>: New.
5364 * target.c (target_ops::beneath): New.
5365 * corelow.c: Adjust all references to target_ops::beneath.
5366 * linux-thread-db.c: Likewise.
5367 * make-target-delegates: Likewise.
5368 * record-btrace.c: Likewise.
5369 * record-full.c: Likewise.
5370 * remote.c: Likewise.
5371 * target.c: Likewise.
5372 * target-delegates.c: Regenerate.
5373
5374 2018-06-07 Pedro Alves <palves@redhat.com>
5375
5376 * target.h (target_stack): Delete.
5377 (current_top_target): Declare function.
5378 * target.c (target_stack): Delete.
5379 (g_current_top_target): New.
5380 (current_top_target): New function.
5381 * auxv.c: Use current_top_target instead of target_stack
5382 throughout.
5383 * avr-tdep.c: Likewise.
5384 * breakpoint.c: Likewise.
5385 * corefile.c: Likewise.
5386 * elfread.c: Likewise.
5387 * eval.c: Likewise.
5388 * exceptions.c: Likewise.
5389 * frame.c: Likewise.
5390 * gdbarch-selftests.c: Likewise.
5391 * gnu-v3-abi.c: Likewise.
5392 * ia64-tdep.c: Likewise.
5393 * ia64-vms-tdep.c: Likewise.
5394 * infcall.c: Likewise.
5395 * infcmd.c: Likewise.
5396 * infrun.c: Likewise.
5397 * linespec.c: Likewise.
5398 * linux-tdep.c: Likewise.
5399 * minsyms.c: Likewise.
5400 * ppc-linux-nat.c: Likewise.
5401 * ppc-linux-tdep.c: Likewise.
5402 * procfs.c: Likewise.
5403 * regcache.c: Likewise.
5404 * remote.c: Likewise.
5405 * rs6000-tdep.c: Likewise.
5406 * s390-linux-nat.c: Likewise.
5407 * s390-tdep.c: Likewise.
5408 * solib-aix.c: Likewise.
5409 * solib-darwin.c: Likewise.
5410 * solib-dsbt.c: Likewise.
5411 * solib-spu.c: Likewise.
5412 * solib-svr4.c: Likewise.
5413 * solib-target.c: Likewise.
5414 * sparc-tdep.c: Likewise.
5415 * sparc64-tdep.c: Likewise.
5416 * spu-tdep.c: Likewise.
5417 * symfile.c: Likewise.
5418 * symtab.c: Likewise.
5419 * target-descriptions.c: Likewise.
5420 * target-memory.c: Likewise.
5421 * target.c: Likewise.
5422 * target.h: Likewise.
5423 * tracefile-tfile.c: Likewise.
5424 * tracepoint.c: Likewise.
5425 * valops.c: Likewise.
5426 * valprint.c: Likewise.
5427 * value.c: Likewise.
5428 * windows-tdep.c: Likewise.
5429 * mi/mi-main.c: Likewise.
5430
5431 2018-06-07 Tom Tromey <tom@tromey.com>
5432
5433 * valprint.h (build_address_symbolic): Declare.
5434 * printcmd.c (print_address_symbolic): Update.
5435 (build_address_symbolic): Change "name" and "filename" to
5436 std::string.
5437 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5438 Update.
5439 * defs.h (build_address_symbolic): Remove declaration.
5440
5441 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5442
5443 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5444 (aarch64_vnv_type): Add function.
5445 (aarch64_pseudo_register_name): Add V regs for SVE.
5446 (aarch64_pseudo_register_type): Likewise.
5447 (aarch64_pseudo_register_reggroup_p): Likewise.
5448 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5449 (aarch64_pseudo_read_value): Add V regs for SVE.
5450 (aarch64_pseudo_write_2): Use V0 offset for SVE
5451 (aarch64_pseudo_write): Add V regs for SVE.
5452 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5453
5454 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5455
5456 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5457 (sve_vl_from_vq): Likewise.
5458
5459 2018-06-05 Tom Tromey <tom@tromey.com>
5460
5461 * cli/cli-cmds.c (show_version): Update.
5462 * top.c (print_gdb_version): Add "interactive" parameter.
5463 Update.
5464 * main.c (captured_main_1): Update.
5465 * top.h (print_gdb_version): Add "interactive" parameter and a
5466 comment.
5467
5468 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5469
5470 * common/enum-flags.h: Add trailing semicolon to example in
5471 comment.
5472
5473 2018-06-05 Tom Tromey <tom@tromey.com>
5474
5475 PR cli/12326:
5476 * NEWS: Add entry about pager.
5477 * utils.c (pagination_disabled_for_command): New global.
5478 (prompt_for_continue): Allow "c" response to prompt.
5479 (reinitialize_more_filter): Clear
5480 pagination_disabled_for_command.
5481 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5482
5483 2018-06-04 Tom Tromey <tom@tromey.com>
5484
5485 * ada-lang.h (ada_lookup_symbol_list): Update.
5486 * ada-lang.c (resolve_subexp): Update.
5487 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5488 parameter.
5489 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5490 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5491 results parameter to std::vector.
5492 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5493 Update.
5494 * ada-exp.y (block_lookup): Update.
5495 (select_possible_type_sym): Change type of syms. Remove nsyms
5496 parameter.
5497 (write_var_or_type, write_name_assoc): Update.
5498
5499 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5500
5501 * windows-nat.c (windows_nat_target::xfer_partial): Return
5502 TARGET_XFER_E_IO if we need to delegate to the target beneath
5503 but BENEATH is NULL.
5504
5505 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5506
5507 * Makefile.in (config.status): Add configure.nat as a
5508 dependency.
5509
5510 2018-06-04 Tom Tromey <tom@tromey.com>
5511
5512 * cp-name-parser.y (cpname_state): Add method declarations.
5513 (HANDLE_QUAL): Update.
5514 (cpname_state::d_grab, cpname_state::fill_comp)
5515 (cpname_state::make_operator, cpname_state::make_dtor)
5516 (cpname_state::make_builtin_type, cpname_state::make_name)
5517 (cpname_state::d_qualify, cpname_state::d_int_type)
5518 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5519 (%union): Move earlier.
5520
5521 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5522
5523 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5524
5525 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5526
5527 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5528 (aarch64_pseudo_write_1): Likewise.
5529 (aarch64_pseudo_read_value): Use helper.
5530 (aarch64_pseudo_write): Likewise.
5531
5532 2018-06-04 Pedro Alves <palves@redhat.com>
5533
5534 * darwin-nat.c (darwin_ops): Delete.
5535 (darwin_attach_pid): Use get_native_target.
5536
5537 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5538
5539 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5540 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5541
5542 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5543
5544 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5545 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5546 (aarch64_gdbarch_init): Check for SVE.
5547 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5548
5549 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5550
5551 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5552 * aarch64-tdep.h (aarch64_read_description): Likewise.
5553 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5554 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5555 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5556 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5557 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5558
5559 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
5560
5561 * value.c (value_fetch_lazy_bitfield): New.
5562 (value_fetch_lazy_memory): New.
5563 (value_fetch_lazy_register): New.
5564 (value_fetch_lazy): Factor out to smaller functions.
5565
5566 2018-06-01 Tom Tromey <tom@tromey.com>
5567
5568 * cp-name-parser.y (backslashable, represented): Now const.
5569
5570 2018-06-01 Tom Tromey <tom@tromey.com>
5571
5572 * cp-name-parser.y: Include parser-defs.h.
5573 (parser_fprintf): Remove declaration.
5574
5575 2018-06-01 Tom Tromey <tom@tromey.com>
5576
5577 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5578 %parse-param.
5579 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5580 (global_result): Remove globals.
5581 (struct cpname_state): New.
5582 (yyparse): Don't declare.
5583 (yylex, yyerror): Move declarations after %union.
5584 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5585 (make_name): Add state parameter.
5586 Update all callers.
5587 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5588 parameter.
5589 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5590 Update.
5591 (yylex): Add lvalp, state parameters.
5592 (yyerror): Add state parameter.
5593 (cp_demangled_name_to_comp): Update.
5594
5595 2018-06-01 Tom Tromey <tom@tromey.com>
5596
5597 * cp-name-parser.y (parser_fprintf): Declare.
5598 (GDB_YY_REMAP_PREFIX): Define.
5599 Include yy-remap.h. Don't redefine yy* identifiers.
5600
5601 2018-06-01 Tom Tromey <tom@tromey.com>
5602
5603 * python/py-type.c (typy_legacy_template_argument): Update.
5604 * cp-support.h (cp_demangled_name_to_comp): Update.
5605 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5606 parameter to be a "std::string *".
5607 (main): Update.
5608
5609 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
5610
5611 * ada-lex.l: Include "diagnostics.h" instead of
5612 "common/diagnostics.h".
5613 * unittests/environ-selftests.c: Likewise.
5614 * common/diagnostics.h: Moved to ../include.
5615
5616 2018-06-01 Joel Brobecker <brobecker@adacore.com>
5617
5618 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5619 to language_mode_manual while calling breakpoint_re_set_one.
5620
5621 2018-06-01 Tom Tromey <tom@tromey.com>
5622
5623 * valops.c (value_cast_structs, destructor_name_p): Update.
5624 * symtab.c (gdb_mangle_name): Update.
5625 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5626 Update.
5627 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5628 (pascal_object_print_value_fields, pascal_object_print_value):
5629 Update.
5630 * p-typeprint.c (pascal_type_print_derivation_info): Update.
5631 * linespec.c (find_methods): Update.
5632 * gdbtypes.h (type_name_no_tag): Remove.
5633 (type_name_or_error): Rename from type_name_no_tag_or_error.
5634 * gdbtypes.c (type_name_no_tag): Remove.
5635 (type_name_or_error): Rename from type_name_no_tag_or_error.
5636 (lookup_struct_elt_type, check_typedef): Update.
5637 * expprint.c (print_subexp_standard): Update.
5638 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5639 * d-namespace.c (d_lookup_nested_symbol): Update.
5640 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5641 (cp_print_class_member): Update.
5642 * cp-namespace.c (cp_lookup_nested_symbol): Update.
5643 * completer.c (add_struct_fields): Update.
5644 * c-typeprint.c (cp_type_print_derivation_info)
5645 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5646 Update.
5647 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5648 (ada_prefer_type, ada_is_exception_sym): Update.
5649
5650 2018-06-01 Tom Tromey <tom@tromey.com>
5651
5652 * valops.c (enum_constant_from_type, value_namespace_elt)
5653 (value_maybe_namespace_elt): Update.
5654 * valarith.c (find_size_for_pointer_math): Update.
5655 * target-descriptions.c (make_gdb_type): Update.
5656 * symmisc.c (print_symbol): Update.
5657 * stabsread.c (define_symbol, read_type)
5658 (complain_about_struct_wipeout, add_undefined_type)
5659 (cleanup_undefined_types_1): Update.
5660 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5661 (rust_range_type_p, val_print_struct, rust_print_struct_def)
5662 (rust_internal_print_type, rust_composite_type)
5663 (rust_evaluate_funcall, rust_evaluate_subexp)
5664 (rust_inclusive_range_type_p): Update.
5665 * python/py-type.c (typy_get_tag): Update.
5666 * p-typeprint.c (pascal_type_print_base): Update.
5667 * mdebugread.c (parse_symbol, parse_type): Update.
5668 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5669 Update.
5670 * guile/scm-type.c (gdbscm_type_tag): Update.
5671 * go-lang.c (sixg_string_p): Update.
5672 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5673 Update.
5674 * gdbtypes.h (struct main_type) <tag_name>: Remove.
5675 (TYPE_TAG_NAME): Remove.
5676 * gdbtypes.c (type_name_no_tag): Simplify.
5677 (check_typedef, check_types_equal, recursive_dump_type)
5678 (copy_type_recursive, arch_composite_type): Update.
5679 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
5680 in summary mode when needed.
5681 * eval.c (evaluate_funcall): Update.
5682 * dwarf2read.c (fixup_go_packaging, read_structure_type)
5683 (process_structure_scope, read_enumeration_type)
5684 (read_namespace_type, read_module_type, determine_prefix): Update.
5685 * cp-support.c (inspect_type): Update.
5686 * coffread.c (process_coff_symbol, decode_base_type): Update.
5687 * c-varobj.c (c_is_path_expr_parent): Update.
5688 * c-typeprint.c (c_type_print_base_struct_union): Update.
5689 (c_type_print_base_1): Update. Print struct/class/union/enum in
5690 summary when using C language.
5691 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5692 (gen_maybe_namespace_elt): Update.
5693 * ada-lang.c (ada_type_name): Simplify.
5694 (empty_record, ada_template_to_fixed_record_type_1)
5695 (template_to_static_fixed_type)
5696 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5697
5698 2018-06-01 Tom Tromey <tom@tromey.com>
5699
5700 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5701 c_print_type.
5702 * c-typeprint.c (c_print_type_1): Add "language" parameter.
5703 (c_print_type): Update.
5704 (c_print_type): New overload.
5705 (c_type_print_varspec_prefix, c_type_print_args)
5706 (c_type_print_varspec_suffix, c_print_type_no_offsets)
5707 (c_type_print_base_struct_union, c_type_print_base_1)
5708 (cp_type_print_method_args): Add "language" parameter.
5709 (c_type_print_base): Update.
5710 * c-lang.h (c_print_type): Add new overload.
5711
5712 2018-06-01 Tom Tromey <tom@tromey.com>
5713
5714 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5715 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5716
5717 2018-06-01 Alan Hayward <alan.hayward@arm.com>
5718
5719 * aarch64-tdep.c (aarch64_sve_register_names): New const
5720 var.
5721 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5722 (AARCH64_SVE_Z_REGS_NUM): New define.
5723 (AARCH64_SVE_P_REGS_NUM): Likewise.
5724 (AARCH64_SVE_NUM_REGS): Likewise.
5725
5726 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5727
5728 * nat/linux-ptrace.h [__alpha__]
5729 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5730 definitions.
5731
5732 2018-05-31 Maciej W. Rozycki <macro@mips.com>
5733
5734 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5735 the endianness selected.
5736 * NEWS: Document `set endian auto' mode operation update.
5737
5738 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5739
5740 * Makefile.in: Add new header.
5741 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5742 (sve_vl_from_vg): Likewise.
5743 (sve_vq_from_vl): Likewise.
5744 (sve_vl_from_vq): Likewise.
5745 (sve_vq_from_vg): Likewise.
5746 (sve_vg_from_vq): Likewise.
5747 * configure.nat: Add new c file.
5748 * nat/aarch64-sve-linux-ptrace.c: New file.
5749 * nat/aarch64-sve-linux-ptrace.h: New file.
5750
5751 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5752
5753 * aarch64-linux-nat.c (aarch64_linux_read_description):
5754 Add parmeter zero.
5755 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5756 Likewise.
5757 * aarch64-tdep.c (tdesc_aarch64_list): Add.
5758 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5759 (aarch64_gdbarch_init): Add parmeter zero.
5760 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5761 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5762 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5763 parmeter.
5764 * doc/gdb.texinfo: Describe SVE feature
5765 * features/aarch64-sve.c: New file.
5766
5767 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5768
5769 PR gdb/23210
5770 * gdbarch.sh (significant_addr_bit): Default to zero when
5771 not set by target architecture.
5772 * gdbarch.c: Re-generated.
5773 * utils.c (address_significant): Update.
5774
5775 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5776
5777 * stack.c (func_command): Remove trailing newline in call to error.
5778
5779 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5780
5781 * regcache.h (regcache_raw_collect): Remove, update callers to
5782 use regcache::raw_collect.
5783 * regcache.c (regcache_raw_collect): Remove.
5784
5785 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5786
5787 * regcache.h (regcache_raw_supply): Remove, update callers to
5788 use detached_regcache::raw_supply.
5789 * regcache.c (regcache_raw_supply): Remove.
5790
5791 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5792
5793 * regcache.h (regcache_cooked_write_part): Remove, update
5794 callers to use regcache::cooked_write_part.
5795 * regcache.c (regcache_cooked_write_part): Remove.
5796
5797 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5798
5799 * regcache.h (regcache_cooked_read_part): Remove, update callers
5800 to use readable_regcache::cooked_read_part.
5801 * regcache.c (regcache_cooked_read_part): Remove.
5802
5803 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5804
5805 * regcache.h (regcache_cooked_read_value): Remove, update
5806 callers to use readable_regcache::cooked_read_value.
5807 * regcache.c (regcache_cooked_read_value): Remove.
5808
5809 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5810
5811 * regcache.h (regcache_cooked_write): Remove, update callers to
5812 use regcache::cooked_write.
5813 * regcache.c (regcache_cooked_write): Remove.
5814
5815 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5816
5817 * regcache.h (regcache_invalidate): Remove, update callers to
5818 use detached_regcache::invalidate instead.
5819 * regcache.c (regcache_invalidate): Remove.
5820
5821 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5822
5823 * regcache.h (regcache_raw_write_part): Remove, update callers
5824 to use regcache::raw_write_part instead.
5825 * regcache.c (regcache_raw_write_part): Remove.
5826
5827 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5828
5829 * regcache.h (regcache_raw_read_part): Remove, update callers to
5830 use readable_regcache::raw_read_part instead.
5831 * regcache.c (regcache_raw_read_part): Remove.
5832
5833 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5834
5835 * regcache.h (regcache_cooked_read): Remove, update callers to
5836 use readable_regcache::cooked_read instead.
5837 * regcache.c (regcache_cooked_read): Remove.
5838
5839 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5840
5841 * regcache.h (regcache_raw_write): Remove, update callers to use
5842 regcache::raw_write instead.
5843 * regcache.c (regcache_raw_write): Remove.
5844
5845 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5846
5847 * regcache.h (regcache_raw_read): Remove, update callers to use
5848 readable_regcache::raw_read instead.
5849 * regcache.c (regcache_raw_read): Remove.
5850
5851 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5852
5853 * regcache.h (regcache_raw_update): Remove, update callers to
5854 use readable_regcache::raw_update instead.
5855 * regcache.c (regcache_raw_update): Remove.
5856
5857 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5858
5859 * regcache.h (regcache_register_status): Remove, update callers
5860 to use reg_buffer::get_register_status directly instead.
5861 * regcache.c (regcache_register_status): Remove.
5862
5863 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5864
5865 * regcache.h (regcache_get_ptid): Remove, update all callers to
5866 call regcache::ptid instead.
5867 * regcache.c (regcache_get_ptid): Remove.
5868
5869 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5870
5871 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5872
5873 2018-05-30 Pedro Alves <palves@redhat.com>
5874
5875 * common/common-exceptions.h (exception_rethrow): Use
5876 ATTRIBUTE_NORETURN.
5877
5878 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5879
5880 * breakpoint.c (print_solib_event, check_status_catch_solib):
5881 Remove struct keyword in range-based for loops.
5882 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5883 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5884 Likewise.
5885 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5886 Likewise.
5887 * symfile.c (addr_info_make_relative): Likewise.
5888 * thread.c (value_in_thread_stack_temporaries): Likewise.
5889
5890 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5891
5892 PR gdb/16841
5893 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5894 aggregate type to get its real type before accessing it.
5895
5896 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5897
5898 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5899 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5900 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5901 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5902 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5903 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5904 * printcmd.c (info_address_command): Likewise.
5905
5906 2018-05-29 Tom Tromey <tom@tromey.com>
5907
5908 * windows-nat.c (handle_exception): Update fall-through comment.
5909
5910 2018-05-29 Tom Tromey <tom@tromey.com>
5911
5912 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5913 (struct program_space) <added_solibs>: Now a std::vector.
5914 * breakpoint.c (print_solib_event): Update.
5915 (check_status_catch_solib): Update.
5916 * progspace.c (clear_program_space_solib_cache): Update.
5917 * solib.c (update_solib_list): Update.
5918
5919 2018-05-29 Tom Tromey <tom@tromey.com>
5920
5921 * python/py-type.c (typy_richcompare): Update.
5922 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5923 * gdbtypes.h (types_deeply_equal): Return bool.
5924 (types_equal): Likewise.
5925 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5926 declare VEC.
5927 (check_types_equal): Change worklist to std::vector. Return
5928 bool.
5929 (struct type_equality_entry): Add constructor.
5930 (compare_maybe_null_strings): Return bool.
5931 (check_types_worklist): Return bool. Change worklist to
5932 std::vector.
5933 (types_deeply_equal): Use std::vector.
5934 (types_equal): Return bool.
5935 (compare_maybe_null_strings): Simplify.
5936
5937 2018-05-29 Tom Tromey <tom@tromey.com>
5938
5939 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5940
5941 2018-05-29 Tom Tromey <tom@tromey.com>
5942
5943 * objc-lang.h: Don't include cp-support.h.
5944 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5945 declare VEC.
5946
5947 2018-05-27 Tom Tromey <tom@tromey.com>
5948
5949 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5950
5951 2018-05-25 Tom Tromey <tom@tromey.com>
5952
5953 * value.c (value::location): Initialize.
5954
5955 2018-05-25 Tom Tromey <tom@tromey.com>
5956
5957 * dbxread.c (init_bincl_list): Remove.
5958 (bincl_list): Now a std::vector.
5959 (bincls_allocated, next_bincl): Remove.
5960 (free_bincl_list, do_free_bincl_list_cleanup)
5961 (make_cleanup_free_bincl_list): Remove.
5962 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5963 unique_xmalloc_ptr.
5964 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5965 (struct header_file_location): Add constructor.
5966 (add_bincl_to_list): Remove.
5967
5968 2018-05-25 Tom Tromey <tom@tromey.com>
5969
5970 * tui/tui.c (tui_enable): Update.
5971 * mi/mi-interp.c (mi_interp::init): Update.
5972 * interps.h (class interp) <name>: New method.
5973 <m_name>: Rename from name.
5974 (~scoped_restore_interp): Update.
5975 * interps.c (interp::interp): Update.
5976 (interp_add, interp_set, interp_lookup_existing)
5977 (current_interp_named_p): Update.
5978
5979 2018-05-25 Tom Tromey <tom@tromey.com>
5980
5981 * interps.c (interp_name): Remove.
5982 * mi/mi-interp.c (mi_interp::init): Update.
5983 * interps.h (interp_name): Remove.
5984 (~scoped_restore_interp): Update.
5985 * tui/tui.c (tui_enable): Update.
5986
5987 2018-05-25 Tom Tromey <tom@tromey.com>
5988
5989 * utils.c (fputs_maybe_filtered): Update.
5990 * linespec.c (decode_line_full): Update.
5991 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5992 (mi_print_breakpoint_for_event, mi_solib_loaded)
5993 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5994 (mi_user_selected_context_changed): Update.
5995 * mi/mi-main.c (mi_execute_command): Update.
5996 * cli/cli-script.c (execute_control_command): Update.
5997 * python/python.c (execute_gdb_command): Update.
5998 * solib.c (info_sharedlibrary_command): Update.
5999 * interps.c (interp_ui_out): Remove.
6000 * interps.h (interp_ui_out): Remove.
6001
6002 2018-05-25 Tom Tromey <tom@tromey.com>
6003
6004 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6005 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6006 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6007
6008 2018-05-25 Tom Tromey <tom@tromey.com>
6009
6010 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6011 * interps.c (interp_exec): Use scoped_restore.
6012
6013 2018-05-25 Tom Tromey <tom@tromey.com>
6014
6015 * remote.c (remote_target::remote_file_get): Use
6016 gdb::byte_vector.
6017 (remote_target::remote_file_put): Likewise.
6018
6019 2018-05-25 Tom Tromey <tom@tromey.com>
6020
6021 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6022 a std::string.
6023 (get_pe_section_index, add_pe_exported_sym): Update.
6024 (read_pe_exported_syms): Use gdb::def_vector.
6025
6026 2018-05-25 Tom Tromey <tom@tromey.com>
6027
6028 * frame.c (remove_prev_frame): Remove.
6029 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6030
6031 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6032
6033 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6034 Remove prototypes.
6035 * mips-linux-nat.c (supply_fpregset): Always call
6036 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6037 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6038 `mips_fill_fpregset'.
6039 * mips-linux-tdep.c (mips_supply_fpregset)
6040 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6041 (mips_fill_fpregset_wrapper): Remove functions.
6042 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6043 (mips_linux_fpregset): Remove variable.
6044 (mips_linux_iterate_over_regset_sections): Use
6045 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6046 (mips_linux_o32_sigframe_init): Remove comment.
6047
6048 2018-05-25 Pedro Alves <palves@redhat.com>
6049
6050 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6051 (struct readahead_cache, struct packet_reg, struct
6052 remote_arch_state, class remote_state): Move higher up in the
6053 file.
6054 (remote_target::m_remote_state): Now an object instead of a pointer.
6055 (remote_target::get_remote_state): Adjust.
6056
6057 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6058
6059 * stack.c (select_and_print_frame): Delete.
6060 (struct function_bounds): Move struct within function.
6061 (func_command): Most content moved into new function
6062 find_frame_for_function, use new function, print result, add
6063 function comment.
6064 (find_frame_for_function): New function, now returns a result.
6065
6066 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6067
6068 * stack.c (iterate_over_block_arg_vars): Fix comment.
6069 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6070
6071 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6072
6073 PR gdb/23203
6074 * frame.c
6075 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6076 Define.
6077 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6078 Define.
6079 * frame.h (class scoped_restore_selected_frame): New class.
6080 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6081 of any exception, use scoped_restore_selected_frame to restore the
6082 frame instead.
6083
6084 2018-05-24 Pedro Alves <palves@redhat.com>
6085
6086 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6087 override.
6088
6089 2018-05-23 Tom Tromey <tom@tromey.com>
6090
6091 * complaints.c (struct complaints): Remove.
6092 (symfile_complaint_book): Remove.
6093 (series): New global.
6094 (complaint_internal): Update.
6095 (clear_complaints): Update.
6096
6097 2018-05-23 Tom Tromey <tom@tromey.com>
6098
6099 * complaints.c (counters): New global.
6100 (struct complain): Remove.
6101 (struct complaints) <root>: Remove.
6102 (complaint_sentinel): Remove.
6103 (symfile_complaint_book): Update.
6104 (find_complaint) Remove.
6105 (complaint_internal, clear_complaints): Update.
6106
6107 2018-05-23 Tom Tromey <tom@tromey.com>
6108
6109 * complaints.c (struct complain) <file, line>: Remove.
6110 (find_complaint): Remove file, line parameters.
6111 (complaint_internal): Update.
6112
6113 2018-05-23 Tom Tromey <tom@tromey.com>
6114
6115 * complaints.c (vcomplaint): Remove.
6116 (complaint_internal) Merge in contents of vcomplaint.
6117
6118 2018-05-23 Tom Tromey <tom@tromey.com>
6119
6120 * complaints.c (struct complaints) <explanation>: Remove.
6121 (symfile_explanations): Remove.
6122 (symfile_complaint_book): Update.
6123 (vcomplaint): Update.
6124 (struct explanation): Remove.
6125
6126 2018-05-23 Tom Tromey <tom@tromey.com>
6127
6128 * complaints.c (symfile_complaints): Remove.
6129 (complaint_internal): Remove "complaints" parameter.
6130 (clear_complaints, vcomplaint): Remove "c" parameter.
6131 (get_complaints): Remove.
6132 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6133 (dwarf2_debug_line_missing_file_complaint)
6134 (dwarf2_debug_line_missing_end_sequence_complaint)
6135 (dwarf2_complex_location_expr_complaint)
6136 (dwarf2_const_value_length_mismatch_complaint)
6137 (dwarf2_section_buffer_overflow_complaint)
6138 (dwarf2_macro_malformed_definition_complaint)
6139 (dwarf2_invalid_attrib_class_complaint)
6140 (create_addrmap_from_index, dw2_symtab_iter_next)
6141 (dw2_expand_marked_cus)
6142 (dw2_debug_names_iterator::find_vec_in_debug_names)
6143 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6144 (create_debug_type_hash_table, init_cutu_and_read_dies)
6145 (partial_die_parent_scope, add_partial_enumeration)
6146 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6147 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6148 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6149 (create_cus_hash_table, create_dwp_hash_table)
6150 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6151 (dwarf2_rnglists_process, dwarf2_ranges_process)
6152 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6153 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6154 (handle_struct_member_die, process_structure_scope)
6155 (read_array_type, read_common_block, read_module_type)
6156 (read_tag_pointer_type, read_typedef, read_base_type)
6157 (read_subrange_type, load_partial_dies, partial_die_info::read)
6158 (partial_die_info::read, partial_die_info::read)
6159 (partial_die_info::read, read_checked_initial_length_and_offset)
6160 (dwarf2_string_attr, read_formatted_entries)
6161 (dwarf_decode_line_header)
6162 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6163 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6164 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6165 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6166 (get_signatured_type, get_DW_AT_signature_type)
6167 (decode_locdesc, file_file_name, consume_improper_spaces)
6168 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6169 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6170 (dwarf2_symbol_mark_computed, set_die_type)
6171 (read_attribute_value): Update.
6172 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6173 Update.
6174 * dbxread.c (unknown_symtype_complaint)
6175 (lbrac_mismatch_complaint, repeated_header_complaint)
6176 (set_namestring, function_outside_compilation_unit_complaint)
6177 (read_dbx_symtab, process_one_symbol): Update.
6178 * gdbtypes.c (stub_noname_complaint): Update.
6179 * windows-nat.c (handle_unload_dll): Update.
6180 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6181 (decode_base_type): Update.
6182 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6183 (eb_complaint, record_include_begin, record_include_end)
6184 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6185 (process_xcoff_symbol, read_symbol)
6186 (function_outside_compilation_unit_complaint)
6187 (scan_xcoff_symtab): Update.
6188 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6189 * buildsym.c (finish_block_internal, make_blockvector)
6190 (end_symtab_get_static_block, augment_type_symtab): Update.
6191 * dtrace-probe.c (dtrace_process_dof)
6192 (dtrace_static_probe_ops::get_probes): Update.
6193 * complaints.h (struct complaint): Don't declare.
6194 (symfile_complaints): Remove.
6195 (complaint_internal): Remove "complaints" parameter.
6196 (complaint): Likewise.
6197 (clear_complaints): Likewise.
6198 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6199 (reread_symbols): Update.
6200 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6201 (dwarf2_frame_cache, decode_frame_entry): Update.
6202 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6203 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6204 (info_selectors_command): Update.
6205 * macrotab.c (macro_include, check_for_redefinition)
6206 (macro_undef): Update.
6207 * objfiles.c (filter_overlapping_sections): Update.
6208 * stabsread.c (invalid_cpp_abbrev_complaint)
6209 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6210 (define_symbol, error_type, read_type, rs6000_builtin_type)
6211 (stabs_method_name_from_physname, read_member_functions)
6212 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6213 (attach_fields_to_type, complain_about_struct_wipeout)
6214 (read_range_type, read_args, common_block_start)
6215 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6216 Update.
6217 * mdebugread.c (index_complaint, unknown_ext_complaint)
6218 (basic_type_complaint, bad_tag_guess_complaint)
6219 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6220 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6221 (parse_procedure, parse_lines)
6222 (function_outside_compilation_unit_complaint)
6223 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6224 (bad_tag_guess_complaint, reg_value_complaint): Update.
6225 * cp-support.c (demangled_name_complaint): Update.
6226 * macroscope.c (sal_macro_scope): Update.
6227 * dwarf-index-write.c (class debug_names): Update.
6228
6229 2018-05-23 Tom Tromey <tom@tromey.com>
6230
6231 * complaints.c (clear_complaints): Remove "noisy" parameter.
6232 * complaints.h (clear_complaints): Update.
6233 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6234 (reread_symbols): Update.
6235
6236 2018-05-23 Tom Tromey <tom@tromey.com>
6237
6238 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6239 SUBSEQUENT_MESSAGE.
6240 (vcomplaint, clear_complaints): Update.
6241 (symfile_explanations): Remove some messages.
6242
6243 2018-05-23 Tom Tromey <tom@tromey.com>
6244
6245 * complaints.c (internal_complaint): Remove.
6246 * complaints.h (internal_complaint): Remove.
6247
6248 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6249
6250 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6251
6252 2018-05-22 Pedro Alves <palves@redhat.com>
6253
6254 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6255 (remote_fileio_badfd, remote_fileio_return_errno)
6256 (remote_fileio_return_success, remote_fileio_func_open)
6257 (remote_fileio_func_open, remote_fileio_func_close)
6258 (remote_fileio_func_read, remote_fileio_func_write)
6259 (remote_fileio_func_lseek, remote_fileio_func_rename)
6260 (remote_fileio_func_unlink, remote_fileio_func_stat)
6261 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6262 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6263 remote_target parameter.
6264 (remote_fio_func_map) <func>: Add remote_target parameter.
6265 (do_remote_fileio_request, remote_fileio_request):
6266 * remote-fileio.h (remote_fileio_request):
6267 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6268 remote_target parameter.
6269 (remote_notif_process, handle_notification): Adjust to pass down
6270 the remote.
6271 (remote_notif_state_allocate): Add remote_target parameter. Save
6272 it.
6273 * remote-notif.h (struct remote_target): Forward declare.
6274 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6275 remote_target parameter.
6276 (struct remote_notif_state) <remote>: New field.
6277 (remote_notif_ack, remote_notif_parse): Add remote_target
6278 parameter.
6279 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6280 remote_target parameter.
6281 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6282 (threads_listing_context, rmt_thread_action, protocol_feature)
6283 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6284 (packet_result, struct threads_listing_context, remote_state):
6285 Move definitions and declarations higher up.
6286 (remote_target) <~remote_target>: Declare.
6287 (remote_download_command_source, remote_file_put, remote_file_get)
6288 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6289 (remote_hostio_pread_vFile, remote_hostio_send_command)
6290 (remote_hostio_set_filesystem, remote_hostio_open)
6291 (remote_hostio_close, remote_hostio_unlink, remote_state)
6292 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6293 (get_memory_write_packet_size, get_memory_read_packet_size)
6294 (append_pending_thread_resumptions, remote_detach_1)
6295 (append_resumption, remote_resume_with_vcont)
6296 (add_current_inferior_and_thread, wait_ns, wait_as)
6297 (process_stop_reply, remote_notice_new_inferior)
6298 (process_initial_stop_replies, remote_add_thread)
6299 (btrace_sync_conf, remote_btrace_maybe_reopen)
6300 (remove_new_fork_children, kill_new_fork_children)
6301 (discard_pending_stop_replies, stop_reply_queue_length)
6302 (check_pending_events_prevent_wildcard_vcont)
6303 (discard_pending_stop_replies_in_queue, stop_reply)
6304 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6305 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6306 (remote_interrupt_as, remote_interrupt_ns)
6307 (remote_get_noisy_reply, remote_query_attached)
6308 (remote_add_inferior, remote_current_thread, get_current_thread)
6309 (set_thread, set_general_thread, set_continue_thread)
6310 (set_general_process, write_ptid)
6311 (remote_unpack_thread_info_response, remote_get_threadinfo)
6312 (parse_threadlist_response, remote_get_threadlist)
6313 (remote_threadlist_iterator, remote_get_threads_with_ql)
6314 (remote_get_threads_with_qxfer)
6315 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6316 (get_offsets, remote_check_symbols, remote_supported_packet)
6317 (remote_query_supported, remote_packet_size)
6318 (remote_serial_quit_handler, remote_detach_pid)
6319 (remote_vcont_probe, remote_resume_with_hc)
6320 (send_interrupt_sequence, interrupt_query)
6321 (remote_notif_get_pending_events, fetch_register_using_p)
6322 (send_g_packet, process_g_packet, fetch_registers_using_g)
6323 (store_register_using_P, store_registers_using_G)
6324 (set_remote_traceframe, check_binary_download)
6325 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6326 (remote_xfer_live_readonly_partial, remote_read_bytes)
6327 (remote_send_printf, remote_flash_write, readchar)
6328 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6329 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6330 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6331 (extended_remote_disable_randomization, extended_remote_run)
6332 (send_environment_packet, extended_remote_environment_support)
6333 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6334 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6335 (packet_command): Now methods of ...
6336 (remote_target): ... this class.
6337 (m_remote_state) <remote_target>: New field.
6338 (struct remote_state) <stop_reply_queue,
6339 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6340 fields.
6341 (remote_state::remote_state): Allocate stop_reply_queue.
6342 (remote_state): Delete global.
6343 (get_remote_state_raw): Delete.
6344 (remote_target::get_remote_state): Allocate m_remote_state on
6345 demand.
6346 (get_current_remote_target): New.
6347 (remote_ops, extended_remote_ops): Delete.
6348 (wait_forever_enabled_p, remote_async_inferior_event_token):
6349 Delete, moved to struct remote_state.
6350 (remote_target::close): Delete self. Destruction bits split to
6351 ...
6352 (remote_target::~remote_target): ... this.
6353 (show_memory_packet_size): Adjust to use
6354 get_current_remote_target.
6355 (struct protocol_feature) <func>: Add remote_target parameter.
6356 All callers adjusted.
6357 (curr_quit_handler_target): New.
6358 (remote_serial_quit_handler): Reimplement.
6359 (remote_target::open_1): Adjust to use get_current_remote_target.
6360 Heap-allocate remote_target/extended_remote_target instances.
6361 (vcont_builder::vcont_builder): Add remote_target parameter, and
6362 save it in m_remote. All callers adjusted.
6363 (vcont_builder::m_remote): New field.
6364 (vcont_builder::restart, vcont_builder::flush)
6365 (vcont_builder::push_action): Use it.
6366 (remote_target::commit_resume): Use it.
6367 (struct queue_iter_param) <remote>: New field.
6368 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6369 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6370 (check_pending_event_prevents_wildcard_vcont_callback)
6371 (remote_target::check_pending_events_prevent_wildcard_vcont)
6372 (remote_target::discard_pending_stop_replies)
6373 (remote_target::discard_pending_stop_replies_in_queue)
6374 (remote_target::remote_notif_remove_queued_reply): Fill in
6375 'remote' field.
6376 (remote_notif_get_pending_events): New.
6377 (remote_target::readchar, remote_target::remote_serial_write):
6378 Save/restore curr_quit_handler_target.
6379 (putpkt): New.
6380 (kill_new_fork_children): Fill in 'remote' field.
6381 (packet_command): Use get_current_remote_target, defer to
6382 remote_target method of same name.
6383 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6384 parameter, and save it in m_remote. All callers adjusted.
6385 (scoped_remote_fd::release): Use m_remote.
6386 (scoped_remote_fd::m_remote): New field.
6387 (remote_file_put, remote_file_get, remote_file_delete): Use
6388 get_current_remote_target, defer to remote_target method of same
6389 name.
6390 (remote_btrace_reset): Add remote_state paremeter. Update all
6391 callers.
6392 (remote_async_inferior_event_handler). Pass down 'data'.
6393 (remote_new_objfile): Use get_current_remote_target.
6394 (remote_target::vcont_r_supported): New.
6395 (set_range_stepping): Use get_current_remote_target and
6396 remote_target::vcont_r_supported.
6397 (_initialize_remote): Don't allocate 'remote_state' and
6398 'stop_reply_queue' globals.
6399 * remote.h (struct remote_target): Forward declare.
6400 (getpkt, putpkt, remote_notif_get_pending_events): Add
6401 'remote_target' parameter.
6402
6403 2018-05-22 Pedro Alves <palves@redhat.com>
6404
6405 * remote.c (vcont_builder): Now a class. Make all data members
6406 private.
6407 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6408 Declare methods.
6409 (vcont_builder_restart): Rename to ...
6410 (vcont_builder::restart): ... this.
6411 (vcont_builder_flush): Rename to ...
6412 (vcont_builder::flush): ... this.
6413 (vcont_builder_push_action): Rename to ...
6414 (vcont_builder::push_action): ... this.
6415 (remote_target::commit_resume): Adjust.
6416
6417 2018-05-22 Pedro Alves <palves@redhat.com>
6418
6419 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6420 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6421 (get_fixed_memory_packet_size): New.
6422 (get_memory_packet_size): Use it.
6423 (set_memory_packet_size): Don't override the config size with
6424 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6425 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6426 Don't refer to get_memory_packet_size if not connected to a remote
6427 target. Show "(default)" if configured size is 0.
6428
6429 2018-05-22 Pedro Alves <palves@redhat.com>
6430
6431 * remote.c (remote_target::mourn_inferior): Move
6432 discard_pending_stop_replies call here from ...
6433 (_initialize_remote): ... here.
6434
6435 2018-05-22 Pedro Alves <palves@redhat.com>
6436
6437 * remote.c (compare_section_command): Remove set_general_process
6438 call.
6439
6440 2018-05-22 Pedro Alves <palves@redhat.com>
6441
6442 * remote.c (struct packet_reg, struct remote_arch_state):
6443 Move higher up in the file.
6444 (remote_state) <m_arch_states>: Store remote_arch_state values
6445 instead of remote_arch_state pointers.
6446 (remote_state::get_remote_arch_state): Adjust.
6447
6448 2018-05-22 Pedro Alves <palves@redhat.com>
6449
6450 * remote.c: Include <unordered_map>.
6451 (remote_state): Now a class.
6452 (remote_state) <get_remote_arch_state>: Declare method.
6453 <get_remote_arch_state>: New field.
6454 (remote_arch_state) <remote_arch_state>: Declare ctor.
6455 <regs>: Now a unique_ptr.
6456 (remote_gdbarch_data_handle): Delete.
6457 (get_remote_arch_state): Delete.
6458 (remote_state::get_remote_arch_state): New.
6459 (get_remote_state): Adjust to call remote_state's
6460 get_remote_arch_state method.
6461 (init_remote_state): Delete, bits factored out to ...
6462 (remote_arch_state::remote_arch_state): ... this new method.
6463 (get_remote_packet_size, get_memory_packet_size)
6464 (process_g_packet, remote_target::fetch_registers)
6465 (remote_target::prepare_to_store, store_registers_using_G)
6466 (remote_target::store_registers, remote_target::get_trace_status):
6467 Adjust to call remote_state's method.
6468 (_initialize_remote): Remove reference to
6469 remote_gdbarch_data_handle.
6470
6471 2018-05-22 Pedro Alves <palves@redhat.com>
6472
6473 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6474 pread>: New method declarations.
6475 (remote_target::open_1): Adjust.
6476 (readahead_cache_invalidate): Rename to ...
6477 (readahead_cache::invalidate): ... this, and adjust to be a class
6478 method.
6479 (readahead_cache_invalidate_fd): Rename to ...
6480 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6481 class method.
6482 (remote_hostio_pwrite): Adjust.
6483 (remote_hostio_pread_from_cache): Rename to ...
6484 (readahead_cache::pread): ... this, and adjust to be a class
6485 method.
6486 (remote_hostio_close): Adjust.
6487
6488 2018-05-22 Pedro Alves <palves@redhat.com>
6489
6490 * remote.c (remote_hostio_close_cleanup): Delete.
6491 (class scoped_remote_fd): New.
6492 (remote_file_put, remote_file_get): Use it.
6493
6494 2018-05-22 Pedro Alves <palves@redhat.com>
6495
6496 (struct vCont_action_support): Use bool and initialize all fields.
6497 (struct readahead_cache): Initialize all fields.
6498 (remote_state): Use bool and initialize all fields.
6499 (remote_state::remote_state, remote_state::~remote_state): New.
6500 (new_remote_state): Delete.
6501 (_initialize_remote): Use new to allocate remote_state.
6502
6503 2018-05-22 Pedro Alves <palves@redhat.com>
6504 張俊芝 <zjz@zjz.name>
6505
6506 PR gdb/22973
6507 * c-exp.y: Include "c-support.h".
6508 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6509 of tolower. Use c_ident_is_alpha to scan names.
6510 * c-lang.c: Include "c-support.h".
6511 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6512 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6513 * c-support.h: New file, with bits factored out from ...
6514 * cp-name-parser.y: ... this file.
6515 Include "c-support.h".
6516 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6517 c-support.h and renamed.
6518 (symbol_end, yylex): Adjust.
6519
6520 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6521
6522 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6523 parameter type to CORE_ADDR.
6524 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6525 parameter type in declaration to CORE_ADDR.
6526 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6527 target_auxv_search to get AT_HWCAP and use the result to get the
6528 target description.
6529 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6530 to CORE_ADDR. Remove the cast of the return value to unsigned
6531 long. Fix error predicate of target_auxv_search.
6532 (ppc_linux_nat_target::read_description): Change the type of the
6533 hwcap variable to CORE_ADDR.
6534
6535 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6536
6537 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6538 if the size of fpscr is larger than 32 bits.
6539
6540 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6541
6542 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6543 (ppc32_linux_vsxregmap): New global.
6544 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6545 regcache_supply_regset, and regcache_collect_regset.
6546 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6547 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6548 (fetch_vsx_register, store_vsx_register): Remove.
6549 (fetch_vsx_registers): Add regno parameter. Get regset using
6550 ppc_linux_vsxregset. Use regset to supply registers.
6551 (store_vsx_registers): Add regno parameter. Get regset using
6552 ppc_linux_vsxregset. Use regset to collect registers.
6553 (fetch_register): Call fetch_vsx_registers instead of
6554 fetch_vsx_register.
6555 (store_register): Call store_vsx_registers instead of
6556 store_vsx_register.
6557 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6558 new regno parameter.
6559 (store_ppc_registers): Call store_vsx_registers with -1 for the
6560 new regno parameter.
6561 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6562 (ppc_collect_vsxregset): Remove.
6563
6564 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6565
6566 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6567 offset fields.
6568 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6569 for vector register offset fields.
6570 (ppc64_fbsd_reg_offsets): Likewise.
6571 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6572 to vector register offset fields.
6573 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6574 to vector register offset fields.
6575 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6576 vector register offset fields.
6577 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6578 initializers for vector register offset fields.
6579 (rs6000_aix64_reg_offsets): Likewise.
6580 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6581 (ppc_supply_vrregset): Remove.
6582 (ppc_collect_vrregset): Remove.
6583 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6584 (ppc_linux_vrregset) : New function.
6585 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6586 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6587 (ppc32_linux_vrregset): Remove.
6588 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6589 and use result instead of ppc32_linux_vrregset.
6590 (ppc32_linux_reg_offsets): Remove initializers for vector register
6591 offset fields.
6592 (ppc64_linux_reg_offsets): Likewise.
6593 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6594 * ppc-linux-nat.c: Include regset.h.
6595 (gdb_vrregset_t): Adjust comment to account for little-endian
6596 mode.
6597 (supply_vrregset, fill_vrregset): Remove.
6598 (fetch_altivec_register, store_altivec_register): Remove.
6599 (fetch_altivec_registers): Add regno parameter. Get regset using
6600 ppc_linux_vrregset. Use regset to supply registers.
6601 (store_altivec_registers): Add regno parameter. Get regset using
6602 ppc_linux_vrregset. Use regset to collect registers.
6603 (fetch_register): Call fetch_altivec_registers instead of
6604 fetch_altivec_register.
6605 (store_register): Call store_altivec_registers instead of
6606 store_altivec_register.
6607 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6608 the new regno parameter.
6609 (store_ppc_registers): Call store_altivec_registers with -1 for
6610 the new regno parameter.
6611
6612 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6613
6614 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6615 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6616 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6617 (gdb_vrregset_t): Change array type size to
6618 PPC_LINUX_SIZEOF_VRREGSET.
6619 (gdb_vsxregset_t): Change array type size to
6620 PPC_LINUX_SIZEOF_VSXREGSET.
6621 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6622 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6623 PPC_LINUX_SIZEOF_VSXREGSET.
6624
6625 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6626
6627 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6628 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6629 nat/ppc-linux.c.
6630 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6631 ppc_linux_target_wordsize with tid.
6632 (ppc_linux_nat_target::read_description): Call ppc_linux_target
6633 wordsize with tid.
6634 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6635 (ppc64_64bit_inferior_p): Add static and inline specifiers.
6636 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6637 tid parameter. Remove static specifier.
6638 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6639 (ppc_linux_target_wordsize): New declaration.
6640
6641 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6642
6643 * arch/ppc-linux-common.c: New file.
6644 * arch/ppc-linux-common.h: New file.
6645 * arch/ppc-linux-tdesc.h: New file.
6646 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6647 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6648 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6649 arch/ppc-linux-tdesc.h.
6650 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6651 arch/ppc-linux-tdesc.h.
6652 (ppc_linux_nat_target::read_description): Remove target
6653 description matching code. Fill a ppc_linux_features struct and
6654 call ppc_linux_match_description with it. Move comment about ISA
6655 2.05 to ppc-linux-common.c.
6656 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6657 arch/ppc-linux-tdesc.h.
6658 (ppc_linux_core_read_description): Remove target description
6659 matching code. Fill a ppc_linux_features struct and call
6660 ppc_linux_match_description with it.
6661 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6662 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6663 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6664 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6665 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6666 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6667 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6668 (tdesc_powerpc_e500l): Remove.
6669
6670 2018-05-22 Joel Brobecker <brobecker@adacore.com>
6671
6672 * ada-lang.c (catch_assert_command): Pass empty string instead
6673 of NULL for excep_string argument.
6674
6675 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6676
6677 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6678 the width of the requested register exceeds the width of the
6679 `ptrace' data type.
6680
6681 2018-05-21 Tom Tromey <tom@tromey.com>
6682
6683 * printcmd.c (output_command): Remove.
6684 (output_command_const): Rename to output_command.
6685 * valprint.h (output_command): Rename from output_command_const.
6686 * tracepoint.c (trace_dump_actions): Call output_command.
6687
6688 2018-05-21 Tom Tromey <tom@tromey.com>
6689
6690 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6691 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6692 * ada-lang.h (create_ada_exception_catchpoint): Update.
6693 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6694 std::string.
6695 (create_excep_cond_exprs, ~ada_catchpoint)
6696 (should_stop_exception, print_one_exception)
6697 (print_mention_exception, print_recreate_exception): Update.
6698 (ada_get_next_arg): Remove.
6699 (catch_ada_exception_command_split): Use std::string. Change type
6700 of "excep_string", "cond_string".
6701 (catch_ada_exception_command): Update.
6702 (create_ada_exception_catchpoint): Change type of excep_string.
6703 (ada_exception_sal): Remove excep_string parameter.
6704 (~ada_catchpoint): Remove.
6705
6706 2018-05-21 Tom Tromey <tom@tromey.com>
6707
6708 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6709 cleanup.
6710
6711 2018-05-21 Tom Tromey <tom@tromey.com>
6712
6713 * ada-lang.c (ada_exception_message_1, ada_exception_message):
6714 Return unique_xmalloc_ptr.
6715 (print_it_exception): Update.
6716
6717 2018-05-21 Tom Tromey <tom@tromey.com>
6718
6719 * tracepoint.c (trace_dump_actions): Use std::string.
6720
6721 2018-05-21 Tom Tromey <tom@tromey.com>
6722
6723 * symfile.c (reread_symbols): Use std::string for original_name.
6724
6725 2018-05-21 Tom Tromey <tom@tromey.com>
6726
6727 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6728 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
6729 constructor.
6730
6731 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
6732
6733 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6734 instance to...
6735 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6736 * objfiles.c (get_objfile_bfd_data): Allocate
6737 objfile_per_bfd_storage with obstack_new when allocating on
6738 obstack.
6739
6740 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6741
6742 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6743 OBSTACK_ZALLOC.
6744 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6745 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6746 * mdebugread.c (mdebug_build_psymtabs): Likewise.
6747 (add_pending): Likewise.
6748 (parse_symbol): Likewise.
6749 (parse_partial_symbols): Likewise.
6750 (psymtab_to_symtab_1): Likewise.
6751 (new_psymtab): Likewise.
6752 (elfmdebug_build_psymtabs): Likewise.
6753 * minsyms.c (terminate_minimal_symbol_table): Likewise.
6754 * objfiles.c (get_objfile_bfd_data): Likewise.
6755 (objfile_register_static_link): Likewise.
6756 * psymtab.c (allocate_psymtab): Likewise.
6757 * stabsread.c (read_member_functions): Likewise.
6758 * xcoffread.c (xcoff_end_psymtab): Likewise.
6759
6760 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6761
6762 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6763 compiler supports std::is_trivially_constructible.
6764 * common/poison.h: Include obstack.h.
6765 (IsMallocable): Define to is_trivially_constructible if the
6766 compiler supports it, define to true_type otherwise.
6767 (xobnew): New.
6768 (XOBNEW): Redefine.
6769 (xobnewvec): New.
6770 (XOBNEWVEC): Redefine.
6771 * gdb_obstack.h (obstack_zalloc): New.
6772 (OBSTACK_ZALLOC): Redefine.
6773 (obstack_calloc): New.
6774 (OBSTACK_CALLOC): Redefine.
6775 (obstack_new): New.
6776 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6777 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6778 gdbarch.c.
6779 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6780 obstack_calloc/obstack_zalloc.
6781 (gdbarch_obstack_zalloc): Remove.
6782 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6783
6784 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6785
6786 * stack.c (backtrace_command_1): Remove useless variable int i.
6787
6788 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6789
6790 * stack.c (print_frame_info): Fix comment.
6791
6792 2018-05-18 Tom Tromey <tom@tromey.com>
6793
6794 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6795 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6796 (~dwarf2_per_objfile): Update
6797 (dwarf2_get_dwz_file): Use new.
6798 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6799 unique_ptr.
6800
6801 2018-05-18 Tom Tromey <tom@tromey.com>
6802
6803 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6804 unique_ptr.
6805 * dwarf2read.c (struct dwp_file): Add constructor and
6806 initializers.
6807 (open_and_init_dwp_file): Return a unique_ptr.
6808 (dwarf2_per_objfile, create_dwp_hash_table)
6809 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6810 (lookup_dwo_unit_in_dwp): Update.
6811 (open_and_init_dwp_file, get_dwp_file): Update.
6812
6813 2018-05-18 Tom Tromey <tom@tromey.com>
6814
6815 * dwarf2read.c (dwarf2_per_objfile): Update.
6816 (struct mapped_index): Add initializers.
6817 (dwarf2_read_index): Use new.
6818 (dw2_symtab_iter_init): Update.
6819 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6820 unique_ptr.
6821
6822 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6823
6824 * dwarf2read.c (mapped_index) <total_size>: Remove.
6825
6826 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6827
6828 * unittests/format_pieces-selftests.c (test_format_specifier):
6829 Add ARI comments.
6830
6831 2018-05-18 Tom Tromey <tom@tromey.com>
6832
6833 * c-typeprint.c (maybe_print_hole): New function.
6834 (c_print_type_struct_field_offset): Update.
6835 (c_type_print_base_struct_union): Call maybe_print_hole.
6836
6837 2018-05-17 Keith Seitz <keiths@redhat.com>
6838
6839 * breakpoint.c (build_bpstat_chain): New function, moved from
6840 bpstat_stop_status.
6841 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6842 If no stop chain is passed, call build_bpstat_chain to build it.
6843 * breakpoint.h (build_bpstat_chain): Declare.
6844 (bpstat_stop_status): Move documentation here from breakpoint.c.
6845 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6846 build the stop chain and pass it to skip_inline_frames.
6847 Pass this stop chain to bpstat_stop_status.
6848 * inline-frame.c: Include breakpoint.h.
6849 (stopped_by_user_bp_inline_frame): New function.
6850 (skip_inline_frames): Add parameter `stop_chain'.
6851 Move documention to inline-frame.h.
6852 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6853 whether the frame should be elided.
6854 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6855 Add moved documentation and update for new parameter.
6856
6857 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6858
6859 PR cli/14975
6860 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6861 unittests/format_pieces-selftests.c.
6862 * common/format.h (format_piece) <operator==>: New.
6863 (format_pieces) <operator[]>: Remove.
6864 * common/format.c (format_pieces::format_pieces): Handle \e.
6865 * unittests/format_pieces-selftests.c: New.
6866
6867 2018-05-17 Tom Tromey <tom@tromey.com>
6868
6869 PR symtab/23010:
6870 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6871 (dw2_instantiate_symtab): Add skip_partial parameter.
6872 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6873 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6874 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6875 (dw2_expand_symtabs_matching_one)
6876 (dw2_find_pc_sect_compunit_symtab)
6877 (dw2_debug_names_lookup_symbol)
6878 (dw2_debug_names_expand_symtabs_for_function): Update.
6879 (init_cutu_and_read_dies): Add skip_partial parameter.
6880 (process_psymtab_comp_unit, build_type_psymtabs_1)
6881 (process_skeletonless_type_unit, load_partial_comp_unit)
6882 (psymtab_to_symtab_1): Update.
6883 (load_full_comp_unit): Add skip_partial parameter.
6884 (process_imported_unit_die, dwarf2_read_addr_index)
6885 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6886 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6887 (read_signatured_type): Update.
6888
6889 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6890
6891 * value.c (release_value): Remove unused variable.
6892 (record_latest_value): Likewise.
6893 (access_value_history): Likewise.
6894 (preserve_values): Likewise.
6895
6896 2018-05-17 Tom Tromey <tom@tromey.com>
6897
6898 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6899 Initialize.
6900
6901 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6902
6903 PR gdb/22286
6904 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6905 Also handle registers whose width is not a multiple of
6906 PTRACE_TYPE_RET.
6907 (linux_nat_trad_target::store_register): Likewise.
6908
6909 2018-05-16 Tom Tromey <tom@tromey.com>
6910
6911 * gdbcore.h (core_bfd): Redefine.
6912 * corelow.c (core_target::close): Update.
6913 (core_target_open): Update.
6914 * progspace.h (struct program_space) <cbfd>: Now a
6915 gdb_bfd_ref_ptr.
6916
6917 2018-05-16 Tom Tromey <tom@tromey.com>
6918
6919 PR cli/19551:
6920 * symfile-add-flags.h (enum symfile_add_flags)
6921 <SYMFILE_NOT_FILENAME>: New constant.
6922 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6923 objfile name from BFD.
6924 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6925 * minidebug.c (find_separate_debug_file_in_section): Put
6926 ".gnu_debugdata" into BFD's file name.
6927
6928 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6929
6930 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6931 Remove.
6932
6933 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6934
6935 PR binutils/21446
6936 * aarch64-tdep.c (aarch64_analyze_prologue,
6937 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6938 Indicate not interested in errors.
6939
6940 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6941
6942 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6943 Supply the MIPS_ZERO_REGNUM register.
6944
6945 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6946
6947 * mips-tdep.c (mask_address_var): Make variable static.
6948
6949 2018-05-14 Tom Tromey <tom@tromey.com>
6950
6951 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6952
6953 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6954
6955 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6956 FXSAVE_ADDR for the mxcsr register.
6957
6958 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6959
6960 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6961
6962 2018-05-11 Pedro Alves <palves@redhat.com>
6963
6964 * corelow.c (core_target) <core_target>: No longer inline.
6965 Initialize m_core_gdbarch, m_core_vec and build the section table
6966 here.
6967 <~core_target>: New.
6968 <core_gdbarch, get_core_register_section>: New methods.
6969 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6970 factored out from ...
6971 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6972 (core_ops): Delete.
6973 (sniff_core_bfd): Add gdbarch parameter.
6974 (core_close): Delete, merged into ...
6975 (core_target::close): ... here. Delete self.
6976 (core_close_cleanup): Delete.
6977 (core_target_open): Allocate a core_target on the heap. Use a
6978 unique_ptr instead of a cleanup. Bits moved into the core_target
6979 ctor. Adjust to use core_target methods instead of globals.
6980 (get_core_register_section): Rename to ...
6981 (core_target::get_core_register_section): ... this and adjust.
6982 (struct get_core_registers_cb_data): New.
6983 (get_core_registers_cb): Use it. Use bool.
6984 (core_target::fetch_registers, core_target::files_info)
6985 (core_target::xfer_partial, core_target::read_description)
6986 (core_target::pid_to, core_target::thread_name): Adjust to
6987 reference class fields instead of globals.
6988 * target.h (struct target_ops_deleter, target_ops_up): New.
6989
6990 2018-05-11 Pedro Alves <palves@redhat.com>
6991
6992 * corefile.c (core_file_command): Move to corelow.c.
6993 * corelow.c (the_core_target): Delete.
6994 (core_file_command): Moved from corefile.c. Check exec_bfd
6995 instead of the_core_target. Use target_detach instead of calling
6996 into the_core_target directly.
6997 (maybe_say_no_core_file_now): New.
6998 (core_target::detach): Use it.
6999 (_initialize_corelow): Remove references to the_core_target.
7000 * gdbcore.h (the_core_target): Delete.
7001
7002 2018-05-11 Tom Tromey <tromey@redhat.com>
7003 Pedro Alves <palves@redhat.com>
7004
7005 * corefile.c (core_bfd): Remove.
7006 * gdbcore.h (core_bfd): Now a macro.
7007 * progspace.h (struct program_space) <cbfd>: New field.
7008
7009 2018-05-11 Tom Tromey <tom@tromey.com>
7010
7011 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7012 gdb::def_vector.
7013
7014 2018-05-10 Tom Tromey <tom@tromey.com>
7015
7016 * configure: Rebuild.
7017 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7018
7019 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7020
7021 PR server/23158:
7022 * regformats/regdat.sh: Adjust script, following the addition
7023 of the new expedite_regs parameter to init_target_desc.
7024
7025 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7026
7027 PR gdb/23127
7028 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7029 set_gdbarch_significant_addr_bit.
7030 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7031 set_gdbarch_significant_addr_bit.
7032 * utils.c (address_significant): Update to sign extend addr.
7033
7034 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7035
7036 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7037 (xtensa_linux_init_abi): Limit tdep->num_regs by
7038 tdep->num_nopriv_regs.
7039 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7040 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7041 not initialized.
7042
7043 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7044
7045 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7046
7047 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7048
7049 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7050 (I387_MXCSR_INIT_VAL): New constant.
7051 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7052 buffer if it was supplied by the inferior.
7053 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7054 (i387_xsave_get_clear_bv): New function.
7055 (i387_supply_xsave): Only read x87 control registers from the
7056 xsave buffer if the feature is enabled, and the state will have
7057 been written, otherwise, provide a suitable default.
7058 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7059 including x87 control registers. Update control registers if they
7060 have changed from the default value, and mark features as enabled
7061 as required.
7062 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7063
7064 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7065
7066 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7067
7068 2018-05-07 Tom Tromey <tom@tromey.com>
7069
7070 * configure: Rebuild.
7071 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7072
7073 2018-05-07 Tom Tromey <tom@tromey.com>
7074
7075 PR tdep/20362:
7076 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7077 bit. Use correct value for VDIV.
7078
7079 2018-05-04 Tom Tromey <tom@tromey.com>
7080
7081 * configure: Rebuild.
7082 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7083
7084 2018-05-04 Tom Tromey <tom@tromey.com>
7085
7086 * linux-record.c (record_linux_system_call) <case
7087 RECORD_SYS_RECVFROM>: Add "break".
7088
7089 2018-05-04 Tom Tromey <tom@tromey.com>
7090
7091 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7092 Add missing "break".
7093 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7094 Add missing "break".
7095
7096 2018-05-04 Tom Tromey <tom@tromey.com>
7097
7098 * rs6000-tdep.c (ppc_process_record_op4)
7099 (ppc_process_record_op63): Add fall-through comment.
7100
7101 2018-05-04 Tom Tromey <tom@tromey.com>
7102
7103 * i386-tdep.c (i386_process_record): Add fall-through comment.
7104
7105 2018-05-04 Tom Tromey <tom@tromey.com>
7106
7107 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7108 comment.
7109
7110 2018-05-04 Tom Tromey <tom@tromey.com>
7111
7112 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7113 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7114 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7115 comment.
7116 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7117 comment.
7118 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7119 comment.
7120
7121 2018-05-04 Tom Tromey <tom@tromey.com>
7122
7123 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7124
7125 2018-05-04 Tom Tromey <tom@tromey.com>
7126
7127 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7128 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7129 * symfile.c (section_is_mapped): Fix fall-through comment.
7130 * stabsread.c (define_symbol, read_member_functions): Fix
7131 fall-through comment.
7132 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7133 comment.
7134 * remote.c (remote_wait_as): Fix fall-through comment.
7135 * p-exp.y (yylex): Fix fall-through comment.
7136 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7137 comment.
7138 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7139 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7140 * jv-exp.y (yylex): Fix fall-through comment.
7141 * go-exp.y (lex_one_token): Fix fall-through comment.
7142 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7143 fall-through comment.
7144 * f-exp.y (yylex): Fix fall-through comment.
7145 * dwarf2read.c (process_die): Fix fall-through comments.
7146 * dbxread.c (process_one_symbol): Fix fall-through comment.
7147 * d-exp.y (lex_one_token): Fix fall-through comment.
7148 * cp-name-parser.y (yylex): Fix fall-through comment.
7149 * coffread.c (coff_symtab_read): Fix fall-through comment.
7150 * c-exp.y (lex_one_token): Fix fall-through comment.
7151 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7152 comment.
7153 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7154 comment.
7155
7156 2018-05-04 Tom Tromey <tom@tromey.com>
7157
7158 PR python/22730:
7159 * NEWS: Mention gdb.execute change.
7160 * gdbcmd.h (execute_control_command): Don't declare.
7161 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7162 execute_control_commands, execute_control_commands_to_string.
7163 * cli/cli-script.h (execute_control_commands)
7164 (execute_control_commands_to_string): Declare.
7165 (execute_control_command): Add from_tty parameter.
7166 * cli/cli-script.c (execute_control_commands)
7167 (execute_control_commands_to_string): New functions.
7168 (execute_user_command): Use execute_control_commands.
7169 (execute_control_command_1): Add "from_tty" parameter. Update.
7170 (execute_control_command): Likewise.
7171
7172 2018-05-04 Tom Tromey <tom@tromey.com>
7173
7174 PR python/22731:
7175 * NEWS: Mention that breakpoint commands are writable.
7176 * python/py-breakpoint.c (bppy_set_commands): New function.
7177 (breakpoint_object_getset) <"commands">: Use it.
7178
7179 2018-05-04 Tom Tromey <tom@tromey.com>
7180
7181 * tracepoint.c (actions_command): Update.
7182 * mi/mi-cmd-break.c (mi_command_line_array)
7183 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7184 (mi_read_next_line): Remove.
7185 (mi_cmd_break_commands): Update.
7186 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7187 function_view.
7188 * cli/cli-script.c (get_command_line): Update.
7189 (process_next_line): Use function_view. Constify.
7190 (recurse_read_control_structure, read_command_lines)
7191 (read_command_lines_1): Change argument types to function_view.
7192 (do_define_command, document_command): Update.
7193 * breakpoint.h (check_tracepoint_command): Don't declare.
7194 * breakpoint.c (check_tracepoint_command): Remove.
7195 (commands_command_1, create_tracepoint_from_upload): Update.
7196
7197 2018-05-04 Tom Tromey <tom@tromey.com>
7198
7199 PR gdb/11750:
7200 * cli/cli-script.h (enum command_control_type) <define_control>:
7201 New constant.
7202 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7203 (build_command_line, execute_control_command_1)
7204 (process_next_line): Likewise.
7205 (do_define_command): New function, extracted from define_command.
7206 (define_command): Use it.
7207
7208 2018-05-04 Tom Tromey <tom@tromey.com>
7209
7210 * tracepoint.c (actions_command): Update.
7211 * cli/cli-script.h (read_command_lines): Update.
7212 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7213 (MAX_TMPBUF): Remove define.
7214 (define_command): Use string_printf.
7215 (document_command): Likewise.
7216 * breakpoint.c (commands_command_1): Update.
7217
7218 2018-05-04 Tom Tromey <tom@tromey.com>
7219
7220 * top.c (execute_command): Update.
7221 * cli/cli-script.h (print_command_lines): Now varargs.
7222 * cli/cli-script.c (print_command_lines): Now varargs.
7223 (execute_control_command_1) <case while_control, case if_control>:
7224 Update.
7225
7226 2018-05-04 Tom Tromey <tom@tromey.com>
7227
7228 * tracepoint.c (all_tracepoint_actions): Rename from
7229 all_tracepoint_actions_and_cleanup. Change return type.
7230 (actions_command, encode_actions_1, encode_actions)
7231 (trace_dump_actions, tdump_command): Update.
7232 * remote.c (remote_download_command_source): Update.
7233 * python/python.c (gdbpy_eval_from_control_command)
7234 (python_command, python_interactive_command): Update.
7235 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7236 * guile/guile.c (guile_command)
7237 (gdbscm_eval_from_control_command, guile_command): Update.
7238 * compile/compile.c (compile_code_command)
7239 (compile_print_command, compile_to_object): Update.
7240 * cli/cli-script.h (struct command_lines_deleter): New.
7241 (counted_command_line): New typedef.
7242 (struct command_line): Add constructor, destructor.
7243 <body_list>: Remove.
7244 <body_list_0, body_list_1>: New members.
7245 (command_line_up): Remove typedef.
7246 (read_command_lines, read_command_lines_1, get_command_line):
7247 Update.
7248 (copy_command_lines): Don't declare.
7249 * cli/cli-script.c (build_command_line): Use "new".
7250 (get_command_line): Return counted_command_line.
7251 (print_command_lines, execute_user_command)
7252 (execute_control_command_1, while_command, if_command): Update.
7253 (realloc_body_list): Remove.
7254 (process_next_line, recurse_read_control_structure): Update.
7255 (read_command_lines, read_command_lines_1): Return counted_command_line.
7256 (free_command_lines): Use "delete".
7257 (copy_command_lines): Remove.
7258 (define_command, document_command, show_user_1): Update.
7259 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7260 a counted_command_line.
7261 * breakpoint.h (counted_command_line): Remove typedef.
7262 (breakpoint_set_commands): Update.
7263 * breakpoint.c (check_no_tracepoint_commands)
7264 (validate_commands_for_breakpoint): Update.
7265 (breakpoint_set_commands): Change commands to be a
7266 counted_command_line.
7267 (commands_command_1, update_dprintf_command_list)
7268 (create_tracepoint_from_upload): Update.
7269
7270 2018-05-04 Tom Tromey <tom@tromey.com>
7271
7272 * cli/cli-decode.h (cmd_list_element): New constructor.
7273 (~cmd_list_element): New destructor.
7274 (struct cmd_list_element): Add initializers.
7275 * cli/cli-decode.c (do_add_cmd): Use "new".
7276 (delete_cmd): Use "delete".
7277
7278 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7279 Pedro Alves <palves@redhat.com>
7280
7281 PR breakpoints/19806 and support for PR external/20207.
7282 * NEWS: Mention Aarch64 watchpoint improvements.
7283 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7284 watchpoints and PR external/20207 watchpoints.
7285 * nat/aarch64-linux-hw-point.c
7286 (kernel_supports_any_contiguous_range): New.
7287 (aarch64_watchpoint_offset): New.
7288 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7289 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7290 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7291 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7292 next_addr_orig_p. Support PR external/20207 watchpoints.
7293 (aarch64_downgrade_regs): New.
7294 (aarch64_dr_state_insert_one_point): New parameters offset and
7295 addr_orig.
7296 (aarch64_dr_state_remove_one_point): Likewise.
7297 (aarch64_handle_breakpoint): Update caller.
7298 (aarch64_handle_aligned_watchpoint): Likewise.
7299 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7300 aligned_offset.
7301 (aarch64_linux_set_debug_regs): Remove const from state. Call
7302 aarch64_downgrade_regs.
7303 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7304 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7305 (DR_CONTROL_MASK): ... this.
7306 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7307 (unsigned int aarch64_watchpoint_offset): New prototype.
7308 (aarch64_linux_set_debug_regs): Remove const from state.
7309 * utils.c (align_up, align_down): Move to ...
7310 * common/common-utils.c (align_up, align_down): ... here.
7311 * utils.h (align_up, align_down): Move to ...
7312 * common/common-utils.h (align_up, align_down): ... here.
7313
7314 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7315
7316 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7317 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7318 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7319 Re-implement to match the ABI as summarized in GCC's
7320 gcc/config/sparc/sparc.c. All callers updated.
7321 (sparc32_store_arguments): Remove assertion.
7322
7323 2018-05-04 Tom Tromey <tom@tromey.com>
7324
7325 * printcmd.c: Don't include tui.h.
7326 (decode_format): Use skip_spaces.
7327
7328 2018-05-04 Tom Tromey <tom@tromey.com>
7329
7330 PR gdb/22619:
7331 * printcmd.c (last_count): New global.
7332 (x_command): Use saved count when repeating.
7333
7334 2018-05-04 Tom Tromey <tom@tromey.com>
7335
7336 * nto-procfs.c (do_closedir_cleanup): Remove.
7337 (procfs_pidlist): Use gdb_dir_up.
7338 * procfs.c (do_closedir_cleanup): Remove.
7339 (proc_update_threads): Use gdb_dir_up.
7340 * common/filestuff.h (struct gdb_dir_deleter): New.
7341 (gdb_dir_up): New typedef.
7342
7343 2018-05-04 Tom Tromey <tom@tromey.com>
7344
7345 * ada-lang.c (print_mention_exception): Use std::string.
7346
7347 2018-05-04 Tom Tromey <tom@tromey.com>
7348
7349 * ada-lang.c (create_excep_cond_exprs): Update.
7350 (ada_exception_catchpoint_cond_string): Use std::string.
7351
7352 2018-05-04 Tom Tromey <tom@tromey.com>
7353
7354 * ada-lang.c (xget_renaming_scope): Return std::string.
7355 (old_renaming_is_invisible): Update.
7356
7357 2018-05-04 Tom Tromey <tom@tromey.com>
7358
7359 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7360 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7361
7362 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7363
7364 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7365
7366 2018-05-04 Tom Tromey <tom@tromey.com>
7367
7368 * remote.c (remote_query_supported_append): Change type.
7369 (remote_check_symbols): Update.
7370
7371 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7372
7373 PR gdb/11420
7374 * configure.ac: Prepend libpython.
7375 * python/python-config.py: Likewise.
7376 * configure: Regenerate.
7377
7378 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7379
7380 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7381
7382 2018-05-03 Pedro Alves <palves@redhat.com>
7383
7384 * s390-linux-nat.c
7385 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7386 override. Write 'true' instead of '1'.
7387 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7388 declaration.
7389
7390 2018-05-02 Pedro Alves <palves@redhat.com>
7391
7392 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7393 add_inf_child_target.
7394 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7395 add_inf_child_target.
7396 * aix-thread.c (aix_thread_target_info): New.
7397 (aix_thread_target) <shortname, longname, doc>: Delete.
7398 <info>: New.
7399 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7400 add_inf_child_target.
7401 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7402 add_inf_child_target.
7403 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7404 add_inf_child_target.
7405 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7406 add_inf_child_target.
7407 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7408 add_inf_child_target.
7409 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7410 add_inf_child_target.
7411 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7412 add_inf_child_target.
7413 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7414 add_inf_child_target.
7415 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7416 add_inf_child_target.
7417 * bfd-target.c (target_bfd_target_info): New.
7418 (target_bfd) <shortname, longname, doc>: Delete.
7419 <info>: New.
7420 * bsd-kvm.c (bsd_kvm_target_info): New.
7421 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7422 <info>: New.
7423 (bsd_kvm_target::open): Rename to ...
7424 (bsd_kvm_target_open): ... this. Adjust.
7425 * bsd-uthread.c (bsd_uthread_target_info): New.
7426 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7427 <info>: New.
7428 * corefile.c (core_file_command): Adjust.
7429 * corelow.c (core_target_info): New.
7430 (core_target) <shortname, longname, doc>: Delete.
7431 <info>: New.
7432 (core_target::open): Rename to ...
7433 (core_target_open): ... this. Adjust.
7434 * ctf.c (ctf_target_info): New.
7435 (ctf_target) <shortname, longname, doc>: Delete.
7436 <info>: New.
7437 (ctf_target::open): Rename to ...
7438 (ctf_target_open): ... this.
7439 (_initialize_ctf): Adjust.
7440 * exec.c (exec_target_info): New.
7441 (exec_target) <shortname, longname, doc>: Delete.
7442 <info>: New.
7443 (exec_target::open): Rename to ...
7444 (exec_target_open): ... this.
7445 * gdbcore.h (core_target_open): Declare.
7446 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7447 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7448 add_inf_child_target.
7449 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7450 add_inf_child_target.
7451 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7452 add_inf_child_target.
7453 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7454 add_inf_child_target.
7455 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7456 add_inf_child_target.
7457 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7458 add_inf_child_target.
7459 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7460 add_inf_child_target.
7461 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7462 add_inf_child_target.
7463 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7464 add_inf_child_target.
7465 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7466 add_inf_child_target.
7467 * inf-child.c (inf_child_target_info): New.
7468 (inf_child_target::info): New.
7469 (inf_child_open_target): Remove 'target' parameter. Use
7470 get_native_target instead.
7471 (inf_child_target::open): Delete.
7472 (add_inf_child_target): New.
7473 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7474 Delete.
7475 <info>: New.
7476 (add_inf_child_target): Declare.
7477 (inf_child_open_target): Declare.
7478 * linux-thread-db.c (thread_db_target_info): New.
7479 (thread_db_target) <shortname, longname, doc>: Delete.
7480 <info>: New.
7481 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7482 add_inf_child_target.
7483 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7484 add_inf_child_target.
7485 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7486 add_inf_child_target.
7487 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7488 add_inf_child_target.
7489 * make-target-delegates (print_class): Adjust.
7490 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7491 add_inf_child_target.
7492 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7493 add_inf_child_target.
7494 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7495 add_inf_child_target.
7496 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7497 add_inf_child_target.
7498 * nto-procfs.c (nto_native_target_info): New.
7499 (nto_procfs_target_native) <shortname, longname, doc>:
7500 Delete.
7501 <info>: New.
7502 (nto_procfs_target_info): New.
7503 (nto_procfs_target_procfs) <shortname, longname, doc>:
7504 Delete.
7505 <info>: New.
7506 (init_procfs_targets): Adjust.
7507 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7508 add_inf_child_target.
7509 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7510 add_inf_child_target.
7511 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7512 add_inf_child_target.
7513 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7514 add_inf_child_target.
7515 * ravenscar-thread.c (ravenscar_target_info): New.
7516 (ravenscar_thread_target) <shortname, longname, doc>:
7517 Delete.
7518 <info>: New.
7519 * record-btrace.c (record_btrace_target_info):
7520 (record_btrace_target) <shortname, longname, doc>: Delete.
7521 <info>: New.
7522 (record_btrace_target::open): Rename to ...
7523 (record_btrace_target_open): ... this. Adjust.
7524 * record-full.c (record_longname, record_doc): New.
7525 (record_full_base_target) <shortname, longname, doc>: Delete.
7526 <info>: New.
7527 (record_full_target_info): New.
7528 (record_full_target): <shortname>: Delete.
7529 <info>: New.
7530 (record_full_core_open_1, record_full_open_1): Update comments.
7531 (record_full_base_target::open): Rename to ...
7532 (record_full_open): ... this.
7533 (cmd_record_full_restore): Update.
7534 (_initialize_record_full): Update.
7535 * remote-sim.c (remote_sim_target_info): New.
7536 (gdbsim_target) <shortname, longname, doc>: Delete.
7537 <info>: New.
7538 (gdbsim_target::open): Rename to ...
7539 (gdbsim_target_open): ... this.
7540 (_initialize_remote_sim): Adjust.
7541 * remote.c (remote_doc): New.
7542 (remote_target_info): New.
7543 (remote_target) <shortname, longname, doc>: Delete.
7544 <info>: New.
7545 (extended_remote_target_info): New.
7546 (extended_remote_target) <shortname, longname, doc>: Delete.
7547 <info>: New.
7548 (remote_target::open_1): Make static. Adjust.
7549 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7550 * s390-linux-nat.c (_initialize_s390_nat): Use
7551 add_inf_child_target.
7552 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7553 add_inf_child_target.
7554 * sol-thread.c (thread_db_target_info): New.
7555 (sol_thread_target) <shortname, longname, doc>: Delete.
7556 <info>: New.
7557 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7558 add_inf_child_target.
7559 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7560 add_inf_child_target.
7561 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7562 add_inf_child_target.
7563 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7564 add_inf_child_target.
7565 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7566 add_inf_child_target.
7567 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7568 add_inf_child_target.
7569 * spu-linux-nat.c (_initialize_spu_nat): Use
7570 add_inf_child_target.
7571 * spu-multiarch.c (spu_multiarch_target_info): New.
7572 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7573 <info>: New.
7574 * target-delegates.c: Regenerate.
7575 * target.c: Include <unordered_map>.
7576 (target_ops_p): Delete.
7577 (DEF_VEC_P(target_ops_p)): Delete.
7578 (target_factories): New.
7579 (test_target_info): New.
7580 (test_target_ops::info): New.
7581 (open_target): Adjust to use target_factories.
7582 (add_target_with_completer): Rename to ...
7583 (add_target): ... this. Change prototype. Register target_info
7584 and open callback in target_factories. Register target_info in
7585 command context instead of target_ops.
7586 (add_target): Delete old implementation.
7587 (add_deprecated_target_alias): Change prototype. Adjust.
7588 (the_native_target): New.
7589 (set_native_target, get_native_target): New.
7590 (find_default_run_target): Use the_native_target.
7591 (find_attach_target, find_run_target): Simplify.
7592 (target_ops::open): Delete.
7593 (dummy_target_info): New.
7594 (dummy_target::shortname, dummy_target::longname)
7595 (dummy_target::doc): Delete.
7596 (dummy_target::info): New.
7597 (debug_target::shortname, debug_target::longname)
7598 (debug_target::doc): Delete.
7599 (debug_target::info): New.
7600 * target.h (struct target_info): New.
7601 (target_ops::~target_ops): Add comment.
7602 (target_ops::info): New.
7603 (target_ops::shortname, target_ops::longname, target_ops::doc): No
7604 longer virtual. Implement in terms of target_info.
7605 (set_native_target, get_native_target): Declare.
7606 (target_open_ftype): New.
7607 (add_target, add_target_with_completer)
7608 (add_deprecated_target_alias): Change prototype.
7609 (test_target) <shortname, longname, doc>: Delete.
7610 <info>: New.
7611 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7612 add_inf_child_target.
7613 * tracefile-tfile.c (tfile_target_info): New.
7614 (tfile_target) <shortname, longname, doc>: Delete.
7615 <info>: New.
7616 (tfile_target::open): Rename to ...
7617 (tfile_target_open): ... this.
7618 (_initialize_tracefile_tfile): Adjust.
7619 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7620 add_inf_child_target.
7621 * windows-nat.c (_initialize_windows_nat): Use
7622 add_inf_child_target.
7623 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7624 add_inf_child_target.
7625
7626 2018-05-02 Pedro Alves <palves@redhat.com>
7627
7628 * linux-nat.h (linux_nat_target) <low_new_thread,
7629 low_delete_thread, low_new_fork, low_forget_process,
7630 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7631 New virtual methods.
7632 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7633 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7634 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7635 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7636 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7637 Delete.
7638 * linux-fork.c (delete_fork): Adjust to call low method.
7639 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7640 (linux_nat_new_fork, linux_nat_forget_process_hook)
7641 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7642 (linux_nat_status_is_event):
7643 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7644 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7645 to call low method.
7646 (sigtrap_is_event): Rename to ...
7647 (linux_nat_target::low_status_is_event): ... this.
7648 (linux_nat_set_status_is_event): Delete.
7649 (save_stop_reason, linux_nat_wait_1)
7650 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7651 low methods.
7652 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7653 (linux_nat_set_new_fork, linux_nat_set_forget_process)
7654 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7655 (linux_nat_set_prepare_to_resume): Delete.
7656 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7657 low virtual methods.
7658 * amd64-linux-nat.c: Likewise.
7659 * arm-linux-nat.c: Likewise.
7660 * i386-linux-nat.c: Likewise.
7661 * ia64-linux-nat.c: Likewise.
7662 * mips-linux-nat.c: Likewise.
7663 * ppc-linux-nat.c: Likewise.
7664 * s390-linux-nat.c: Likewise.
7665 * sparc64-linux-nat.c: Likewise.
7666 * x86-linux-nat.c: Likewise.
7667 * x86-linux-nat.h: Include "nat/x86-linux.h".
7668 (x86_linux_nat_target) <low_new_fork, low_forget_process,
7669 low_prepare_to_resume, low_new_thread, low_delete_thread>:
7670 Override methods.
7671
7672 2018-05-02 Pedro Alves <palves@redhat.com>
7673
7674 * target.h (target_ops)
7675 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7676 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7677 stopped_by_watchpoint, have_continuable_watchpoint,
7678 stopped_data_address, watchpoint_addr_within_range,
7679 can_accel_watchpoint_condition, can_run, thread_alive,
7680 has_all_memory, has_memory, has_stack, has_registers,
7681 has_execution, can_async_p, is_async_p, supports_non_stop,
7682 always_non_stop_p, can_execute_reverse, supports_multi_process,
7683 supports_enable_disable_tracepoint,
7684 supports_disable_randomization, supports_string_tracing,
7685 supports_evaluation_of_breakpoint_conditions,
7686 can_run_breakpoint_commands, filesystem_is_local,
7687 can_download_tracepoint, get_trace_state_variable_value,
7688 set_trace_notes, get_tib_address, use_agent, can_use_agent,
7689 record_is_replaying, record_will_replay,
7690 augmented_libraries_svr4_read>: Adjust to return bool.
7691 * aarch64-linux-nat.c: All implementations adjusted.
7692 * aix-thread.c: All implementations adjusted.
7693 * arm-linux-nat.c: All implementations adjusted.
7694 * breakpoint.c: All implementations adjusted.
7695 * bsd-kvm.c: All implementations adjusted.
7696 * bsd-uthread.c: All implementations adjusted.
7697 * corelow.c: All implementations adjusted.
7698 * ctf.c: All implementations adjusted.
7699 * darwin-nat.c: All implementations adjusted.
7700 * darwin-nat.h: All implementations adjusted.
7701 * exec.c: All implementations adjusted.
7702 * fbsd-nat.c: All implementations adjusted.
7703 * fbsd-nat.h: All implementations adjusted.
7704 * gnu-nat.c: All implementations adjusted.
7705 * gnu-nat.h: All implementations adjusted.
7706 * go32-nat.c: All implementations adjusted.
7707 * ia64-linux-nat.c: All implementations adjusted.
7708 * inf-child.c: All implementations adjusted.
7709 * inf-child.h: All implementations adjusted.
7710 * inf-ptrace.c: All implementations adjusted.
7711 * inf-ptrace.h: All implementations adjusted.
7712 * linux-nat.c: All implementations adjusted.
7713 * linux-nat.h: All implementations adjusted.
7714 * mips-linux-nat.c: All implementations adjusted.
7715 * nto-procfs.c: All implementations adjusted.
7716 * ppc-linux-nat.c: All implementations adjusted.
7717 * procfs.c: All implementations adjusted.
7718 * ravenscar-thread.c: All implementations adjusted.
7719 * record-btrace.c: All implementations adjusted.
7720 * record-full.c: All implementations adjusted.
7721 * remote-sim.c: All implementations adjusted.
7722 * remote.c: All implementations adjusted.
7723 * s390-linux-nat.c: All implementations adjusted.
7724 * sol-thread.c: All implementations adjusted.
7725 * spu-multiarch.c: All implementations adjusted.
7726 * target-delegates.c: All implementations adjusted.
7727 * target.c: All implementations adjusted.
7728 * target.h: All implementations adjusted.
7729 * tracefile-tfile.c: All implementations adjusted.
7730 * tracefile.c: All implementations adjusted.
7731 * tracefile.h: All implementations adjusted.
7732 * windows-nat.c: All implementations adjusted.
7733 * x86-linux-nat.h: All implementations adjusted.
7734 * x86-nat.h: All implementations adjusted.
7735
7736 2018-05-02 Pedro Alves <palves@redhat.com>
7737
7738 * make-target-delegates (scan_target_h): Don't trim lines here.
7739 Replace sequences of tabs and/or whitespace with a single
7740 whitespace.
7741 (top level, parsing methods): Trim each line before processing it
7742 here.
7743
7744 2018-05-02 Pedro Alves <palves@redhat.com>
7745 John Baldwin <jhb@freebsd.org>
7746
7747 * target.h (enum strata) <debug_stratum>: New.
7748 (struct target_ops) <all delegation methods>: Replace by C++
7749 virtual methods, and drop "to_" prefix. All references updated
7750 throughout.
7751 <to_shortname, to_longname, to_doc, to_data,
7752 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7753 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7754 virtual methods. All references updated throughout.
7755 <can_attach, supports_terminal_ours, can_create_inferior,
7756 get_thread_control_capabilities, attach_no_wait>: New
7757 virtual methods.
7758 <insert_breakpoint, remove_breakpoint>: Now
7759 TARGET_DEFAULT_NORETURN methods.
7760 <info_proc>: Now returns bool.
7761 <to_magic>: Delete.
7762 (OPS_MAGIC): Delete.
7763 (current_target): Delete. All references replaced by references
7764 to ...
7765 (target_stack): ... this. New.
7766 (target_shortname, target_longname): Adjust.
7767 (target_can_run): Now a function declaration.
7768 (default_child_has_all_memory, default_child_has_memory)
7769 (default_child_has_stack, default_child_has_registers)
7770 (default_child_has_execution): Remove target_ops parameter.
7771 (complete_target_initialization): Delete.
7772 (memory_breakpoint_target): New template class.
7773 (test_target_ops): Refactor as a C++ class with virtual methods.
7774 * make-target-delegates (NAME_PART): Tighten.
7775 (POINTER_PART, CP_SYMBOL): New.
7776 (SIMPLE_RETURN_PART): Reimplement.
7777 (VEC_RETURN_PART): Expect less.
7778 (RETURN_PART, VIRTUAL_PART): New.
7779 (METHOD): Adjust to C++ virtual methods.
7780 (scan_target_h): Remove reference to C99.
7781 (dname): Output "target_ops::" prefix.
7782 (write_function_header): Adjust to output a C++ class method.
7783 (write_declaration): New.
7784 (write_delegator): Adjust to output a C++ class method.
7785 (tdname): Output "dummy_target::" prefix.
7786 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7787 method.
7788 (tdefault_names, debug_names): Delete.
7789 (return_types, tdefaults, styles, argtypes_array): New.
7790 (top level): All methods are delegators.
7791 (print_class): New.
7792 (top level): Print dummy_target and debug_target classes.
7793 * target-delegates.c: Regenerate.
7794 * target-debug.h (target_debug_print_enum_info_proc_what)
7795 (target_debug_print_thread_control_capabilities)
7796 (target_debug_print_thread_info_p): New.
7797 * target.c (dummy_target): Delete.
7798 (the_dummy_target, the_debug_target): New.
7799 (target_stack): Now extern.
7800 (set_targetdebug): Push/unpush debug target.
7801 (default_child_has_all_memory, default_child_has_memory)
7802 (default_child_has_stack, default_child_has_registers)
7803 (default_child_has_execution): Remove target_ops parameter.
7804 (complete_target_initialization): Delete.
7805 (add_target_with_completer): No longer call
7806 complete_target_initialization.
7807 (target_supports_terminal_ours): Use regular delegation.
7808 (update_current_target): Delete.
7809 (push_target): No longer check magic number. Don't call
7810 update_current_target.
7811 (unpush_target): Don't call update_current_target.
7812 (target_is_pushed): No longer check magic number.
7813 (target_require_runnable): Skip for all stratums over
7814 process_stratum.
7815 (target_ops::info_proc): New.
7816 (target_info_proc): Use find_target_at and
7817 find_default_run_target.
7818 (target_supports_disable_randomization): Use regular delegation.
7819 (target_get_osdata): Use find_target_at.
7820 (target_ops::open, target_ops::close, target_ops::can_attach)
7821 (target_ops::attach, target_ops::can_create_inferior)
7822 (target_ops::create_inferior, target_ops::can_run)
7823 (target_can_run): New.
7824 (default_fileio_target): Use regular delegation.
7825 (target_ops::fileio_open, target_ops::fileio_pwrite)
7826 (target_ops::fileio_pread, target_ops::fileio_fstat)
7827 (target_ops::fileio_close, target_ops::fileio_unlink)
7828 (target_ops::fileio_readlink): New.
7829 (target_fileio_open_1, target_fileio_unlink)
7830 (target_fileio_readlink): Always call the target method. Handle
7831 FILEIO_ENOSYS.
7832 (return_zero, return_zero_has_execution): Delete.
7833 (init_dummy_target): Delete.
7834 (dummy_target::dummy_target, dummy_target::shortname)
7835 (dummy_target::longname, dummy_target::doc)
7836 (debug_target::debug_target, debug_target::shortname)
7837 (debug_target::longname, debug_target::doc): New.
7838 (target_supports_delete_record): Use regular delegation.
7839 (setup_target_debug): Delete.
7840 (maintenance_print_target_stack): Skip debug_stratum.
7841 (initialize_targets): Instantiate the_dummy_target and
7842 the_debug_target.
7843 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7844 use target_stack.
7845 (target_auxv_search, fprint_target_auxv): Adjust.
7846 (info_auxv_command): Adjust to use target_stack.
7847 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7848 * exceptions.c (print_flush): Handle a NULL target_stack.
7849 * regcache.c (target_ops_no_register): Refactor as class with
7850 virtual methods.
7851
7852 * exec.c (exec_target): New class.
7853 (exec_ops): Now an exec_target.
7854 (exec_open, exec_close_1, exec_get_section_table)
7855 (exec_xfer_partial, exec_files_info, exec_has_memory)
7856 (exec_make_note_section): Refactor as exec_target methods.
7857 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7858 Delete.
7859 (exec_target::find_memory_regions): New.
7860 (_initialize_exec): Don't call init_exec_ops.
7861 * gdbcore.h (exec_file_clear): Delete.
7862
7863 * corefile.c (core_target): Delete.
7864 (core_file_command): Adjust.
7865 * corelow.c (core_target): New class.
7866 (the_core_target): New.
7867 (core_close): Remove target_ops parameter.
7868 (core_close_cleanup): Adjust.
7869 (core_target::close): New.
7870 (core_open, core_detach, get_core_registers, core_files_info)
7871 (core_xfer_partial, core_thread_alive, core_read_description)
7872 (core_pid_to_str, core_thread_name, core_has_memory)
7873 (core_has_stack, core_has_registers, core_info_proc): Rework as
7874 core_target methods.
7875 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7876 (_initialize_corelow): Initialize the_core_target.
7877 * gdbcore.h (core_target): Delete.
7878 (the_core_target): New.
7879
7880 * ctf.c: (ctf_target): New class.
7881 (ctf_ops): Now a ctf_target.
7882 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7883 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7884 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7885 methods.
7886 (init_ctf_ops): Delete.
7887 (_initialize_ctf): Don't call it.
7888 * tracefile-tfile.c (tfile_target): New class.
7889 (tfile_ops): Now a tfile_target.
7890 (tfile_open, tfile_close, tfile_files_info)
7891 (tfile_get_tracepoint_status, tfile_trace_find)
7892 (tfile_fetch_registers, tfile_xfer_partial)
7893 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7894 Refactor as tfile_target methods.
7895 (tfile_xfer_partial_features): Remove target_ops parameter.
7896 (init_tfile_ops): Delete.
7897 (_initialize_tracefile_tfile): Don't call it.
7898 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7899 (tracefile_has_stack, tracefile_has_registers)
7900 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7901 tracefile_target methods.
7902 (init_tracefile_ops): Delete.
7903 (tracefile_target::tracefile_target): New.
7904 * tracefile.h: Include "target.h".
7905 (tracefile_target): New class.
7906 (init_tracefile_ops): Delete.
7907
7908 * spu-multiarch.c (spu_multiarch_target): New class.
7909 (spu_ops): Now a spu_multiarch_target.
7910 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7911 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7912 (spu_search_memory, spu_mourn_inferior): Refactor as
7913 spu_multiarch_target methods.
7914 (init_spu_ops): Delete.
7915 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7916 complete_target_initialization.
7917
7918 * ravenscar-thread.c (ravenscar_thread_target): New class.
7919 (ravenscar_ops): Now a ravenscar_thread_target.
7920 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7921 (ravenscar_thread_alive, ravenscar_pid_to_str)
7922 (ravenscar_fetch_registers, ravenscar_store_registers)
7923 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7924 (ravenscar_stopped_by_hw_breakpoint)
7925 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7926 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7927 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7928 methods.
7929 (init_ravenscar_thread_ops): Delete.
7930 (_initialize_ravenscar): Remove references to
7931 init_ravenscar_thread_ops and complete_target_initialization.
7932
7933 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7934 (bsd_uthread_target): New class.
7935 (bsd_uthread_ops): Now a bsd_uthread_target.
7936 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7937 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7938 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7939 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7940 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7941 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7942 (bsd_uthread_target): Delete function.
7943 (_initialize_bsd_uthread): Remove reference to
7944 complete_target_initialization.
7945
7946 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7947 (target_bfd): ... this new class.
7948 (target_bfd_xfer_partial, target_bfd_get_section_table)
7949 (target_bfd_close): Refactor as target_bfd methods.
7950 (target_bfd::~target_bfd): New.
7951 (target_bfd_reopen): Adjust.
7952 (target_bfd::close): New.
7953
7954 * record-btrace.c (record_btrace_target): New class.
7955 (record_btrace_ops): Now a record_btrace_target.
7956 (record_btrace_open, record_btrace_stop_recording)
7957 (record_btrace_disconnect, record_btrace_close)
7958 (record_btrace_async, record_btrace_info)
7959 (record_btrace_insn_history, record_btrace_insn_history_range)
7960 (record_btrace_insn_history_from, record_btrace_call_history)
7961 (record_btrace_call_history_range)
7962 (record_btrace_call_history_from, record_btrace_record_method)
7963 (record_btrace_is_replaying, record_btrace_will_replay)
7964 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7965 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7966 (record_btrace_store_registers, record_btrace_prepare_to_store)
7967 (record_btrace_to_get_unwinder)
7968 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7969 (record_btrace_commit_resume, record_btrace_wait)
7970 (record_btrace_stop, record_btrace_can_execute_reverse)
7971 (record_btrace_stopped_by_sw_breakpoint)
7972 (record_btrace_supports_stopped_by_sw_breakpoint)
7973 (record_btrace_stopped_by_hw_breakpoint)
7974 (record_btrace_supports_stopped_by_hw_breakpoint)
7975 (record_btrace_update_thread_list, record_btrace_thread_alive)
7976 (record_btrace_goto_begin, record_btrace_goto_end)
7977 (record_btrace_goto, record_btrace_stop_replaying_all)
7978 (record_btrace_execution_direction)
7979 (record_btrace_prepare_to_generate_core)
7980 (record_btrace_done_generating_core): Refactor as
7981 record_btrace_target methods.
7982 (init_record_btrace_ops): Delete.
7983 (_initialize_record_btrace): Remove reference to
7984 init_record_btrace_ops.
7985 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7986 the execution_direction global.
7987 (record_full_base_target, record_full_target)
7988 (record_full_core_target): New classes.
7989 (record_full_ops): Now a record_full_target.
7990 (record_full_core_ops): Now a record_full_core_target.
7991 (record_full_target::detach, record_full_target::disconnect)
7992 (record_full_core_target::disconnect)
7993 (record_full_target::mourn_inferior, record_full_target::kill):
7994 New.
7995 (record_full_open, record_full_close, record_full_async): Refactor
7996 as methods of the record_full_base_target class.
7997 (record_full_resume, record_full_commit_resume): Refactor
7998 as methods of the record_full_target class.
7999 (record_full_wait, record_full_stopped_by_watchpoint)
8000 (record_full_stopped_data_address)
8001 (record_full_stopped_by_sw_breakpoint)
8002 (record_full_supports_stopped_by_sw_breakpoint)
8003 (record_full_stopped_by_hw_breakpoint)
8004 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8005 methods of the record_full_base_target class.
8006 (record_full_store_registers, record_full_xfer_partial)
8007 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8008 Refactor as methods of the record_full_target class.
8009 (record_full_can_execute_reverse, record_full_get_bookmark)
8010 (record_full_goto_bookmark, record_full_execution_direction)
8011 (record_full_record_method, record_full_info, record_full_delete)
8012 (record_full_is_replaying, record_full_will_replay)
8013 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8014 (record_full_stop_replaying): Refactor as methods of the
8015 record_full_base_target class.
8016 (record_full_core_resume, record_full_core_kill)
8017 (record_full_core_fetch_registers)
8018 (record_full_core_prepare_to_store)
8019 (record_full_core_store_registers, record_full_core_xfer_partial)
8020 (record_full_core_insert_breakpoint)
8021 (record_full_core_remove_breakpoint)
8022 (record_full_core_has_execution): Refactor
8023 as methods of the record_full_core_target class.
8024 (record_full_base_target::supports_delete_record): New.
8025 (init_record_full_ops): Delete.
8026 (init_record_full_core_ops): Delete.
8027 (record_full_save): Refactor as method of the
8028 record_full_base_target class.
8029 (_initialize_record_full): Remove references to
8030 init_record_full_ops and init_record_full_core_ops.
8031
8032 * remote.c (remote_target, extended_remote_target): New classes.
8033 (remote_ops): Now a remote_target.
8034 (extended_remote_ops): Now an extended_remote_target.
8035 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8036 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8037 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8038 (remote_pass_signals, remote_set_syscall_catchpoint)
8039 (remote_program_signals, )
8040 (remote_thread_always_alive): Remove target_ops parameter.
8041 (remote_thread_alive, remote_thread_name)
8042 (remote_update_thread_list, remote_threads_extra_info)
8043 (remote_static_tracepoint_marker_at)
8044 (remote_static_tracepoint_markers_by_strid)
8045 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8046 (remote_open): Refactor as methods of remote_target.
8047 (extended_remote_open, extended_remote_detach)
8048 (extended_remote_attach, extended_remote_post_attach):
8049 (extended_remote_supports_disable_randomization)
8050 (extended_remote_create_inferior): : Refactor as method of
8051 extended_remote_target.
8052 (remote_set_permissions, remote_open_1, remote_detach)
8053 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8054 (remote_resume, remote_commit_resume, remote_stop)
8055 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8056 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8057 (remote_prepare_to_store, remote_store_registers)
8058 (remote_flash_erase, remote_flash_done, remote_files_info)
8059 (remote_kill, remote_mourn, remote_insert_breakpoint)
8060 (remote_remove_breakpoint, remote_insert_watchpoint)
8061 (remote_watchpoint_addr_within_range)
8062 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8063 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8064 (remote_supports_stopped_by_sw_breakpoint)
8065 (remote_stopped_by_hw_breakpoint)
8066 (remote_supports_stopped_by_hw_breakpoint)
8067 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8068 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8069 (remote_verify_memory): Refactor as methods of remote_target.
8070 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8071 parameter.
8072 (remote_xfer_partial, remote_get_memory_xfer_limit)
8073 (remote_search_memory, remote_rcmd, remote_memory_map)
8074 (remote_pid_to_str, remote_get_thread_local_address)
8075 (remote_get_tib_address, remote_read_description): Refactor as
8076 methods of remote_target.
8077 (remote_target::fileio_open, remote_target::fileio_pwrite)
8078 (remote_target::fileio_pread, remote_target::fileio_close): New.
8079 (remote_hostio_readlink, remote_hostio_fstat)
8080 (remote_filesystem_is_local, remote_can_execute_reverse)
8081 (remote_supports_non_stop, remote_supports_disable_randomization)
8082 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8083 (remote_supports_enable_disable_tracepoint)
8084 (remote_supports_string_tracing)
8085 (remote_can_run_breakpoint_commands, remote_trace_init)
8086 (remote_download_tracepoint, remote_can_download_tracepoint)
8087 (remote_download_trace_state_variable, remote_enable_tracepoint)
8088 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8089 (remote_trace_start, remote_get_trace_status)
8090 (remote_get_tracepoint_status, remote_trace_stop)
8091 (remote_trace_find, remote_get_trace_state_variable_value)
8092 (remote_save_trace_data, remote_get_raw_trace_data)
8093 (remote_set_disconnected_tracing, remote_core_of_thread)
8094 (remote_set_circular_trace_buffer, remote_traceframe_info)
8095 (remote_get_min_fast_tracepoint_insn_len)
8096 (remote_set_trace_buffer_size, remote_set_trace_notes)
8097 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8098 (remote_disable_btrace, remote_teardown_btrace)
8099 (remote_read_btrace, remote_btrace_conf)
8100 (remote_augmented_libraries_svr4_read, remote_load)
8101 (remote_pid_to_exec_file, remote_can_do_single_step)
8102 (remote_execution_direction, remote_thread_handle_to_thread_info):
8103 Refactor as methods of remote_target.
8104 (init_remote_ops, init_extended_remote_ops): Delete.
8105 (remote_can_async_p, remote_is_async_p, remote_async)
8106 (remote_thread_events, remote_upload_tracepoints)
8107 (remote_upload_trace_state_variables): Refactor as methods of
8108 remote_target.
8109 (_initialize_remote): Remove references to init_remote_ops and
8110 init_extended_remote_ops.
8111
8112 * remote-sim.c (gdbsim_target): New class.
8113 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8114 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8115 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8116 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8117 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8118 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8119 Refactor as methods of gdbsim_target.
8120 (gdbsim_ops): Now a gdbsim_target.
8121 (init_gdbsim_ops): Delete.
8122 (gdbsim_cntrl_c): Adjust.
8123 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8124
8125 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8126 (the_amd64_linux_nat_target): New.
8127 (amd64_linux_fetch_inferior_registers)
8128 (amd64_linux_store_inferior_registers): Refactor as methods of
8129 amd64_linux_nat_target.
8130 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8131 * i386-linux-nat.c: Don't include "linux-nat.h".
8132 (i386_linux_nat_target): New class.
8133 (the_i386_linux_nat_target): New.
8134 (i386_linux_fetch_inferior_registers)
8135 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8136 as methods of i386_linux_nat_target.
8137 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8138 * inf-child.c (inf_child_ops): Delete.
8139 (inf_child_fetch_inferior_registers)
8140 (inf_child_store_inferior_registers): Delete.
8141 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8142 methods of inf_child_target.
8143 (inf_child_target::supports_terminal_ours)
8144 (inf_child_target::terminal_init)
8145 (inf_child_target::terminal_inferior)
8146 (inf_child_target::terminal_ours_for_output)
8147 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8148 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8149 New.
8150 (inf_child_open, inf_child_disconnect, inf_child_close)
8151 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8152 (inf_child_post_startup_inferior, inf_child_can_run)
8153 (inf_child_pid_to_exec_file): Refactor as methods of
8154 inf_child_target.
8155 (inf_child_follow_fork): Delete.
8156 (inf_child_target::can_create_inferior)
8157 (inf_child_target::can_attach): New.
8158 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8159 (inf_child_target::has_stack, inf_child_target::has_registers)
8160 (inf_child_target::has_execution): New.
8161 (inf_child_fileio_open, inf_child_fileio_pwrite)
8162 (inf_child_fileio_pread, inf_child_fileio_fstat)
8163 (inf_child_fileio_close, inf_child_fileio_unlink)
8164 (inf_child_fileio_readlink, inf_child_use_agent)
8165 (inf_child_can_use_agent): Refactor as methods of
8166 inf_child_target.
8167 (return_zero, inf_child_target): Delete.
8168 (inf_child_target::inf_child_target): New.
8169 * inf-child.h: Include "target.h".
8170 (inf_child_target): Delete function prototype.
8171 (inf_child_target): New class.
8172 (inf_child_open_target, inf_child_mourn_inferior)
8173 (inf_child_maybe_unpush_target): Delete.
8174 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8175 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8176 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8177 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8178 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8179 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8180 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8181 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8182 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8183 methods of inf_ptrace_target.
8184 (inf_ptrace_target): Delete function.
8185 * inf-ptrace.h: Include "inf-child.h".
8186 (inf_ptrace_target): Delete function declaration.
8187 (inf_ptrace_target): New class.
8188 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8189 * linux-nat.c (linux_target): New.
8190 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8191 (linux_nat_target::~linux_nat_target): New.
8192 (linux_child_post_attach, linux_child_post_startup_inferior)
8193 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8194 (linux_child_remove_fork_catchpoint)
8195 (linux_child_insert_vfork_catchpoint)
8196 (linux_child_remove_vfork_catchpoint)
8197 (linux_child_insert_exec_catchpoint)
8198 (linux_child_remove_exec_catchpoint)
8199 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8200 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8201 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8202 (linux_nat_stopped_data_address)
8203 (linux_nat_stopped_by_sw_breakpoint)
8204 (linux_nat_supports_stopped_by_sw_breakpoint)
8205 (linux_nat_stopped_by_hw_breakpoint)
8206 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8207 (linux_nat_kill, linux_nat_mourn_inferior)
8208 (linux_nat_xfer_partial, linux_nat_thread_alive)
8209 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8210 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8211 (linux_child_static_tracepoint_markers_by_strid)
8212 (linux_nat_is_async_p, linux_nat_can_async_p)
8213 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8214 (linux_nat_supports_multi_process)
8215 (linux_nat_supports_disable_randomization, linux_nat_async)
8216 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8217 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8218 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8219 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8220 methods of linux_nat_target.
8221 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8222 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8223 parameter.
8224 (check_stopped_by_watchpoint): Adjust.
8225 (linux_xfer_partial): Delete.
8226 (linux_target_install_ops, linux_target, linux_nat_add_target):
8227 Delete.
8228 (linux_nat_target::linux_nat_target): New.
8229 * linux-nat.h: Include "inf-ptrace.h".
8230 (linux_nat_target): New.
8231 (linux_target, linux_target_install_ops, linux_nat_add_target):
8232 Delete function declarations.
8233 (linux_target): Declare global.
8234 * linux-thread-db.c (thread_db_target): New.
8235 (thread_db_target::thread_db_target): New.
8236 (thread_db_ops): Delete.
8237 (the_thread_db_target): New.
8238 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8239 (thread_db_update_thread_list, thread_db_pid_to_str)
8240 (thread_db_extra_thread_info)
8241 (thread_db_thread_handle_to_thread_info)
8242 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8243 (thread_db_resume): Refactor as methods of thread_db_target.
8244 (init_thread_db_ops): Delete.
8245 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8246 * x86-linux-nat.c: Don't include "linux-nat.h".
8247 (super_post_startup_inferior): Delete.
8248 (x86_linux_nat_target::~x86_linux_nat_target): New.
8249 (x86_linux_child_post_startup_inferior)
8250 (x86_linux_read_description, x86_linux_enable_btrace)
8251 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8252 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8253 methods of x86_linux_nat_target.
8254 (x86_linux_create_target): Delete. Bits folded ...
8255 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8256 pointer.
8257 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8258 (x86_linux_nat_target): New class.
8259 (x86_linux_create_target): Delete.
8260 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8261 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8262 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8263 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8264 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8265 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8266 make extern.
8267 (x86_use_watchpoints): Delete.
8268 * x86-nat.h: Include "breakpoint.h" and "target.h".
8269 (x86_use_watchpoints): Delete.
8270 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8271 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8272 (x86_insert_watchpoint, x86_remove_watchpoint)
8273 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8274 (x86_stopped_by_hw_breakpoint): New declarations.
8275 (x86_nat_target): New template class.
8276
8277 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8278 (the_ppc_linux_nat_target): New.
8279 (ppc_linux_fetch_inferior_registers)
8280 (ppc_linux_can_use_hw_breakpoint)
8281 (ppc_linux_region_ok_for_hw_watchpoint)
8282 (ppc_linux_ranged_break_num_registers)
8283 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8284 (ppc_linux_insert_mask_watchpoint)
8285 (ppc_linux_remove_mask_watchpoint)
8286 (ppc_linux_can_accel_watchpoint_condition)
8287 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8288 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8289 (ppc_linux_watchpoint_addr_within_range)
8290 (ppc_linux_masked_watch_num_registers)
8291 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8292 (ppc_linux_read_description): Refactor as methods of
8293 ppc_linux_nat_target.
8294 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8295
8296 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8297 (procfs_target): New class.
8298 (the_procfs_target): New.
8299 (procfs_target): Delete function.
8300 (procfs_auxv_parse, procfs_attach, procfs_detach)
8301 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8302 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8303 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8304 (procfs_create_inferior, procfs_update_thread_list)
8305 (procfs_thread_alive, procfs_pid_to_str)
8306 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8307 (procfs_stopped_data_address, procfs_insert_watchpoint)
8308 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8309 (proc_find_memory_regions, procfs_info_proc)
8310 (procfs_make_note_section): Refactor as methods of procfs_target.
8311 (_initialize_procfs): Adjust.
8312 * sol-thread.c (sol_thread_target): New class.
8313 (sol_thread_ops): Now a sol_thread_target.
8314 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8315 (sol_thread_fetch_registers, sol_thread_store_registers)
8316 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8317 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8318 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8319 (init_sol_thread_ops): Delete.
8320 (_initialize_sol_thread): Adjust. Remove references to
8321 init_sol_thread_ops and complete_target_initialization.
8322
8323 * windows-nat.c (windows_nat_target): New class.
8324 (windows_fetch_inferior_registers)
8325 (windows_store_inferior_registers, windows_resume, windows_wait)
8326 (windows_attach, windows_detach, windows_pid_to_exec_file)
8327 (windows_files_info, windows_create_inferior)
8328 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8329 (windows_close, windows_pid_to_str, windows_xfer_partial)
8330 (windows_get_tib_address, windows_get_ada_task_ptid)
8331 (windows_thread_name, windows_thread_alive): Refactor as
8332 windows_nat_target methods.
8333 (do_initial_windows_stuff): Adjust.
8334 (windows_target): Delete function.
8335 (_initialize_windows_nat): Adjust.
8336
8337 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8338 (darwin_mourn_inferior, darwin_kill_inferior)
8339 (darwin_create_inferior, darwin_attach, darwin_detach)
8340 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8341 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8342 (darwin_supports_multi_process): Refactor as darwin_nat_target
8343 methods.
8344 (darwin_resume_to, darwin_files_info): Delete.
8345 (_initialize_darwin_inferior): Rename to ...
8346 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8347 * darwin-nat.h: Include "inf-child.h".
8348 (darwin_nat_target): New class.
8349 (darwin_complete_target): Delete.
8350 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8351 (darwin_target): New.
8352 (i386_darwin_fetch_inferior_registers)
8353 (i386_darwin_store_inferior_registers): Refactor as methods of
8354 darwin_nat_target.
8355 (darwin_complete_target): Delete, with ...
8356 (_initialize_i386_darwin_nat): ... bits factored out here.
8357
8358 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8359 (the_alpha_linux_nat_target): New.
8360 (alpha_linux_register_u_offset): Refactor as
8361 alpha_linux_nat_target method.
8362 (_initialize_alpha_linux_nat): Adjust.
8363 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8364 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8365 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8366 methods of linux_nat_trad_target.
8367 (linux_trad_target): Delete.
8368 * linux-nat-trad.h (linux_trad_target): Delete function.
8369 (linux_nat_trad_target): New class.
8370 * mips-linux-nat.c (mips_linux_nat_target): New class.
8371 (super_fetch_registers, super_store_registers, super_close):
8372 Delete.
8373 (the_mips_linux_nat_target): New.
8374 (mips64_linux_regsets_fetch_registers)
8375 (mips64_linux_regsets_store_registers)
8376 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8377 (mips_linux_register_u_offset, mips_linux_read_description)
8378 (mips_linux_can_use_hw_breakpoint)
8379 (mips_linux_stopped_by_watchpoint)
8380 (mips_linux_stopped_data_address)
8381 (mips_linux_region_ok_for_hw_watchpoint)
8382 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8383 (mips_linux_close): Refactor as methods of mips_linux_nat.
8384 (_initialize_mips_linux_nat): Adjust to C++ification.
8385
8386 * aix-thread.c (aix_thread_target): New class.
8387 (aix_thread_ops): Now an aix_thread_target.
8388 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8389 (aix_thread_fetch_registers, aix_thread_store_registers)
8390 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8391 (aix_thread_thread_alive, aix_thread_pid_to_str)
8392 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8393 Refactor as methods of aix_thread_target.
8394 (init_aix_thread_ops): Delete.
8395 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8396 and complete_target_initialization.
8397 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8398 (rs6000_nat_target): New class.
8399 (the_rs6000_nat_target): New.
8400 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8401 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8402 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8403 (super_create_inferior): Delete.
8404 (_initialize_rs6000_nat): Adjust to C++ification.
8405
8406 * arm-linux-nat.c (arm_linux_nat_target): New class.
8407 (the_arm_linux_nat_target): New.
8408 (arm_linux_fetch_inferior_registers)
8409 (arm_linux_store_inferior_registers, arm_linux_read_description)
8410 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8411 (arm_linux_remove_hw_breakpoint)
8412 (arm_linux_region_ok_for_hw_watchpoint)
8413 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8414 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8415 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8416 arm_linux_nat_target.
8417 (_initialize_arm_linux_nat): Adjust to C++ification.
8418
8419 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8420 (the_aarch64_linux_nat_target): New.
8421 (aarch64_linux_fetch_inferior_registers)
8422 (aarch64_linux_store_inferior_registers)
8423 (aarch64_linux_child_post_startup_inferior)
8424 (aarch64_linux_read_description)
8425 (aarch64_linux_can_use_hw_breakpoint)
8426 (aarch64_linux_insert_hw_breakpoint)
8427 (aarch64_linux_remove_hw_breakpoint)
8428 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8429 (aarch64_linux_region_ok_for_hw_watchpoint)
8430 (aarch64_linux_stopped_data_address)
8431 (aarch64_linux_stopped_by_watchpoint)
8432 (aarch64_linux_watchpoint_addr_within_range)
8433 (aarch64_linux_can_do_single_step): Refactor as methods of
8434 aarch64_linux_nat_target.
8435 (super_post_startup_inferior): Delete.
8436 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8437
8438 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8439 (the_hppa_linux_nat_target): New.
8440 (hppa_linux_fetch_inferior_registers)
8441 (hppa_linux_store_inferior_registers): Refactor as methods of
8442 hppa_linux_nat_target.
8443 (_initialize_hppa_linux_nat): Adjust to C++ification.
8444
8445 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8446 (the_ia64_linux_nat_target): New.
8447 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8448 (ia64_linux_stopped_data_address)
8449 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8450 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8451 ia64_linux_nat_target methods.
8452 (super_xfer_partial): Delete.
8453 (_initialize_ia64_linux_nat): Adjust to C++ification.
8454
8455 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8456 (the_m32r_linux_nat_target): New.
8457 (m32r_linux_fetch_inferior_registers)
8458 (m32r_linux_store_inferior_registers): Refactor as
8459 m32r_linux_nat_target methods.
8460 (_initialize_m32r_linux_nat): Adjust to C++ification.
8461
8462 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8463 (the_m68k_linux_nat_target): New.
8464 (m68k_linux_fetch_inferior_registers)
8465 (m68k_linux_store_inferior_registers): Refactor as
8466 m68k_linux_nat_target methods.
8467 (_initialize_m68k_linux_nat): Adjust to C++ification.
8468
8469 * s390-linux-nat.c (s390_linux_nat_target): New class.
8470 (the_s390_linux_nat_target): New.
8471 (s390_linux_fetch_inferior_registers)
8472 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8473 (s390_insert_watchpoint, s390_remove_watchpoint)
8474 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8475 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8476 (s390_auxv_parse, s390_read_description): Refactor as methods of
8477 s390_linux_nat_target.
8478 (_initialize_s390_nat): Adjust to C++ification.
8479
8480 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8481 (the_sparc_linux_nat_target): New.
8482 (_initialize_sparc_linux_nat): Adjust to C++ification.
8483 * sparc-nat.c (sparc_fetch_inferior_registers)
8484 (sparc_store_inferior_registers): Remove target_ops parameter.
8485 * sparc-nat.h (sparc_fetch_inferior_registers)
8486 (sparc_store_inferior_registers): Remove target_ops parameter.
8487 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8488 (the_sparc64_linux_nat_target): New.
8489 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8490
8491 * spu-linux-nat.c (spu_linux_nat_target): New class.
8492 (the_spu_linux_nat_target): New.
8493 (spu_child_post_startup_inferior, spu_child_post_attach)
8494 (spu_child_wait, spu_fetch_inferior_registers)
8495 (spu_store_inferior_registers, spu_xfer_partial)
8496 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8497 methods.
8498 (_initialize_spu_nat): Adjust to C++ification.
8499
8500 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8501 (the_tilegx_linux_nat_target): New.
8502 (fetch_inferior_registers, store_inferior_registers):
8503 Refactor as methods.
8504 (_initialize_tile_linux_nat): Adjust to C++ification.
8505
8506 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8507 (the_xtensa_linux_nat_target): New.
8508 (xtensa_linux_fetch_inferior_registers)
8509 (xtensa_linux_store_inferior_registers): Refactor as
8510 xtensa_linux_nat_target methods.
8511 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8512
8513 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8514 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8515 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8516 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8517 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8518 (fbsd_stopped_by_sw_breakpoint)
8519 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8520 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8521 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8522 (fbsd_post_startup_inferior, fbsd_post_attach)
8523 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8524 (fbsd_set_syscall_catchpoint)
8525 (super_xfer_partial, super_resume, super_wait)
8526 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8527 (fbsd_handle_debug_trap): Remove target_ops parameter.
8528 (fbsd_nat_add_target): Delete.
8529 * fbsd-nat.h: Include "inf-ptrace.h".
8530 (fbsd_nat_add_target): Delete.
8531 (USE_SIGTRAP_SIGINFO): Define.
8532 (fbsd_nat_target): New class.
8533
8534 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8535 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8536 (amd64bsd_target): Delete.
8537 * amd64-bsd-nat.h: New file.
8538 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8539 "x86-bsd-nat.h".
8540 (amd64_fbsd_nat_target): New class.
8541 (the_amd64_fbsd_nat_target): New.
8542 (amd64fbsd_read_description): Refactor as method of
8543 amd64_fbsd_nat_target.
8544 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8545 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8546 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8547 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8548 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8549 (i386bsd_target): Delete.
8550 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8551 (i386bsd_fetch_inferior_registers)
8552 (i386bsd_store_inferior_registers): Declare.
8553 (i386_bsd_nat_target): New class.
8554 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8555 (the_i386_fbsd_nat_target): New.
8556 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8557 i386_fbsd_nat_target methods.
8558 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8559 (_initialize_i386fbsd_nat): Adjust to C++ification.
8560 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8561 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8562 (_initialize_x86_bsd_nat): Adjust to C++ification.
8563 * x86-bsd-nat.h: Include "x86-nat.h".
8564 (x86bsd_target): Delete declaration.
8565 (x86bsd_nat_target): New class.
8566
8567 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8568 (the_aarch64_fbsd_nat_target): New.
8569 (aarch64_fbsd_fetch_inferior_registers)
8570 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8571 aarch64_fbsd_nat_target.
8572 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8573 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8574 (the_alpha_bsd_nat_target): New.
8575 (alphabsd_fetch_inferior_registers)
8576 (alphabsd_store_inferior_registers): Refactor as
8577 alpha_bsd_nat_target methods.
8578 (_initialize_alphabsd_nat): Refactor as methods of
8579 alpha_bsd_nat_target.
8580 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8581 (the_amd64_nbsd_nat_target): New.
8582 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8583 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8584 (the_amd64_obsd_nat_target): New.
8585 (_initialize_amd64obsd_nat): Adjust to C++ification.
8586 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8587 (the_arm_fbsd_nat_target): New.
8588 (arm_fbsd_fetch_inferior_registers)
8589 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8590 (_initialize_arm_fbsd_nat): Refactor as methods of
8591 arm_fbsd_nat_target.
8592 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8593 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8594 (the_arm_netbsd_nat_target): New.
8595 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8596 arm_netbsd_nat_target.
8597 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8598 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8599 (the_hppa_nbsd_nat_target): New.
8600 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8601 hppa_nbsd_nat_target methods.
8602 (_initialize_hppanbsd_nat): Adjust to C++ification.
8603 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8604 (the_hppa_obsd_nat_target): New.
8605 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8606 methods of hppa_obsd_nat_target.
8607 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
8608 add_target.
8609 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8610 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
8611 add_target.
8612 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8613 (_initialize_i386obsd_nat): Use add_target.
8614 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8615 (the_m68k_bsd_nat_target): New.
8616 (m68kbsd_fetch_inferior_registers)
8617 (m68kbsd_store_inferior_registers): Refactor as methods of
8618 m68k_bsd_nat_target.
8619 (_initialize_m68kbsd_nat): Adjust to C++ification.
8620 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8621 (the_mips_fbsd_nat_target): New.
8622 (mips_fbsd_fetch_inferior_registers)
8623 (mips_fbsd_store_inferior_registers): Refactor as methods of
8624 mips_fbsd_nat_target.
8625 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
8626 add_target.
8627 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8628 (the_mips_nbsd_nat_target): New.
8629 (mipsnbsd_fetch_inferior_registers)
8630 (mipsnbsd_store_inferior_registers): Refactor as methods of
8631 mips_nbsd_nat_target.
8632 (_initialize_mipsnbsd_nat): Adjust to C++ification.
8633 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8634 (the_mips64_obsd_nat_target): New.
8635 (mips64obsd_fetch_inferior_registers)
8636 (mips64obsd_store_inferior_registers): Refactor as methods of
8637 mips64_obsd_nat_target.
8638 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
8639 add_target.
8640 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8641 nbsd_nat_target.
8642 * nbsd-nat.h: Include "inf-ptrace.h".
8643 (nbsd_nat_target): New class.
8644 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8645 (obsd_wait): Refactor as methods of obsd_nat_target.
8646 (obsd_add_target): Delete.
8647 * obsd-nat.h: Include "inf-ptrace.h".
8648 (obsd_nat_target): New class.
8649 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8650 (the_ppc_fbsd_nat_target): New.
8651 (ppcfbsd_fetch_inferior_registers)
8652 (ppcfbsd_store_inferior_registers): Refactor as methods of
8653 ppc_fbsd_nat_target.
8654 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
8655 add_target.
8656 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8657 (the_ppc_nbsd_nat_target): New.
8658 (ppcnbsd_fetch_inferior_registers)
8659 (ppcnbsd_store_inferior_registers): Refactor as methods of
8660 ppc_nbsd_nat_target.
8661 (_initialize_ppcnbsd_nat): Adjust to C++ification.
8662 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8663 (the_ppc_obsd_nat_target): New.
8664 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8665 methods of ppc_obsd_nat_target.
8666 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
8667 add_target.
8668 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8669 (the_sh_nbsd_nat_target): New.
8670 (shnbsd_fetch_inferior_registers)
8671 (shnbsd_store_inferior_registers): Refactor as methods of
8672 sh_nbsd_nat_target.
8673 (_initialize_shnbsd_nat): Adjust to C++ification.
8674 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8675 (inf_ptrace_xfer_partial): Delete.
8676 (sparc_xfer_partial, sparc_target): Delete.
8677 * sparc-nat.h (sparc_fetch_inferior_registers)
8678 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8679 (sparc_target): Delete function declaration.
8680 (sparc_target): New template class.
8681 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8682 (_initialize_sparcnbsd_nat): Adjust to C++ification.
8683 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8684 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
8685 add_target.
8686 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8687 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8688 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8689 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
8690 add_target.
8691 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8692 (the_vax_bsd_nat_target): New.
8693 (vaxbsd_fetch_inferior_registers)
8694 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8695 methods.
8696 (_initialize_vaxbsd_nat): Adjust to C++ification.
8697
8698 * bsd-kvm.c (bsd_kvm_target): New class.
8699 (bsd_kvm_ops): Now a bsd_kvm_target.
8700 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8701 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8702 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8703 bsd_kvm_target.
8704 (bsd_kvm_return_one): Delete.
8705 (bsd_kvm_add_target): Adjust to C++ification.
8706
8707 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8708 (nto_procfs_target_procfs): New classes.
8709 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8710 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8711 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8712 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8713 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8714 (procfs_remove_hw_breakpoint, procfs_resume)
8715 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8716 (procfs_kill_inferior, procfs_store_registers)
8717 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8718 as methods of nto_procfs_target.
8719 (nto_procfs_ops): Now an nto_procfs_target_procfs.
8720 (nto_native_ops): Delete.
8721 (procfs_open, procfs_native_open): Delete.
8722 (nto_native_ops): Now an nto_procfs_target_native.
8723 (init_procfs_targets): Adjust to C++ification.
8724 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8725 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8726 Refactor as methods of nto_procfs_target.
8727
8728 * go32-nat.c (go32_nat_target): New class.
8729 (the_go32_nat_target): New.
8730 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8731 (go32_store_registers, go32_xfer_partial, go32_files_info)
8732 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8733 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8734 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8735 (go32_pid_to_str): Refactor as methods of go32_nat_target.
8736 (go32_target): Delete.
8737 (_initialize_go32_nat): Adjust to C++ification.
8738
8739 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8740 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8741 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8742 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8743 gnu_nat_target.
8744 (gnu_target): Delete.
8745 * gnu-nat.h (gnu_target): Delete.
8746 (gnu_nat_target): New class.
8747 * i386-gnu-nat.c (gnu_base_target): New.
8748 (i386_gnu_nat_target): New class.
8749 (the_i386_gnu_nat_target): New.
8750 (_initialize_i386gnu_nat): Adjust to C++ification.
8751
8752 2018-05-02 Pedro Alves <palves@redhat.com>
8753
8754 * bfd-target.c (target_bfd_xclose): Rename to ...
8755 (target_bfd_close): ... this.
8756 (target_bfd_reopen): Adjust.
8757 * target.c (target_close): Remove references to to_xclose.
8758 * target.h (target_ops::to_xclose): Delete.
8759 (target_ops::to_close): Update comments.
8760
8761 2018-05-02 Pedro Alves <palves@redhat.com>
8762
8763 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8764 "linux-nat.h".
8765 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8766 * inf-ptrace.c (inf_ptrace_register_u_offset)
8767 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8768 (inf_ptrace_store_register, inf_ptrace_store_registers)
8769 (inf_ptrace_trad_target): Move to ...
8770 * linux-nat-trad.c: ... this new file.
8771 * linux-nat-trad.h: New file.
8772 * linux-nat.c (linux_target_install_ops): Make extern.
8773 (linux_trad_target): Delete.
8774 * linux-nat.h (linux_trad_target): Delete declaration.
8775 (linux_target_install_ops): Declare.
8776 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8777 "linux-nat.h".
8778
8779 2018-05-02 Pedro Alves <palves@redhat.com>
8780
8781 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8782 procfs_target/add_target here.
8783 * procfs.c (procfs_target): Make static.
8784 (_initialize_procfs): Call add_target here.
8785 * procfs.h (struct target_ops): Remove forward declaration.
8786 (procfs_target): Remove declaration.
8787 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8788
8789 2018-05-02 Pedro Alves <palves@redhat.com>
8790
8791 * procfs.c (procfs_stopped_by_watchpoint)
8792 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8793 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8794 Forward declare.
8795 (procfs_use_watchpoints): Delete, move contents...
8796 (procfs_target): ... here.
8797 * procfs.h (procfs_use_watchpoints): Delete declaration.
8798 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8799 procfs_use_watchpoints.
8800 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8801 procfs_use_watchpoints.
8802
8803 2018-05-02 Tom Tromey <tom@tromey.com>
8804
8805 PR python/20084:
8806 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8807 and var_zuinteger_unlimited.
8808 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8809 and PARAM_ZUINTEGER_UNLIMITED.
8810 (set_parameter_value): Handle var_zuinteger and
8811 var_zuinteger_unlimited.
8812 (add_setshow_generic): Likewise.
8813 (parmpy_init): Likewise.
8814
8815 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8816
8817 PR rust/23124
8818 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8819 pointer is not null before dereferencing it.
8820
8821 2018-04-30 Tom Tromey <tom@tromey.com>
8822
8823 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8824 is_mi_like_p.
8825
8826 2018-04-30 Tom Tromey <tom@tromey.com>
8827
8828 * breakpoint.c (mention): Remove use of is_mi_like_p.
8829 (print_mention_ranged_breakpoint): Likewise.
8830 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8831 of is_mi_like_p.
8832
8833 2018-04-30 Tom Tromey <tom@tromey.com>
8834
8835 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8836
8837 2018-04-30 Tom Tromey <tom@tromey.com>
8838
8839 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8840 (info_spu_event_command): Remove some uses of is_mi_like_p.
8841
8842 2018-04-30 Tom Tromey <tom@tromey.com>
8843
8844 * python/py-framefilter.c (py_print_single_arg)
8845 (enumerate_locals, py_print_args, py_print_frame): Remove some
8846 uses of is_mi_like_p.
8847
8848 2018-04-30 Tom Tromey <tom@tromey.com>
8849
8850 * ui-out.c: Update.
8851 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8852 * ui-out.h (ui_out::is_mi_like_p): Now const.
8853 (ui_out::do_is_mi_like_p): Now const.
8854 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8855
8856 2018-04-30 Tom Tromey <tom@tromey.com>
8857
8858 * varobj.c (varobj_set_visualizer): Use new_reference.
8859 * python/python.c (gdbpy_decode_line): Use new_reference.
8860 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8861 new_reference.
8862
8863 2018-04-30 Tom Tromey <tom@tromey.com>
8864
8865 * varobj.c (install_new_value): Use new_reference.
8866 * value.h (value_incref): Return void. Swap intro comment with
8867 value_decref.
8868 * value.c (set_value_parent): Use new_reference.
8869 (value_incref): Return void. Update intro comment.
8870 (release_value): Use new_reference.
8871 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8872
8873 2018-04-30 Tom Tromey <tom@tromey.com>
8874
8875 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8876 * gdb_bfd.h (new_bfd_ref): Remove.
8877 (gdb_bfd_open): Update comment.
8878 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8879 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8880 (gdb_bfd_fdopenr): Use new_reference.
8881 * exec.c (exec_file_attach): Use new_reference.
8882
8883 2018-04-30 Tom Tromey <tom@tromey.com>
8884
8885 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8886 method.
8887
8888 2018-04-30 Tom Tromey <tom@tromey.com>
8889
8890 * jit.c (jit_read_code_entry): Use type_align.
8891 * i386-tdep.c (i386_gdbarch_init): Don't call
8892 set_gdbarch_long_long_align_bit.
8893 * gdbarch.sh: Remove long_long_align_bit.
8894 * gdbarch.c, gdbarch.h: Rebuild.
8895 * arc-tdep.c (arc_type_align): New function.
8896 (arc_gdbarch_init): Use arc_type_align. Don't call
8897 set_gdbarch_long_long_align_bit.
8898
8899 2018-04-30 Tom Tromey <tom@tromey.com>
8900
8901 * rust-lang.c (rust_type_alignment): Remove.
8902 (rust_composite_type): Use type_align.
8903
8904 2018-04-30 Tom Tromey <tom@tromey.com>
8905
8906 * NEWS: Mention Type.align.
8907 * python/py-type.c (typy_get_alignof): New function.
8908 (type_object_getset): Add "alignof".
8909
8910 2018-04-30 Tom Tromey <tom@tromey.com>
8911
8912 PR exp/17095:
8913 * NEWS: Update.
8914 * std-operator.def (UNOP_ALIGNOF): New operator.
8915 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8916 New.
8917 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8918 * c-lang.c (c_op_print_tab): Add alignof.
8919 * c-exp.y (ALIGNOF): New token.
8920 (exp): Add "ALIGNOF" production.
8921 (ident_tokens): Add _Alignof and alignof.
8922
8923 2018-04-30 Tom Tromey <tom@tromey.com>
8924
8925 * i386-tdep.c (i386_type_align): New function.
8926 (i386_gdbarch_init): Update.
8927 * gdbarch.sh (type_align): New method.
8928 * gdbarch.c, gdbarch.h: Rebuild.
8929 * arch-utils.h (default_type_align): Declare.
8930 * arch-utils.c (default_type_align): New function.
8931 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8932 (struct type) <align_log2>: New field.
8933 <instance_flags>: Now a bitfield.
8934 (TYPE_RAW_ALIGN): New macro.
8935 (type_align, type_raw_align, set_type_align): Declare.
8936 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8937 functions.
8938 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8939 (get_alignment, maybe_set_alignment): New functions.
8940 (read_structure_type, read_enumeration_type, read_array_type)
8941 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8942 (read_subrange_type, read_base_type): Set type alignment.
8943
8944 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8945
8946 * dwarf2read.c (read_index_from_section): Use bool.
8947
8948 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8949
8950 PR gdb/22950
8951 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8952 with #ifdef.
8953
8954 2018-04-29 John Reiser <jreiser@BitWagon.com>
8955
8956 PR build/22873
8957 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8958 last step, and do it atomically.
8959
8960 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8961
8962 * compile/compile-c-types.c (convert_int, convert_float):
8963 Update for C FE v1.
8964
8965 2018-04-27 Tom Tromey <tom@tromey.com>
8966
8967 PR rust/22545:
8968 * rust-lang.c (rust_inclusive_range_type_p): New function.
8969 (rust_range): Handle inclusive ranges.
8970 (rust_compute_range): Likewise.
8971 * rust-exp.y (struct rust_op) <inclusive>: New field.
8972 (DOTDOTEQ): New constant.
8973 (range_expr): Add "..=" productions.
8974 (operator_tokens): Add "..=" token.
8975 (ast_range): Add "inclusive" parameter.
8976 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8977 ranges.
8978 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8979 bounds values.
8980 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8981 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8982 Update comments.
8983 * expprint.c (print_subexp_standard): Handle new bounds values.
8984 (dump_subexp_body_standard): Likewise.
8985
8986 2018-04-27 Tom Tromey <tom@tromey.com>
8987
8988 * configure: Rebuild.
8989 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8990 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8991 "OVERRIDE".
8992 (class symbol_needs_eval_context): Likewise.
8993 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8994 (mock_mapped_index::symbol_name_at): Use "override". Remove
8995 "virtual".
8996 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8997 "override".
8998 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8999 * aarch64-tdep.c (instruction_reader::read): Use "override".
9000 (instruction_reader_test::read): Likewise.
9001 * arm-tdep.c (instruction_reader::read): Use "override".
9002 (instruction_reader_thumb::read): Likewise.
9003
9004 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9005
9006 PR remote/9665
9007 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9008 instead of remote_send.
9009 (remote_send): Remove.
9010
9011 2018-04-26 Pedro Alves <palves@redhat.com>
9012
9013 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9014 find_function_start_sal instead of find_pc_line.
9015
9016 2018-04-26 Pedro Alves <palves@redhat.com>
9017
9018 * breakpoint.c (set_breakpoint_location_function): Handle
9019 mst_data_gnu_ifunc.
9020 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9021 * elfread.c (elf_symtab_read): Give data symbols with
9022 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9023 (elf_rel_plt_read): Update comment.
9024 * linespec.c (convert_linespec_to_sals): Handle
9025 mst_data_gnu_ifunc.
9026 (minsym_found): Handle mst_data_gnu_ifunc.
9027 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9028 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9029 * parse.c (find_minsym_type_and_address): Handle
9030 mst_data_gnu_ifunc.
9031 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9032 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9033 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9034 comment.
9035 <mst_data_gnu_ifunc>: New enumerator.
9036
9037 2018-04-26 Pedro Alves <palves@redhat.com>
9038
9039 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9040 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9041 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9042 Handle it.
9043 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9044 (lookup_minimal_symbol_by_pc): Adjust.
9045 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9046 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9047 * minsyms.h (lookup_msym_prefer): New enum.
9048 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9049 parameter by a lookup_msym_prefer parameter.
9050
9051 2018-04-26 Pedro Alves <palves@redhat.com>
9052
9053 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9054 ends in "@plt" instead of looking at the symbol's section.
9055
9056 2018-04-26 Pedro Alves <palves@redhat.com>
9057
9058 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9059 all references.
9060 (find_pc_partial_function_gnu_ifunc): Rename to ...
9061 (find_pc_partial_function): ... this, and remove references to
9062 'is_gnu_ifunc_p'.
9063 (find_pc_partial_function): Delete old implementation.
9064 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9065
9066 2018-04-26 Pedro Alves <palves@redhat.com>
9067
9068 * linespec.c (struct bound_minimal_symbol_search_key): New.
9069 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9070 skip first line if we found a GNU ifunc minimal symbol by name.
9071 (compare_msymbols): Change parameters to work with a destructured
9072 lhs minsym.
9073 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9074 functions.
9075
9076 2018-04-26 Pedro Alves <palves@redhat.com>
9077
9078 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9079 ifunc targets here. Instead, if we have an ifunc minsym, use its
9080 address/name.
9081 (add_location_to_breakpoint): Store the minsym and the objfile in
9082 the breakpoint location.
9083 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9084 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9085 Record the minsym in the sal.
9086 * symtab.h (symtab_and_line) <msymbol>: New field.
9087
9088 2018-04-26 Pedro Alves <palves@redhat.com>
9089
9090 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9091 unless we actually resolved the ifunc.
9092
9093 2018-04-26 Pedro Alves <palves@redhat.com>
9094
9095 * c-exp.y (variable production): Prefer ifunc minsyms over
9096 regular function symbols.
9097 * symtab.c (find_gnu_ifunc): New function.
9098 * minsyms.h (lookup_msym_prefer): New enum.
9099 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9100 parameter by a lookup_msym_prefer parameter.
9101 * symtab.h (find_gnu_ifunc): New declaration.
9102
9103 2018-04-26 Pedro Alves <palves@redhat.com>
9104
9105 * blockframe.c (find_gnu_ifunc_target_type): New function.
9106 (find_function_type): New.
9107 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9108 return a value with a memory address.
9109 (eval_call): For calls to GNU ifunc functions, try to find the
9110 type of the target function from the type that the resolver
9111 returns.
9112 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9113 symbols.
9114 * infcall.c (find_function_return_type): Delete.
9115 (find_function_addr): Add 'function_type' parameter. For calls to
9116 GNU ifunc functions, try to find the type of the target function
9117 from the type that the resolver returns, and return it via
9118 FUNCTION_TYPE.
9119 (call_function_by_hand_dummy): Adjust to use the function type
9120 returned by find_function_addr.
9121 (find_function_addr): Add 'function_type' parameter and move
9122 description here.
9123 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9124 declarations.
9125
9126 2018-04-26 Pedro Alves <palves@redhat.com>
9127
9128 * c-exp.y (variable production): Skip finding an alias for ifunc
9129 symbols.
9130
9131 2018-04-26 Pedro Alves <palves@redhat.com>
9132
9133 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9134
9135 2018-04-25 Pedro Alves <palves@redhat.com>
9136
9137 * infcmd.c (kill_command): Print the pid as string, not the whole
9138 thread's ptid. Add comment. s/has been killed/killed/ in output
9139 message.
9140 * remote.c (remote_detach_1): Print the pid as string, not the
9141 whole thread's ptid.
9142
9143 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9144 Sergio Durigan Junior <sergiodj@redhat.com>
9145 Pedro Alves <palves@redhat.com>
9146
9147 * infcmd.c (kill_command): Print message when inferior has
9148 been killed.
9149 * inferior.c (print_inferior_events): Remove 'static'. Set as
9150 '1'.
9151 (add_inferior): Improve message printed when
9152 'print_inferior_events' is on.
9153 (exit_inferior): Remove message printed when
9154 'print_inferior_events' is on.
9155 (detach_inferior): Improve message printed when
9156 'print_inferior_events' is on.
9157 (initialize_inferiors): Use 'add_inferior_silent' to set
9158 'current_inferior_'.
9159 * inferior.h (print_inferior_events): Declare here as
9160 'extern'.
9161 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9162 '[Detaching...]' messages when 'print_inferior_events' is on.
9163 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9164 as prefix/suffix for messages. Remove periods. Fix erroneous
9165 'Detaching after fork from child...', replace it by '... from
9166 parent...'.
9167 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9168 prefix/suffix when printing 'Detaching...' messages. Print
9169 them when 'print_inferior_events' is on.
9170 * remote.c (remote_detach_1): Print message when detaching
9171 from inferior and '!is_fork_parent'.
9172
9173 2018-04-24 Tom Tromey <tom@tromey.com>
9174
9175 * cli-out.h: Reindent.
9176
9177 2018-04-24 Tom Tromey <tom@tromey.com>
9178
9179 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9180 (cli_ui_out::do_field_string): Use fputs_filtered.
9181 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9182
9183 2018-04-23 Tom Tromey <tom@tromey.com>
9184
9185 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9186 gdb::unique_xmalloc_ptr.
9187
9188 2018-04-23 Tom Tromey <tom@tromey.com>
9189
9190 * configure: Rebuild.
9191
9192 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9193
9194 PR gdb/23095
9195 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9196 prepare_for_testing. Set normal_bp to r_debug_state if target
9197 is bsd.
9198
9199 2018-04-21 Pedro Alves <palves@redhat.com>
9200 Rajendra SY <rajendra.sy@gmail.com>
9201
9202 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9203 * remote.c (extended_remote_attach): In all-stop mode, mark the
9204 thread as executing.
9205
9206 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9207
9208 * thread.c (thread_apply_all_command): Fix comment.
9209 (thread_command): Fix comment.
9210
9211 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9212
9213 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9214 parameter.
9215 * features/aarch64-core.c (create_feature_aarch64_core):
9216 Regenerate.
9217 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9218 Likewise.
9219 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9220 Likewise.
9221 * features/i386/32bit-avx512.c
9222 (create_feature_i386_32bit_avx512): Likewise.
9223 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9224 Likewise.
9225 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9226 Likewise.
9227 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9228 Likewise.
9229 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9230 Likewise.
9231 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9232 Likewise.
9233 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9234 Likewise.
9235 * features/i386/64bit-avx512.c
9236 (create_feature_i386_64bit_avx512): Likewise.
9237 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9238 Likewise.
9239 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9240 Likewise.
9241 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9242 Likewise.
9243 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9244 Likewise.
9245 * features/i386/64bit-segments.c
9246 (create_feature_i386_64bit_segments): Likewise.
9247 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9248 Likewise.
9249 * features/i386/x32-core.c
9250 (create_feature_i386_x32_core): Likewise.
9251 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9252 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9253 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9254 * target-descriptions.c: In generated code, don't pass xml
9255 filename.
9256
9257 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9258
9259 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9260 (print_xml_feature::visit_post): Likewise.
9261 (print_xml_feature::visit): Likewise.
9262 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9263 (print_xml_feature): Add new class.
9264 * regformats/regdat.sh: Null xmltarget on feature targets.
9265 * target-descriptions.c (struct target_desc): Add xmltarget.
9266 (maintenance_check_tdesc_xml_convert): Add unittest function.
9267 (tdesc_get_features_xml): Add function to get xml.
9268 (maintenance_check_xml_descriptions): Test xml generation.
9269 * xml-tdesc.c (string_read_description_xml): Add function.
9270 * xml-tdesc.h (string_read_description_xml): Add declaration.
9271
9272 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9273
9274 * features/Makefile: Add feature marker to targets with new style
9275 target descriptions.
9276 * regformats/aarch64.dat: Regenerate.
9277 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9278 * regformats/i386/amd64-avx-linux.dat: Likewise.
9279 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9280 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9281 * regformats/i386/amd64-linux.dat: Likewise.
9282 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9283 * regformats/i386/amd64.dat: Likewise.
9284 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9285 * regformats/i386/i386-avx-linux.dat: Likewise.
9286 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9287 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9288 * regformats/i386/i386-linux.dat: Likewise.
9289 * regformats/i386/i386-mmx-linux.dat: Likewise.
9290 * regformats/i386/i386-mpx-linux.dat: Likewise.
9291 * regformats/i386/i386.dat: Likewise.
9292 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9293 * regformats/i386/x32-avx-linux.dat: Likewise.
9294 * regformats/i386/x32-linux.dat: Likewise.
9295 * regformats/tic6x-c62x-linux.dat: Likewise.
9296 * regformats/tic6x-c64x-linux.dat: Likewise.
9297 * regformats/tic6x-c64xp-linux.dat: Likewise.
9298 * regformats/regdat.sh: Parse feature marker.
9299
9300 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9301
9302 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9303 (tdesc_osabi_name): Likewise.
9304 * target-descriptions.c (tdesc_architecture_name): Add new
9305 function.
9306 (tdesc_osabi_name): Likewise.
9307
9308 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9309
9310 * common/tdesc.c (tdesc_predefined_type): Move to here.
9311 (tdesc_named_type): Likewise.
9312 (tdesc_create_vector): Likewise.
9313 (tdesc_create_struct): Likewise.
9314 (tdesc_set_struct_size): Likewise.
9315 (tdesc_create_union): Likewise.
9316 (tdesc_create_flags): Likewise.
9317 (tdesc_create_enum): Likewise.
9318 (tdesc_add_field): Likewise.
9319 (tdesc_add_typed_bitfield): Likewise.
9320 (tdesc_add_bitfield): Likewise.
9321 (tdesc_add_flag): Likewise.
9322 (tdesc_add_enum_value): Likewise.
9323 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9324 (struct tdesc_type_vector): Likewise.
9325 (struct tdesc_type_field): Likewise.
9326 (struct tdesc_type_with_fields): Likewise.
9327 (tdesc_create_enum): Add declaration.
9328 (tdesc_add_typed_bitfield): Likewise.
9329 (tdesc_add_enum_value): Likewise.
9330 * target-descriptions.c (tdesc_type_field): Move from here.
9331 (tdesc_type_builtin): Likewise.
9332 (tdesc_type_vector): Likewise.
9333 (tdesc_type_with_fields): Likewise.
9334 (tdesc_predefined_types): Likewise.
9335 (tdesc_named_type): Likewise.
9336 (tdesc_create_vector): Likewise.
9337 (tdesc_create_struct): Likewise.
9338 (tdesc_set_struct_size): Likewise.
9339 (tdesc_create_union): Likewise.
9340 (tdesc_create_flags): Likewise.
9341 (tdesc_create_enum): Likewise.
9342 (tdesc_add_field): Likewise.
9343 (tdesc_add_typed_bitfield): Likewise.
9344 (tdesc_add_bitfield): Likewise.
9345 (tdesc_add_flag): Likewise.
9346 (tdesc_add_enum_value): Likewise.
9347 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9348 (tdesc_add_typed_bitfield): Likewise.
9349 (tdesc_add_enum_value): Likewise.
9350
9351 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9352
9353 * common/tdesc.c (tdesc_feature::accept): Move to here.
9354 (tdesc_feature::operator==): Likewise.
9355 (tdesc_create_reg): Likewise.
9356 * common/tdesc.h (tdesc_type_kind): Likewise.
9357 (struct tdesc_type): Likewise.
9358 (struct tdesc_feature): Likewise.
9359 * regformats/regdat.sh: Create a feature.
9360 * target-descriptions.c (tdesc_type_kind): Move from here.
9361 (tdesc_type): Likewise.
9362 (tdesc_type_up): Likewise.
9363 (tdesc_feature): Likewise.
9364 (tdesc_create_reg): Likewise.
9365
9366 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9367
9368 * Makefile.in: Add arch/tdesc.c
9369 * common/tdesc.c: New file.
9370 * common/tdesc.h (tdesc_element_visitor): Move to here.
9371 (tdesc_element): Likewise.
9372 (tdesc_reg): Likewise.
9373 (tdesc_reg_up): Likewise.
9374 * regformats/regdef.h (reg): Add offset to constructors.
9375 * target-descriptions.c (tdesc_element_visitor): Move from here.
9376 (tdesc_element): Likewise.
9377 (tdesc_reg): Likewise.
9378 (tdesc_reg_up): Likewise.
9379
9380 2018-04-17 Tom Tromey <tom@tromey.com>
9381
9382 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9383 discriminant field.
9384
9385 2018-04-17 Tom Tromey <tom@tromey.com>
9386
9387 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9388
9389 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9390
9391 * symtab.c (print_symbol_info): Skip printing filename and line
9392 number when `last' is NULL.
9393 (symtab_symbol_info): Use empty string instead of NULL for first
9394 invocation of print_symbol_info.
9395 (rbreak_command): Pass NULL to `last' parameter of
9396 print_symbol_info.
9397
9398 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9399
9400 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9401 instead of nullptr.
9402
9403 2018-04-16 Pedro Alves <palves@redhat.com>
9404
9405 * MAINTAINERS (sh): Remove.
9406 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9407 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9408 (ALLDEPFILES): Remove sh64-tdep.c.
9409 * NEWS: Mentions that support for SH-5/SH64 is removed.
9410 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9411 (sh*-*-openbsd*): Ditto.
9412 (sh64-*-elf*): Remove.
9413 (sh*): Remove.
9414 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9415 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9416 * sh-tdep.c: No longer include "sh64-tdep.h".
9417 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9418 * sh64-tdep.c, sh64-tdep.h: Remove files.
9419
9420 2018-04-16 Pedro Alves <palves@redhat.com>
9421
9422 * MAINTAINERS: Remove m88k.
9423 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9424 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9425 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9426 * NEWS: Mention that support for m88k was removed.
9427 * configure.host (m88*-*-*): Remove support.
9428 * configure.nat (m88k-*-*): Remove support.
9429 * configure.tgt (m88*-*-openbsd*): Remove.
9430 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9431
9432 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9433
9434 * configure.tgt (x86_tobjs): New variable.
9435 (amd64_tobjs, i386_tobjs): Use it.
9436
9437 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9438
9439 * symtab.c (print_symbol_info): Precede the symbol definition by
9440 the line number when available.
9441 * NEWS: Advertise this enhancement.
9442
9443 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9444
9445 * NEWS (New options): announce set/show record btrace cpu.
9446 * btrace.c: Include record-btrace.h.
9447 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9448 the vendor is unknown.
9449 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9450 Maybe overwrite the btrace configuration's cpu.
9451 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9452 (btrace_fetch): Add cpu parameter. Update callers.
9453 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9454 Maybe overwrite the btrace configuration's cpu. Skip enabling
9455 errata workarounds if the vendor is unknown.
9456 * python/py-record-btrace.c: Include record-btrace.h.
9457 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9458 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9459 * record-btrace.c (record_btrace_cpu_state_kind): New.
9460 (record_btrace_cpu): New.
9461 (set_record_btrace_cpu_cmdlist): New.
9462 (record_btrace_get_cpu): New.
9463 (require_btrace_thread, record_btrace_info)
9464 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9465 (cmd_set_record_btrace_cpu_none): New.
9466 (cmd_set_record_btrace_cpu_auto): New.
9467 (cmd_set_record_btrace_cpu): New.
9468 (cmd_show_record_btrace_cpu): New.
9469 (_initialize_record_btrace): Initialize set/show record btrace cpu
9470 commands.
9471 * record-btrace.h (record_btrace_get_cpu): New.
9472
9473 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9474
9475 * record.c (set_record_command): Fix typo in message.
9476
9477 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9478
9479 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9480
9481 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9482
9483 * infrun.c (process_event_stop_test): Call
9484 gdbarch_in_indirect_branch_thunk.
9485 * gdbarch.sh (in_indirect_branch_thunk): New.
9486 * gdbarch.c: Regenerated.
9487 * gdbarch.h: Regenerated.
9488 * x86-tdep.h: New.
9489 * x86-tdep.c: New.
9490 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9491 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9492 (ALLDEPFILES): Add x86-tdep.c.
9493 * arch-utils.h (default_in_indirect_branch_thunk): New.
9494 * arch-utils.c (default_in_indirect_branch_thunk): New.
9495 * i386-tdep: Include x86-tdep.h.
9496 (i386_in_indirect_branch_thunk): New.
9497 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9498 function.
9499 * amd64-tdep: Include x86-tdep.h.
9500 (amd64_in_indirect_branch_thunk): New.
9501 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9502
9503 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9504
9505 PR gdb/23053
9506 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9507 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9508 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9509 regression.
9510
9511 2018-04-12 Tom Tromey <tom@tromey.com>
9512
9513 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9514 (rust_evaluate_subexp): Likewise.
9515
9516 2018-04-12 Pedro Alves <palves@redhat.com>
9517
9518 * procfs.c (procfs_detach): Make forward declaration's prototype
9519 match definition's protototype.
9520 (proc_get_LDT_entry): Remove stale do_cleanups call.
9521
9522 2018-04-12 Pedro Alves <palves@redhat.com>
9523
9524 * target.h (target_ops::to_has_exited): Delete.
9525 (target_has_exited): Delete.
9526 * target-delegates.c: Regenerate.
9527
9528 2018-04-11 Pedro Alves <palves@redhat.com>
9529
9530 * target.c (fileio_fh_t::t): Add comment.
9531 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9532 (target_fileio_close): Handle a NULL target.
9533 (invalidate_fileio_fh): New.
9534 (target_close): Call it.
9535 * remote.c (remote_hostio_send_command): No longer check whether
9536 remote_desc is open.
9537
9538 2018-04-11 Pedro Alves <palves@redhat.com>
9539
9540 * target.c (fileio_fh_t): Make it a named struct instead of a
9541 typedef.
9542 (fileio_fh_t::is_closed): New method.
9543 (DEF_VEC_O (fileio_fh_t)): Remove.
9544 (fileio_fhandles): Now a std::vector.
9545 (is_closed_fileio_fh): Delete.
9546 (acquire_fileio_fd): Adjust. Rename parameters.
9547 (release_fileio_fd): Adjust.
9548 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9549 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9550 (target_fileio_close): Adjust.
9551
9552 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
9553
9554 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9555 index.
9556
9557 2018-04-10 Pedro Alves <palves@redhat.com>
9558
9559 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9560 (scoped_finish_thread_state): New class.
9561 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9562 cleanup.
9563 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9564 (fetch_inferior_event, normal_stop): Likewise.
9565 * thread.c (finish_thread_state_cleanup): Delete.
9566
9567 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9568 Pedro Alves <palves@redhat.com>
9569
9570 * value.c: Include "selftest.h" and "common/array-view.h".
9571 (struct range) <operator ==>: New.
9572 (test_ranges_contain): New.
9573 (check_ranges_vector): New.
9574 (test_insert_into_bit_range_vector): New.
9575 (_initialize_values): Register selftests.
9576 * common/array-view.h (operator==, operator!=): New.
9577
9578 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9579
9580 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9581 an iterator.
9582 * inline-frame.c: Include <algorithm>.
9583 (struct inline_state): Add constructor.
9584 (inline_state_s): Remove.
9585 (DEF_VEC_O(inline_state_s)): Remove.
9586 (inline_states): Change type to std::vector.
9587 (find_inline_frame_state): Adjust to std::vector.
9588 (allocate_inline_frame_state): Remove.
9589 (clear_inline_frame_state): Adjust to std::vector.
9590 (skip_inline_frames): Adjust to std::vector.
9591
9592 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9593
9594 * tracepoint.h (struct trace_state_variable): Add constructor.
9595 <name>: Change type to std::string.
9596 * tracepoint.c (tsv_s): Remove.
9597 (DEF_VEC_O(tsv_s)): Remove.
9598 (tvariables): Change to std::vector.
9599 (create_trace_state_variable): Adjust to std::vector.
9600 (find_trace_state_variable): Likewise.
9601 (find_trace_state_variable_by_number): Likewise.
9602 (delete_trace_state_variable): Likewise.
9603 (trace_variable_command): Adjust to std::string.
9604 (delete_trace_variable_command): Likewise.
9605 (tvariables_info_1): Adjust to std::vector.
9606 (save_trace_state_variables): Likewise.
9607 (start_tracing): Likewise.
9608 (merge_uploaded_trace_state_variables): Adjust to std::vector
9609 and std::string.
9610 * target.h (struct target_ops)
9611 <to_download_trace_state_variable>: Pass reference to
9612 trace_state_variable.
9613 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9614 * target-delegates.c: Re-generate.
9615 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9616 (mi_tsv_deleted): Likewise.
9617 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9618 * remote.c (remote_download_trace_state_variable): Change
9619 pointer to reference and adjust.
9620 * make-target-delegates (parse_argtypes): Handle references.
9621 (write_function_header): Likewise.
9622 (munge_type): Likewise.
9623
9624 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9625
9626 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9627 string_view-selftests.c.
9628 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9629 testsuite.
9630 * unittests/basic_string_view/cons/char/1.cc: Likewise.
9631 * unittests/basic_string_view/cons/char/2.cc: Likewise.
9632 * unittests/basic_string_view/cons/char/3.cc: Likewise.
9633 * unittests/basic_string_view/element_access/char/1.cc:
9634 Likewise.
9635 * unittests/basic_string_view/element_access/char/empty.cc:
9636 Likewise.
9637 * unittests/basic_string_view/element_access/char/front_back.cc:
9638 Likewise.
9639 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9640 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9641 Likewise.
9642 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9643 Likewise.
9644 * unittests/basic_string_view/modifiers/swap/char/1.cc:
9645 Likewise.
9646 * unittests/basic_string_view/operations/compare/char/1.cc:
9647 Likewise.
9648 * unittests/basic_string_view/operations/compare/char/13650.cc:
9649 Likewise.
9650 * unittests/basic_string_view/operations/copy/char/1.cc:
9651 Likewise.
9652 * unittests/basic_string_view/operations/data/char/1.cc:
9653 Likewise.
9654 * unittests/basic_string_view/operations/find/char/1.cc:
9655 Likewise.
9656 * unittests/basic_string_view/operations/find/char/2.cc:
9657 Likewise.
9658 * unittests/basic_string_view/operations/find/char/3.cc:
9659 Likewise.
9660 * unittests/basic_string_view/operations/find/char/4.cc:
9661 Likewise.
9662 * unittests/basic_string_view/operations/rfind/char/1.cc:
9663 Likewise.
9664 * unittests/basic_string_view/operations/rfind/char/2.cc:
9665 Likewise.
9666 * unittests/basic_string_view/operations/rfind/char/3.cc:
9667 Likewise.
9668 * unittests/basic_string_view/operations/substr/char/1.cc:
9669 Likewise.
9670 * unittests/basic_string_view/operators/char/2.cc: Likewise.
9671 * unittests/string_view-selftests.c: New file.
9672
9673 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9674
9675 * unittests/basic_string_view/capacity/1.cc: New file.
9676 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9677 * unittests/basic_string_view/cons/char/1.cc: New file.
9678 * unittests/basic_string_view/cons/char/2.cc: New file.
9679 * unittests/basic_string_view/cons/char/3.cc: New file.
9680 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9681 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9682 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9683 * unittests/basic_string_view/element_access/char/1.cc: New file.
9684 * unittests/basic_string_view/element_access/char/2.cc: New file.
9685 * unittests/basic_string_view/element_access/char/empty.cc: New file.
9686 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9687 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9688 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9689 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9690 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9691 * unittests/basic_string_view/include.cc: New file.
9692 * unittests/basic_string_view/inserters/char/1.cc: New file.
9693 * unittests/basic_string_view/inserters/char/2.cc: New file.
9694 * unittests/basic_string_view/inserters/char/3.cc: New file.
9695 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9696 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9697 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9698 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9699 * unittests/basic_string_view/literals/types.cc: New file.
9700 * unittests/basic_string_view/literals/values.cc: New file.
9701 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9702 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9703 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9704 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9705 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9706 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9707 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9708 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9709 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9710 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9711 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9712 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9713 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9714 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9715 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9716 * unittests/basic_string_view/operations/data/char/1.cc: New file.
9717 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9718 * unittests/basic_string_view/operations/find/char/1.cc: New file.
9719 * unittests/basic_string_view/operations/find/char/2.cc: New file.
9720 * unittests/basic_string_view/operations/find/char/3.cc: New file.
9721 * unittests/basic_string_view/operations/find/char/4.cc: New file.
9722 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9723 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9724 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9725 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9726 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9727 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9728 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9729 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9730 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9731 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9732 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9733 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9734 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9735 * unittests/basic_string_view/operators/char/2.cc: New file.
9736 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9737 * unittests/basic_string_view/range_access/char/1.cc: New file.
9738 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9739 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9740 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9741 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9742 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9743 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9744 * unittests/basic_string_view/requirements/typedefs.cc: New file.
9745 * unittests/basic_string_view/typedefs.cc: New file.
9746 * unittests/basic_string_view/types/1.cc: New file.
9747
9748 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9749
9750 * common/gdb_string_view.h: Remove libstdc++ implementation
9751 details, adjust to gdb reality.
9752 * common/gdb_string_view.tcc: Likewise.
9753 * cli/cli-script.c (struct string_view): Remove.
9754 (user_args) <m_args>: Change element type to gdb::string_view.
9755 (user_args::insert_args): Adjust.
9756
9757 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9758
9759 * common/gdb_string_view.h: New file.
9760 * common/gdb_string_view.tcc: New file.
9761
9762 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9763
9764 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9765 * configure: Re-generate.
9766
9767 2018-04-09 Pedro Alves <palves@redhat.com>
9768
9769 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9770 (set_target_gdbarch): Call
9771 gdb::observers::architecture_changed.notify instead of
9772 observer_notify_architecture_changed.
9773
9774 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9775
9776 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9777 (do_restore_current_traceframe_cleanup): Remove.
9778 (restore_current_traceframe_cleanup_dtor): Remove.
9779 (make_cleanup_restore_current_traceframe): Remove.
9780 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9781 New.
9782 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9783 * infrun.c (fetch_inferior_event): Use
9784 scoped_restore_current_traceframe.
9785
9786 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9787
9788 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9789 Remove.
9790 <n_allocated_type_units>: Remove.
9791 <all_type_units>: Change to std::vector.
9792 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9793 to std::vector change.
9794 (dwarf2_per_objfile::get_cutu): Likewise.
9795 (dwarf2_per_objfile::get_tu): Likewise.
9796 (create_signatured_type_table_from_index): Likewise.
9797 (create_signatured_type_table_from_debug_names): Likewise.
9798 (dw2_symtab_iter_next): Likewise.
9799 (dw2_print_stats): Likewise.
9800 (dw2_expand_all_symtabs): Likewise.
9801 (dw2_expand_marked_cus): Likewise.
9802 (dw2_debug_names_iterator::next): Likewise.
9803 (dwarf2_initialize_objfile): Likewise.
9804 (add_signatured_type_cu_to_table): Likewise.
9805 (create_all_type_units): Likewise.
9806 (add_type_unit): Likewise.
9807 (struct tu_abbrev_offset): Add constructor.
9808 (build_type_psymtabs_1): Adjust to std::vector change.
9809 (print_tu_stats): Likewise.
9810 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9811 (write_debug_names): Likewise.
9812
9813 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9814
9815 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9816 Make an std::vector.
9817 <n_comp_units>: Remove.
9818 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9819 to std::vector change.
9820 (dwarf2_per_objfile::get_cutu): Likewise.
9821 (dwarf2_per_objfile::get_cu): Likewise.
9822 (create_cus_from_index): Likewise.
9823 (create_addrmap_from_index): Likewise.
9824 (create_addrmap_from_aranges): Likewise.
9825 (dwarf2_read_index): Likewise.
9826 (dw2_find_last_source_symtab): Likewise.
9827 (dw2_map_symtabs_matching_filename): Likewise.
9828 (dw2_symtab_iter_next): Likewise.
9829 (dw2_print_stats): Likewise.
9830 (dw2_expand_all_symtabs): Likewise.
9831 (dw2_expand_symtabs_with_fullname): Likewise.
9832 (dw2_expand_marked_cus): Likewise.
9833 (dw2_map_symbol_filenames): Likewise.
9834 (create_cus_from_debug_names): Likewise.
9835 (dwarf2_read_debug_names): Likewise.
9836 (dw2_debug_names_iterator::next): Likewise.
9837 (dwarf2_initialize_objfile): Likewise.
9838 (set_partial_user): Likewise.
9839 (dwarf2_build_psymtabs_hard): Likewise.
9840 (read_comp_units_from_section): Remove arguments, adjust to
9841 std::vector change.
9842 (create_all_comp_units): Adjust to std::vector and
9843 read_comp_units_from_section changes.
9844 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9845 change.
9846 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9847 (psyms_seen_size): Likewise.
9848 (write_gdbindex): Likewise.
9849 (write_debug_names): Likewise.
9850
9851 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9852
9853 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9854 with dwarf2_per_objfile.
9855 (create_cus_from_index): Likewise.
9856 (create_signatured_type_table_from_index): Likewise.
9857 (dwarf2_read_index): Likewise.
9858 (dwarf2_initialize_objfile): Likewise.
9859 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9860 per_cu rather than get_dwarf2_per_objfile.
9861
9862 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9863
9864 * dwarf2read.h (struct signatured_type): Forward declare.
9865 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9866 New methods.
9867 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9868 (dw2_get_cutu): ...this.
9869 (dwarf2_per_objfile::get_cu): Rename from...
9870 (dw2_get_cu): ...this.
9871 (dwarf2_per_objfile::get_tu): New.
9872 (create_addrmap_from_index): Adjust.
9873 (create_addrmap_from_aranges): Adjust.
9874 (dw2_find_last_source_symtab): Adjust.
9875 (dw2_map_symtabs_matching_filename): Adjust.
9876 (dw2_symtab_iter_next): Adjust.
9877 (dw2_print_stats): Adjust.
9878 (dw2_expand_all_symtabs): Adjust.
9879 (dw2_expand_symtabs_with_fullname): Adjust.
9880 (dw2_expand_marked_cus): Adjust.
9881 (dw_expand_symtabs_matching_file_matcher): Adjust.
9882 (dw2_map_symbol_filenames): Adjust.
9883 (dw2_debug_names_iterator::next): Adjust.
9884 (dwarf2_initialize_objfile): Adjust.
9885 (set_partial_user): Adjust.
9886 (dwarf2_build_psymtabs_hard): Adjust.
9887
9888 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9889
9890 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9891 Remove unused variables.
9892 (dw2_map_symtabs_matching_filename): Likewise.
9893 (dwarf2_record_block_ranges): Likewise.
9894 (dwarf2_read_addr_index): Likewise.
9895 (follow_die_offset): Likewise.
9896
9897 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9898
9899 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9900 to symbol_file_add_main.
9901
9902 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9903
9904 PR mi/22299
9905 * mi/mi-console.c (do_fputc_async_safe): New.
9906 (mi_console_file::write_async_safe): New.
9907 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9908 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9909 New.
9910 * ui-file.c (ui_file::putstrn): Adjust call to
9911 fputstrn_unfiltered.
9912 * utils.c (printchar): Replace do_fputs and do_fprintf
9913 parameters by do_fputc.
9914 (fputstr_filtered): Adjust call to printchar.
9915 (fputstr_unfiltered): Likewise.
9916 (fputstrn_filtered): Likewise.
9917 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9918 printchar.
9919 * utils.h (do_fputc_ftype): New typedef.
9920 (fputstrn_unfiltered): Add do_fputc parameter.
9921
9922 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9923
9924 * regformats/i386/i386-avx.dat: Remove.
9925
9926 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9927
9928 PR gdb/22979
9929 * amd64-tdep.c (amd64_none_init_abi): New function.
9930 (amd64_x32_none_init_abi): New function.
9931 (_initialize_amd64_tdep): Register handlers for x86-64 and
9932 x64_32 with GDB_OSABI_NONE.
9933 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9934 GDB_OSABI_NONE osabi.
9935
9936 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9937
9938 PR gdb/22980
9939 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9940 GDB_OSABI_NONE.
9941 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9942 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9943
9944 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9945
9946 * common/byte-vector.h (char_vector): New type.
9947 * target.h (target_read_alloc): Return
9948 gdb::optional<byte_vector>.
9949 (target_read_stralloc): Return gdb::optional<char_vector>.
9950 (target_get_osdata): Return gdb::optional<char_vector>.
9951 * target.c (target_read_alloc_1): Templatize. Replacement
9952 manual memory management with vector.
9953 (target_read_alloc): Change return type, adjust.
9954 (target_read_stralloc): Change return type, adjust.
9955 (target_get_osdata): Change return type, adjust.
9956 * auxv.c (struct auxv_info) <length>: Remove.
9957 <data>: Change type to gdb::optional<byte_vector>.
9958 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9959 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9960 (target_auxv_search): Adjust.
9961 (fprint_target_auxv): Adjust.
9962 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9963 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9964 (linux_make_corefile_notes): Adjust.
9965 * osdata.c (get_osdata): Adjust.
9966 * remote.c (remote_get_threads_with_qxfer): Adjust.
9967 (remote_memory_map): Adjust.
9968 (remote_traceframe_info): Adjust.
9969 (btrace_read_config): Adjust.
9970 (remote_read_btrace): Adjust.
9971 (remote_pid_to_exec_file): Adjust.
9972 * solib-aix.c (solib_aix_get_library_list): Adjust.
9973 * solib-dsbt.c (decode_loadmap): Don't free buf.
9974 (dsbt_get_initial_loadmaps): Adjust.
9975 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9976 * solib-target.c (solib_target_current_sos): Adjust.
9977 * tracepoint.c (sdata_make_value): Adjust.
9978 * xml-support.c (xinclude_start_include): Adjust.
9979 (xml_fetch_content_from_file): Adjust.
9980 * xml-support.h (xml_fetch_another): Change return type.
9981 (xml_fetch_content_from_file): Change return type.
9982 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9983 * xml-tdesc.c (file_read_description_xml): Adjust.
9984 (fetch_available_features_from_target): Change return type.
9985 (target_fetch_description_xml): Adjust.
9986 (target_read_description_xml): Adjust.
9987
9988 2018-04-06 Tom Tromey <tom@tromey.com>
9989
9990 * value.c (~value): Update.
9991 (struct value) <contents>: Now unique_xmalloc_ptr.
9992 (value_contents_bits_eq, allocate_value_contents)
9993 (value_contents_raw, value_contents_all_raw)
9994 (value_contents_for_printing, value_contents_for_printing_const)
9995 (set_value_enclosing_type): Update.
9996
9997 2018-04-06 Tom Tromey <tom@tromey.com>
9998
9999 * value.c (range_s): Remove typedef, VEC.
10000 (struct range): Add operator<.
10001 (range_lessthan): Remove.
10002 (ranges_contain): Change type.
10003 (~value): Update.
10004 (struct value) <unavailable, optimized_out>: Now std::vector.
10005 (value_entirely_available)
10006 (value_entirely_covered_by_range_vector)
10007 (value_entirely_unavailable, value_entirely_optimized_out):
10008 Update.
10009 (insert_into_bit_range_vector): Change argument type.
10010 (find_first_range_overlap): Likewise.
10011 (struct ranges_and_idx, value_contents_bits_eq)
10012 (require_not_optimized_out, require_available): Update.
10013 (ranges_copy_adjusted): Change argument types.
10014 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10015
10016 2018-04-06 Tom Tromey <tom@tromey.com>
10017
10018 * value.c (~value): Update.
10019 (struct value) <parent>: Now a value_ref_ptr.
10020 (value_parent, set_value_parent, value_address, value_copy):
10021 Update.
10022
10023 2018-04-06 Tom Tromey <tom@tromey.com>
10024
10025 * value.c (struct value): Add constructor, destructor, and member
10026 initializers.
10027 (allocate_value_lazy, value_decref): Update.
10028
10029 2018-04-06 Tom Tromey <tom@tromey.com>
10030
10031 * value.c (struct value) <released, next>: Remove.
10032 (all_values): Now a std::vector.
10033 (allocate_value_lazy): Update.
10034 (value_next): Remove.
10035 (value_mark, value_free_to_mark, release_value)
10036 (value_release_to_mark): Update.
10037
10038 2018-04-06 Tom Tromey <tom@tromey.com>
10039
10040 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10041 (free_value_chain): Remove.
10042 * value.c (free_value_chain): Remove.
10043 (value_release_to_mark): Return a std::vector.
10044 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10045 std::vector.
10046 (check_condition): Update.
10047 * eval.c (fetch_subexp_value): Change "val_chain" to a
10048 std::vector.
10049 * breakpoint.c (update_watchpoint): Update.
10050 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10051
10052 2018-04-06 Tom Tromey <tom@tromey.com>
10053
10054 * value.h (free_all_values): Remove.
10055 * value.c (free_all_values): Remove.
10056
10057 2018-04-06 Tom Tromey <tom@tromey.com>
10058
10059 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10060 (value_history_chain, value_history_count): Remove.
10061 (value_history): New global.
10062 (record_latest_value, access_value_history, show_values)
10063 (preserve_values): Update.
10064
10065 2018-04-06 Tom Tromey <tom@tromey.com>
10066
10067 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10068 * varobj.c (varobj_set_display_format, varobj_set_value)
10069 (install_default_visualizer, construct_visualizer)
10070 (install_new_value, ~varobj, varobj_get_value_type)
10071 (my_value_of_variable, varobj_editable_p): Update.
10072 * c-varobj.c (c_describe_child, c_value_of_variable)
10073 (cplus_number_of_children, cplus_describe_child): Update.
10074 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10075 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10076 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10077
10078 2018-04-06 Tom Tromey <tom@tromey.com>
10079
10080 * printcmd.c (last_examine_address): Change type to
10081 value_ref_ptr.
10082 (do_examine, x_command): Update.
10083
10084 2018-04-06 Tom Tromey <tom@tromey.com>
10085
10086 * value.c (release_value): Update.
10087 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10088 (struct bpstats) <val>: Now a value_ref_ptr.
10089 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10090 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10091 (~watchpoint, print_it_watchpoint, watch_command_1)
10092 (invalidate_bp_value_on_memory_change): Update.
10093
10094 2018-04-06 Tom Tromey <tom@tromey.com>
10095
10096 * varobj.c (varobj_clear_saved_item)
10097 (update_dynamic_varobj_children, install_new_value, ~varobj):
10098 Update.
10099 * value.h (value_incref): Move declaration earlier.
10100 (value_decref): Rename from value_free.
10101 (struct value_ref_policy): New.
10102 (value_ref_ptr): New typedef.
10103 (struct value_deleter): Remove.
10104 (gdb_value_up): Remove typedef.
10105 (release_value): Change return type.
10106 (release_value_or_incref): Remove.
10107 * value.c (set_value_parent): Update.
10108 (value_incref): Change return type.
10109 (value_decref): Rename from value_free.
10110 (value_free_to_mark, free_all_values, free_value_chain): Update.
10111 (release_value): Return value_ref_ptr.
10112 (release_value_or_incref): Remove.
10113 (record_latest_value, set_internalvar, clear_internalvar):
10114 Update.
10115 * stack.c (info_frame_command): Don't call value_free.
10116 * python/py-value.c (valpy_dealloc, valpy_new)
10117 (value_to_value_object): Update.
10118 * printcmd.c (do_examine): Update.
10119 * opencl-lang.c (lval_func_free_closure): Update.
10120 * mi/mi-main.c (register_changed_p): Don't call value_free.
10121 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10122 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10123 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10124 value_free.
10125 * guile/scm-value.c (vlscm_free_value_smob)
10126 (vlscm_scm_from_value): Update.
10127 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10128 (frame_unwind_register_unsigned, get_frame_register_bytes)
10129 (put_frame_register_bytes): Don't call value_free.
10130 * findvar.c (address_from_register): Don't call value_free.
10131 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10132 * dwarf2loc.c (entry_data_value_free_closure)
10133 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10134 (dwarf2_evaluate_loc_desc_full): Update.
10135 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10136 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10137 (~watchpoint, watch_command_1)
10138 (invalidate_bp_value_on_memory_change): Update.
10139 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10140
10141 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10142
10143 PR gdb/23022
10144 * warning.m4: Add -Wno-error=deprecated-register.
10145 * configure: Re-generate.
10146
10147 2018-04-05 Tom Tromey <tom@tromey.com>
10148
10149 * linespec.h: Remove include of "vec.h".
10150
10151 2018-04-05 Tom Tromey <tom@tromey.com>
10152
10153 * linespec.c (typep): Remove typedef.
10154 (find_methods, find_superclass_methods): Take a std::vector.
10155 (find_method): Use std::vector.
10156
10157 2018-04-05 Tom Tromey <tom@tromey.com>
10158
10159 * utils.c (compare_strings): Remove.
10160 * utils.h (compare_strings): Remove.
10161 * objc-lang.h (find_imps): Update.
10162 * objc-lang.c (find_methods): Take a std::vector.
10163 (uniquify_strings, find_imps): Likewise.
10164 * linespec.c (find_methods): Take a std::vector.
10165 (decode_objc): Use std::vector.
10166 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10167 a std::vector.
10168 (find_method, find_function_symbols): Use std::vector.
10169
10170 2018-04-05 Tom Tromey <tom@tromey.com>
10171
10172 * completer.c (completion_tracker::completion_tracker): Remove
10173 cast.
10174 (completion_tracker::discard_completions): Likewise.
10175 * breakpoint.c (ambiguous_names_p): Remove cast.
10176 * ada-lang.c (_initialize_ada_language): Remove cast.
10177 * utils.h (streq): Update.
10178 (streq_hash): Add new declaration.
10179 * utils.c (streq): Return bool.
10180 (streq_hash): New function.
10181
10182 2018-04-05 Tom Tromey <tom@tromey.com>
10183
10184 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10185 Remove a string copy.
10186
10187 2018-04-05 Tom Tromey <tom@tromey.com>
10188
10189 * linespec.c (filter_results): Use std::vector.
10190 (decode_line_2, decode_line_full): Update.
10191
10192 2018-04-05 Tom Tromey <tom@tromey.com>
10193
10194 * linespec.c (canonical_to_fullform): Return std::string.
10195 (filter_results): Update.
10196 (struct decode_line_2_item): Add constructor.
10197 <fullform, displayform>: Now std::string.
10198 (decode_line_2_compare_items): Now a std::sort comparator.
10199 (decode_line_2): Update.
10200
10201 2018-04-05 Tom Tromey <tom@tromey.com>
10202
10203 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10204 (unexpected_linespec_error): Update.
10205 (linespec_parse_basic, parse_linespec): Update.
10206
10207 2018-04-05 Tom Tromey <tom@tromey.com>
10208
10209 * linespec.c (linespec_parse_basic): Reindent.
10210
10211 2018-04-05 Tom Tromey <tom@tromey.com>
10212
10213 * minsyms.h (iterate_over_minimal_symbols): Update.
10214 * minsyms.c (iterate_over_minimal_symbols): Take a
10215 gdb::function_view.
10216 * linespec.c (struct collect_minsyms): Remove.
10217 (compare_msyms): Now a std::sort comparator.
10218 (add_minsym): Add parameters.
10219 (search_minsyms_for_name): Update. Use std::vector.
10220
10221 2018-04-03 Tom Tromey <tom@tromey.com>
10222
10223 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10224 gdb::byte_vector.
10225
10226 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10227
10228 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10229
10230 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10231
10232 PR gdb/16959
10233 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10234 printing static type.
10235
10236 2018-04-01 Tom Tromey <tom@tromey.com>
10237
10238 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10239 (rs6000_xfer_shared_libraries): Update.
10240
10241 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10242
10243 * common/gdb_vecs.h (char_ptr): Remove.
10244 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10245
10246 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10247
10248 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10249 with std::vector.
10250 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10251
10252 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10253
10254 * tracepoint.h (struct uploaded_tp): Initialize fields.
10255 <actions, step_actions, cmd_strings>: Change type to
10256 std::vector<char *>.
10257 * tracepoint.c (get_uploaded_tp): Allocate with new.
10258 (free_uploaded_tps): Free with delete.
10259 (parse_tracepoint_definition): Adjust to std::vector change.
10260 * breakpoint.c (read_uploaded_action): Likewise.
10261 (create_tracepoint_from_upload): Likewise.
10262 * ctf.c (ctf_write_uploaded_tp): Likewise.
10263 (SET_ARRAY_FIELD): Likewise.
10264 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10265
10266 2018-03-30 Tom Tromey <tom@tromey.com>
10267
10268 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10269 std::unique_ptr.
10270 (svr4_keep_data_in_core): Update.
10271 (svr4_read_so_list): Update.
10272
10273 2018-03-30 Tom Tromey <tom@tromey.com>
10274
10275 * windows-nat.c (handle_output_debug_string, handle_exception):
10276 Update.
10277 * target.h (target_read_string): Update.
10278 * target.c (target_read_string): Change "string" to
10279 unique_xmalloc_ptr.
10280 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10281 Update.
10282 * solib-frv.c (frv_current_sos): Update.
10283 * solib-dsbt.c (dsbt_current_sos): Update.
10284 * solib-darwin.c (darwin_current_sos): Update.
10285 * linux-thread-db.c (inferior_has_bug): Update.
10286 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10287 Update. Remove alloca.
10288 * ada-lang.c (ada_main_name): Update.
10289
10290 2018-03-30 Tom Tromey <tom@tromey.com>
10291
10292 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10293 (struct dwo_file_deleter): New.
10294 (dwo_file_up): New typedef.
10295 (open_and_init_dwo_file): Use dwo_file_up.
10296 (free_dwo_file_cleanup): Remove.
10297
10298 2018-03-30 Tom Tromey <tom@tromey.com>
10299
10300 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10301 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10302
10303 2018-03-30 Tom Tromey <tom@tromey.com>
10304
10305 * dwarf2read.c (class free_cached_comp_units): New class.
10306 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10307 (free_cached_comp_units): Remove function.
10308
10309 2018-03-30 Tom Tromey <tom@tromey.com>
10310
10311 * utils.h (make_cleanup_unpush_target): Remove.
10312 * inf-ptrace.c (struct target_unpusher): New.
10313 (target_unpush_up) New typedef.
10314 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10315 target_unpush_up.
10316 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10317
10318 2018-03-27 Tom Tromey <tom@tromey.com>
10319
10320 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10321
10322 2018-03-27 Pedro Alves <palves@redhat.com>
10323 Tom Tromey <tom@tromey.com>
10324
10325 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10326 destructor. Now a class.
10327 (gdb_readline_wrapper_cleanup): Remove function.
10328 (gdb_readline_wrapper): Remove cleanups.
10329
10330 2018-03-27 Tom Tromey <tom@tromey.com>
10331
10332 * typeprint.h (struct type_print_options) <local_typedefs,
10333 global_typedefs>: Remove "struct" keyword.
10334 (class typedef_hash_table): New class.
10335 (recursively_update_typedef_hash, add_template_parameters)
10336 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10337 (find_typedef_in_hash): Don't declare.
10338 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10339 (typedef_hash_table::recursively_update): Rename from
10340 recursively_update_typedef_hash. Now a member.
10341 (typedef_hash_table::add_template_parameters): Rename from
10342 add_template_parameters. Now a member.
10343 (typedef_hash_table::typedef_hash_table): Now a constructor;
10344 rename from create_typedef_hash.
10345 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10346 rename from free_typedef_hash.
10347 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10348 (do_free_global_table): Remove.
10349 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10350 from copy_type_recursive.
10351 (create_global_typedef_table): Remove.
10352 (typedef_hash_table::find_global_typedef): Now a member of
10353 typedef_hash_table.
10354 (typedef_hash_table::find_typedef): Rename from
10355 find_typedef_in_hash; now a member.
10356 (whatis_exp): Update.
10357 * extension.h (struct ext_lang_type_printers): Add constructor and
10358 destructor.
10359 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10360 declare.
10361 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10362 Now a constructor; rename from start_ext_lang_type_printers.
10363 (ext_lang_type_printers): Now a destructor; rename from
10364 free_ext_lang_type_printers.
10365 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10366 Update.
10367 (c_type_print_base_struct_union): Update. Remove cleanups.
10368
10369 2018-03-27 Tom Tromey <tom@tromey.com>
10370
10371 * dwarf-index-write.c: Include <cmath>.
10372
10373 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10374
10375 * NEWS: Add entry describing new "set|show varsize-limit" command.
10376 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10377 command.
10378 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10379 "set variable".
10380
10381 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10382
10383 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10384 dwarf-index-write.c
10385 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10386 * dwarf-index-common.c: New file.
10387 * dwarf-index-common.h: New file.
10388 * dwarf-index-write.c: New file.
10389 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10390 (struct dwarf2_section_info): Move from here.
10391 (dwarf2_section_info_def): Likewise.
10392 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10393 (offset_type): Likewise.
10394 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10395 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10396 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10397 (byte_swap): Likewise.
10398 (MAYBE_SWAP): Likewise.
10399 (dwarf2_per_cu_ptr): Likewise.
10400 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10401 (struct tu_stats): Likewise.
10402 (struct dwarf2_per_objfile): Likewise.
10403 (struct dwarf2_per_cu_data): Likewise.
10404 (struct signatured_type): Likewise.
10405 (sig_type_ptr): Likewise.
10406 (DEF_VEC_P (sig_type_ptr)): Likewise.
10407 (INDEX4_SUFFIX): Likewise.
10408 (INDEX5_SUFFIX): Likewise.
10409 (DEBUG_STR_SUFFIX): Likewise.
10410 (dwarf2_read_section): Make non-static.
10411 (mapped_index_string_hash): Move from here.
10412 (dwarf5_djb_hash): Likewise.
10413 (file_write): Likewise.
10414 (class data_buf): Likewise.
10415 (struct symtab_index_entry): Likewise.
10416 (struct mapped_symtab): Likewise.
10417 (find_slot): Likewise.
10418 (hash_expand): Likewise.
10419 (add_index_entry): Likewise.
10420 (uniquify_cu_indices): Likewise.
10421 (class c_str_view): Likewise.
10422 (class c_str_view_hasher): Likewise.
10423 (class vector_hasher): Likewise.
10424 (write_hash_table): Likewise.
10425 (psym_index_map): Likewise.
10426 (struct addrmap_index_data): Likewise.
10427 (add_address_entry): Likewise.
10428 (add_address_entry_worker): Likewise.
10429 (write_address_map): Likewise.
10430 (symbol_kind): Likewise.
10431 (write_psymbols): Likewise.
10432 (struct signatured_type_index_data): Likewise.
10433 (write_one_signatured_type): Likewise.
10434 (recursively_count_psymbols): Likewise.
10435 (recursively_write_psymbols): Likewise.
10436 (class debug_names): Likewise.
10437 (check_dwarf64_offsets): Likewise.
10438 (psyms_seen_size): Likewise.
10439 (write_gdbindex): Likewise.
10440 (write_debug_names): Likewise.
10441 (assert_file_size): Likewise.
10442 (write_psymtabs_to_index): Likewise.
10443 (save_gdb_index_command): Likewise.
10444 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10445 command.
10446 * dwarf2read.h: New file.
10447
10448 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10449
10450 PR gdb/22670
10451 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10452 symbol name if the CU's language stores symbol names in linkage
10453 format.
10454 * language.h (struct language_defn)
10455 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10456 all instances of this struct.
10457
10458 2018-03-26 Tom Tromey <tom@tromey.com>
10459
10460 * stack.c (backtrace_command_1): Remove verbose code.
10461
10462 2018-03-26 Tom Tromey <tom@tromey.com>
10463
10464 * python/py-framefilter.c (py_print_type): Don't catch
10465 exceptions. Return void.
10466 (py_print_value): Likewise.
10467 (py_print_single_arg): Likewise.
10468 (enumerate_args): Don't catch exceptions.
10469 (py_print_args): Likewise.
10470 (py_print_frame): Likewise.
10471 (gdbpy_apply_frame_filter): Catch exceptions here.
10472
10473 2018-03-26 Tom Tromey <tom@tromey.com>
10474
10475 * stack.c (_initialize_stack): Remove trailing newlines from help
10476 text. Add "Usage" line to "backtrace" help.
10477
10478 2018-03-26 Tom Tromey <tom@tromey.com>
10479
10480 PR python/16486:
10481 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10482
10483 2018-03-26 Tom Tromey <tom@tromey.com>
10484
10485 * python/py-framefilter.c (py_print_single_arg): Return
10486 EXT_LANG_BT_ERROR from catch.
10487
10488 2018-03-26 Tom Tromey <tom@tromey.com>
10489
10490 PR backtrace/15584:
10491 * stack.c (backtrace_command_1): Move some code into no-filters
10492 "if".
10493
10494 2018-03-26 Tom Tromey <tom@tromey.com>
10495
10496 * python/py-framefilter.c (throw_quit_or_print_exception): New
10497 function.
10498 (gdbpy_apply_frame_filter): Use it.
10499
10500 2018-03-26 Tom Tromey <tom@tromey.com>
10501
10502 PR cli/17716:
10503 * python/py-framefilter.c (py_print_type, py_print_value)
10504 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10505 RETURN_MASK_ERROR.
10506
10507 2018-03-26 Tom Tromey <tom@tromey.com>
10508
10509 * python/py-framefilter.c (enumerate_args): Use
10510 gdb::unique_xmalloc_ptr.
10511
10512 2018-03-26 Tom Tromey <tom@tromey.com>
10513
10514 * python/py-framefilter.c (py_print_frame): Return
10515 EXT_LANG_BT_OK.
10516 (gdbpy_apply_frame_filter): Update comment.
10517 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10518 Remove.
10519 <EXT_LANG_BT_NO_FILTERS>: Change value.
10520
10521 2018-03-26 Tom Tromey <tom@tromey.com>
10522
10523 PR backtrace/15582:
10524 * stack.c (backtrace_command): Parse "hide" argument.
10525 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10526 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10527 constant.
10528
10529 2018-03-26 Tom Tromey <tom@tromey.com>
10530
10531 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10532 add "flags".
10533 (backtrace_command): Remove "fulltrace", add "flags".
10534
10535 2018-03-26 Tom Tromey <tom@tromey.com>
10536
10537 * stack.c (backtrace_command): Rewrite command line parsing.
10538
10539 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10540
10541 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10542
10543 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10544
10545 * filename-seen-cache.h: Add include guard.
10546
10547 2018-03-26 Keith Seitz <keiths@redhat.com>
10548
10549 * symfile.c (place_section): Remove "struct" from section_addr_info
10550 in comment.
10551 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10552 "struct" keyword from section_addr_info.
10553
10554 2018-03-26 Alan Hayward <alan.hayward@arm.com>
10555
10556 * regformats/regdef.h (reg): Add constructors.
10557
10558 2018-03-25 Pedro Alves <palves@redhat.com>
10559
10560 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10561 if then/else bodies in var_func_name extraction.
10562
10563 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
10564
10565 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10566 lookup_minimal_symbol() to find symbol entry.
10567 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10568
10569 2018-03-23 Keith Seitz <keiths@redhat.com>
10570
10571 PR c++/22968
10572 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10573 nested type definitions for C++, too.
10574
10575 2018-03-23 Tom Tromey <tom@tromey.com>
10576
10577 * machoread.c (struct oso_el): Add a constructor. Don't define as
10578 a typedef.
10579 (macho_register_oso): Remove.
10580 (macho_symtab_read): Take a std::vector.
10581 (oso_el_compare_name): Now a std::sort comparator.
10582 (macho_symfile_read_all_oso): Take a std::vector.
10583 (macho_symfile_read): Use std::vector. Remove cleanups.
10584
10585 2018-03-22 Tom Tromey <tom@tromey.com>
10586
10587 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10588 (record_full_goto_bookmark): Use std::string.
10589
10590 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10591
10592 PR tdep/18295
10593 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10594 a single mask.
10595
10596 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10597
10598 * rs6000-tdep.c (store_insn_p): New function.
10599 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10600 and cr_reg to their unshifted values. Use store_insn_p to
10601 match LR saves using either R1 or fdata->alloca_reg. Use
10602 store_insn_p to match CR saves. Set alloca_reg_offset
10603 when alloca_reg and framep are set. Remove lr_reg shift
10604 when assigning to fdata->lr_register.
10605
10606 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
10607
10608 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10609 command line args instead of emitting a warning.
10610
10611 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10612
10613 * tracepoint.h (struct static_tracepoint_marker): Initialize
10614 fields, define default constructor, move constructor and move
10615 assignment, disable the rest.
10616 <str_id, extra>: Make std::string.
10617 (release_static_tracepoint_marker): Remove.
10618 (free_current_marker): Remove.
10619 * tracepoint.c (free_current_marker): Remove.
10620 (parse_static_tracepoint_marker_definition): Adjust to
10621 std::string, use new hex2str overload.
10622 (release_static_tracepoint_marker): Remove.
10623 (print_one_static_tracepoint_marker): Get marker by reference
10624 and adjust to std::string.
10625 (info_static_tracepoint_markers_command): Adjust to std::vector
10626 changes
10627 * target.h (static_tracepoint_marker_p): Remove typedef.
10628 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10629 (struct target_ops) <to_static_tracepoint_marker_at>: Return
10630 bool.
10631 <to_static_tracepoint_markers_by_strid>: Return std::vector.
10632 * target-debug.h
10633 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10634 (target_debug_print_std_vector_static_tracepoint_marker): New.
10635 (target_debug_print_struct_static_tracepoint_marker_p): Rename
10636 to...
10637 (target_debug_print_static_tracepoint_marker_p): ... this.
10638 * target-delegates.c: Re-generate.
10639 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10640 Make std::string.
10641 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10642 (decode_static_tracepoint_spec): Adjust to std::vector.
10643 (tracepoint_print_one_detail): Adjust to std::string.
10644 (strace_marker_decode_location): Adjust to std::string.
10645 (update_static_tracepoint): Adjust to std::string, remove call
10646 to release_static_tracepoint_marker.
10647 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10648 Adjust to std::vector.
10649 * remote.c (remote_static_tracepoint_marker_at): Return bool.
10650 (remote_static_tracepoint_markers_by_strid): Adjust to
10651 std::vector.
10652 * common/rsp-low.h (hex2str): New overload with explicit count
10653 of bytes.
10654 * common/rsp-low.c (hex2str): New overload with explicit count
10655 of bytes.
10656 * unittests/rsp-low-selftests.c (test_hex2str): New function.
10657 (_initialize_rsp_low_selftests): Add test_hex2str test.
10658 * unittests/tracepoint-selftests.c
10659 (test_parse_static_tracepoint_marker_definition): Adjust to
10660 std::string.
10661
10662 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10663
10664 * tracepoint.c (parse_static_tracepoint_marker_definition):
10665 Consider case where the definition is followed by more
10666 definitions.
10667 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10668 tracepoint-selftests.c.
10669 * unittests/tracepoint-selftests.c: New.
10670
10671 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10672
10673 * MAINTAINERS (Write After Approval): Add Pedro Franco de
10674 Carvalho.
10675
10676 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10677
10678 * symtab.c (find_pc_sect_line): fixed indentation.
10679
10680 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10681
10682 * symtab.c (find_pc_sect_line): now uses binary search.
10683
10684 2018-03-19 Tom Tromey <tom@tromey.com>
10685
10686 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10687 "IDENT" production.
10688
10689 2018-03-19 Pedro Alves <palves@redhat.com>
10690 Tom Tromey <tom@tromey.com>
10691
10692 * unittests/observable-selftests.c: New file.
10693 * common/observable.h: New file.
10694 * observable.h: New file.
10695 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10696 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10697 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10698 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10699 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10700 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10701 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10702 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10703 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10704 python/py-breakpoint.c, python/py-finishbreakpoint.c,
10705 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10706 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10707 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10708 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10709 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10710 tui/tui-interp.c, valops.c: Update all users.
10711 * tui/tui-hooks.c (tui_bp_created_observer)
10712 (tui_bp_deleted_observer, tui_bp_modified_observer)
10713 (tui_inferior_exit_observer, tui_before_prompt_observer)
10714 (tui_normal_stop_observer, tui_register_changed_observer):
10715 Remove.
10716 (tui_observers_token): New global.
10717 (attach_or_detach, tui_attach_detach_observers): New functions.
10718 (tui_install_hooks, tui_remove_hooks): Use
10719 tui_attach_detach_observers.
10720 * record-btrace.c (record_btrace_thread_observer): Remove.
10721 (record_btrace_thread_observer_token): New global.
10722 * observer.sh: Remove.
10723 * observer.c: Rename to observable.c.
10724 * observable.c (namespace gdb_observers): Define new objects.
10725 (observer_debug): Move into gdb_observers namespace.
10726 (struct observer, struct observer_list, xalloc_observer_list_node)
10727 (xfree_observer_list_node, generic_observer_attach)
10728 (generic_observer_detach, generic_observer_notify): Remove.
10729 (_initialize_observer): Update.
10730 Don't include observer.inc.
10731 * Makefile.in (generated_files): Remove observer.h, observer.inc.
10732 (clean mostlyclean): Likewise.
10733 (observer.h, observer.inc): Remove targets.
10734 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10735 (COMMON_SFILES): Use observable.c, not observer.c.
10736 * .gitignore: Remove observer.h.
10737
10738 2018-03-18 Tom Tromey <tom@tromey.com>
10739
10740 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10741 gdb::def_vector.
10742 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10743
10744 2018-03-17 Tom Tromey <tom@tromey.com>
10745
10746 * auto-load.c (auto_load_objfile_script_1): Use std::string.
10747
10748 2018-03-17 Tom Tromey <tom@tromey.com>
10749
10750 * target.c (class scoped_target_fd): New.
10751 (target_fileio_close_cleanup): Remove.
10752 (target_fileio_read_alloc_1): Use scoped_target_fd.
10753
10754 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
10755
10756 * silent-rules.mk: New.
10757 * Makefile.in: Include silent-rules.mk
10758 (srcdir, VPATH, top_srcdir): Move up.
10759 (COMPILE): Add ECHO_CXX.
10760 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10761 (init.c): Add ECHO_INIT_C.
10762 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10763 (version.c): Add ECHO_GEN.
10764 (printcmd.o): Add ECHO_CXX.
10765 (target-float.o): Add ECHO_CXX.
10766 (ada-exp.o): Add ECHO_CXX.
10767 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10768 (insight$(EXEEXT)): Add ECHO_CXXLD.
10769 * gnulib/configure.ac: Add AM_SILENT_RULES.
10770 * gnulib/aclocal.m4: Re-generate.
10771 * gnulib/configure: Re-generate.
10772 * gnulib/import/Makefile.in: Re-generate.
10773
10774 2018-03-16 Tom Tromey <tom@tromey.com>
10775
10776 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10777 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10778 * utils.c (do_free_section_addr_info)
10779 (make_cleanup_free_section_addr_info): Remove.
10780 * symfile.h (struct other_sections): Add constructor.
10781 (struct section_addr_info): Remove.
10782 (section_addr_info): New typedef.
10783 (struct sym_fns) <sym_offsets>: Change type of parameter.
10784 (build_section_addr_info_from_objfile)
10785 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10786 (default_symfile_offsets, symbol_file_add)
10787 (symbol_file_add_from_bfd)
10788 (build_section_addr_info_from_section_table): Update.
10789 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10790 * symfile.c (alloc_section_addr_info): Remove.
10791 (build_section_addr_info_from_section_table): Change return type.
10792 Update.
10793 (build_section_addr_info_from_bfd)
10794 (build_section_addr_info_from_objfile): Likewise.
10795 (free_section_addr_info): Remove.
10796 (relative_addr_info_to_section_offsets): Change type of "addrs".
10797 (addrs_section_compar): Now a std::sort comparator.
10798 (addrs_section_sort): Change return type.
10799 (addr_info_make_relative): Change type of "addrs". Update.
10800 (default_symfile_offsets, syms_from_objfile_1)
10801 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10802 (symbol_file_add_separate): Update.
10803 (symbol_file_add): Change type of "addrs". Update.
10804 (add_symbol_file_command): Update. Remove cleanups.
10805 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10806 cleanups.
10807 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10808 * solib.c (solib_read_symbols): Update.
10809 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10810 * machoread.c (macho_symfile_offsets): Update.
10811 * jit.c (jit_bfd_try_read_symtab): Update.
10812
10813 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10814
10815 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10816 unittests/utils-selftests.c.
10817 * unittests/utils-selftests.c: New file.
10818
10819 2018-03-14 Tom Tromey <tom@tromey.com>
10820
10821 PR cli/14977:
10822 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10823 for NULL.
10824
10825 2018-03-14 Tom Tromey <tom@tromey.com>
10826
10827 PR cli/19918:
10828 * printcmd.c (printf_pointer): Allow "-" in format.
10829
10830 2018-03-14 Tom Tromey <tom@tromey.com>
10831
10832 * printcmd.c (_initialize_printcmd): Add usage to printf.
10833
10834 2018-03-14 Yao Qi <qiyao@sourceware.org>
10835
10836 * MAINTAINERS: Update my email address.
10837
10838 2018-03-13 Tom Tromey <tom@tromey.com>
10839
10840 * machoread.c (macho_check_dsym): Change filenamep to a
10841 std::string*.
10842 (macho_symfile_read): Update.
10843 * symfile.c (load_command): Use std::string.
10844
10845 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10846
10847 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10848 to error message string.
10849 (riscv_register_name): Use xsnprintf instead of sprintf.
10850 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10851 internal_error.
10852 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10853 error.
10854 (riscv_push_dummy_call): Likewise.
10855
10856 2018-03-12 Tom Tromey <tom@tromey.com>
10857
10858 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10859 Use gdb::byte_vector.
10860 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10861
10862 2018-03-12 Yao Qi <yao.qi@linaro.org>
10863
10864 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10865 parameter type to readable_regcache.
10866 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10867 the declaration.
10868
10869 2018-03-11 Tom Tromey <tom@tromey.com>
10870
10871 * dwarf2read.c (struct nextfield): Add initializers.
10872 (struct nextfnfield): Remove.
10873 (struct fnfieldlist): Add initializers. Remove "length" and
10874 "head", use std::vector.
10875 (struct decl_field_list): Remove.
10876 (struct field_info): Add initializers.
10877 <fields, baseclasses>: Now std::vector.
10878 <nbaseclasses, nfnfields, typedef_field_list_count,
10879 nested_types_list_count>: Remove.
10880 (dwarf2_add_field, dwarf2_add_type_defn)
10881 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10882 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10883 (process_structure_scope): Update.
10884
10885 2018-03-11 Tom Tromey <tom@tromey.com>
10886
10887 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10888 for use by std::sort.
10889 (build_type_psymtabs_1): Use std::vector.
10890
10891 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10892
10893 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10894 and LIBMPFR in the printed configuration.
10895
10896 2018-03-08 Tom Tromey <tom@tromey.com>
10897
10898 * source.c (get_filename_and_charpos): Use scoped_fd.
10899 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10900 (procfs_pidlist): Likewise.
10901 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10902 (iterate_over_mappings): Likewise.
10903
10904 2018-03-08 Tom Tromey <tom@tromey.com>
10905
10906 * infcall.c (struct call_return_meta_info)
10907 <stack_temporaries_enabled>: Remove.
10908 (get_call_return_value, call_function_by_hand_dummy): Update.
10909 * thread.c (disable_thread_stack_temporaries): Remove.
10910 (enable_thread_stack_temporaries): Remove.
10911 (thread_stack_temporaries_enabled_p): Return bool.
10912 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10913 (get_last_thread_stack_temporary): Update.
10914 * eval.c (evaluate_subexp): Update.
10915 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10916 class, not a function.
10917 (value_ptr, value_vec): Remove typedefs.
10918 (class thread_info) <stack_temporaries_enabled>: Now bool.
10919 <stack_temporaries>: Now a std::vector.
10920 (thread_stack_temporaries_enabled_p)
10921 (value_in_thread_stack_temporaries): Return bool.
10922
10923 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10924
10925 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10926 (getpkt_or_notif_sane_1): Likewise.
10927
10928 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10929
10930 * build-id.c (build_id_to_debug_bfd): Use std::string.
10931
10932 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10933
10934 * build-id.c (find_separate_debug_file_by_buildid): Return
10935 std::string.
10936 * build-id.h (find_separate_debug_file_by_buildid): Return
10937 std::string.
10938 * coffread.c (coff_symfile_read): Adjust to std::string.
10939 * elfread.c (elf_symfile_read): Adjust to std::string.
10940 * symfile.c (separate_debug_file_exists): Change parameter to
10941 std::string.
10942 (find_separate_debug_file): Return std::string.
10943 (find_separate_debug_file_by_debuglink): Return std::string.
10944 * symfile.h (find_separate_debug_file_by_debuglink): Return
10945 std::string.
10946
10947 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10948
10949 * common/xml-utils.c (xml_escape_text): Move code to...
10950 (xml_escape_text_append): ... this new function.
10951 * common/xml-utils.h (xml_escape_text_append): New declaration.
10952 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10953 New function.
10954 (_initialize_xml_utils): register test_xml_escape_text_append as
10955 a selftest.
10956
10957 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10958
10959 * defs.h: Remove MAX_REGISTER_SIZE.
10960 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10961 asserts.
10962 * python/py-unwind.c (pyuw_sniffer): Likewise.
10963
10964 2018-03-07 Tom Tromey <tom@tromey.com>
10965
10966 * linux-tdep.c (linux_info_proc): Update.
10967 * target.h (struct target_ops) <to_fileio_readlink>: Return
10968 optional<string>.
10969 (target_fileio_readlink): Return optional<string>.
10970 * remote.c (remote_hostio_readlink): Return optional<string>.
10971 * inf-child.c (inf_child_fileio_readlink): Return
10972 optional<string>.
10973 * target.c (target_fileio_readlink): Return optional<string>.
10974
10975 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10976
10977 * regcache.c (cooked_read_test): Add riscv to the list of
10978 architectures that have a save_reggroup.
10979
10980 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10981
10982 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10983 value is not a dynamic class object.
10984
10985 2018-03-06 Tom Tromey <tom@tromey.com>
10986
10987 * rust-exp.y: Formatting fixes.
10988
10989 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10990
10991 * riscv-tdep.c (riscv_register_name): Remove target description
10992 support.
10993 (riscv_gdbarch_init): Remove target description check.
10994
10995 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10996
10997 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10998 comment.
10999 * riscv-tdep.h: Likewise.
11000
11001 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11002
11003 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11004 (riscv_pseudo_register_write): Delete.
11005 (riscv_gdbarch_init): Remove all use of pseudo registers.
11006
11007 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11008
11009 * record-btrace.c (btrace_print_lines): Replace cleanup
11010 parameter with RAII equivalents.
11011 (btrace_insn_history): Replace cleanup with RAII equivalents.
11012 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11013 make_cleanup_ui_out_tuple_begin_end): Remove.
11014 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11015 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11016 make_cleanup_ui_out_list_begin_end): Remove.
11017
11018 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11019
11020 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11021 parameter types to std::vector. Use bool.
11022 (record_btrace_wait): Replace VEC(tp_t) with
11023 std::vector<thread_info *>.
11024 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11025
11026 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11027
11028 * record-btrace.c (record_btrace_disable_callback): Remove.
11029 (struct scoped_btrace_disable): New.
11030 (record_btrace_open): Use scoped_btrace_disable.
11031
11032 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11033
11034 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11035 reading values from registers.
11036
11037 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11038
11039 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11040 where appropriate.
11041
11042 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11043
11044 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11045 change parameter type. Use GDB's print functions, and use
11046 core_addr_to_string where appropriate.
11047 (riscv_push_dummy_call): Use core_addr_to_string where
11048 appropriate, update call to riscv_print_arg_location, and reindent
11049 a few lines.
11050 (riscv_return_value): Update call to riscv_print_arg_location.
11051
11052 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11053 Tim Newsome <tim@sifive.com>
11054 Albert Ou <a0u@eecs.berkeley.edu>
11055 Darius Rad <darius@bluespec.com>
11056
11057 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11058 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11059 (ALLDEPFILES): Add riscv-tdep.c
11060 * configure.tgt: Add riscv support.
11061 * riscv-tdep.c: New file.
11062 * riscv-tdep.h: New file.
11063 * NEWS: Mention new target.
11064 * MAINTAINERS: Add entry for riscv.
11065
11066 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11067
11068 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11069 fields within aggregates.
11070
11071 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11072
11073 * record-btrace.c (btrace_print_lines): Change type of flags to
11074 gdb_disassembly_flags.
11075
11076 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11077
11078 * fbsd-nat.c: Include "inf-ptrace.h".
11079 (USE_SIGTRAP_SIGINFO): Conditionally define.
11080 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11081 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11082 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11083 function.
11084 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11085 Likewise.
11086 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11087 Likewise.
11088 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11089 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11090 "supports_stopped_by_hw_breakpoint" target methods.
11091
11092 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11093
11094 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11095 * fbsd-nat.c (debug_fbsd_nat): New variable.
11096 (show_fbsd_nat_debug): New function.
11097 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11098 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11099
11100 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11101
11102 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11103 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11104 prototype.
11105 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11106 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11107 method.
11108
11109 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11110
11111 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11112 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11113
11114 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11115
11116 * charset.c (struct charset_vector): New.
11117 (charsets): Change type to charset_vector.
11118 (find_charset_names): Adjust.
11119 (add_one): Adjust.
11120 (_initialize_charset): Adjust.
11121
11122 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11123
11124 * progspace.h (struct program_space) <deleted_solibs>: Change
11125 type to std::vector<std::string>.
11126 * progspace.c (clear_program_space_solib_cache): Adjust.
11127 * breakpoint.c (print_solib_event): Adjust.
11128 (check_status_catch_solib): Adjust.
11129 * solib.c (update_solib_list): Adjust.
11130 * ui-out.h (class ui_out) <field_string>: New overload.
11131 * ui-out.c (ui_out::field_string): New overload.
11132
11133 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11134
11135 * progspace.h (struct program_space): Add constructor and
11136 destructor, initialize fields.
11137 (add_program_space): Remove.
11138 * progspace.c (add_program_space): Rename to...
11139 (program_space::program_space): ... this.
11140 (release_program_space): Rename to...
11141 (program_space::~program_space): ... this.
11142 (delete_program_space): Use delete to delete program_space.
11143 (initialize_progspace): Use new to allocate program_space.
11144 * inferior.c (add_inferior_with_spaces): Likewise.
11145 (clone_inferior_command): Likewise.
11146 * infrun.c (follow_fork_inferior): Likewise.
11147 (handle_vfork_child_exec_or_exit): Likewise.
11148
11149 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11150
11151 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11152 (delim_string_to_char_ptr_vec): Return std::vector of
11153 gdb::unique_xmalloc_ptr.
11154 (dirnames_to_char_ptr_vec_append): Take std::vector of
11155 gdb::unique_xmalloc_ptr.
11156 (dirnames_to_char_ptr_vec): Return std::vector of
11157 gdb::unique_xmalloc_ptr.
11158 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11159 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11160 (delim_string_to_char_ptr_vec): Return an std::vector of
11161 gdb::unique_xmalloc_ptr, adjust the code.
11162 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11163 gdb::unique_xmalloc_ptr, adjust the code.
11164 (dirnames_to_char_ptr_vec): Return an std::vector of
11165 gdb::unique_xmalloc_ptr, adjust the code.
11166 * auto-load.c (auto_load_safe_path_vec): Change type to
11167 std::vector of gdb::unique_xmalloc_ptr.
11168 (auto_load_expand_dir_vars): Return an std::vector of
11169 gdb::unique_xmalloc_ptr, adjust the code.
11170 (auto_load_safe_path_vec_update): Adjust.
11171 (filename_is_in_auto_load_safe_path_vec): Adjust.
11172 (auto_load_objfile_script_1): Adjust.
11173 * build-id.c (build_id_to_debug_bfd): Adjust.
11174 * linux-thread-db.c (thread_db_load_search): Adjust.
11175 * source.c (add_path): Adjust.
11176 (openp): Adjust.
11177 * symfile.c (find_separate_debug_file): Adjust.
11178 * utils.c (do_free_char_ptr_vec): Remove.
11179 (make_cleanup_free_char_ptr_vec): Remove.
11180
11181 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11182
11183 PR gdb/22907
11184 * common/pathstuff.c: Conditionally include "<windows.h>".
11185
11186 2018-03-01 Georg Sauthoff <mail@georg.so>
11187
11188 PR gdb/22888
11189 * gcore.in: Quote variables and switch interpreter to bash.
11190
11191 2018-03-01 Tom Tromey <tom@tromey.com>
11192
11193 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11194 assertion. Add assertion for discriminant_index.
11195 (quirk_rust_enum): Use correct base type name in univariant case.
11196
11197 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11198
11199 * record.c (get_call_history_modifiers): Return a
11200 record_print_flags.
11201 (cmd_record_call_history): Adjust.
11202 * record-btrace.c (record_btrace_call_history): Adjust.
11203 (record_btrace_call_history_range): Adjust.
11204 (record_btrace_call_history_from): Adjust.
11205 * target-debug.h (target_debug_print_record_print_flags): New.
11206 * target-delegates.c: Re-generate.
11207 * target.c (target_call_history): Change flags type.
11208 (target_call_history_from): Likewise.
11209 (target_call_history_range): Likewise.
11210 * target.h (struct target_ops) <target_call_history>: Likewise.
11211 (target_call_history_from): Likewise.
11212 (target_call_history_range): Likewise.
11213
11214 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11215 Simon Marchi <simon.marchi@polymtl.ca>
11216
11217 * common/common-utils.c: Include "sys/stat.h".
11218 (is_regular_file): Move here from "source.c"; change return
11219 type to "bool".
11220 * common/common-utils.h (is_regular_file): New prototype.
11221 * common/pathstuff.c (contains_dir_separator): New function.
11222 * common/pathstuff.h (contains_dir_separator): New prototype.
11223 * source.c: Don't include "sys/stat.h".
11224 (is_regular_file): Move to "common/common-utils.c".
11225
11226 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11227
11228 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11229 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11230 * auto-load.c: Include "common/pathstuff.h".
11231 * common/common-def.h (current_directory): Move here.
11232 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11233 function.
11234 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11235 prototype.
11236 * common/pathstuff.c: New file.
11237 * common/pathstuff.h: New file.
11238 * compile/compile.c: Include "common/pathstuff.h".
11239 * defs.h (current_directory): Move to "common/common-defs.h".
11240 * dwarf2read.c: Include "common/pathstuff.h".
11241 * exec.c: Likewise.
11242 * guile/scm-safe-call.c: Likewise.
11243 * linux-thread-db.c: Likewise.
11244 * main.c: Likewise.
11245 * nto-tdep.c: Likewise.
11246 * objfiles.c: Likewise.
11247 * source.c: Likewise.
11248 * symtab.c: Likewise.
11249 * utils.c: Include "common/pathstuff.h".
11250 (gdb_realpath): Move to "common/pathstuff.c".
11251 (gdb_realpath_keepfile): Likewise.
11252 (gdb_abspath): Likewise.
11253 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11254 (gdb_realpath_keepfile): Likewise.
11255 (gdb_abspath): Likewise.
11256
11257 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11258
11259 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11260 wildcard process pid for super_resume for kernels with a
11261 specific bug.
11262
11263 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11264
11265 * compile/compile.c (get_args): Add additional comments
11266 explaining function.
11267
11268 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11269 Tom Tromey <tom@tromey.com>
11270
11271 * target.h (memory_write_request_s): Remove typedef. Don't define
11272 VEC.
11273 (target_write_memory_blocks): Change argument to std::vector.
11274 (struct memory_write_request): Add constructor.
11275 * target-memory.c (compare_block_starting_address): Return bool.
11276 Change argument types.
11277 (claim_memory): Change arguments to use std::vector.
11278 (split_regular_and_flash_blocks, blocks_to_erase)
11279 (compute_garbled_blocks): Likewise.
11280 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11281 (target_write_memory_blocks): Change argument to std::vector.
11282 * symfile.c (struct load_section_data): Add constructor and
11283 destructor. Use std::vector for "requests".
11284 (struct load_progress_data): Add initializers.
11285 (load_section_callback): Update. Use "new".
11286 (clear_memory_write_data): Remove.
11287 (generic_load): Update.
11288
11289 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11290
11291 * arch/aarch64.h: Use common/tdesc.h.
11292
11293 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11294
11295 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11296 architecture with a 64-bit ABI.
11297
11298 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11299
11300 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11301 ahead of target description loading.
11302
11303 2018-02-26 Tom Tromey <tom@tromey.com>
11304
11305 * stack.c (backtrace_command_1): Update.
11306 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11307 of "flags".
11308 * python/py-framefilter.c (py_print_frame)
11309 (gdbpy_apply_frame_filter): Change type of "flags".
11310 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11311 of "flags".
11312 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11313 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11314 * extension.h (enum frame_filter_flag): Rename from
11315 frame_filter_flags.
11316 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11317 (apply_ext_lang_frame_filter): Change type of "flags".
11318 * extension.c (apply_ext_lang_frame_filter): Change type of
11319 "flags".
11320 * extension-priv.h (struct extension_language_ops)
11321 <apply_frame_filter>: Change type of "flags".
11322
11323 2018-02-26 Tom Tromey <tom@tromey.com>
11324
11325 PR python/16497:
11326 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11327 off-by-one in py_end computation.
11328 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11329 PRINT_MORE_FRAMES.
11330 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11331 constant.
11332
11333 2018-02-26 Tom Tromey <tom@tromey.com>
11334
11335 * dwarf2read.c (struct variant_field): New.
11336 (struct nextfield) <variant>: New field.
11337 (dwarf2_add_field): Handle DW_TAG_variant_part.
11338 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11339 discriminated union.
11340 (read_structure_type): Handle DW_TAG_variant_part.
11341 (handle_struct_member_die): New function, extracted from
11342 process_structure_scope. Handle DW_TAG_variant.
11343 (process_structure_scope): Handle discriminated unions. Call
11344 handle_struct_member_die.
11345
11346 2018-02-26 Tom Tromey <tom@tromey.com>
11347
11348 * rust-lang.h (rust_last_path_segment): Declare.
11349 * rust-lang.c (rust_last_path_segment): Now public. Change
11350 contract.
11351 (struct disr_info): Remove.
11352 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11353 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11354 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11355 (rust_enum_p, rust_enum_variant): New function.
11356 (rust_underscore_fields): Remove "offset" parameter.
11357 (rust_print_enum): New function.
11358 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11359 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11360 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11361 enums.
11362 (rust_internal_print_type): New function, from rust_print_type.
11363 Remove enum code.
11364 (rust_print_type): Call rust_internal_print_type.
11365 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11366 Update enum handling.
11367 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11368 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11369 (rust_union_quirks): New functions.
11370 (process_full_comp_unit, process_full_type_unit): Call
11371 rust_union_quirks.
11372 (process_structure_scope): Update rust_unions if necessary.
11373
11374 2018-02-26 Tom Tromey <tom@tromey.com>
11375
11376 * value.h (value_union_variant): Declare.
11377 * valops.c (value_union_variant): New function.
11378 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11379 (struct discriminant_info): New.
11380 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11381 enumerator.
11382 (struct main_type) <flag_discriminated_union>: New field.
11383
11384 2018-02-26 Tom Tromey <tom@tromey.com>
11385
11386 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11387 unittests/unpack-selftests.c.
11388 * unittests/unpack-selftests.c: New file.
11389 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11390
11391 2018-02-26 Yao Qi <yao.qi@linaro.org>
11392
11393 * dwarf2read.c (struct partial_die_info) <read>: New method.
11394 (read_partial_die): Remove the declaration.
11395 (load_partial_dies): Update.
11396 (partial_die_info::partial_die_info):
11397 (read_partial_die): Change it to partial_die_info::read.
11398
11399 2018-02-26 Yao Qi <yao.qi@linaro.org>
11400
11401 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11402 (fixup_partial_die): Remove declaration.
11403 (scan_partial_symbols): Update.
11404 (partial_die_parent_scope): Likewise.
11405 (partial_die_full_name): Likewise.
11406 (fixup_partial_die): Change it to partial_die_info::fixup.
11407
11408 2018-02-26 Yao Qi <yao.qi@linaro.org>
11409
11410 * dwarf2read.c (read_partial_die): Update the declaration.
11411 (load_partial_dies): Caller update.
11412 (read_partial_die): Remove one argument abbrev_len.
11413
11414 2018-02-26 Yao Qi <yao.qi@linaro.org>
11415
11416 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11417 assignment operator.
11418 (load_partial_dies): Use ctor and copy ctor.
11419 (read_partial_die): Update.
11420 (dwarf2_cu::find_partial_die): Use ctor.
11421
11422 2018-02-26 Yao Qi <yao.qi@linaro.org>
11423
11424 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11425 (find_partial_die_in_comp_unit): Change it to
11426 dwarf2_cu::find_partial_die.
11427 (find_partial_die): Update.
11428
11429 2018-02-26 Yao Qi <yao.qi@linaro.org>
11430
11431 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11432 is NULL.
11433
11434 2018-02-26 Yao Qi <yao.qi@linaro.org>
11435
11436 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11437
11438 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11439
11440 * arch/amd64.h: Use common/tdesc.h.
11441 * arch/i386.c: Likewise.
11442 * arch/i386.h: Likewise.
11443 * arch/tic6x.c: Likewise.
11444 * arch/tdesc.h: Move file from here...
11445 * common/tdesc.h: ...to here.
11446 * features/aarch64-core.c: Regenerate.
11447 * features/aarch64-fpu.c: Regenerate.
11448 * features/i386/32bit-avx.c: Regenerate.
11449 * features/i386/32bit-avx512.c: Regenerate.
11450 * features/i386/32bit-core.c: Regenerate.
11451 * features/i386/32bit-linux.c: Regenerate.
11452 * features/i386/32bit-mpx.c: Regenerate.
11453 * features/i386/32bit-pkeys.c: Regenerate.
11454 * features/i386/32bit-sse.c: Regenerate.
11455 * features/i386/64bit-avx.c: Regenerate.
11456 * features/i386/64bit-avx512.c: Regenerate.
11457 * features/i386/64bit-core.c: Regenerate.
11458 * features/i386/64bit-linux.c: Regenerate.
11459 * features/i386/64bit-mpx.c: Regenerate.
11460 * features/i386/64bit-pkeys.c: Regenerate.
11461 * features/i386/64bit-segments.c: Regenerate.
11462 * features/i386/64bit-sse.c: Regenerate.
11463 * features/i386/x32-core.c: Regenerate.
11464 * features/tic6x-c6xp.c: Regenerate.
11465 * features/tic6x-core.c: Regenerate.
11466 * features/tic6x-gp.c: Regenerate.
11467 * target-descriptions.c: Use common/tdesc.h.
11468 * target-descriptions.h: Likewise.
11469
11470 2018-02-24 Tom Tromey <tom@tromey.com>
11471
11472 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11473 (try_thread_db_load_from_dir, thread_db_load_search): Use
11474 std::string.
11475 (info_auto_load_libthread_db_compare): Return bool. Change
11476 argument types.
11477 (info_auto_load_libthread_db): Use std::vector, std::string.
11478 Remove cleanups.
11479
11480 2018-02-24 Tom Tromey <tom@tromey.com>
11481
11482 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11483 std::string.
11484 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11485 std::string*.
11486 * gdbarch.c: Rebuild.
11487 * gdbarch.h: Rebuild.
11488 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11489 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11490 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11491 std::string*.
11492
11493 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11494
11495 * gdbtypes.h (sect_offset): Change type to uint64_t.
11496 (sect_offset_str): New function.
11497 * dwarf2read.c (create_addrmap_from_aranges): Use
11498 sect_offset_str.
11499 (error_check_comp_unit_head): Likewise.
11500 (create_debug_type_hash_table): Likewise.
11501 (read_cutu_die_from_dwo): Likewise.
11502 (init_cutu_and_read_dies): Likewise.
11503 (init_cutu_and_read_dies_no_follow): Likewise.
11504 (process_psymtab_comp_unit_reader): Likewise.
11505 (partial_die_parent_scope): Likewise.
11506 (peek_die_abbrev): Likewise.
11507 (process_queue): Likewise.
11508 (dwarf2_physname): Likewise.
11509 (read_namespace_alias): Likewise.
11510 (read_import_statement): Likewise.
11511 (create_dwo_cu_reader): Likewise.
11512 (create_cus_hash_table): Likewise.
11513 (lookup_dwo_cutu): Likewise.
11514 (inherit_abstract_dies): Likewise.
11515 (read_func_scope): Likewise.
11516 (read_call_site_scope): Likewise.
11517 (dwarf2_add_member_fn): Likewise.
11518 (read_common_block): Likewise.
11519 (read_module_type): Likewise.
11520 (read_typedef): Likewise.
11521 (read_subrange_type): Likewise.
11522 (load_partial_dies): Likewise.
11523 (read_partial_die): Likewise.
11524 (find_partial_die): Likewise.
11525 (read_str_index): Likewise.
11526 (dwarf2_string_attr): Likewise.
11527 (build_error_marker_type): Likewise.
11528 (lookup_die_type): Likewise.
11529 (dump_die_shallow): Likewise.
11530 (follow_die_ref): Likewise.
11531 (dwarf2_fetch_die_loc_sect_off): Likewise.
11532 (dwarf2_fetch_constant_bytes): Likewise.
11533 (follow_die_sig): Likewise.
11534 (get_signatured_type): Likewise.
11535 (get_DW_AT_signature_type): Likewise.
11536 (dwarf2_find_containing_comp_unit): Likewise.
11537 (set_die_type): Likewise.
11538
11539 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11540
11541 * arch/aarch64.c: Include "common-defs.h".
11542 * arch/amd64.c: Likewise.
11543 * arch/i386.c: Likewise.
11544
11545 2018-02-21 Tom Tromey <tom@tromey.com>
11546
11547 * value.h: (extract_field_op): Update.
11548 * eval.c (extract_field_op): Return a const char *.
11549 * expression.h (parse_expression_for_completion): Update.
11550 * completer.c (complete_expression): Update.
11551 (add_struct_fields): Make fieldname const.
11552 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11553 (mark_completion_tag, parse_exp_in_context_1): Update.
11554 (parse_expression_for_completion): Change "name" to
11555 unique_xmalloc_ptr*.
11556
11557 2018-02-21 Tom Tromey <tom@tromey.com>
11558
11559 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11560
11561 2018-02-21 Yao Qi <yao.qi@linaro.org>
11562
11563 * avr-tdep.c (avr_read_pc): Change parameter type to
11564 readable_regcache.
11565 * gdbarch.sh (read_pc): Likewise.
11566 * gdbarch.c: Re-generated.
11567 * gdbarch.h: Re-generated.
11568 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11569 readable_regcache.
11570 * ia64-tdep.c (ia64_read_pc): Likewise.
11571 * mips-tdep.c (mips_read_pc): Likewise.
11572 * spu-tdep.c (spu_read_pc): Likewise.
11573
11574 2018-02-21 Yao Qi <yao.qi@linaro.org>
11575
11576 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11577 * regcache-dump.c: New file.
11578 * regcache.c: Move register_dump to regcache-dump.c.
11579 (maintenance_print_registers): Likewise.
11580 (maintenance_print_raw_registers): Likewise.
11581 (maintenance_print_cooked_registers): Likewise.
11582 (maintenance_print_register_groups): Likewise.
11583 (maintenance_print_remote_registers): Likewise.
11584 (_initialize_regcache): Likewise.
11585 * regcache.h (register_dump): Moved from regcache.c.
11586
11587 2018-02-21 Yao Qi <yao.qi@linaro.org>
11588
11589 * regcache.c (regcache::regcache): Update.
11590 (regcache::invalidate): Move it to detached_regcache::invalidate.
11591 (get_thread_arch_aspace_regcache): Update.
11592 (regcache::raw_update): Update.
11593 (regcache::cooked_read): Remove some code.
11594 (regcache::cooked_read_value): Likewise.
11595 (regcache::raw_write): Remove assert on m_readonly_p.
11596 (regcache::raw_supply_integer): Move it to
11597 detached_regcache::raw_supply_integer.
11598 (regcache::raw_supply_zeroed): Likewise.
11599 * regcache.h (detached_regcache) <raw_supply_integer>: New
11600 declaration.
11601 <raw_supply_zeroed, invalidate>: Likewise.
11602 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11603 <invalidate>: Likewise.
11604 <m_readonly_p>: Removed.
11605
11606 2018-02-21 Yao Qi <yao.qi@linaro.org>
11607
11608 * infcmd.c (get_return_value): Let stop_regs point to
11609 get_current_regcache.
11610 * regcache.c (regcache::regcache): Remove.
11611 (register_dump_reg_buffer): New class.
11612 (regcache_print): Adjust.
11613 * regcache.h (regcache): Remove constructors.
11614
11615 2018-02-21 Yao Qi <yao.qi@linaro.org>
11616
11617 * regcache.c (class register_dump): New class.
11618 (register_dump_regcache, register_dump_none): New class.
11619 (register_dump_remote, register_dump_groups): New class.
11620 (regcache_print): Update.
11621 * regcache.h (regcache_dump_what): Move it to regcache.c.
11622 (regcache) <dump>: Remove.
11623
11624 2018-02-21 Yao Qi <yao.qi@linaro.org>
11625
11626 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11627 reg_buffer_rw *.
11628 (jit_unwind_reg_set_impl): Call raw_supply.
11629 (jit_frame_sniffer): Use reg_buffer_rw.
11630 * record-full.c (record_full_core_regbuf): Change its type.
11631 (record_full_core_open_1): Use reg_buffer_rw.
11632 (record_full_close): Likewise.
11633 (record_full_core_fetch_registers): Use regcache->raw_supply.
11634 (record_full_core_store_registers): Likewise.
11635 * regcache.c (regcache::get_register_status): Move it to
11636 reg_buffer.
11637 (regcache_raw_set_cached_value): Remove.
11638 (regcache::raw_set_cached_value): Remove.
11639 (regcache::raw_write): Call raw_supply.
11640 (regcache::raw_supply): Move it to reg_buffer_rw.
11641 * regcache.h (regcache_raw_set_cached_value): Remove.
11642 (reg_buffer_rw): New class.
11643
11644 2018-02-21 Yao Qi <yao.qi@linaro.org>
11645
11646 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11647 readonly_detached_regcache.
11648 (dummy_frame_prev_register): Use regcache->cooked_read.
11649 * frame.c (frame_save_as_regcache): Change return type.
11650 (frame_pop): Update.
11651 * frame.h (frame_save_as_regcache): Update declaration.
11652 * inferior.h (get_infcall_suspend_state_regcache): Update
11653 declaration.
11654 * infrun.c (infcall_suspend_state) <registers>: use
11655 readonly_detached_regcache.
11656 (save_infcall_suspend_state): Don't use regcache_dup.
11657 (get_infcall_suspend_state_regcache): Change return type.
11658 * linux-fork.c (struct fork_info) <savedregs>: Change to
11659 readonly_detached_regcache.
11660 <pc>: New field.
11661 (fork_save_infrun_state): Don't use regcache_dup.
11662 (info_checkpoints_command): Adjust.
11663 * mi/mi-main.c (register_changed_p): Update declaration.
11664 (mi_cmd_data_list_changed_registers): Use
11665 readonly_detached_regcache.
11666 (register_changed_p): Change parameter type to
11667 readonly_detached_regcache.
11668 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11669 readonly_detached_regcache.
11670 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11671 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11672 New.
11673 (regcache::save): Move it to reg_buffer.
11674 (regcache::restore): Change parameter type.
11675 (regcache_dup): Remove.
11676 * regcache.h (reg_buffer) <save>: New method.
11677 (readonly_detached_regcache): New class.
11678 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11679 readonly_detached_regcache.
11680 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11681
11682 2018-02-21 Yao Qi <yao.qi@linaro.org>
11683
11684 * frame.c (frame_save_as_regcache): Use regcache method save.
11685 (frame_pop): Use regcache method restore.
11686 * infrun.c (restore_infcall_suspend_state): Likewise.
11687 * linux-fork.c (fork_load_infrun_state): Likewise.
11688 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11689 save.
11690 * regcache.c (regcache_save): Remove.
11691 (regcache::restore): More asserts.
11692 (regcache_cpy): Remove.
11693 * regcache.h (regcache_save): Remove the declaration.
11694 (regcache::restore): Move from private to public.
11695 Remove the friend declaration of regcache_cpy.
11696 (regcache_cpy): Remove declaration.
11697
11698 2018-02-21 Yao Qi <yao.qi@linaro.org>
11699
11700 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11701 parameter type to 'readable_regcache *'.
11702 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11703 * arm-tdep.c (arm_neon_quad_read): Likewise.
11704 (arm_pseudo_read): Likewise.
11705 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11706 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11707 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11708 * gdbarch.c: Re-generated.
11709 * gdbarch.h: Re-generated.
11710 * gdbarch.sh (pseudo_register_read): Change parameter type to
11711 'readable_regcache *'.
11712 (pseudo_register_read_value): Likewise.
11713 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11714 (h8300_pseudo_register_read): Likewise.
11715 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11716 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11717 (i386_pseudo_register_read_into_value): Likewise.
11718 (i386_pseudo_register_read_value): Likewise.
11719 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11720 declaration.
11721 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11722 * m32c-tdep.c (m32c_raw_read): Likewise.
11723 (m32c_read_flg): Likewise.
11724 (m32c_banked_register): Likewise.
11725 (m32c_banked_read): Likewise.
11726 (m32c_sb_read): Likewise.
11727 (m32c_part_read): Likewise.
11728 (m32c_cat_read): Likewise.
11729 (m32c_r3r2r1r0_read): Likewise.
11730 (m32c_pseudo_register_read): Likewise.
11731 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11732 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11733 (mep_pseudo_cr64_read): Likewise.
11734 (mep_pseudo_register_read): Likewise.
11735 * mips-tdep.c (mips_pseudo_register_read): Likewise.
11736 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11737 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11738 * regcache.c (regcache::raw_read): Move it to readable_regcache.
11739 (regcache::cooked_read): Likewise.
11740 (regcache::cooked_read_value): Likewise.
11741 (regcache_cooked_read_signed):
11742 (regcache::cooked_read): Likewise.
11743 * regcache.h (readable_regcache): New class.
11744 (regcache): Inherit readable_regcache. Move some methods to
11745 readable_regcache.
11746 * rl78-tdep.c (rl78_pseudo_register_read): Change
11747 parameter type to 'readable_regcache *'.
11748 * rs6000-tdep.c (do_regcache_raw_read): Remove.
11749 (e500_pseudo_register_read): Change parameter type to
11750 'readable_regcache *'.
11751 (dfp_pseudo_register_read): Likewise.
11752 (vsx_pseudo_register_read): Likewise.
11753 (efpr_pseudo_register_read): Likewise.
11754 * s390-tdep.c (s390_pseudo_register_read): Likewise.
11755 * sh-tdep.c (sh_pseudo_register_read): Likewise.
11756 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11757 (sh64_pseudo_register_read): Likewise.
11758 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11759 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11760 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11761 (spu_pseudo_register_read): Likewise.
11762 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11763 (xtensa_pseudo_register_read): Likewise.
11764
11765 2018-02-21 Yao Qi <yao.qi@linaro.org>
11766
11767 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11768 (regcache::arch): Move it to reg_buffer::arch.
11769 (regcache::register_buffer): Likewise.
11770 (regcache::assert_regnum): Likewise.
11771 (regcache::num_raw_registers): Likewise.
11772 * regcache.h (reg_buffer): New class.
11773 (regcache): Inherit reg_buffer.
11774
11775 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11776
11777 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11778 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11779
11780 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11781
11782 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11783
11784 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11785
11786 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11787 (SFILES): Remove common/*.c files.
11788 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11789 * common/common.host: Add common reference.
11790 * configure.ac: Likewise.
11791 * configure: Regenerate.
11792
11793 2018-02-16 Yao Qi <yao.qi@linaro.org>
11794
11795 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11796 (block_initialize_namespace): Use new.
11797 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11798 (dwarf2_free_objfile): Use delete.
11799 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11800 (copy_type_recursive): Use new.
11801 * gdb_obstack.h (allocate_on_obstack): New.
11802
11803 2018-02-15 Yao Qi <yao.qi@linaro.org>
11804
11805 PR gdb/22849
11806 * inferior.c (exit_inferior_1): Reset inf->control.
11807
11808 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11809
11810 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11811 declaration.
11812
11813 2018-02-14 Pedro Alves <palves@redhat.com>
11814
11815 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11816 frame_cleanup_after_sniffer on exception.
11817
11818 2018-02-14 Tom Tromey <tom@tromey.com>
11819
11820 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11821 const.
11822 (solib_bfd_open): Make pathname const.
11823 * solib.c (solib_bfd_open): Make pathname const.
11824 * solib-spu.c (spu_bfd_fopen): Make name const.
11825 (spu_bfd_open): Make pathname const.
11826 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11827 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11828
11829 2018-02-14 Tom Tromey <tom@tromey.com>
11830
11831 * symfile.c (symfile_bfd_open): Update.
11832 * source.h (openp, source_full_path_of, find_and_open_source):
11833 Change argument type to unique_xmalloc_ptr.
11834 * source.c (openp): Take a unique_xmalloc_ptr.
11835 (source_full_path_of, find_and_open_source): Likewise.
11836 (open_source_file, symtab_to_fullname): Update.
11837 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11838 unique_xmalloc_ptr.
11839 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11840 (exec_file_find): Update.
11841 * psymtab.c (psymtab_to_fullname): Update.
11842 * nto-tdep.h (nto_find_and_open_solib): Update.
11843 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11844 unique_xmalloc_ptr.
11845 * exec.c (exec_file_attach): Update.
11846 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11847 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11848
11849 2018-02-14 Tom Tromey <tom@tromey.com>
11850
11851 * solib.c: Include source.h.
11852 * nto-tdep.c: Include source.h.
11853 * mi/mi-cmd-env.c: Include source.h.
11854 * infcmd.c: Include source.h.
11855 * exec.c: Include source.h.
11856 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11857 (add_path, directory_switch, source_path, init_source_path): Move
11858 declarations...
11859 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11860 (add_path, directory_switch, source_path, init_source_path):
11861 ...here.
11862
11863 2018-02-14 Tom Tromey <tom@tromey.com>
11864
11865 * solist.h (exec_file_find, solib_find): Return
11866 unique_xmalloc_ptr.
11867 (solib_bfd_fopen): Take a const char *.
11868 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11869 (exec_file_find, solib_find): Likewise.
11870 (solib_bfd_fopen): Do not take ownership of "pathname".
11871 (solib_bfd_open): Use unique_xmalloc_ptr.
11872 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11873 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11874 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11875 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11876
11877 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11878
11879 * ada-lang.c (name_match_type_from_name): Remove reference to
11880 ada_name_for_lookup in function's documentation.
11881 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11882
11883 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11884
11885 * defs.h (enum openp_flags): New enum.
11886 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11887 Move to enum openp_flags.
11888 (openp_flags): New enum flags.
11889 (openp): Change parameter type to openp_flags.
11890 * source.c (openp): Change parameter type to openp_flags.
11891 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11892 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11893
11894 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11895
11896 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11897 per-command.
11898
11899 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11900
11901 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11902 into...
11903 (class dwarf2_queue_guard): ...the destructor of this new class.
11904 (dw2_do_instantiate_symtab): Create instance of the new class
11905 dwarf2_queue_guard, remove cleanup.
11906
11907 2018-02-09 Tom Tromey <tom@tromey.com>
11908
11909 * source.c (find_source_lines): Don't reference past the end of
11910 the vector.
11911
11912 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11913
11914 * remote.c (remote_btrace_maybe_reopen): Change error message.
11915 * btrace.c (btrace_enable): Likewise.
11916 (parse_xml_btrace): Likewise.
11917 (parse_xml_btrace_conf): Likewise.
11918
11919 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11920
11921 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11922 (linux_enable_pt, linux_enable_bts): Call
11923 diagnose_perf_event_open_fail.
11924
11925 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11926
11927 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11928 Remove parameter and change return type. Update callers. Move it.
11929 (linux_enable_bts, linux_enable_pt): Improve error message.
11930 (linux_enable_pt): Remove zero buffer size check.
11931 (linux_enable_btrace): Improve error messages. Remove NULL return
11932 check.
11933
11934 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11935
11936 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11937 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11938 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11939 (linux_supports_pt, linux_supports_btrace): Remove.
11940 (linux_enable_bts): Call cpu_supports_bts.
11941 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11942 * remote.c (remote_supports_btrace): Remove.
11943 (init_remote_ops): Remove remote_supports_btrace.
11944 * target-delegates.c: Regenerated.
11945 * target.c (target_supports_btrace): Remove.
11946 * target.h (target_ops) <to_supports_btrace>: Remove
11947 (target_supports_btrace): Remove.
11948 * x86-linux-nat.c (x86_linux_create_target): Remove
11949 linux_supports_btrace.
11950
11951 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11952
11953 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11954 btrace failed.
11955 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11956 exception and use message in own exception.
11957
11958 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11959
11960 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11961 (perf_event_pt_event_type): Use gdb_file_up.
11962 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11963 scoped_fd, and scoped_mmap.
11964
11965 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11966
11967 * common/scoped_mmap.h: New.
11968 * unittests/scoped_mmap-selftest.c: New.
11969 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11970 unittests/scoped_mmap-selftest.c.
11971
11972 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11973
11974 * common/scoped_fd.h: New.
11975 * unittests/scoped_fd-selftest.c: New.
11976 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11977 unittests/scoped_fd-selftest.c.
11978
11979 2018-02-09 Tom Tromey <tom@tromey.com>
11980
11981 * auto-load.c (auto_load_section_scripts): Use
11982 gdb::unique_xmalloc_ptr.
11983
11984 2018-02-09 Tom Tromey <tom@tromey.com>
11985
11986 * auto-load.c (execute_script_contents): Use std::string.
11987
11988 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11989
11990 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11991 Python function, rather than a new command.
11992
11993 2018-02-08 Tom Tromey <tom@tromey.com>
11994
11995 * solib.c (solib_find_1): Use std::string.
11996 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11997
11998 2018-02-08 Tom Tromey <tom@tromey.com>
11999
12000 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12001
12002 2018-02-08 Tom Tromey <tom@tromey.com>
12003
12004 * source.c (find_source_lines): Use gdb::def_vector.
12005
12006 2018-02-08 Tom Tromey <tom@tromey.com>
12007
12008 * macrocmd.c (struct temporary_macro_definition): New.
12009 (macro_define_command): Use temporary_macro_definition. Remove
12010 cleanups.
12011 (free_macro_definition_ptr): Remove.
12012
12013 2018-02-08 Tom Tromey <tom@tromey.com>
12014
12015 * macroexp.c (maybe_expand): Use std::string.
12016
12017 2018-02-08 Tom Tromey <tom@tromey.com>
12018
12019 * macroexp.c (struct macro_buffer): Add initializers for some
12020 members.
12021 (init_buffer, init_shared_buffer, free_buffer)
12022 (free_buffer_return_text): Remove.
12023 (macro_buffer): New constructors.
12024 (~macro_buffer): New destructor.
12025 (macro_buffer::set_shared): New method.
12026 (macro_buffer::resize_buffer, macro_buffer::appendc)
12027 (macro_buffer::appendmem): Now methods, not free functions.
12028 (set_token, append_tokens_without_splicing, stringify)
12029 (macro_stringify): Update.
12030 (gather_arguments): Change return type. Remove argc_p argument,
12031 add args_ptr argument. Use std::vector.
12032 (substitute_args): Remove argc argument. Accept std::vector.
12033 (expand): Update. Use std::vector.
12034 (scan, macro_expand, macro_expand_next): Update.
12035
12036 2018-02-08 Tom Tromey <tom@tromey.com>
12037
12038 * symtab.c (default_collect_symbol_completion_matches_break_on):
12039 Use unique_xmalloc_ptr.
12040 * macroscope.h: (sal_macro_scope, user_macro_scope)
12041 (default_macro_scope): Return unique_xmalloc_ptr.
12042 * macroscope.c (sal_macro_scope, user_macro_scope)
12043 (default_macro_scope): Return unique_xmalloc_ptr.
12044 * macroexp.h (macro_expand, macro_expand_once): Return
12045 unique_xmalloc_ptr.
12046 * macroexp.c (macro_expand, macro_expand_once): Return
12047 unique_xmalloc_ptr.
12048 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12049 (info_macro_command, info_macros_command): Use
12050 unique_xmalloc_ptr.
12051 * compile/compile-c-support.c (write_macro_definitions): Use
12052 unique_xmalloc_ptr.
12053 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12054
12055 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12056
12057 * value.c (value_static_field): Assign field type instead of
12058 containing type when returning an optimized out value.
12059
12060 2018-02-06 Yao Qi <yao.qi@linaro.org>
12061
12062 * ft32-tdep.c (ft32_read_pc): Remove.
12063 (ft32_write_pc): Remove.
12064 (ft32_gdbarch_init): Update.
12065 * m32r-tdep.c (m32r_read_pc): Remove.
12066 (m32r_gdbarch_init): Update.
12067 * mep-tdep.c (mep_read_pc): Remove.
12068 (mep_gdbarch_init): Update.
12069 * microblaze-tdep.c (microblaze_write_pc): Remove.
12070 (microblaze_gdbarch_init): Update.
12071 * mn10300-tdep.c (mn10300_read_pc): Remove.
12072 (mn10300_write_pc): Remove.
12073 (mn10300_gdbarch_init): Update.
12074 * moxie-tdep.c (moxie_read_pc): Remove.
12075 (moxie_write_pc): Remove.
12076 (moxie_gdbarch_init): Update.
12077
12078 2018-02-06 Yao Qi <yao.qi@linaro.org>
12079
12080 * expprint.c (print_subexp_standard): Handle
12081 OP_F77_UNDETERMINED_ARGLIST.
12082 (dump_subexp_body_standard): Likewise.
12083
12084 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12085
12086 * target-descriptions.c (tdesc_element_visitor) Add empty
12087 implementations.
12088 (tdesc_type): Move make_gdb_type from here.
12089 (tdesc_type_builtin): Likewise.
12090 (tdesc_type_vector): Likewise.
12091 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12092 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12093 (make_gdb_type_union): Likewise.
12094 (make_gdb_type_flags): Likewise.
12095 (make_gdb_type_enum): Likewise.
12096 (make_gdb_type): New function.
12097 (tdesc_register_type): Use static make_gdb_type.
12098
12099 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12100
12101 * infcmd.c (default_print_one_register_info): Align natural-format
12102 column values consistently one under another.
12103 (pad_to_column): New function.
12104
12105 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12106
12107 * dwarf2read.c (dwarf2_physname): Move commment.
12108
12109 2018-02-01 Leszek Swirski <leszeks@google.com>
12110
12111 * varobj.c (varobj_formatted_print_options): Allow recursive
12112 pretty printing if pretty printing is enabled.
12113
12114 2018-02-01 Leszek Swirski <leszeks@google.com>
12115
12116 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12117 names after a structop as a filename.
12118
12119 2018-02-01 Yao Qi <yao.qi@linaro.org>
12120
12121 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12122 (arm_record_coproc_data_proc): Likewise.
12123
12124 2018-02-01 Yao Qi <yao.qi@linaro.org>
12125
12126 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12127
12128 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12129
12130 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12131 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12132
12133 2018-01-31 Pedro Alves <palves@redhat.com>
12134
12135 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12136 * inflow.c (child_terminal_save_inferior): Wrap reference to
12137 tcgetpgrp in HAVE_TERMIOS_H.
12138 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12139 _WIN32.
12140 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12141 always iterate over all inferiors.
12142 (gdbsim_cntrl_c): Adjust.
12143 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12144
12145 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12146
12147 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12148 index type is objfile-owned if the element type is as well.
12149
12150 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12151
12152 GDB 8.1 released.
12153
12154 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12155
12156 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12157 "features/s390x-linux64.c".
12158 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12159 s390_linux32 and s390x_linux64.
12160 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12161 default tdesc.
12162 * s390-tdep.c: Include "features/s390-linux32.c" and
12163 "features/s390x-linux64.c".
12164 (s390_tdesc_valid): Add check for tdesc_has_registers.
12165 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12166 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12167 tdesc_s390x_linux64.
12168 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12169 tdesc_s390x_linux64 to...
12170 * s390-tdep.h: ...here.
12171
12172 2018-01-30 Pedro Alves <palves@redhat.com>
12173
12174 PR gdb/13211
12175 * config.in, configure: Regenerate.
12176 * configure.ac: Check for getpgid.
12177 * go32-nat.c (go32_pass_ctrlc): New.
12178 (go32_target): Install it.
12179 * inf-child.c (inf_child_target): Install
12180 child_terminal_save_inferior, child_pass_ctrlc and
12181 child_interrupt.
12182 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12183 (inf_ptrace_target): No longer install it.
12184 * infcmd.c (interrupt_target_1): Adjust.
12185 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12186 (child_interrupt): Declare.
12187 (inferior::terminal_state): New.
12188 * inflow.c (struct terminal_info): Update comments.
12189 (inferior_process_group): Delete.
12190 (terminal_is_ours): Delete.
12191 (gdb_tty_state): New.
12192 (child_terminal_init): Adjust.
12193 (is_gdb_terminal, sharing_input_terminal_1)
12194 (sharing_input_terminal): New functions.
12195 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12196 Set the process's actual process group in the foreground if
12197 possible. Handle is_ours_for_output/is_ours distinction. Don't
12198 mark terminal as the inferior's if not sharing GDB's terminal.
12199 Don't check attach_flag.
12200 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12201 pass down a target_terminal_state.
12202 (child_terminal_save_inferior): New, factored out from ...
12203 (child_terminal_ours_1): ... this. Handle
12204 target_terminal_state::is_ours_for_output.
12205 (child_interrupt, child_pass_ctrlc): New.
12206 (inflow_inferior_exit): Clear the inferior's terminal_state.
12207 (copy_terminal_info): Copy the inferior's terminal state.
12208 (_initialize_inflow): Remove reference to terminal_is_ours.
12209 * inflow.h (inferior_process_group): Delete.
12210 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12211 * procfs.c (procfs_target): Don't install procfs_interrupt.
12212 (procfs_interrupt): Delete.
12213 * remote.c (remote_serial_quit_handler): Adjust.
12214 (remote_interrupt): Remove ptid parameter. Adjust.
12215 * target-delegates.c: Regenerate.
12216 * target.c: Include "terminal.h".
12217 (target_terminal::terminal_state): Rename to ...
12218 (target_terminal::m_terminal_state): ... this.
12219 (target_terminal::init): Adjust.
12220 (target_terminal::inferior): Adjust to per-inferior
12221 terminal_state.
12222 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12223 (target_terminal::ours, target_terminal::ours_for_output): Use
12224 target_terminal_is_ours_kind.
12225 (target_interrupt): Remove ptid parameter. Adjust.
12226 (default_target_pass_ctrlc): Adjust.
12227 * target.h (target_ops::to_terminal_save_inferior): New field.
12228 (target_ops::to_interrupt): Remove ptid_t parameter.
12229 (target_interrupt): Remove ptid_t parameter. Update comment.
12230 (target_pass_ctrlc): Update comment.
12231 * target/target.h (target_terminal_state): New scoped enum,
12232 factored out of ...
12233 (target_terminal::terminal_state): ... here.
12234 (target_terminal::inferior): Update comments.
12235 (target_terminal::restore_inferior): New.
12236 (target_terminal::is_inferior, target_terminal::is_ours)
12237 (target_terminal::is_ours_for_output): Adjust.
12238 (target_terminal::scoped_restore_terminal_state): Adjust to
12239 rename, and call restore_inferior() instead of inferior().
12240 (target_terminal::scoped_restore_terminal_state::m_state): Change
12241 type.
12242 (target_terminal::terminal_state): Rename to ...
12243 (target_terminal::m_terminal_state): ... this and change type.
12244
12245 2018-01-30 Pedro Alves <palves@redhat.com>
12246
12247 * linux-nat.c (wait_for_signal): New function.
12248 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12249 directly.
12250 (async_terminal_is_ours)
12251 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12252 (linux_nat_add_target): Don't override
12253 to_terminal_inferior/to_terminal_ours.
12254
12255 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12256
12257 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12258
12259 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12260
12261 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12262 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12263 dwarf2_per_objfile_free here.
12264 (dwarf2_per_objfile_free): Remove.
12265 (_initialize_dwarf2_read): Don't register
12266 dwarf2_per_objfile_free as a registry cleanup.
12267
12268 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12269
12270 Avoid compilation errors in MinGW native builds
12271
12272 The error is triggered by including python-internal.h, and the
12273 error message is:
12274
12275 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12276 from build-gnulib/import/math.h:27,
12277 from d:/usr/Python26/include/pyport.h:235,
12278 from d:/usr/Python26/include/Python.h:58,
12279 from python/python-internal.h:94,
12280 from python/py-arch.c:24:
12281 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12282 using ::hypot;
12283 ^~~~~
12284
12285 This happens because Python headers define 'hypot' to expand t
12286 '_hypot' in the Windows builds.
12287 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12288 'hypoth'. This avoids a compilation error.
12289
12290 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12291
12292 * MAINTAINERS (Write After Approval): Fix ordering.
12293
12294 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12295
12296 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12297
12298 2018-01-26 Alan Modra <amodra@gmail.com>
12299
12300 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12301 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12302 Remove nop. Make const. Comment.
12303 (powerpc32_plt_stub_so_2): New.
12304 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12305 Correct count. Update uses.
12306 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12307 Move common code reading PLT entry word. Correct
12308 powerpc32_plt_stub PLT address calculation.
12309 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12310 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12311 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12312 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12313 (ppc64_standard_linkage8): Likewise.
12314 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12315 Correct insns description.
12316 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12317
12318 2018-01-24 Pedro Alves <palves@redhat.com>
12319
12320 GCC PR libstdc++/83906
12321 * gdbtypes.c (operator==(const dynamic_prop &,
12322 const dynamic_prop &)): New.
12323 (operator==(const range_bounds &, const range_bounds &)): New.
12324 (check_types_equal): Use them instead of memcmp.
12325 * gdbtypes.h (operator==(const dynamic_prop &,
12326 const dynamic_prop &)): Declare.
12327 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12328 (operator==(const range_bounds &, const range_bounds &)): Declare.
12329 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12330
12331 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12332
12333 * s390-linux-tdep.c (s390_record_address_mask)
12334 (s390_record_calc_disp_common, s390_record_calc_disp)
12335 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12336 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12337 (s390_process_record): Move to s390-tdep.c.
12338 (s390_linux_init_abi_any): Adjust.
12339 * s390-tdep.c (s390_record_address_mask)
12340 (s390_record_calc_disp_common, s390_record_calc_disp)
12341 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12342 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12343 (s390_process_record): Moved from s390-linux-tdep.c
12344 (s390_gdbarch_init): Adjust.
12345
12346 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12347
12348 * s390-linux-nat.c (s390-tdep.h): New include.
12349 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12350 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12351 (ALLDEPFILES): Add s390-tdep.c.
12352 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12353 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12354 * s390-tdep.h: ...this. New file.
12355 * s390-linux-tdep.c (s390-tdep.h): New include.
12356 (_initialize_s390_tdep): Rename to...
12357 (_initialize_s390_linux_tdep): ...this and adjust.
12358 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12359 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12360 s390-tdep.h.
12361 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12362 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12363 (s390_is_partial_instruction, s390_software_single_step)
12364 (is_non_branch_ril, s390_displaced_step_copy_insn)
12365 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12366 (s390_prologue_data, s390_addr, s390_store, s390_load)
12367 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12368 (s390_register_call_saved, s390_guess_tracepoint_registers)
12369 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12370 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12371 (s390_pseudo_register_name, s390_pseudo_register_type)
12372 (s390_pseudo_register_read, s390_pseudo_register_write)
12373 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12374 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12375 (s390_addr_bits_remove, s390_address_class_type_flags)
12376 (s390_address_class_type_flags_to_name)
12377 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12378 (s390_function_arg_float, s390_function_arg_vector)
12379 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12380 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12381 (s390_frame_align, s390_register_return_value, s390_return_value)
12382 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12383 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12384 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12385 (s390_trad_frame_prev_register, s390_unwind_cache)
12386 (s390_prologue_frame_unwind_cache)
12387 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12388 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12389 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12390 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12391 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12392 (s390_frame_base_address, s390_local_base_address)
12393 (s390_frame_base, s390_gcc_target_options)
12394 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12395 (s390_validate_reg_range, s390_tdesc_valid)
12396 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12397 * s390-tdep.c: ...this. New file.
12398
12399 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12400
12401 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12402 (s390_process_record, s390_gdbarch_tdep_alloc)
12403 (s390_linux_init_abi_any): Use/set new hook.
12404
12405 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12406
12407 * s390-linux-tdep.c (osabi.h): New include.
12408 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12409 (s390_linux_init_abi_any): New functions.
12410 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12411
12412 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12413
12414 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12415 tdesc_has_registers check
12416
12417 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12418
12419 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12420 (s390_validate_reg_range): New macro.
12421 (s390_gdbarch_init): Adjust.
12422
12423 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12424
12425 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12426 (s390_gdbarch_tdep_alloc): Adjust.
12427 (s390_gdbarch_init): Adjust.
12428
12429 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12430
12431 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12432 <have_tdb>: Change type to bool.
12433 (s390_gdbarch_tdep_alloc): Adjust.
12434 (s390_gdbarch_init): Adjust.
12435
12436 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12437
12438 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12439 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12440 (s390_gdbarch_tdep_alloc): New function.
12441 (s390_gdbarch_init): Allocate tdep at start and use its fields
12442 instead of separate variables.
12443
12444 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12445
12446 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12447 when looking for cached gdbarch and add comment for remaining.
12448
12449 2018-01-22 Pedro Alves <palves@redhat.com>
12450 Sergio Durigan Junior <sergiodj@redhat.com>
12451
12452 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12453 case.
12454
12455 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12456
12457 * MAINTAINERS: Update my company e-mail address.
12458
12459 2018-01-22 Yao Qi <yao.qi@linaro.org>
12460
12461 * regcache.c (cooked_write_test): New function.
12462 (_initialize_regcache): Register the test.
12463
12464 2018-01-22 Yao Qi <yao.qi@linaro.org>
12465
12466 * ia64-tdep.c (ia64_pseudo_register_read): Call
12467 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12468 * m32c-tdep.c (m32c_cat_read): Likewise.
12469 (m32c_r3r2r1r0_read): Likewise.
12470 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12471 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12472
12473 2018-01-22 Yao Qi <yao.qi@linaro.org>
12474
12475 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12476 method raw_read instead of regcache_raw_read.
12477 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12478 * arm-tdep.c (arm_neon_quad_read): Likewise.
12479 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12480 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12481 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12482 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12483 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12484 (i386_pseudo_register_read_into_value): Likewise.
12485 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12486 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12487 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12488 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12489 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12490 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12491 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12492 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12493 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12494
12495 2018-01-22 Yao Qi <yao.qi@linaro.org>
12496
12497 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12498 * configure.tgt: Remove target mt.
12499 * mt-tdep.c: Remove.
12500 * regcache.c (cooked_read_test): Remove the check for mt.
12501
12502 2018-01-22 Yao Qi <yao.qi@linaro.org>
12503
12504 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12505 instead of gdbarch_pseudo_register_read_value.
12506
12507 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12508
12509 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12510 language is Ada.
12511
12512 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12513
12514 * linespec.c (create_sals_line_offset): Remove code that preserved
12515 the symtab_and_line's line number.
12516
12517 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12518
12519 * varobj.c (varobj_create): Don't set valid_block when creating a
12520 floating varobj.
12521
12522 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12523
12524 * varobj.c (varobj_create): Remove out of date comment.
12525
12526 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12527
12528 PR mi/20395
12529 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12530 updating innermost block.
12531 * parse.c (innermost_block_tracker::update): Take extra type
12532 parameter, and check types match before updating innermost block.
12533 (write_dollar_variable): Update innermost block for registers.
12534 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12535 (innermost_block_tracker::innermost_block_tracker): Initialise
12536 m_types member.
12537 (innermost_block_tracker::reset): Take type parameter.
12538 (innermost_block_tracker::update): Take type parameter, and pass
12539 type through as needed.
12540 (innermost_block_tracker::m_types): New member.
12541 * varobj.c (varobj_create): Pass type when reseting innermost
12542 block.
12543
12544 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12545
12546 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12547 * ada-lang.c (resolve_subexp): Likewise.
12548 * breakpoint.c (set_breakpoint_condition) Likewise.
12549 (watch_command_1) Likewise.
12550 * c-exp.y (variable): Likewise.
12551 * d-exp.y (PrimaryExpression): Likewise.
12552 * f-exp.y (variable): Likewise.
12553 * go-exp.y (variable): Likewise.
12554 * m2-exp.y (variable): Likewise.
12555 * objfiles.c (objfile::~objfile): Likewise.
12556 * p-exp.y (variable): Likewise.
12557 * parse.c (innermost_block): Change type.
12558 * parser-defs.h (class innermost_block_tracker): New.
12559 (innermost_block): Change to innermost_block_tracker.
12560 * printcmd.c (display_command): Switch to innermost_block API.
12561 (do_one_display): Likewise.
12562 * rust-exp.y (do_one_display): Likewise.
12563 * symfile.c (clear_symtab_users): Likewise.
12564 * varobj.c (varobj_create): Switch to innermost_block API, replace
12565 use of innermost_block with block stored on varobj object.
12566
12567 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12568
12569 * expression.h (innermost_block): Remove declaration.
12570 * varobj.c: Add 'parser-defs.h' include.
12571
12572 2018-01-19 Tom Tromey <tom@tromey.com>
12573
12574 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12575 symbols in the static and global blocks.
12576
12577 2018-01-19 James Clarke <jrtc27@jrtc27.com>
12578
12579 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12580 gdb_ptrace.h, and move including gdb_wait.h ...
12581 * nat/linux-ptrace.h: ... to here.
12582
12583 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12584
12585 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12586 inf_ptrace_detach_success.
12587 (inf_ptrace_detach_success): Add inferior parameter, use it
12588 instead of inferior_ptid, pass it to detach_inferior.
12589 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12590 parameter.
12591 * inferior.c (detach_inferior): Add overload that takes an
12592 inferior object.
12593 * inferior.h (detach_inferior): Likewise.
12594 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12595 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12596 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12597
12598 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12599
12600 * target.h (struct target_ops) <to_detach>: Add inferior
12601 parameter.
12602 (target_detach): Likewise.
12603 * target.c (dispose_inferior): Pass inferior down.
12604 (target_detach): Pass inferior down. Assert that it is equal to
12605 the current inferior.
12606 * aix-thread.c (aix_thread_detach): Pass inferior down.
12607 * corefile.c (core_file_command): Pass current_inferior() down.
12608 * corelow.c (core_detach): Add inferior parameter.
12609 * darwin-nat.c (darwin_detach): Likewise.
12610 * gnu-nat.c (gnu_detach): Likewise.
12611 * inf-ptrace.c (inf_ptrace_detach): Likewise.
12612 * infcmd.c (detach_command): Pass current_inferior() down to
12613 target_detach.
12614 * infrun.c (follow_fork_inferior): Pass parent_inf to
12615 target_detach.
12616 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12617 target_detach.
12618 * linux-nat.c (linux_nat_detach): Add inferior parameter.
12619 * linux-thread-db.c (thread_db_detach): Likewise.
12620 * nto-procfs.c (procfs_detach): Likewise.
12621 * procfs.c (procfs_detach): Likewise.
12622 * record.c (record_detach): Likewise.
12623 * record.h (struct inferior): Forward-declare.
12624 (record_detach): Add inferior parameter.
12625 * remote-sim.c (gdbsim_detach): Likewise.
12626 * remote.c (remote_detach_1): Likewise.
12627 (remote_detach): Likewise.
12628 (extended_remote_detach): Likewise.
12629 * sol-thread.c (sol_thread_detach): Likewise.
12630 * target-debug.h (target_debug_print_inferior_p): New macro.
12631 * target-delegates.c: Re-generate.
12632 * top.c (kill_or_detach): Pass inferior down to target_detach.
12633 * windows-nat.c (windows_detach): Add inferior parameter.
12634
12635 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12636
12637 * target.h (struct target_ops) <to_detach>: Remove args
12638 parameter.
12639 (target_detach): Likewise.
12640 * target.c (dispose_inferior): Adjust.
12641 (target_detach): Remove args parameter, adjust.
12642 * aix-thread.c (aix_thread_detach): Adjust.
12643 * corefile.c (core_file_command): Adjust.
12644 * corelow.c (core_detach): Adjust.
12645 * darwin-nat.c (darwin_detach): Adjust.
12646 * gnu-nat.c (gnu_detach): Adjust.
12647 * inf-ptrace.c (inf_ptrace_detach): Adjust.
12648 * infcmd.c (detach_command): Adjust
12649 * infrun.c (follow_fork_inferior): Adjust.
12650 (handle_vfork_child_exec_or_exit): Adjust.
12651 * linux-fork.c (linux_fork_detach): Remove args parameter.
12652 * linux-fork.h (linux_fork_detach): Likewise.
12653 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12654 * linux-thread-db.c (thread_db_detach): Likewise.
12655 * nto-procfs.c (procfs_detach): Likewise.
12656 * procfs.c (procfs_detach): Likewise.
12657 (do_detach): Remove signo parameter.
12658 * record.c (record_detach): Remove args parameter.
12659 * record.h (record_detach): Likewise.
12660 * remote-sim.c (gdbsim_detach): Likewise.
12661 * remote.c (remote_detach_1): Likewise.
12662 (remote_detach): Likewise.
12663 (extended_remote_detach): Likewise.
12664 * sol-thread.c (sol_thread_detach): Likewise.
12665 * target-delegates.c: Re-generate.
12666 * top.c (struct qt_args) <args>: Remove field.
12667 (kill_or_detach): Don't pass args.
12668 (quit_force): Don't set args.
12669 * windows-nat.c (windows_detach): Remove args parameter.
12670
12671 2018-01-19 Yao Qi <yao.qi@linaro.org>
12672
12673 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12674 (arm_linux_init_abi): Install it.
12675
12676 2018-01-19 Yao Qi <yao.qi@linaro.org>
12677
12678 * osabi.c (gdb_osabi_names): Extend the regexp for
12679 arm-linux-gnueabihf.
12680
12681 2018-01-18 Yao Qi <yao.qi@linaro.org>
12682
12683 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12684 m_abbrevs.
12685 (abbrev_table::add_abbrev): Update.
12686 (abbrev_table::lookup_abbrev): Update.
12687
12688 2018-01-18 Yao Qi <yao.qi@linaro.org>
12689
12690 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12691
12692 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
12693
12694 * compile/compile.c (compile_to_object): Convert "triplet_rx"
12695 to "std::string".
12696
12697 2018-01-17 Tom Tromey <tom@tromey.com>
12698
12699 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
12700
12701 2018-01-17 Tom Tromey <tom@tromey.com>
12702
12703 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12704 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12705 (create_array_type_with_stride): Update.
12706 * dwarf2read.c (set_die_type): Update.
12707
12708 2018-01-17 Tom Tromey <tom@tromey.com>
12709
12710 * dwarf2read.c (delayed_method_info): Remove typedef.
12711 (dwarf2_cu::method_info): Now a std::vector.
12712 (add_to_method_list): Update.
12713 (free_delayed_list): Remove.
12714 (compute_delayed_physnames): Update.
12715 (process_full_comp_unit, process_full_type_unit): Clear the method
12716 list. Remove cleanups.
12717 (psymtab_include_file_name): Add name_holder parameter. Use
12718 unique_xmalloc_ptr.
12719 (dwarf_decode_lines): Update.
12720
12721 2018-01-17 Tom Tromey <tom@tromey.com>
12722 Simon Marchi <simon.marchi@ericsson.com>
12723
12724 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12725 (dwarf2_per_objfile::free_cached_comp_units)
12726 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12727 (init_cutu_and_read_dies_no_follow): Update.
12728 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12729 (dwarf2_cu::~dwarf2_cu): New.
12730 (free_heap_comp_unit, free_stack_comp_unit): Remove.
12731 (age_cached_comp_units, free_one_cached_comp_unit): Update.
12732
12733 2018-01-17 Tom Tromey <tom@tromey.com>
12734 Simon Marchi <simon.marchi@ericsson.com>
12735
12736 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12737 (struct die_reader_specs) <abbrev_table>: New member.
12738 (struct abbrev_table): Add constructor.
12739 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12740 <abbrev_obstack>: Now an auto_obstack.
12741 (abbrev_table_up): New typedef.
12742 (init_cu_die_reader): Add abbrev_table parameter.
12743 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12744 Add result_dwo_abbrev_table.
12745 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12746 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12747 Update.
12748 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12749 parameter.
12750 (skip_children): Update.
12751 (abbrev_table::alloc_abbrev): Rename from
12752 abbrev_table_alloc_abbrev.
12753 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12754 (abbrev_table::lookup_abbrev): Rename from
12755 abbrev_table_lookup_abbrev.
12756 (abbrev_table_read_table): Return abbrev_table_up.
12757 (abbrev_table_free, abbrev_table_free_cleanup)
12758 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12759 (load_partial_dies): Update.
12760
12761 2018-01-17 Tom Tromey <tom@tromey.com>
12762
12763 * dwarf2read.c (dwarf2_compute_name): Update comment.
12764 (read_func_scope, read_variable): Update.
12765 (new_symbol): Remove.
12766 (new_symbol_full): Rename to new_symbol.
12767
12768 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12769
12770 PR gdb/16577
12771 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12772 a warning instead of throwing an error, set section size to 0 and return
12773 NULL.
12774 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12775
12776 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12777
12778 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12779 std::string.
12780 (linux_ptrace_attach_fail_reason_string): Likewise.
12781 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12782 Likewise.
12783 (linux_ptrace_attach_fail_reason_string): Likewise.
12784 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12785
12786 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12787
12788 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12789
12790 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12791
12792 PR gdb/21559
12793 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12794 checking for fs_base/gs_base fields in struct user_regs_struct.
12795 * configure: Regenerate.
12796
12797 2018-01-17 Yao Qi <yao.qi@linaro.org>
12798
12799 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12800 function.
12801 (aarch64_linux_init_abi): Install it to gdbarch hook
12802 gcc_target_options.
12803
12804 2018-01-15 Pedro Alves <palves@redhat.com>
12805
12806 * common/signals-state-save-restore.c
12807 (save_original_signals_state): Fix typos.
12808
12809 2017-01-12 Tom Tromey <tom@tromey.com>
12810 Sergio Durigan Junior <sergiodj@redhat.com>
12811
12812 * Makefile.in (install-only): Install gdb-add-index.
12813
12814 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12815
12816 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12817
12818 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12819
12820 * infrun.c (keep_going_pass_signal): Clear step-over info when
12821 insert_breakpoints fails.
12822
12823 2018-01-11 Pedro Alves <palves@redhat.com>
12824
12825 PR gdb/22583
12826 * infrun.c (resume): Rename to ...
12827 (resume_1): ... this.
12828 (resume): Reimplement as wrapper around resume_1.
12829
12830 2018-01-11 Pedro Alves <palves@redhat.com>
12831
12832 PR remote/22597
12833 * remote.c (remote_parse_stop_reply): Default to the last-set
12834 general thread instead of to 'magic_null_ptid'.
12835
12836 2018-01-10 Pedro Alves <palves@redhat.com>
12837
12838 * language.h (language_get_symbol_name_matcher): Rename ...
12839 (get_symbol_name_matcher): ... this.
12840 * language.c (language_get_symbol_name_matcher): Ditto.
12841 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12842 callers adjusted.
12843
12844 2018-01-10 Pedro Alves <palves@redhat.com>
12845
12846 PR gdb/22670
12847 * dwarf2read.c
12848 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12849 Adjust to use language_get_symbol_name_matcher instead of
12850 language_defn::la_get_symbol_name_matcher.
12851 * language.c (language_get_symbol_name_matcher): If in Ada mode
12852 and the lookup name is a verbatim match, return Ada's matcher.
12853 * language.h (language_get_symbol_name_matcher): Adjust comment.
12854 (ada_lookup_name_info::verbatim_p):: New method.
12855
12856 2018-01-10 Pedro Alves <palves@redhat.com>
12857
12858 PR gdb/22670
12859 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12860 minsym's language is language_auto or language_cplus, pass down
12861 language_ada instead.
12862 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12863
12864 2018-01-10 Pedro Alves <palves@redhat.com>
12865
12866 PR gdb/22670
12867 * minsyms.c (linkage_name_str): New function.
12868 (iterate_over_minimal_symbols): Use it.
12869
12870 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12871
12872 * NEWS: Document that 'info proc' now works on FreeBSD.
12873
12874 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12875
12876 * configure.ac: Check for kinfo_getfile in libutil.
12877 * configure: Regenerate.
12878 * config.in: Regenerate.
12879 * fbsd-nat.c: Include "fbsd-tdep.h".
12880 (fbsd_fetch_cmdline): New.
12881 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12882 rather than calling error.
12883 (fbsd_info_proc): New.
12884 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12885 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12886 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12887
12888 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12889
12890 * fbsd-nat.c (struct free_deleter): Remove.
12891 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12892
12893 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12894
12895 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12896 NULL for an empty pathname.
12897
12898 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12899
12900 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12901 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12902 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12903 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12904 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12905 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12906 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12907 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12908 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12909 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12910 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12911 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12912 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12913 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12914 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12915
12916 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12917
12918 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12919 (gnu_xfer_auxv): New function.
12920 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12921 TARGET_OBJECT_AUXV.
12922
12923 2018-01-08 Yao Qi <yao.qi@linaro.org>
12924 Simon Marchi <simon.marchi@ericsson.com>
12925
12926 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12927 common/selftest.c.
12928 (COMMON_OBS): Remove selftest.o.
12929 * configure.ac: Append selftest-arch.c and common/selftest.c to
12930 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12931 * configure: Re-generated.
12932 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12933 GDB_SELF_TEST.
12934 (maintenance_info_selftests): Likewise.
12935
12936 2018-01-08 Xavier Roirand <roirand@adacore.com>
12937
12938 * ada-valprint.c (val_print_packed_array_elements): Use
12939 proper number of elements when printing an array indexed
12940 by an enumeration type.
12941
12942 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12943
12944 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12945 (dw2_get_file_names_reader): Adjust.
12946 (lookup_dwo_signatured_type): Adjust.
12947 (lookup_dwp_signatured_type): Adjust.
12948 (lookup_signatured_type): Adjust.
12949 (create_type_unit_group): Adjust.
12950 (get_type_unit_group): Adjust.
12951 (process_psymtab_comp_unit_reader): Adjust.
12952 (build_type_psymtabs_reader): Adjust.
12953 (scan_partial_symbols): Adjust.
12954 (add_partial_symbol): Adjust.
12955 (add_partial_subprogram): Adjust.
12956 (peek_die_abbrev): Adjust.
12957 (fixup_go_packaging): Adjust.
12958 (process_imported_unit_die): Adjust.
12959 (dwarf2_compute_name): Adjust.
12960 (dwarf2_physname): Adjust.
12961 (read_import_statement): Adjust.
12962 (handle_DW_AT_stmt_list): Adjust.
12963 (read_file_scope): Adjust.
12964 (read_func_scope): Adjust.
12965 (read_lexical_block_scope): Adjust.
12966 (read_call_site_scope): Adjust.
12967 (read_variable): Adjust.
12968 (dwarf2_rnglists_process): Adjust.
12969 (dwarf2_ranges_process): Adjust.
12970 (dwarf2_ranges_read): Adjust.
12971 (dwarf2_get_pc_bounds): Adjust.
12972 (dwarf2_record_block_ranges): Adjust.
12973 (dwarf2_add_field): Adjust.
12974 (dwarf2_add_member_fn): Adjust.
12975 (read_structure_type): Adjust.
12976 (process_structure_scope): Adjust.
12977 (read_enumeration_type): Adjust.
12978 (read_array_type): Adjust.
12979 (mark_common_block_symbol_computed): Adjust.
12980 (read_common_block): Adjust.
12981 (read_namespace_type): Adjust.
12982 (read_namespace): Adjust.
12983 (read_module_type): Adjust.
12984 (read_tag_pointer_type): Adjust.
12985 (read_tag_ptr_to_member_type): Adjust.
12986 (read_tag_string_type): Adjust.
12987 (read_subroutine_type): Adjust.
12988 (read_typedef): Adjust.
12989 (read_base_type): Adjust.
12990 (attr_to_dynamic_prop): Adjust.
12991 (read_subrange_type): Adjust.
12992 (read_unspecified_type): Adjust.
12993 (dwarf2_read_abbrevs): Adjust.
12994 (load_partial_dies): Adjust.
12995 (read_partial_die): Adjust.
12996 (find_partial_die): Adjust.
12997 (guess_partial_die_structure_name): Adjust.
12998 (fixup_partial_die): Adjust.
12999 (read_attribute_value): Adjust.
13000 (read_addr_index): Adjust.
13001 (read_addr_index_from_leb128): Adjust.
13002 (read_str_index): Adjust.
13003 (dwarf2_string_attr): Adjust.
13004 (get_debug_line_section): Adjust.
13005 (dwarf_decode_line_header): Adjust.
13006 (lnp_state_machine::check_line_address): Adjust.
13007 (dwarf_decode_lines_1): Adjust.
13008 (dwarf_decode_lines): Adjust.
13009 (dwarf2_start_symtab): Adjust.
13010 (var_decode_location): Adjust.
13011 (new_symbol_full): Adjust.
13012 (dwarf2_const_value_data): Adjust.
13013 (dwarf2_const_value_attr): Adjust.
13014 (dwarf2_const_value): Adjust.
13015 (die_type): Adjust.
13016 (die_containing_type): Adjust.
13017 (build_error_marker_type): Adjust.
13018 (lookup_die_type): Adjust.
13019 (guess_full_die_structure_name): Adjust.
13020 (anonymous_struct_prefix): Adjust.
13021 (determine_prefix): Adjust.
13022 (dwarf2_name): Adjust.
13023 (follow_die_ref_or_sig): Adjust.
13024 (follow_die_offset): Adjust.
13025 (follow_die_ref): Adjust.
13026 (follow_die_sig_1): Adjust.
13027 (follow_die_sig): Adjust.
13028 (get_signatured_type): Adjust.
13029 (get_DW_AT_signature_type): Adjust.
13030 (decode_locdesc): Adjust.
13031 (dwarf_decode_macros): Adjust.
13032 (cu_debug_loc_section): Adjust.
13033 (fill_in_loclist_baton): Adjust.
13034 (dwarf2_symbol_mark_computed): Adjust.
13035 (init_one_comp_unit): Don't assign
13036 dwarf2_cu::dwarf2_per_objfile.
13037 (set_die_type): Adjust.
13038
13039 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13040
13041 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13042 <dwarf2_per_objfile>: New field.
13043 (dwarf2_per_objfile): Remove global.
13044 (get_dwarf2_per_objfile): New function.
13045 (set_dwarf2_per_objfile): New function.
13046 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13047 dwarf2_per_objfile.
13048 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13049 (read_abbrev_offset): Likewise.
13050 (read_indirect_string): Likewise.
13051 (read_indirect_line_string): Likewise.
13052 (read_indirect_string_at_offset): Likewise.
13053 (read_indirect_string_from_dwz): Likewise.
13054 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13055 dwarf2_per_objfile.
13056 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13057 (create_all_comp_units): Change objfile parameter to
13058 dwarf2_per_objfile.
13059 (create_all_type_units): Likewise.
13060 (process_queue): Add dwarf2_per_objfile parameter.
13061 (read_and_check_comp_unit_head): Likewise.
13062 (lookup_dwo_unit_in_dwp): Likewise.
13063 (get_dwp_file): Likewise.
13064 (process_cu_includes): Likewise.
13065 (struct free_dwo_file_cleanup_data): New struct.
13066 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13067 set_dwarf2_per_objfile.
13068 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13069 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13070 context, adjust calls.
13071 (dw2_instantiate_symtab): Likewise.
13072 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13073 (dw2_get_cu): Likewise.
13074 (create_cu_from_index_list): Change objfile parameter to
13075 dwarf2_per_objfile.
13076 (create_cus_from_index_list): Get dwarf2_per_objfile from
13077 context, adjust calls.
13078 (create_cus_from_index): Likewise.
13079 (create_signatured_type_table_from_index): Change objfile
13080 parameter to dwarf2_per_objfile.
13081 (create_signatured_type_table_from_debug_names): Change objfile
13082 parameter to dwarf2_per_objfile.
13083 (create_addrmap_from_index): Likewise.
13084 (create_addrmap_from_aranges): Likewise.
13085 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13086 (dw2_setup): Remove.
13087 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13088 context.
13089 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13090 get_dwarf2_per_objfile.
13091 (dw2_forget_cached_source_info): Likewise.
13092 (dw2_map_symtabs_matching_filename): Likewise.
13093 (struct dw2_symtab_iterator) <index>: Remove.
13094 <dwarf2_per_objfile>: New field.
13095 (dw2_symtab_iter_init): Replace index parameter with
13096 dwarf2_per_objfile.
13097 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13098 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13099 (dw2_print_stats): Likewise.
13100 (dw2_dump): Likewise.
13101 (dw2_expand_symtabs_for_function): Likewise.
13102 (dw2_expand_all_symtabs): Likewise.
13103 (dw2_expand_symtabs_with_fullname): Likewise.
13104 (dw2_expand_marked_cus): Replace index and objfile parameters
13105 with dwarf2_per_objfile.
13106 (dw_expand_symtabs_matching_file_matcher): Add
13107 dwarf2_per_objfile parameter and adjust calls.
13108 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13109 adjust calls.
13110 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13111 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13112 adjust calls.
13113 (create_cus_from_debug_names_list): Replace objfile parameter
13114 with dwarf2_per_objfile and adjust calls.
13115 (create_cus_from_debug_names): Likewise.
13116 (dwarf2_read_debug_names): Likewise.
13117 (mapped_debug_names::namei_to_name): Adjust call.
13118 (dw2_debug_names_iterator::next): Likewise.
13119 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13120 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13121 (dw2_debug_names_dump): Likewise.
13122 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13123 (dw2_debug_names_expand_symtabs_matching): Likewise.
13124 (dwarf2_initialize_objfile): Likewise.
13125 (dwarf2_build_psymtabs): Likewise.
13126 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13127 this_cu.
13128 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13129 (read_and_check_comp_unit_head): Likewise.
13130 (read_abbrev_offset): Likewise.
13131 (create_debug_type_hash_table): Likewise.
13132 (create_debug_types_hash_table): Likewise.
13133 (create_all_type_units): Replace objfile parameter with
13134 dwarf2_per_objfile.
13135 (add_type_unit): Add dwarf2_per_objfile parameter.
13136 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13137 with dwarf2_per_objfile.
13138 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13139 (lookup_dwp_signatured_type): Likewise.
13140 (lookup_signatured_type): Likewise.
13141 (read_cutu_die_from_dwo): Likewise.
13142 (init_tu_and_read_dwo_dies): Likewise.
13143 (init_cutu_and_read_dies): Likewise.
13144 (init_cutu_and_read_dies_no_follow): Likewise.
13145 (allocate_type_unit_groups_table): Add objfile parameter.
13146 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13147 (get_type_unit_group): Likewise.
13148 (process_psymtab_comp_unit): Update call.
13149 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13150 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13151 (print_tu_stats): Likewise.
13152 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13153 in void* parameter.
13154 (build_type_psymtabs): Change objfile parameter to
13155 dwarf2_per_objfile.
13156 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13157 passed in void* parameter.
13158 (process_skeletonless_type_units): Change objfile parameter to
13159 dwarf2_per_objfile.
13160 (set_partial_user): Likewise.
13161 (dwarf2_build_psymtabs_hard): Likewise.
13162 (read_comp_units_from_section): Likewise.
13163 (create_all_comp_units): Likewise.
13164 (scan_partial_symbols): Update calls.
13165 (add_partial_symbol): Likewise.
13166 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13167 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13168 (process_queue): Add dwarf2_per_objfile parameter.
13169 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13170 (compute_compunit_symtab_includes): Likewise.
13171 (process_cu_includes): Add dwarf2_per_objfile parameter.
13172 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13173 (process_full_type_unit): Likewise.
13174 (process_imported_unit_die): Update call.
13175 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13176 (read_file_scope): Likewise.
13177 (allocate_dwo_file_hash_table): Add objfile parameter.
13178 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13179 (create_cus_hash_table): Likewise.
13180 (create_dwp_hash_table): Likewise.
13181 (create_dwo_unit_in_dwp_v1): Likewise.
13182 (create_dwp_v2_section): Likewise.
13183 (create_dwo_unit_in_dwp_v2): Likewise.
13184 (lookup_dwo_unit_in_dwp): Likewise.
13185 (try_open_dwop_file): Likewise.
13186 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13187 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13188 cleanup to include a reference to dwarf2_per_objfile.
13189 (open_dwp_file): Add dwarf2_per_objfile parameter.
13190 (open_and_init_dwp_file): Likewise.
13191 (get_dwp_file): Likewise.
13192 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13193 (queue_and_load_all_dwo_tus): Update call.
13194 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13195 data.
13196 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13197 (dwarf2_ranges_process): Likewise.
13198 (dwarf2_get_pc_bounds): Likewise.
13199 (mark_common_block_symbol_computed): Likewise.
13200 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13201 (dwarf2_read_abbrevs): Update call.
13202 (read_partial_die): Use dwarf2_per_objfile from cu.
13203 (find_partial_die): Likewise.
13204 (fixup_partial_die): Likewise.
13205 (read_attribute_value): Likewise.
13206 (read_indirect_string_at_offset_from): Add objfile parameter.
13207 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13208 parameter.
13209 (read_indirect_string_from_dwz): Add objfile parameter.
13210 (read_indirect_string): Add objfile parameter.
13211 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13212 (read_addr_index): Use dwarf2_per_objfile from cu.
13213 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13214 call dw2_setup.
13215 (read_str_index): Use dwarf2_per_objfile from cu.
13216 (get_debug_line_section): Likewise.
13217 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13218 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13219 (new_symbol_full): Use dwarf2_per_objfile from cu.
13220 (build_error_marker_type): Likewise.
13221 (lookup_die_type): Likewise.
13222 (determine_prefix): Likewise.
13223 (follow_die_offset): Likewise.
13224 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13225 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13226 (dwarf2_fetch_die_type_sect_off): Likewise.
13227 (dwarf2_get_die_type): Likewise.
13228 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13229 (get_signatured_type): Likewise.
13230 (get_DW_AT_signature_type): Likewise.
13231 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13232 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13233 (cu_debug_loc_section): Likewise.
13234 (fill_in_loclist_baton): Likewise.
13235 (dwarf2_symbol_mark_computed): Likewise.
13236 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13237 dwarf2_per_objfile.
13238 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13239 parameter.
13240 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13241 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13242 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13243 (set_die_type): Use dwarf2_free_objfile from cu.
13244 (get_die_type_at_offset): Likewise.
13245 (dwarf2_per_objfile_free): Don't assign global variable.
13246 (debug_names) <constructor>: Add dwarf2_per_objfile
13247 parameter, update m_debugstrlookup construction.
13248 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13249 parameter.
13250 <m_dwarf2_per_objfile>: New field.
13251 <lookup>: Use m_dwarf2_per_objfile.
13252 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13253 (psyms_seen_size): Likewise.
13254 (write_gdbindex): Replace objfile parameter with
13255 dwarf2_per_objfile.
13256 (write_debug_names): Likewise.
13257 (write_psymtabs_to_index): Likewise.
13258 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13259 calls.
13260
13261 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13262
13263 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13264 <dwarf2_per_objfile>: New field.
13265 (struct dwarf2_per_cu_data) <objfile>: Remove.
13266 <dwarf2_per_objfile>: New field.
13267 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13268 of objfile.
13269 (create_signatured_type_table_from_index): Likewise.
13270 (create_debug_type_hash_table): Likewise.
13271 (fill_in_sig_entry_from_dwo_entry): Likewise.
13272 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13273 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13274 objfile.
13275 (create_partial_symtab): Access objfile through
13276 dwarf2_per_objfile.
13277 (process_psymtab_comp_unit_reader): Likewise.
13278 (read_comp_units_from_section): Likewise.
13279 (scan_partial_symbols): Likewise.
13280 (add_partial_symbol): Likewise.
13281 (add_partial_subprogram): Likewise.
13282 (peek_die_abbrev): Likewise.
13283 (fixup_go_packaging): Likewise.
13284 (process_full_comp_unit): Likewise.
13285 (process_full_type_unit): Likewise.
13286 (process_imported_unit_die): Likewise.
13287 (dwarf2_compute_name): Likewise.
13288 (dwarf2_physname): Likewise.
13289 (read_import_statement): Likewise.
13290 (create_cus_hash_table): Assign dwarf2_physname instead of
13291 objfile.
13292 (read_func_scope): Access objfile through dwarf2_per_objfile.
13293 (read_lexical_block_scope): Likewise.
13294 (read_call_site_scope): Likewise.
13295 (read_variable): Likewise.
13296 (dwarf2_rnglists_process): Likewise.
13297 (dwarf2_ranges_process): Likewise.
13298 (dwarf2_ranges_read): Likewise.
13299 (dwarf2_record_block_ranges): Likewise.
13300 (dwarf2_add_field): Likewise.
13301 (dwarf2_add_member_fn): Likewise.
13302 (read_structure_type): Likewise.
13303 (process_structure_scope): Likewise.
13304 (read_enumeration_type): Likewise.
13305 (read_array_type): Likewise.
13306 (read_common_block): Likewise.
13307 (read_namespace_type): Likewise.
13308 (read_namespace): Likewise.
13309 (read_module_type): Likewise.
13310 (read_tag_pointer_type): Likewise.
13311 (read_tag_ptr_to_member_type): Likewise.
13312 (read_tag_string_type): Likewise.
13313 (read_subroutine_type): Likewise.
13314 (read_typedef): Likewise.
13315 (read_base_type): Likewise.
13316 (attr_to_dynamic_prop): Likewise.
13317 (read_subrange_type): Likewise.
13318 (read_unspecified_type): Likewise.
13319 (load_partial_dies): Likewise.
13320 (read_partial_die): Likewise.
13321 (find_partial_die): Likewise.
13322 (guess_partial_die_structure_name): Likewise.
13323 (fixup_partial_die): Likewise.
13324 (read_attribute_value): Likewise.
13325 (read_addr_index_from_leb128): Likewise.
13326 (dwarf2_read_addr_index): Likewise.
13327 (dwarf2_string_attr): Likewise.
13328 (lnp_state_machine::check_line_address): Likewise.
13329 (dwarf_decode_lines_1): Likewise.
13330 (dwarf_decode_lines): Likewise.
13331 (dwarf2_start_symtab): Likewise.
13332 (var_decode_location): Likewise.
13333 (new_symbol_full): Likewise.
13334 (dwarf2_const_value_data): Likewise.
13335 (dwarf2_const_value_attr): Likewise.
13336 (dwarf2_const_value): Likewise.
13337 (die_type): Likewise.
13338 (die_containing_type): Likewise.
13339 (lookup_die_type): Likewise.
13340 (guess_full_die_structure_name): Likewise.
13341 (anonymous_struct_prefix): Likewise.
13342 (dwarf2_name): Likewise.
13343 (follow_die_ref_or_sig): Likewise.
13344 (follow_die_offset): Likewise.
13345 (follow_die_ref): Likewise.
13346 (dwarf2_fetch_die_loc_sect_off): Likewise.
13347 (dwarf2_fetch_constant_bytes): Likewise.
13348 (dwarf2_fetch_die_type_sect_off): Likewise.
13349 (dwarf2_get_die_type): Likewise.
13350 (follow_die_sig): Likewise.
13351 (decode_locdesc): Likewise.
13352 (dwarf2_per_cu_objfile): Likewise.
13353 (dwarf2_per_cu_text_offset): Likewise.
13354 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13355 objfile.
13356 (set_die_type): Access objfile through
13357 dwarf2_per_objfile.
13358
13359 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13360
13361 * valprint.c (converted_character_d): Remove typedef.
13362 (DEF_VEC_O (converted_character_d)): Remove.
13363 (count_next_character): Use std::vector.
13364 (print_converted_chars_to_obstack): Likewise.
13365 (generic_printstr): Likewise.
13366
13367 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13368
13369 * xml-support.h (struct gdb_xml_value): Add constructor.
13370 <value>: Change type to unique_xmalloc_ptr.
13371 (gdb_xml_value_s): Remove typedef.
13372 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13373 (gdb_xml_element_start_handler): Change parameter type to
13374 std::vector.
13375 (xml_find_attribute): Likewise.
13376 * xml-support.c (xml_find_attribute): Change parameter type to
13377 std::vector and adjust.
13378 (gdb_xml_values_cleanup): Remove.
13379 (gdb_xml_parser::start_element): Adjust to std::vector.
13380 (xinclude_start_include): Change paraeter type to std::vector
13381 and adjust.
13382 * btrace.c (check_xml_btrace_version): Likewise.
13383 (parse_xml_btrace_block): Likewise.
13384 (parse_xml_btrace_pt_config_cpu): Likewise.
13385 (parse_xml_btrace_pt): Likewise.
13386 (parse_xml_btrace_conf_bts): Likewise.
13387 (parse_xml_btrace_conf_pt): Likewise.
13388 * memory-map.c (memory_map_start_memory): Likewise.
13389 (memory_map_start_property): Likewise.
13390 * osdata.c (osdata_start_osdata): Likewise.
13391 (osdata_start_item): Likewise.
13392 (osdata_start_column): Likewise.
13393 * remote.c (start_thread): Likewise.
13394 * solib-aix.c (library_list_start_library): Likewise.
13395 (library_list_start_list): Likewise.
13396 * solib-svr4.c (library_list_start_library): Likewise.
13397 (svr4_library_list_start_list): Likewise.
13398 * solib-target.c (library_list_start_segment): Likewise.
13399 (library_list_start_section): Likewise.
13400 (library_list_start_library): Likewise.
13401 (library_list_start_list): Likewise.
13402 * tracepoint.c (traceframe_info_start_memory): Likewise.
13403 (traceframe_info_start_tvar): Likewise.
13404 * xml-syscall.c (syscall_start_syscall): Likewise.
13405 * xml-tdesc.c (tdesc_start_target): Likewise.
13406 (tdesc_start_feature): Likewise.
13407 (tdesc_start_reg): Likewise.
13408 (tdesc_start_union): Likewise.
13409 (tdesc_start_struct): Likewise.
13410 (tdesc_start_flags): Likewise.
13411 (tdesc_start_enum): Likewise.
13412 (tdesc_start_field): Likewise.
13413 (tdesc_start_enum_value): Likewise.
13414 (tdesc_start_vector): Likewise.
13415
13416 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13417
13418 * extension.h (struct xmethod_worker) <clone>: Remove.
13419 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13420 Remove.
13421 (python_xmethod_worker::clone): Remove.
13422 * valops.c (find_overload_match): Use std::move instead of
13423 clone.
13424
13425 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13426
13427 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13428 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13429 <free_xmethod_worker_data>: Remove.
13430 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13431 <get_xmethod_arg_types>: Remove.
13432 <get_xmethod_result_type>: Remove.
13433 <invoke_xmethod>: Remove.
13434 * extension.c (new_xmethod_worker): Remove.
13435 (clone_xmethod_worker): Remove.
13436 (get_matching_xmethod_workers): Return void, pass std::vector by
13437 pointer.
13438 (get_xmethod_arg_types): Rename to...
13439 (xmethod_worker::get_arg_types): ... this, and adjust.
13440 (get_xmethod_result_type): Rename to...
13441 (xmethod_worker::get_result_type): ... this, and adjust.
13442 (invoke_xmethod): Remove.
13443 (free_xmethod_worker): Remove.
13444 (free_xmethod_worker_vec): Remove.
13445 * extension.h (enum ext_lang_rc): Move here from
13446 extension-priv.h.
13447 (struct xmethod_worker): Add constructor and destructor.
13448 <data>: Remove.
13449 <value>: Remove.
13450 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13451 virtual pure methods.
13452 <get_arg_types, get_result_type>: New methods.
13453 (xmethod_worker_ptr): Remove typedef.
13454 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13455 (xmethod_worker_vec): Remove typedef.
13456 (xmethod_worker_up): New typedef.
13457 (invoke_xmethod): Remove.
13458 (clone_xmethod_worker): Remove.
13459 (free_xmethod_worker): Remove.
13460 (free_xmethod_worker_vec): Remove.
13461 (get_xmethod_arg_types): Remove.
13462 (get_xmethod_result_type): Remove.
13463 * valops.c (find_method_list): Use std::vector, don't use
13464 intermediate vector.
13465 (value_find_oload_method_list): Use std::vector.
13466 (find_overload_match): Use std::vector.
13467 (find_oload_champ): Use std::vector.
13468 * value.c (value_free): Use operator delete.
13469 (value_of_xmethod): Rename to...
13470 (value_from_xmethod): ... this. Don't assign
13471 xmethod_worker::value, take rvalue-reference.
13472 (result_type_of_xmethod): Adjust.
13473 (call_xmethod): Adjust.
13474 * value.h: Include extension.h.
13475 (struct xmethod_worker): Don't forward-declare.
13476 (value_of_xmethod): Rename to...
13477 (value_from_xmethod): ... this, take rvalue-reference.
13478 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13479 (struct python_xmethod_worker): ... this, add constructor and
13480 destructor.
13481 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13482 (gdbpy_free_xmethod_worker_data): Rename to...
13483 (python_xmethod_worker::~python_xmethod_worker): ... this and
13484 adjust.
13485 (gdbpy_clone_xmethod_worker_data): Rename to...
13486 (python_xmethod_worker::clone): ... this and adjust.
13487 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13488 temporary vector.
13489 (gdbpy_get_xmethod_arg_types): Rename to...
13490 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13491 (gdbpy_get_xmethod_result_type): Rename to...
13492 (python_xmethod_worker::do_get_result_type): ... this and
13493 adjust.
13494 (gdbpy_invoke_xmethod): Rename to...
13495 (python_xmethod_worker::invoke): ... this and adjust.
13496 (new_python_xmethod_worker): Rename to...
13497 (python_xmethod_worker::python_xmethod_worker): ... this and
13498 adjust.
13499 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13500 Remove.
13501 (gdbpy_free_xmethod_worker_data): Remove.
13502 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13503 (gdbpy_get_xmethod_arg_types): Remove.
13504 (gdbpy_get_xmethod_result_type): Remove.
13505 (gdbpy_invoke_xmethod): Remove.
13506 * python/python.c (python_extension_ops): Remove obsolete
13507 callbacks.
13508
13509 2018-01-05 Pedro Alves <palves@redhat.com>
13510
13511 PR gdb/18653
13512 * common/signals-state-save-restore.c
13513 (save_original_signals_state): New parameter 'quiet'. Warn if we
13514 find a custom handler preinstalled, instead of internal erroring.
13515 But only warn if !quiet.
13516 * common/signals-state-save-restore.h
13517 (save_original_signals_state): New parameter 'quiet'.
13518 * main.c (captured_main_1): Move save_original_signals_state call
13519 after option handling, and pass QUIET.
13520
13521 2018-01-05 Pedro Alves <palves@redhat.com>
13522
13523 * spu-tdep.c (spu_catch_start): Pass
13524 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13525
13526 2018-01-05 Pedro Alves <palves@redhat.com>
13527
13528 PR gdb/22670
13529 * ada-lang.c (literal_symbol_name_matcher): New function.
13530 (ada_get_symbol_name_matcher): Use it for
13531 symbol_name_match_type::SEARCH_NAME.
13532 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13533 it down instead of assuming symbol_name_match_type::FULL.
13534 * block.h (block_lookup_symbol): New parameter 'match_type'.
13535 * c-valprint.c (print_unpacked_pointer): Use
13536 lookup_symbol_search_name instead of lookup_symbol.
13537 * compile/compile-object-load.c (get_out_value_type): Pass down
13538 symbol_name_match_type::SEARCH_NAME.
13539 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13540 symbol_name_match_type::FULL.
13541 * cp-support.c (cp_get_symbol_name_matcher): Handle
13542 symbol_name_match_type::SEARCH_NAME.
13543 * infrun.c (insert_exception_resume_breakpoint): Use
13544 lookup_symbol_search_name.
13545 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13546 * psymtab.c (maintenance_check_psymtabs): Use
13547 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13548 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13549 SYMBOL_SEARCH_NAME.
13550 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13551 if symbol_name_match_type::SEARCH_NAME.
13552 (lookup_symbol_in_language): Pass down
13553 symbol_name_match_type::FULL.
13554 (lookup_symbol_search_name): New.
13555 (lookup_language_this): Pass down
13556 symbol_name_match_type::SEARCH_NAME.
13557 (lookup_symbol_aux, lookup_local_symbol): New parameter
13558 'match_type'. Pass it down.
13559 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13560 (lookup_symbol_search_name): New declaration.
13561 (lookup_symbol_in_block): New 'match_type' parameter.
13562
13563 2018-01-05 Pedro Alves <palves@redhat.com>
13564
13565 PR gdb/22670
13566 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13567 ada_lookup_symbol.
13568 (ada_lookup_symbol): Reimplement in terms of
13569 ada_lookup_symbol_list, bits factored out from
13570 ada_lookup_encoded_symbol.
13571
13572 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13573
13574 * ada-exp.y (write_object_renaming): When subscripting an array
13575 using a symbol as the index, pass the block in call to
13576 ada_lookup_encoded_symbol when looking that symbol up.
13577
13578 2018-01-05 Jerome Guitton <guitton@adacore.com>
13579
13580 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13581 TYPE_INDEX_TYPE.
13582
13583 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13584
13585 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13586 the case where VALUE_LVAL (val0) is not lval_memory.
13587
13588 2018-01-05 Xavier Roirand <roirand@adacore.com>
13589
13590 * ada-valprint.c (print_optional_low_bound): Handle
13591 character-indexed array printing like boolean-indexed array
13592 printing.
13593
13594 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13595
13596 * NEWS: Create a new section for the next release branch.
13597 Rename the section of the current branch, now that it has
13598 been cut.
13599
13600 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13601
13602 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13603 * version.in: Bump version to 8.1.50.DATE-git.
13604
13605 2018-01-03 Xavier Roirand <roirand@adacore.com>
13606
13607 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13608 Add field.
13609 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13610 Add field.
13611 (default_exception_support_info) <catch_handlers_sym>: Add field.
13612 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13613 (ada_exception_name_addr_1): Add "catch handlers" handling.
13614 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13615 Update all callers.
13616 (create_excep_cond_exprs) <ex>: Add parameter.
13617 (re_set_exception): Update create_excep_cond_exprs call.
13618 (print_it_exception, print_one_exception, print_mention_exception)
13619 (print_recreate_exception): Add "catch handler" handling.
13620 (allocate_location_catch_handlers, re_set_catch_handlers)
13621 (check_status_catch_handlers, print_it_catch_handlers)
13622 (print_one_catch_handlers, print_mention_catch_handlers)
13623 (print_recreate_catch_handlers): New function.
13624 (catch_handlers_breakpoint_ops): New variable.
13625 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13626 Add parameter. Add "catch handler" handling.
13627 (ada_exception_sym_name, ada_exception_breakpoint_ops):
13628 Add "catch handler" handling.
13629 (ada_exception_catchpoint_cond_string): Add "catch handler"
13630 handling.
13631 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13632 call.
13633 (catch_ada_handlers_command): New function.
13634 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13635 operations structure.
13636 (_initialize_ada_language): Add "catch handlers" command entry.
13637 * NEWS: Document "catch handlers" feature.
13638
13639 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13640
13641 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13642 account when creating the array type of the slice.
13643 (ada_value_slice): Likewise.
13644
13645 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13646
13647 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13648 New enum value.
13649 (create_array_type_with_stride): Add byte_stride_prop parameter.
13650 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13651 New parameter. Update all callers in this file.
13652 (array_type_has_dynamic_stride): New function.
13653 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13654 of arrays with dynamic byte strides.
13655 * dwarf2read.c (read_array_type): Add support for dynamic
13656 DW_AT_byte_stride attributes.
13657
13658 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13659
13660 * dwarf2read.c (read_unspecified_type): Treat
13661 DW_TAG_enumeration_type DIEs from Ada units as stubs.
13662
13663 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13664
13665 Update copyright year range in all GDB files.
13666
13667 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13668
13669 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13670 and gdb/testsuite/gdb.base/step-line.c.
13671
13672 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13673
13674 * copyright.py (main): Dump the contents of
13675 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13676 even if BY_HAND is empty.
13677
13678 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13679
13680 * top.c (print_gdb_version): Update Copyright year in version
13681 message.
13682
13683 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13684
13685 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13686
13687 For older changes see ChangeLog-2017.
13688 \f
13689 Local Variables:
13690 mode: change-log
13691 left-margin: 8
13692 fill-column: 74
13693 version-control: never
13694 coding: utf-8
13695 End: