1 2018-09-16 Tom Tromey <tom@tromey.com>
3 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
5 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
6 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
7 (py_varobj_iter_new): Likewise.
8 (py_varobj_get_iterator): Use gdbpy_ref.
10 2018-09-16 Tom Tromey <tom@tromey.com>
12 * python/py-threadevent.c (py_get_event_thread): Simplify.
13 * python/py-inferior.c (infpy_thread_from_thread_handle):
14 Return immediately after calling thread_to_thread_object. Use
16 (thread_to_thread_object): Set the exception on a NULL return.
18 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
20 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
22 2018-09-16 Tom Tromey <tom@tromey.com>
24 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
27 2018-09-16 Tom Tromey <tom@tromey.com>
29 * python/python-internal.h (thread_to_thread_object): Change
31 * python/py-inferior.c (thread_to_thread_object): Return a new
33 (infpy_thread_from_thread_handle): Update.
34 * python/py-infthread.c (gdbpy_selected_thread): Update.
35 * python/py-stopevent.c (create_stop_event_object): Update.
36 * python/py-threadevent.c (py_get_event_thread): Return a new
38 (py_get_event_thread): Update.
39 * python/py-event.h (py_get_event_thread): Change return type.
40 * python/py-continueevent.c (create_continue_event_object):
43 2018-09-16 Tom Tromey <tom@tromey.com>
45 * python/py-progspace.c (pspy_get_objfiles): Update.
46 * python/python-internal.h (objfile_to_objfile_object): Change
48 * python/py-newobjfileevent.c (create_new_objfile_event_object):
50 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
52 * python/python.c (gdbpy_get_current_objfile): Update.
53 (gdbpy_objfiles): Update.
54 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
56 (objfile_to_objfile_object): Return a new reference.
57 * python/py-symtab.c (stpy_get_objfile): Update.
58 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
61 2018-09-16 Tom Tromey <tom@tromey.com>
63 * python/py-inferior.c (infpy_get_progspace): Update.
64 * python/python-internal.h (pspace_to_pspace_object): Change
66 * python/py-newobjfileevent.c
67 (create_clear_objfiles_event_object): Update.
68 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
70 * python/python.c (gdbpy_get_current_progspace): Update.
71 (gdbpy_progspaces): Update.
72 * python/py-progspace.c (pspace_to_pspace_object): Return a new
74 * python/py-objfile.c (objfpy_get_progspace): Update.
75 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
78 2018-09-16 Tom Tromey <tom@tromey.com>
80 * python/lib/gdb/__init__.py (current_progspace, objfiles)
81 (solib_name, block_for_pc, find_pc_line): New functions.
82 (execute_unwinders): Update.
83 * python/py-block.c (gdbpy_block_for_pc): Remove.
84 * python/py-inferior.c (infpy_get_progspace): New function.
85 (inferior_object_getset) <progspace>: Add.
86 * python/py-progspace.c (pspy_objfiles): Rewrite.
87 (pspy_solib_name, pspy_block_for_pc)
88 (pspy_find_pc_line, pspy_is_valid): New functions.
89 (progspace_object_methods): Add entries for solib_name,
90 block_for_pc, find_pc_line, is_valid.
91 * python/python-internal.h (gdbpy_block_for_pc)
92 (build_objfiles_list): Don't declare.
93 * python/python.c: Don't include solib.h.
94 (gdbpy_solib_name, gdbpy_find_pc_line)
95 (gdbpy_get_current_progspace, build_objfiles_list)
96 (gdbpy_objfiles): Remove.
97 (GdbMethods) <current_progspace, objfiles, block_for_pc,
98 solib_name, find_pc_line>: Remove entries.
100 2018-09-16 Tom Tromey <tom@tromey.com>
102 * top.c (new_ui_command): Use GNU style for metasyntactic
104 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
106 * maint.c (maintenance_translate_address): Remove "<>" around
108 * interps.c (interpreter_exec_cmd): Use GNU style for
109 metasyntactic variables.
110 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
111 metasyntactic variables.
112 * tracepoint.c (tfind_range_command): Use GNU style for
113 metasyntactic variables.
114 (tfind_outside_command): Likewise.
115 (_initialize_tracepoint): Likewise.
116 * remote.c (extended_remote_target::create_inferior): Use GNU
117 style for metasyntactic variables.
118 * sparc64-tdep.c (adi_examine_command): Use GNU style for
119 metasyntactic variables.
120 (adi_assign_command): Likewise.
122 2018-09-16 Tom Tromey <tom@tromey.com>
124 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
125 metasyntactic variables. Print message if no disassembler options
128 2018-09-15 Tom Tromey <tom@tromey.com>
130 * infcmd.c (get_inferior_args): Return const char *.
131 * inferior.h (get_inferior_args): Return type now const.
132 * linux-tdep.c (linux_fill_prpsinfo): Update.
133 * procfs.c (procfs_target::make_corefile_notes): Update.
135 2018-09-07 Tom Tromey <tom@tromey.com>
137 * python/python.c (execute_gdb_command): Call bpstat_do_actions
140 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
142 * nios2-tdep.c (nios2_type_align): New.
143 (nios2_gdb_arch_init): Install type_align hook.
145 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
147 * eval.c (fake_method::fake_method): Call xzalloc directly for a
148 type that is neither object file owned, nor gdbarch owned.
149 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
151 (alloc_type_instance): Allocate non-objfile owned types on the
153 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
154 using TYPE_ALLOC to ensure memory is allocated on the correct
156 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
157 obstack, or the gdbarch obstack.
158 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
160 2018-09-14 Tom Tromey <tom@tromey.com>
162 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
165 2018-09-14 Tom Tromey <tom@tromey.com>
167 * nat/fork-inferior.c (get_startup_shell): Remove "static".
169 2018-09-13 Tom Tromey <tom@tromey.com>
171 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
174 2018-09-13 Tom Tromey <tom@tromey.com>
176 * exec.c (try_open_exec_file): Use std::string.
178 2018-09-13 Tom Tromey <tom@tromey.com>
180 * utils.h (gdb_bfd_errmsg): Return std::string.
181 * exec.c (exec_file_attach): Update.
182 * compile/compile-object-load.c (compile_object_load): Update.
183 * utils.c (gdb_bfd_errmsg): Return std::string.
185 2018-09-13 Tom Tromey <tom@tromey.com>
187 * procfs.c (struct procinfo_deleter): New.
188 (procinfo_up): New typedef.
189 (do_destroy_procinfo_cleanup): Remove.
190 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
192 2018-09-13 Tom Tromey <tom@tromey.com>
194 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
196 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
197 2018-09-13 Tom Tromey <tom@tromey.com>
199 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
200 (pspy_get_objfiles): New function.
201 (progspace_object_methods): New.
202 (pspace_object_type): Add tp_methods callback.
203 * python/python-internal.h (build_objfiles_list): New
205 * python/python.c (build_objfiles_list): New function.
206 (gdbpy_objfiles): Implement using build_objfiles_list.
207 * NEWS: Mention the Progspace.objfiles method.
209 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
211 * python/py-inferior.c (infpy_get_progspace): New function.
212 (inferior_object_getset): Add progspace property.
213 * NEWS: Mention the new property.
215 2018-09-13 Tom Tromey <tom@tromey.com>
218 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
220 2018-09-13 Tom Tromey <tom@tromey.com>
223 * rust-lang.c (rust_enum_variant): Now static.
224 (rust_empty_enum_p): New function.
225 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
228 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
230 * python/py-inferior.c (infpy_repr): New.
231 (inferior_object_type): Register infpy_repr.
232 * python/py-objfile.c (objfpy_repr): New.
233 (objfile_object_type): Register objfpy_repr.
235 2018-09-12 John Baldwin <jhb@FreeBSD.org>
237 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
239 2018-09-12 John Baldwin <jhb@FreeBSD.org>
241 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
244 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
246 * common/common-utils.c: Don't include '<sys/stat.h>'.
247 (is_regular_file): Move to...
248 * common/filestuff.c (is_regular_file): ... here.
249 * common/common-utils.h (is_regular_file): Move to...
250 * common/filestuff.h (is_regular_file): ... here.
252 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
254 * skip.c (debug_skip): New variable.
255 (skiplist_entry::do_skip_file_p): Add debug output.
256 (skiplist_entry::do_skip_gfile_p): Likewise.
257 (skiplist_entry::skip_function_p): Likewise.
258 (_initialize_step_skip): Create debug command.
259 * NEWS: Mention set/show debug skip.
261 2018-09-11 Xavier Roirand <roirand@adacore.com>
263 * darwin-nat.c (should_disable_startup_with_shell):
265 (darwin_nat_target::create_inferior): Add call.
267 2018-09-11 Xavier Roirand <roirand@adacore.com>
269 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
270 inf_port, msg_state>: Initialize.
271 (struct darwin_thread_info) <signaled, single_step>: Change
273 (struct darwin_thread_info) <event>: Initialize.
275 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
279 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
282 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
285 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
289 * gnulib/aclocal.m4: Regenerate.
290 * gnulib/config.in: Regenerate.
291 * gnulib/configure: Regenerate.
292 * gnulib/import/Makefile.am: Update.
293 * gnulib/import/Makefile.in: Update.
294 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
295 * gnulib/import/_Noreturn.h: ... this.
296 * gnulib/import/alloca.in.h: Update.
297 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
298 * gnulib/import/arg-nonnull.h: ... this.
299 * gnulib/import/assure.h: Update.
300 * gnulib/import/at-func.c: Update.
301 * gnulib/import/basename-lgpl.c: Update.
302 * gnulib/import/extra/snippet/c++defs.h: Rename to...
303 * gnulib/import/c++defs.h: ... this.
304 * gnulib/import/canonicalize-lgpl.c: Update.
305 * gnulib/import/cdefs.h: Update.
306 * gnulib/import/chdir-long.c: Update.
307 * gnulib/import/chdir-long.h: Update.
308 * gnulib/import/cloexec.c: Update.
309 * gnulib/import/cloexec.h: Update.
310 * gnulib/import/close.c: Update.
311 * gnulib/import/closedir.c: Update.
312 * gnulib/import/config.charset: Update.
313 * gnulib/import/dirent-private.h: Update.
314 * gnulib/import/dirent.in.h: Update.
315 * gnulib/import/dirfd.c: Update.
316 * gnulib/import/dirname-lgpl.c: Update.
317 * gnulib/import/dirname.h: Update.
318 * gnulib/import/dosname.h: Update.
319 * gnulib/import/dup-safer-flag.c: Update.
320 * gnulib/import/dup-safer.c: Update.
321 * gnulib/import/dup.c: Update.
322 * gnulib/import/dup2.c: Update.
323 * gnulib/import/errno.in.h: Update.
324 * gnulib/import/error.c: Update.
325 * gnulib/import/error.h: Update.
326 * gnulib/import/exitfail.c: Update.
327 * gnulib/import/exitfail.h: Update.
328 * gnulib/import/extra/update-copyright: Update.
329 * gnulib/import/fchdir.c: Update.
330 * gnulib/import/fcntl.c: Update.
331 * gnulib/import/fcntl.in.h: Update.
332 * gnulib/import/fd-hook.c: Update.
333 * gnulib/import/fd-hook.h: Update.
334 * gnulib/import/fd-safer-flag.c: Update.
335 * gnulib/import/fd-safer.c: Update.
336 * gnulib/import/fdopendir.c: Update.
337 * gnulib/import/filename.h: Update.
338 * gnulib/import/filenamecat-lgpl.c: Update.
339 * gnulib/import/filenamecat.h: Update.
340 * gnulib/import/flexmember.h: Update.
341 * gnulib/import/float+.h: Update.
342 * gnulib/import/float.c: Update.
343 * gnulib/import/float.in.h: Update.
344 * gnulib/import/fnmatch.c: Update.
345 * gnulib/import/fnmatch.in.h: Update.
346 * gnulib/import/fnmatch_loop.c: Update.
347 * gnulib/import/fpucw.h: Update.
348 * gnulib/import/frexp.c: Update.
349 * gnulib/import/frexpl.c: Update.
350 * gnulib/import/fstat.c: Update.
351 * gnulib/import/fstatat.c: Update.
352 * gnulib/import/getcwd-lgpl.c: Update.
353 * gnulib/import/getcwd.c: Update.
354 * gnulib/import/getdtablesize.c: Update.
355 * gnulib/import/getlogin_r.c: Update.
356 * gnulib/import/getprogname.c: Update.
357 * gnulib/import/getprogname.h: Update.
358 * gnulib/import/gettext.h: Update.
359 * gnulib/import/gettimeofday.c: Update.
360 * gnulib/import/glob-libc.h: Update.
361 * gnulib/import/glob.c: Update.
362 * gnulib/import/glob.in.h: Update.
363 * gnulib/import/glob_internal.h: Update.
364 * gnulib/import/glob_pattern_p.c: Update.
365 * gnulib/import/globfree.c: Update.
366 * gnulib/import/hard-locale.c: Update.
367 * gnulib/import/hard-locale.h: Update.
368 * gnulib/import/intprops.h: Update.
369 * gnulib/import/inttypes.in.h: Update.
370 * gnulib/import/isnan.c: Update.
371 * gnulib/import/isnand-nolibm.h: Update.
372 * gnulib/import/isnand.c: Update.
373 * gnulib/import/isnanl-nolibm.h: Update.
374 * gnulib/import/isnanl.c: Update.
375 * gnulib/import/itold.c: Update.
376 * gnulib/import/libc-config.h: Update.
377 * gnulib/import/limits.in.h: Update.
378 * gnulib/import/localcharset.c: Update.
379 * gnulib/import/localcharset.h: Update.
380 * gnulib/import/localtime-buffer.c: Update.
381 * gnulib/import/localtime-buffer.h: Update.
382 * gnulib/import/lstat.c: Update.
383 * gnulib/import/m4/00gnulib.m4: Update.
384 * gnulib/import/m4/__inline.m4: Update.
385 * gnulib/import/m4/absolute-header.m4: Update.
386 * gnulib/import/m4/alloca.m4: Update.
387 * gnulib/import/m4/builtin-expect.m4: Update.
388 * gnulib/import/m4/canonicalize.m4: Update.
389 * gnulib/import/m4/chdir-long.m4: Update.
390 * gnulib/import/m4/close.m4: Update.
391 * gnulib/import/m4/closedir.m4: Update.
392 * gnulib/import/m4/configmake.m4: Update.
393 * gnulib/import/m4/d-ino.m4: Update.
394 * gnulib/import/m4/d-type.m4: Update.
395 * gnulib/import/m4/dirent_h.m4: Update.
396 * gnulib/import/m4/dirfd.m4: Update.
397 * gnulib/import/m4/dirname.m4: Update.
398 * gnulib/import/m4/double-slash-root.m4: Update.
399 * gnulib/import/m4/dup.m4: Update.
400 * gnulib/import/m4/dup2.m4: Update.
401 * gnulib/import/m4/eealloc.m4: Update.
402 * gnulib/import/m4/environ.m4: Update.
403 * gnulib/import/m4/errno_h.m4: Update.
404 * gnulib/import/m4/error.m4: Update.
405 * gnulib/import/m4/exponentd.m4: Update.
406 * gnulib/import/m4/exponentl.m4: Update.
407 * gnulib/import/m4/extensions.m4: Update.
408 * gnulib/import/m4/extern-inline.m4: Update.
409 * gnulib/import/m4/fchdir.m4: Update.
410 * gnulib/import/m4/fcntl-o.m4: Update.
411 * gnulib/import/m4/fcntl.m4: Update.
412 * gnulib/import/m4/fcntl_h.m4: Update.
413 * gnulib/import/m4/fdopendir.m4: Update.
414 * gnulib/import/m4/filenamecat.m4: Update.
415 * gnulib/import/m4/flexmember.m4: Update.
416 * gnulib/import/m4/float_h.m4: Update.
417 * gnulib/import/m4/fnmatch.m4: Update.
418 * gnulib/import/m4/fnmatch_h.m4: Update.
419 * gnulib/import/m4/fpieee.m4: Update.
420 * gnulib/import/m4/frexp.m4: Update.
421 * gnulib/import/m4/frexpl.m4: Update.
422 * gnulib/import/m4/fstat.m4: Update.
423 * gnulib/import/m4/fstatat.m4: Update.
424 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
425 * gnulib/import/m4/getcwd-path-max.m4: Update.
426 * gnulib/import/m4/getcwd.m4: Update.
427 * gnulib/import/m4/getdtablesize.m4: Update.
428 * gnulib/import/m4/getlogin.m4: Update.
429 * gnulib/import/m4/getlogin_r.m4: Update.
430 * gnulib/import/m4/getpagesize.m4: Update.
431 * gnulib/import/m4/getprogname.m4: Update.
432 * gnulib/import/m4/gettimeofday.m4: Update.
433 * gnulib/import/m4/glibc21.m4: Update.
434 * gnulib/import/m4/glob.m4: Update.
435 * gnulib/import/m4/glob_h.m4: Update.
436 * gnulib/import/m4/gnulib-cache.m4: Update.
437 * gnulib/import/m4/gnulib-common.m4: Update.
438 * gnulib/import/m4/gnulib-comp.m4: Update.
439 * gnulib/import/m4/gnulib-tool.m4: Update.
440 * gnulib/import/m4/hard-locale.m4: Update.
441 * gnulib/import/m4/include_next.m4: Update.
442 * gnulib/import/m4/inttypes-pri.m4: Update.
443 * gnulib/import/m4/inttypes.m4: Update.
444 * gnulib/import/m4/isnand.m4: Update.
445 * gnulib/import/m4/isnanl.m4: Update.
446 * gnulib/import/m4/largefile.m4: Update.
447 * gnulib/import/m4/limits-h.m4: Update.
448 * gnulib/import/m4/localcharset.m4: Update.
449 * gnulib/import/m4/locale-fr.m4: Update.
450 * gnulib/import/m4/locale-ja.m4: Update.
451 * gnulib/import/m4/locale-zh.m4: Update.
452 * gnulib/import/m4/localtime-buffer.m4: Update.
453 * gnulib/import/m4/longlong.m4: Update.
454 * gnulib/import/m4/lstat.m4: Update.
455 * gnulib/import/m4/malloc.m4: Update.
456 * gnulib/import/m4/malloca.m4: Update.
457 * gnulib/import/m4/math_h.m4: Update.
458 * gnulib/import/m4/mbrtowc.m4: Update.
459 * gnulib/import/m4/mbsinit.m4: Update.
460 * gnulib/import/m4/mbsrtowcs.m4: Update.
461 * gnulib/import/m4/mbstate_t.m4: Update.
462 * gnulib/import/m4/memchr.m4: Update.
463 * gnulib/import/m4/memmem.m4: Update.
464 * gnulib/import/m4/mempcpy.m4: Update.
465 * gnulib/import/m4/memrchr.m4: Update.
466 * gnulib/import/m4/mkdir.m4: Update.
467 * gnulib/import/m4/mkstemp.m4: Update.
468 * gnulib/import/m4/mmap-anon.m4: Update.
469 * gnulib/import/m4/mode_t.m4: Update.
470 * gnulib/import/m4/msvc-inval.m4: Update.
471 * gnulib/import/m4/msvc-nothrow.m4: Update.
472 * gnulib/import/m4/multiarch.m4: Update.
473 * gnulib/import/m4/nocrash.m4: Update.
474 * gnulib/import/m4/off_t.m4: Update.
475 * gnulib/import/m4/onceonly.m4: Update.
476 * gnulib/import/m4/open-cloexec.m4: Update.
477 * gnulib/import/m4/open.m4: Update.
478 * gnulib/import/m4/openat.m4: Update.
479 * gnulib/import/m4/opendir.m4: Update.
480 * gnulib/import/m4/pathmax.m4: Update.
481 * gnulib/import/m4/rawmemchr.m4: Update.
482 * gnulib/import/m4/readdir.m4: Update.
483 * gnulib/import/m4/readlink.m4: Update.
484 * gnulib/import/m4/realloc.m4: Update.
485 * gnulib/import/m4/rename.m4: Update.
486 * gnulib/import/m4/rewinddir.m4: Update.
487 * gnulib/import/m4/rmdir.m4: Update.
488 * gnulib/import/m4/save-cwd.m4: Update.
489 * gnulib/import/m4/secure_getenv.m4: Update.
490 * gnulib/import/m4/setenv.m4: Update.
491 * gnulib/import/m4/signal_h.m4: Update.
492 * gnulib/import/m4/ssize_t.m4: Update.
493 * gnulib/import/m4/stat-time.m4: Update.
494 * gnulib/import/m4/stat.m4: Update.
495 * gnulib/import/m4/std-gnu11.m4: Update.
496 * gnulib/import/m4/stdbool.m4: Update.
497 * gnulib/import/m4/stddef_h.m4: Update.
498 * gnulib/import/m4/stdint.m4: Update.
499 * gnulib/import/m4/stdio_h.m4: Update.
500 * gnulib/import/m4/stdlib_h.m4: Update.
501 * gnulib/import/m4/strchrnul.m4: Update.
502 * gnulib/import/m4/strdup.m4: Update.
503 * gnulib/import/m4/strerror.m4: Update.
504 * gnulib/import/m4/string_h.m4: Update.
505 * gnulib/import/m4/strstr.m4: Update.
506 * gnulib/import/m4/strtok_r.m4: Update.
507 * gnulib/import/m4/sys_socket_h.m4: Update.
508 * gnulib/import/m4/sys_stat_h.m4: Update.
509 * gnulib/import/m4/sys_time_h.m4: Update.
510 * gnulib/import/m4/sys_types_h.m4: Update.
511 * gnulib/import/m4/tempname.m4: Update.
512 * gnulib/import/m4/time_h.m4: Update.
513 * gnulib/import/m4/unistd-safer.m4: Update.
514 * gnulib/import/m4/unistd_h.m4: Update.
515 * gnulib/import/m4/warn-on-use.m4: Update.
516 * gnulib/import/m4/wchar_h.m4: Update.
517 * gnulib/import/m4/wchar_t.m4: Update.
518 * gnulib/import/m4/wctype_h.m4: Update.
519 * gnulib/import/m4/wint_t.m4: Update.
520 * gnulib/import/malloc.c: Update.
521 * gnulib/import/malloc/scratch_buffer.h: Update.
522 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
523 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
524 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
525 * gnulib/import/malloca.c: Update.
526 * gnulib/import/malloca.h: Update.
527 * gnulib/import/malloca.valgrind: Update.
528 * gnulib/import/math.in.h: Update.
529 * gnulib/import/mbrtowc.c: Update.
530 * gnulib/import/mbsinit.c: Update.
531 * gnulib/import/mbsrtowcs-impl.h: Update.
532 * gnulib/import/mbsrtowcs-state.c: Update.
533 * gnulib/import/mbsrtowcs.c: Update.
534 * gnulib/import/memchr.c: Update.
535 * gnulib/import/memmem.c: Update.
536 * gnulib/import/mempcpy.c: Update.
537 * gnulib/import/memrchr.c: Update.
538 * gnulib/import/mkdir.c: Update.
539 * gnulib/import/mkstemp.c: Update.
540 * gnulib/import/msvc-inval.c: Update.
541 * gnulib/import/msvc-inval.h: Update.
542 * gnulib/import/msvc-nothrow.c: Update.
543 * gnulib/import/msvc-nothrow.h: Update.
544 * gnulib/import/open.c: Update.
545 * gnulib/import/openat-die.c: Update.
546 * gnulib/import/openat-priv.h: Update.
547 * gnulib/import/openat-proc.c: Update.
548 * gnulib/import/openat.c: Update.
549 * gnulib/import/openat.h: Update.
550 * gnulib/import/opendir.c: Update.
551 * gnulib/import/pathmax.h: Update.
552 * gnulib/import/pipe-safer.c: Update.
553 * gnulib/import/rawmemchr.c: Update.
554 * gnulib/import/readdir.c: Update.
555 * gnulib/import/readlink.c: Update.
556 * gnulib/import/realloc.c: Update.
557 * gnulib/import/ref-add.sin: Update.
558 * gnulib/import/ref-del.sin: Update.
559 * gnulib/import/rename.c: Update.
560 * gnulib/import/rewinddir.c: Update.
561 * gnulib/import/rmdir.c: Update.
562 * gnulib/import/same-inode.h: Update.
563 * gnulib/import/save-cwd.c: Update.
564 * gnulib/import/save-cwd.h: Update.
565 * gnulib/import/scratch_buffer.h: Update.
566 * gnulib/import/secure_getenv.c: Update.
567 * gnulib/import/setenv.c: Update.
568 * gnulib/import/signal.in.h: Update.
569 * gnulib/import/stat-time.c: Update.
570 * gnulib/import/stat-time.h: Update.
571 * gnulib/import/stat-w32.c: Update.
572 * gnulib/import/stat-w32.h: Update.
573 * gnulib/import/stat.c: Update.
574 * gnulib/import/stdbool.in.h: Update.
575 * gnulib/import/stddef.in.h: Update.
576 * gnulib/import/stdint.in.h: Update.
577 * gnulib/import/stdio.in.h: Update.
578 * gnulib/import/stdlib.in.h: Update.
579 * gnulib/import/str-two-way.h: Update.
580 * gnulib/import/strchrnul.c: Update.
581 * gnulib/import/strdup.c: Update.
582 * gnulib/import/streq.h: Update.
583 * gnulib/import/strerror-override.c: Update.
584 * gnulib/import/strerror-override.h: Update.
585 * gnulib/import/strerror.c: Update.
586 * gnulib/import/string.in.h: Update.
587 * gnulib/import/stripslash.c: Update.
588 * gnulib/import/strnlen1.c: Update.
589 * gnulib/import/strnlen1.h: Update.
590 * gnulib/import/strstr.c: Update.
591 * gnulib/import/strtok_r.c: Update.
592 * gnulib/import/sys_stat.in.h: Update.
593 * gnulib/import/sys_time.in.h: Update.
594 * gnulib/import/sys_types.in.h: Update.
595 * gnulib/import/tempname.c: Update.
596 * gnulib/import/tempname.h: Update.
597 * gnulib/import/time.in.h: Update.
598 * gnulib/import/unistd--.h: Update.
599 * gnulib/import/unistd-safer.h: Update.
600 * gnulib/import/unistd.in.h: Update.
601 * gnulib/import/unsetenv.c: Update.
602 * gnulib/import/verify.h: Update.
603 * gnulib/import/extra/snippet/warn-on-use.h: Update.
604 * gnulib/import/wchar.in.h: Update.
605 * gnulib/import/wctype.in.h: Update.
606 * gnulib/import/xalloc-oversized.h: Update.
607 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
608 "53e2c179f26a890fa6685af4b6c1397ee370433b".
610 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
612 * record-btrace.c (get_thread_current_frame): Remove
615 2018-09-10 Jerome Guitton <guitton@adacore.com>
617 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
618 with check_tag to 1 if and only if the type is tagged and the
619 component being searched cannot been found in the current
620 view. Otherwise, always call ada_to_fixed_type with
623 2018-09-10 Xavier Roirand <roirand@adacore.com>
625 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
627 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
628 * ada-varobj.c (ada_varobj_get_number_of_children,
629 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
631 2018-09-10 Xavier Roirand <roirand@adacore.com>
633 * ada-valprint.c (ada_value_print): Use type instead of
636 2018-09-10 Xavier Roirand <roirand@adacore.com>
638 * ada-lang.c (ada_value_subscript): Handle case when parameter is
639 an array of access to unconstrained array.
641 2018-09-10 Xavier Roirand <roirand@adacore.com>
643 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
644 (ada_check_typedef): Use it.
646 2018-09-10 Xavier Roirand <roirand@adacore.com>
648 * ada-varobj.c (ada_varobj_describe_struct_child)
649 (ada_varobj_describe_child): Handle union case like struct one.
651 2018-09-10 Tom Tromey <tom@tromey.com>
654 * python/python.c (_initialize_python): Make example in "python"
655 help work in Python 3.
657 2018-09-10 Eli Zaretskii <eliz@gnu.org>
659 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
660 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
661 $(EXEEXT) to the script, as it is not a program.
663 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
665 * python/py-prettyprint.c (pretty_print_one_value): Return
667 (print_string_repr): Adjust.
668 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
669 * python/python-internal.h (apply_varobj_pretty_printer): Return
671 * varobj.c (varobj_value_get_print_value): Adjust.
673 2018-09-08 Tom Tromey <tom@tromey.com>
676 * python/py-prettyprint.c (pretty_print_one_value): Check for
679 2018-09-08 Joel Brobecker <brobecker@adacore.com>
681 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
682 replace_operator_with_call.
684 2018-09-08 Joel Brobecker <brobecker@adacore.com>
686 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
688 2018-09-08 Joel Brobecker <brobecker@adacore.com>
690 * ada-typeprint.c (print_range): Print the bounds using TYPE
691 rather than its TYPE_TARGET_TYPE.
693 2018-09-08 Joel Brobecker <brobecker@adacore.com>
695 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
696 call to ada_to_fixed_value_create.
698 2018-09-08 Jerome Guitton <guitton@adacore.com>
700 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
702 2018-09-08 Joel Brobecker <brobecker@adacore.com>
704 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
707 2018-09-08 Joel Brobecker <brobecker@adacore.com>
709 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
710 Move update of loop variable "fi".
712 2018-09-08 Joel Brobecker <brobecker@adacore.com>
714 * ada-lang.c (value_assign_to_component): In the case of
715 big-endian targets, extract the bits of the given VAL
716 using an src_offset of zero if container is not a scalar.
718 2018-09-06 Simon Ser <contact@emersion.fr>
721 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
722 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
723 * fbsd-tdep.c (fbsd_make_note_desc): New.
724 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
725 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
726 * target.h (enum target_object) Add FreeBSD-specific
727 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
729 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
731 * compile/compile-c.h (generate_c_for_variable_locations):
732 Change reference to pointer.
733 * compile/compile-c-support.c (compile_program) <compute>:
735 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
736 (generate_c_for_for_one_variable): Likewise
737 (generate_c_for_variable_locations): Likewise
738 * compile/compile-c-types.c (compile_c_instance::convert_type):
740 * compile/compile-cplus-symbols.c (convert_one_symbol):
741 std::move the scope passed to enter_scope.
742 * compile/compile-cplus-types.c
743 (compile_cplus_instance::enter_scope): Make parameter
745 (compile_cplus_instance::new_scope): Change reference to
747 (compile_cplus_instance::convert_type): Likewise
748 (compile_cplus_convert_typedef): std::move the scope passed to
750 (compile_cplus_convert_struct_or_union): Likewise.
751 (compile_cplus_convert_enum): Likewise.
752 (compile_cplus_convert_namespace): Likewise.
753 * compile/compile-cplus.h (compile_cplus_instance)
754 <enter_scope>: Make parameter rvalue-reference.
755 * compile/compile-internal.h (compile_instance)
756 <get_cached_type>: Likewise
757 * compile/compile-loc2c.c (push): Likewise
761 (print_label): Likewise
762 (pushf_register_address): Likewise
763 (pushf_register): Likewise
764 (do_compile_dwarf_expr_to_c): Likewise
765 (compile_dwarf_expr_to_c): Likewise
766 (compile_dwarf_bounds_to_c): Likewise
767 * compile/compile.c (compile_instance::get_cached_type):
769 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
770 (compile_dwarf_bounds_to_c): Likewise
771 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
772 (dwarf2_compile_property_to_c): Likewise
773 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
774 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
777 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
779 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
780 * tui/tui-data.c (init_content_element): Don't initialize it.
782 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
784 * tui/tui-data.h (struct tui_win_info)
785 <detail::opaque>: Remove.
786 * tui/tui-data.c (init_win_info): Remove assignment.
788 2018-09-05 Tom Tromey <tom@tromey.com>
790 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
792 * target-float.c (host_float_ops<T>::to_string)
793 (host_float_ops<T>::from_string): Use
794 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
795 * configure: Rebuild.
797 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
799 * printcmd.c (printf_c_string): Use
800 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
801 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
803 2018-09-05 Tom Tromey <tom@tromey.com>
805 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
807 2018-09-05 Tom de Vries <tdevries@suse.de>
809 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
810 with resolve_abstract_p == true.
811 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
812 defaulting to false. Propagate resolve_abstract_p to
813 dwarf2_fetch_die_loc_sect_off.
814 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
815 parameter, defaulting to false.
816 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
817 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
819 * dwarf2read.h (struct die_info): Forward-declare.
820 (die_info_ptr): New typedef.
821 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
823 2018-09-05 Joel Brobecker <brobecker@adacore.com>
827 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
828 Pedro Alves <palves@redhat.com>
830 * gnulib/Makefile.in (aclocal_m4_deps): Move to
831 "aclocal-m4-deps.mk". Include file here.
832 $(srcdir)/aclocal.m4: Add "configure.ac".
833 * gnulib/aclocal-m4-deps.mk: New file.
834 * gnulib/update-gnulib.sh: Automatically update
835 "aclocal-m4-deps.mk".
837 2018-09-04 Tom Tromey <tom@tromey.com>
839 * configure: Rebuild.
840 * configure.ac: Remove multi-ice code.
842 2018-09-04 Tom Tromey <tom@tromey.com>
844 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
847 2018-09-04 Tom Tromey <tom@tromey.com>
849 * Makefile.in (printcmd.o, target-float.o): Remove.
850 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
852 2018-09-04 Tom Tromey <tom@tromey.com>
854 * gnulib/Makefile.in: Remove obsolete comment.
855 * Makefile.in: Remove obsolete comment.
857 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
859 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
862 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
864 * riscv-tdep.c: Add 'prologue-value.h' include.
865 (struct riscv_unwind_cache): New struct.
866 (riscv_debug_unwinder): New global.
867 (riscv_scan_prologue): Update arguments, capture register details
869 (riscv_skip_prologue): Reformat arguments line, move end of
870 prologue calculation into riscv_scan_prologue.
871 (riscv_frame_cache): Update return type, create
872 riscv_unwind_cache, scan the prologue, and fill in remaining cache
874 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
875 (riscv_frame_prev_register): Use the trad_frame within the
877 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
880 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
882 * trad-frame.h (trad_frame_set_realreg): Declare.
883 (trad_frame_set_addr): Declare.
884 * trad-frame.c (trad_frame_set_realreg): Define new function.
885 (trad_frame_set_addr): Define new function.
886 (trad_frame_set_reg_realreg): Use new function.
887 (trad_frame_set_reg_addr): Use new function.
889 2018-09-01 Keith Seitz <keiths@redhat.com>
891 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
892 pulongest instead of "%lld".
893 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
896 2018-08-31 Tom Tromey <tom@tromey.com>
898 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
901 2018-08-31 Pedro Alves <palves@redhat.com>
903 * gdbarch.h: Regenerate.
905 2018-08-31 Pedro Alves <palves@redhat.com>
907 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
908 * target.h (Hardware watchpoint interfaces): Describe
909 continuable/steppable/non-steppable watchpoints.
910 * gdbarch.h, gdbarch.c: Regenerate.
912 2018-08-31 Pedro Alves <palves@redhat.com>
914 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
917 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
918 * target.h (target_ops::have_continuable_watchpoint): Delete.
919 (target_have_continuable_watchpoint): Delete.
920 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
921 * target-delegates.c: Regenerate.
923 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
925 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
926 the files present in "gnulib/import/m4/".
928 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
930 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
931 c.sw, c.swsp, and c.sdsp.
933 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
935 * riscv-tdep.c (struct riscv_inferior_data): Delete.
936 (riscv_read_misa_reg): Don't cache value read into inferior data.
937 (riscv_new_inferior_data): Delete.
938 (riscv_inferior_data_cleanup): Delete.
939 (riscv_inferior_data): Delete.
940 (riscv_invalidate_inferior_data): Delete.
941 (_initialize_riscv_tdep): Remove initialisation of inferior data.
943 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
945 * compile/compile-cplus-types.c
946 (compile_cplus_instance::leave_scope): Take the address of scope
948 (compile_cplus_instance::convert_qualified_base): Compare quals
951 2018-08-30 Keith Seitz <keiths@redhat.com>
953 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
954 Use "%s" and host_address_to_string instead of "%p" in printf.
956 2018-08-29 Keith Seitz <keiths@redhat.com>
958 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
959 and compile-cplus-types.c.
960 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
961 * c-lang.c (cplus_language_defn): Set C++ compile functions.
962 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
964 * compile/compile-c-support.c: Include compile-cplus.h.
965 (load_libcompile): Templatize.
966 (get_compile_context): "New" function.
967 (c_get_compile_context): Use get_compile_context.
968 (cplus_get_compile_context): New function.
969 (cplus_push_user_expression, cplus_pop_user_expression)
970 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
971 (cplus_compute_program): Define new structs/functions.
972 * compile/compile-cplus-symmbols.c: New file.
973 * compile/compile-cplus-types.c: New file.
974 * compile/compile-cplus.h: New file.
975 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
977 * compile/compile-object-load.c (get_out_value_type): Use
978 strncmp_iw when comparing symbol names.
979 (compile_object_load): Add mst_bss and mst_data.
980 * compile/compile.c (_initialize_compile): Remove
981 -Wno-implicit-function-declaration from `compile_args'.
982 * compile/gcc-cp-plugin.h: New file.
983 * NEWS: Mention C++ compile support and new debug options.
985 2018-08-29 Keith Seitz <keiths@redhat.com>
987 * linespec.c (collect_info::add_symbol): Make virtual.
988 (struct symbol_searcher_collect_info): New struct.
989 (symbol_searcher::find_all_symbols): New method.
990 * symtab.h (class symbol_searcher): New class.
992 2018-08-29 Keith Seitz <keiths@redhat.com>
994 * linespec.c (struct linespec) <function_symbols, label_symbols>:
995 Change to vector of block_symbol. Update all users.
996 (struct collect_info) <symbols>: Likewise.
997 (collect_info::add_symbol): Take block_symbol as argument.
999 (decode_compound_collector) <m_symbols>: Change type to vector
1000 of block_symbol. Update all users.
1001 (decode_compound_collector::operator ()): Change parameter type
1003 (find_method, find_function_symbols, find_linespec_symbols)
1004 (find_label_symbols_in_block, find_label_symbols): Change symbol
1005 vectors to block_symbol vectors.
1006 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1009 2018-08-29 Keith Seitz <keiths@redhat.com>
1011 * linespec.c (symbolp): Remove typedef and VEC definitions.
1012 (bound_minimal_symbol_d): Likewise.
1014 2018-08-29 Keith Seitz <keiths@redhat.com>
1016 * linespec.c (decode_compound_collector::decode_compound_collector):
1017 Remove initialization for `m_symtabs'.
1018 (decode_compound_collector::release_symbols): Change return type
1019 to std::vector. Update all callers.
1020 (class decode_compound_collector) <m_symbols>: Change type to
1022 (lookup_prefix_sym): Change return type to std::vector. Update all
1024 (compare_symbols): Remove.
1025 (std_compare_symbols): Rename to `compare_symbols'.
1026 (find_method): Change `sym_classes' parameter to std::vector.
1027 Update all callers. Use std::sort to sort sym_classes.
1028 (find_linespec_symbols): Remove cleanup.
1030 2018-08-29 Keith Seitz <keiths@redhat.com>
1032 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1033 std::vector. Update all users.
1034 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1035 (struct collect_info) <minimal_symbols>: Likewise.
1036 (compare_msymbols): Return bool. Change parameters to const
1037 bound_minimal_symbol references.
1038 (find_method, find_function_symbols, find_linespec_symbols): Change
1039 `minsyms' parameter to std::vector. Update all callers.
1041 2018-08-29 Keith Seitz <keiths@redhat.com>
1043 * linespec.c (struct linespec) <label_symbols>: Change type to
1044 std::vector. Update all users.
1045 (find_label_symbols_in_block): Change `result' parameter to
1046 std::vector. Update all callers.
1047 (find_label_symbols): Return std::vector. Update all callers.
1049 2018-08-29 Keith Seitz <keiths@redhat.com>
1051 * linespec.c (struct linespec) <function_symbols>: Change type to
1052 std::vector. Update all users.
1053 (struct collect_info) <function_symbols>: Likewise.
1054 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1055 (std_compare_symbols): New function.
1056 (find_method, find_function_symbols, find_linespec_symbols)
1057 (find_label_symbols_in_block): Change `symbols' parameter to
1058 std::vector. Update all callers.
1059 (find_label_symbols): Likewise for `function_symbols' and
1062 2018-08-29 Keith Seitz <keiths@redhat.com>
1064 * linespec.c (symtab_vector_up): Define.
1065 (struct linespec) <file_symtabs>: Change type to std::vector *.
1067 (struct collect_info) <file_symtabs>: Likewise.
1068 (collect_symtabs_from_filename): Return symtab_vector_up.
1070 (decode_objc): Remove cleanup.
1071 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1072 (symtab_collector::release_symtabs): Return symtab_vector_up.
1074 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1076 (collect_symtabs_from_filename, symtabs_from_filename): Return
1077 symtab_vector_up. Update all callers.
1079 2018-08-29 Tom Tromey <tom@tromey.com>
1081 * csky-tdep.c (csky_analyze_prologue): Use
1082 core_addr_to_string_nz.
1084 2018-08-29 Tom Tromey <tom@tromey.com>
1086 * windows-nat.c (struct xlate_exception) <them>: Change type to
1088 (xlate): Fix formatting. Remove last entry.
1089 (struct xlate_exception, xlate): Comment out.
1090 (windows_nat_target::resume): Use ranged for.
1092 2018-08-29 Jim Wilson <jimw@sifive.com>
1094 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1095 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1097 (riscv_linux_nat_target::store_registers): Likewise.
1099 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1103 * gnulib/aclocal.m4: Regenerate.
1104 * gnulib/config.in: Regenerate.
1105 * gnulib/configure: Regenerate.
1106 * gnulib/import/Makefile.am: Update.
1107 * gnulib/import/Makefile.in: Update.
1108 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1109 * gnulib/import/_Noreturn.h: ... this.
1110 * gnulib/import/alloca.in.h: Update.
1111 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1112 * gnulib/import/arg-nonnull.h: ... this.
1113 * gnulib/import/assure.h: Update.
1114 * gnulib/import/at-func.c: Update.
1115 * gnulib/import/basename-lgpl.c: Update.
1116 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1117 * gnulib/import/c++defs.h: ... this.
1118 * gnulib/import/canonicalize-lgpl.c: Update.
1119 * gnulib/import/cdefs.h: Update.
1120 * gnulib/import/chdir-long.c: Update.
1121 * gnulib/import/chdir-long.h: Update.
1122 * gnulib/import/cloexec.c: Update.
1123 * gnulib/import/cloexec.h: Update.
1124 * gnulib/import/close.c: Update.
1125 * gnulib/import/closedir.c: Update.
1126 * gnulib/import/config.charset: Update.
1127 * gnulib/import/dirent-private.h: Update.
1128 * gnulib/import/dirent.in.h: Update.
1129 * gnulib/import/dirfd.c: Update.
1130 * gnulib/import/dirname-lgpl.c: Update.
1131 * gnulib/import/dirname.h: Update.
1132 * gnulib/import/dosname.h: Update.
1133 * gnulib/import/dup-safer-flag.c: Update.
1134 * gnulib/import/dup-safer.c: Update.
1135 * gnulib/import/dup.c: Update.
1136 * gnulib/import/dup2.c: Update.
1137 * gnulib/import/errno.in.h: Update.
1138 * gnulib/import/error.c: Update.
1139 * gnulib/import/error.h: Update.
1140 * gnulib/import/exitfail.c: Update.
1141 * gnulib/import/exitfail.h: Update.
1142 * gnulib/import/extra/update-copyright: Update.
1143 * gnulib/import/fchdir.c: Update.
1144 * gnulib/import/fcntl.c: Update.
1145 * gnulib/import/fcntl.in.h: Update.
1146 * gnulib/import/fd-hook.c: Update.
1147 * gnulib/import/fd-hook.h: Update.
1148 * gnulib/import/fd-safer-flag.c: Update.
1149 * gnulib/import/fd-safer.c: Update.
1150 * gnulib/import/fdopendir.c: Update.
1151 * gnulib/import/filename.h: Update.
1152 * gnulib/import/filenamecat-lgpl.c: Update.
1153 * gnulib/import/filenamecat.h: Update.
1154 * gnulib/import/flexmember.h: Update.
1155 * gnulib/import/float+.h: Update.
1156 * gnulib/import/float.c: Update.
1157 * gnulib/import/float.in.h: Update.
1158 * gnulib/import/fnmatch.c: Update.
1159 * gnulib/import/fnmatch.in.h: Update.
1160 * gnulib/import/fnmatch_loop.c: Update.
1161 * gnulib/import/fpucw.h: Update.
1162 * gnulib/import/frexp.c: Update.
1163 * gnulib/import/frexpl.c: Update.
1164 * gnulib/import/fstat.c: Update.
1165 * gnulib/import/fstatat.c: Update.
1166 * gnulib/import/getcwd-lgpl.c: Update.
1167 * gnulib/import/getcwd.c: Update.
1168 * gnulib/import/getdtablesize.c: Update.
1169 * gnulib/import/getlogin_r.c: Update.
1170 * gnulib/import/getprogname.c: Update.
1171 * gnulib/import/getprogname.h: Update.
1172 * gnulib/import/gettext.h: Update.
1173 * gnulib/import/gettimeofday.c: Update.
1174 * gnulib/import/glob-libc.h: Update.
1175 * gnulib/import/glob.c: Update.
1176 * gnulib/import/glob.in.h: Update.
1177 * gnulib/import/glob_internal.h: Update.
1178 * gnulib/import/glob_pattern_p.c: Update.
1179 * gnulib/import/globfree.c: Update.
1180 * gnulib/import/hard-locale.c: Update.
1181 * gnulib/import/hard-locale.h: Update.
1182 * gnulib/import/intprops.h: Update.
1183 * gnulib/import/inttypes.in.h: Update.
1184 * gnulib/import/isnan.c: Update.
1185 * gnulib/import/isnand-nolibm.h: Update.
1186 * gnulib/import/isnand.c: Update.
1187 * gnulib/import/isnanl-nolibm.h: Update.
1188 * gnulib/import/isnanl.c: Update.
1189 * gnulib/import/itold.c: Update.
1190 * gnulib/import/libc-config.h: Update.
1191 * gnulib/import/limits.in.h: Update.
1192 * gnulib/import/localcharset.c: Update.
1193 * gnulib/import/localcharset.h: Update.
1194 * gnulib/import/localtime-buffer.c: Update.
1195 * gnulib/import/localtime-buffer.h: Update.
1196 * gnulib/import/lstat.c: Update.
1197 * gnulib/import/m4/00gnulib.m4: Update.
1198 * gnulib/import/m4/__inline.m4: Update.
1199 * gnulib/import/m4/absolute-header.m4: Update.
1200 * gnulib/import/m4/alloca.m4: Update.
1201 * gnulib/import/m4/builtin-expect.m4: Update.
1202 * gnulib/import/m4/canonicalize.m4: Update.
1203 * gnulib/import/m4/chdir-long.m4: Update.
1204 * gnulib/import/m4/close.m4: Update.
1205 * gnulib/import/m4/closedir.m4: Update.
1206 * gnulib/import/m4/configmake.m4: Update.
1207 * gnulib/import/m4/d-ino.m4: Update.
1208 * gnulib/import/m4/d-type.m4: Update.
1209 * gnulib/import/m4/dirent_h.m4: Update.
1210 * gnulib/import/m4/dirfd.m4: Update.
1211 * gnulib/import/m4/dirname.m4: Update.
1212 * gnulib/import/m4/double-slash-root.m4: Update.
1213 * gnulib/import/m4/dup.m4: Update.
1214 * gnulib/import/m4/dup2.m4: Update.
1215 * gnulib/import/m4/eealloc.m4: Update.
1216 * gnulib/import/m4/environ.m4: Update.
1217 * gnulib/import/m4/errno_h.m4: Update.
1218 * gnulib/import/m4/error.m4: Update.
1219 * gnulib/import/m4/exponentd.m4: Update.
1220 * gnulib/import/m4/exponentl.m4: Update.
1221 * gnulib/import/m4/extensions.m4: Update.
1222 * gnulib/import/m4/extern-inline.m4: Update.
1223 * gnulib/import/m4/fchdir.m4: Update.
1224 * gnulib/import/m4/fcntl-o.m4: Update.
1225 * gnulib/import/m4/fcntl.m4: Update.
1226 * gnulib/import/m4/fcntl_h.m4: Update.
1227 * gnulib/import/m4/fdopendir.m4: Update.
1228 * gnulib/import/m4/filenamecat.m4: Update.
1229 * gnulib/import/m4/flexmember.m4: Update.
1230 * gnulib/import/m4/float_h.m4: Update.
1231 * gnulib/import/m4/fnmatch.m4: Update.
1232 * gnulib/import/m4/fnmatch_h.m4: Update.
1233 * gnulib/import/m4/fpieee.m4: Update.
1234 * gnulib/import/m4/frexp.m4: Update.
1235 * gnulib/import/m4/frexpl.m4: Update.
1236 * gnulib/import/m4/fstat.m4: Update.
1237 * gnulib/import/m4/fstatat.m4: Update.
1238 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1239 * gnulib/import/m4/getcwd-path-max.m4: Update.
1240 * gnulib/import/m4/getcwd.m4: Update.
1241 * gnulib/import/m4/getdtablesize.m4: Update.
1242 * gnulib/import/m4/getlogin.m4: Update.
1243 * gnulib/import/m4/getlogin_r.m4: Update.
1244 * gnulib/import/m4/getpagesize.m4: Update.
1245 * gnulib/import/m4/getprogname.m4: Update.
1246 * gnulib/import/m4/gettimeofday.m4: Update.
1247 * gnulib/import/m4/glibc21.m4: Update.
1248 * gnulib/import/m4/glob.m4: Update.
1249 * gnulib/import/m4/glob_h.m4: Update.
1250 * gnulib/import/m4/gnulib-cache.m4: Update.
1251 * gnulib/import/m4/gnulib-common.m4: Update.
1252 * gnulib/import/m4/gnulib-comp.m4: Update.
1253 * gnulib/import/m4/gnulib-tool.m4: Update.
1254 * gnulib/import/m4/hard-locale.m4: Update.
1255 * gnulib/import/m4/include_next.m4: Update.
1256 * gnulib/import/m4/inttypes-pri.m4: Update.
1257 * gnulib/import/m4/inttypes.m4: Update.
1258 * gnulib/import/m4/isnand.m4: Update.
1259 * gnulib/import/m4/isnanl.m4: Update.
1260 * gnulib/import/m4/largefile.m4: Update.
1261 * gnulib/import/m4/limits-h.m4: Update.
1262 * gnulib/import/m4/localcharset.m4: Update.
1263 * gnulib/import/m4/locale-fr.m4: Update.
1264 * gnulib/import/m4/locale-ja.m4: Update.
1265 * gnulib/import/m4/locale-zh.m4: Update.
1266 * gnulib/import/m4/localtime-buffer.m4: Update.
1267 * gnulib/import/m4/longlong.m4: Update.
1268 * gnulib/import/m4/lstat.m4: Update.
1269 * gnulib/import/m4/malloc.m4: Update.
1270 * gnulib/import/m4/malloca.m4: Update.
1271 * gnulib/import/m4/math_h.m4: Update.
1272 * gnulib/import/m4/mbrtowc.m4: Update.
1273 * gnulib/import/m4/mbsinit.m4: Update.
1274 * gnulib/import/m4/mbsrtowcs.m4: Update.
1275 * gnulib/import/m4/mbstate_t.m4: Update.
1276 * gnulib/import/m4/memchr.m4: Update.
1277 * gnulib/import/m4/memmem.m4: Update.
1278 * gnulib/import/m4/mempcpy.m4: Update.
1279 * gnulib/import/m4/memrchr.m4: Update.
1280 * gnulib/import/m4/mkdir.m4: Update.
1281 * gnulib/import/m4/mkstemp.m4: Update.
1282 * gnulib/import/m4/mmap-anon.m4: Update.
1283 * gnulib/import/m4/mode_t.m4: Update.
1284 * gnulib/import/m4/msvc-inval.m4: Update.
1285 * gnulib/import/m4/msvc-nothrow.m4: Update.
1286 * gnulib/import/m4/multiarch.m4: Update.
1287 * gnulib/import/m4/nocrash.m4: Update.
1288 * gnulib/import/m4/off_t.m4: Update.
1289 * gnulib/import/m4/onceonly.m4: Update.
1290 * gnulib/import/m4/open-cloexec.m4: Update.
1291 * gnulib/import/m4/open.m4: Update.
1292 * gnulib/import/m4/openat.m4: Update.
1293 * gnulib/import/m4/opendir.m4: Update.
1294 * gnulib/import/m4/pathmax.m4: Update.
1295 * gnulib/import/m4/rawmemchr.m4: Update.
1296 * gnulib/import/m4/readdir.m4: Update.
1297 * gnulib/import/m4/readlink.m4: Update.
1298 * gnulib/import/m4/realloc.m4: Update.
1299 * gnulib/import/m4/rename.m4: Update.
1300 * gnulib/import/m4/rewinddir.m4: Update.
1301 * gnulib/import/m4/rmdir.m4: Update.
1302 * gnulib/import/m4/save-cwd.m4: Update.
1303 * gnulib/import/m4/secure_getenv.m4: Update.
1304 * gnulib/import/m4/setenv.m4: Update.
1305 * gnulib/import/m4/signal_h.m4: Update.
1306 * gnulib/import/m4/ssize_t.m4: Update.
1307 * gnulib/import/m4/stat-time.m4: Update.
1308 * gnulib/import/m4/stat.m4: Update.
1309 * gnulib/import/m4/std-gnu11.m4: Update.
1310 * gnulib/import/m4/stdbool.m4: Update.
1311 * gnulib/import/m4/stddef_h.m4: Update.
1312 * gnulib/import/m4/stdint.m4: Update.
1313 * gnulib/import/m4/stdio_h.m4: Update.
1314 * gnulib/import/m4/stdlib_h.m4: Update.
1315 * gnulib/import/m4/strchrnul.m4: Update.
1316 * gnulib/import/m4/strdup.m4: Update.
1317 * gnulib/import/m4/strerror.m4: Update.
1318 * gnulib/import/m4/string_h.m4: Update.
1319 * gnulib/import/m4/strstr.m4: Update.
1320 * gnulib/import/m4/strtok_r.m4: Update.
1321 * gnulib/import/m4/sys_socket_h.m4: Update.
1322 * gnulib/import/m4/sys_stat_h.m4: Update.
1323 * gnulib/import/m4/sys_time_h.m4: Update.
1324 * gnulib/import/m4/sys_types_h.m4: Update.
1325 * gnulib/import/m4/tempname.m4: Update.
1326 * gnulib/import/m4/time_h.m4: Update.
1327 * gnulib/import/m4/unistd-safer.m4: Update.
1328 * gnulib/import/m4/unistd_h.m4: Update.
1329 * gnulib/import/m4/warn-on-use.m4: Update.
1330 * gnulib/import/m4/wchar_h.m4: Update.
1331 * gnulib/import/m4/wchar_t.m4: Update.
1332 * gnulib/import/m4/wctype_h.m4: Update.
1333 * gnulib/import/m4/wint_t.m4: Update.
1334 * gnulib/import/malloc.c: Update.
1335 * gnulib/import/malloc/scratch_buffer.h: Update.
1336 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1337 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1338 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1339 * gnulib/import/malloca.c: Update.
1340 * gnulib/import/malloca.h: Update.
1341 * gnulib/import/malloca.valgrind: Update.
1342 * gnulib/import/math.in.h: Update.
1343 * gnulib/import/mbrtowc.c: Update.
1344 * gnulib/import/mbsinit.c: Update.
1345 * gnulib/import/mbsrtowcs-impl.h: Update.
1346 * gnulib/import/mbsrtowcs-state.c: Update.
1347 * gnulib/import/mbsrtowcs.c: Update.
1348 * gnulib/import/memchr.c: Update.
1349 * gnulib/import/memmem.c: Update.
1350 * gnulib/import/mempcpy.c: Update.
1351 * gnulib/import/memrchr.c: Update.
1352 * gnulib/import/mkdir.c: Update.
1353 * gnulib/import/mkstemp.c: Update.
1354 * gnulib/import/msvc-inval.c: Update.
1355 * gnulib/import/msvc-inval.h: Update.
1356 * gnulib/import/msvc-nothrow.c: Update.
1357 * gnulib/import/msvc-nothrow.h: Update.
1358 * gnulib/import/open.c: Update.
1359 * gnulib/import/openat-die.c: Update.
1360 * gnulib/import/openat-priv.h: Update.
1361 * gnulib/import/openat-proc.c: Update.
1362 * gnulib/import/openat.c: Update.
1363 * gnulib/import/openat.h: Update.
1364 * gnulib/import/opendir.c: Update.
1365 * gnulib/import/pathmax.h: Update.
1366 * gnulib/import/pipe-safer.c: Update.
1367 * gnulib/import/rawmemchr.c: Update.
1368 * gnulib/import/readdir.c: Update.
1369 * gnulib/import/readlink.c: Update.
1370 * gnulib/import/realloc.c: Update.
1371 * gnulib/import/ref-add.sin: Update.
1372 * gnulib/import/ref-del.sin: Update.
1373 * gnulib/import/rename.c: Update.
1374 * gnulib/import/rewinddir.c: Update.
1375 * gnulib/import/rmdir.c: Update.
1376 * gnulib/import/same-inode.h: Update.
1377 * gnulib/import/save-cwd.c: Update.
1378 * gnulib/import/save-cwd.h: Update.
1379 * gnulib/import/scratch_buffer.h: Update.
1380 * gnulib/import/secure_getenv.c: Update.
1381 * gnulib/import/setenv.c: Update.
1382 * gnulib/import/signal.in.h: Update.
1383 * gnulib/import/stat-time.c: Update.
1384 * gnulib/import/stat-time.h: Update.
1385 * gnulib/import/stat-w32.c: Update.
1386 * gnulib/import/stat-w32.h: Update.
1387 * gnulib/import/stat.c: Update.
1388 * gnulib/import/stdbool.in.h: Update.
1389 * gnulib/import/stddef.in.h: Update.
1390 * gnulib/import/stdint.in.h: Update.
1391 * gnulib/import/stdio.in.h: Update.
1392 * gnulib/import/stdlib.in.h: Update.
1393 * gnulib/import/str-two-way.h: Update.
1394 * gnulib/import/strchrnul.c: Update.
1395 * gnulib/import/strdup.c: Update.
1396 * gnulib/import/streq.h: Update.
1397 * gnulib/import/strerror-override.c: Update.
1398 * gnulib/import/strerror-override.h: Update.
1399 * gnulib/import/strerror.c: Update.
1400 * gnulib/import/string.in.h: Update.
1401 * gnulib/import/stripslash.c: Update.
1402 * gnulib/import/strnlen1.c: Update.
1403 * gnulib/import/strnlen1.h: Update.
1404 * gnulib/import/strstr.c: Update.
1405 * gnulib/import/strtok_r.c: Update.
1406 * gnulib/import/sys_stat.in.h: Update.
1407 * gnulib/import/sys_time.in.h: Update.
1408 * gnulib/import/sys_types.in.h: Update.
1409 * gnulib/import/tempname.c: Update.
1410 * gnulib/import/tempname.h: Update.
1411 * gnulib/import/time.in.h: Update.
1412 * gnulib/import/unistd--.h: Update.
1413 * gnulib/import/unistd-safer.h: Update.
1414 * gnulib/import/unistd.in.h: Update.
1415 * gnulib/import/unsetenv.c: Update.
1416 * gnulib/import/verify.h: Update.
1417 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1418 * gnulib/import/wchar.in.h: Update.
1419 * gnulib/import/wctype.in.h: Update.
1420 * gnulib/import/xalloc-oversized.h: Update.
1421 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1422 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1424 2018-08-16 Gary Benson <gbenson@redhat.com>
1427 * gdb/main.c (captured_main_1): Exit with nonzero status
1428 in batch mode if the last command to be executed failed.
1429 * NEWS: Mention the above.
1431 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1433 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1434 end of warning message.
1436 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1439 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1440 (aarch64_extract_return_value): Use
1441 aapcs_is_vfp_call_or_return_candidate.
1442 (aarch64_return_in_memory): Likewise.
1443 (aarch64_store_return_value): Likewise.
1445 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1448 (aapcs_is_vfp_call_or_return_candidate): Make static
1449 (pass_in_v_or_stack): Remove function.
1450 (pass_in_v_vfp_candidate): New function.
1451 (aarch64_push_dummy_call): Check for float register candidates.
1453 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1455 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1456 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1457 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1459 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1462 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1463 (struct ipa_sym_addresses): Rename to...
1464 (struct ipa_sym_addresses_common): ... this.
1465 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1467 2018-08-28 Tom Tromey <tom@tromey.com>
1469 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1470 (token_fifo): Now a std::vector.
1471 (yylex, c_parse): Update.
1472 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1473 (token_fifo): Now a std::vector.
1474 (yylex, d_parse): Update.
1475 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1476 (token_fifo): Now a std::vector.
1477 (yylex, go_parse): Update.
1479 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
1481 * parser-defs.h (struct type_stack) <elements>: Change type to
1482 std::vector<union type_stack_elt>.
1483 <depth, size>: Remove.
1484 * parse.c (parse_exp_in_context_1): Adjust.
1485 (type_stack_reserve): Remove.
1486 (check_type_stack_depth): Remove.
1487 (insert_into_type_stack): Adjust to std::vector.
1488 (insert_type): Likewise.
1489 (push_type): Likewise.
1490 (push_type_int): Likewise.
1491 (insert_type_address_space): Likewise.
1492 (pop_type): Likewise.
1493 (pop_type_int): Likewise.
1494 (pop_typelist): Likewise.
1495 (pop_type_stack): Likewise.
1496 (append_type_stack): Likewise.
1497 (push_type_stack): Likewise.
1498 (get_type_stack): Likewise.
1499 (type_stack_cleanup): Likewise.
1500 (push_typelist): Likewise.
1501 (follow_types): Likewise.
1502 (_initialize_parse): Likewise.
1504 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
1506 * NEWS: Mention csky target.
1508 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
1509 Hafiz Abid Qadeer <abidh@codesourcery.com>
1510 Don Breazeal <donb@codesourcery.com>
1512 * csky-linux-tdep.c: New file.
1513 * csky-tdep.c: Likewise.
1514 * csky-tdep.h: Likewise.
1515 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1517 (HFILES_NO_SRCDIR): Add csky-tdep.h.
1518 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1519 * configure.tgt: Add csky support.
1521 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
1523 * python/py-framefilter.c (py_print_frame): Print frame architecture
1524 when printing on an MI output.
1526 2018-08-27 Tom Tromey <tom@tromey.com>
1529 * configure: Rebuild.
1530 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1532 2018-08-27 Tom Tromey <tom@tromey.com>
1534 * aarch64-linux-tdep.c
1535 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1538 2018-08-27 Tom Tromey <tom@tromey.com>
1540 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1542 (ppc64_standard_linkage1, ppc64_standard_linkage2)
1543 (ppc64_standard_linkage3, ppc64_standard_linkage4)
1544 (ppc64_standard_linkage5, ppc64_standard_linkage6)
1545 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1548 2018-08-27 Tom Tromey <tom@tromey.com>
1550 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1551 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1553 2018-08-27 Tom Tromey <tom@tromey.com>
1555 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1556 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1558 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1560 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1562 * sparc-linux-tdep.c (sparc32_linux_sigframe)
1563 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1564 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1566 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1567 (ppc64_linux_sigaction_tramp_frame)
1568 (ppc32_linux_sighandler_tramp_frame)
1569 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1570 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1571 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1572 * mn10300-linux-tdep.c (am33_linux_sigframe)
1573 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1574 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1575 * mips-linux-tdep.c (mips_linux_o32_sigframe)
1576 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1577 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1578 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1579 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1580 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1581 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1582 * microblaze-linux-tdep.c
1583 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1584 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1585 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1586 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1587 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1588 * common/common-types.h (ULONGEST_MAX): New define.
1589 (CORE_ADDR_MAX): Fix formatting.
1590 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1591 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1592 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1593 (arm_linux_rt_sigreturn_tramp_frame)
1594 (arm_eabi_linux_sigreturn_tramp_frame)
1595 (arm_eabi_linux_rt_sigreturn_tramp_frame)
1596 (thumb2_eabi_linux_sigreturn_tramp_frame)
1597 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1598 (arm_linux_restart_syscall_tramp_frame)
1599 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1600 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1601 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1603 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1605 2018-08-27 Tom Tromey <tom@tromey.com>
1607 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1609 * mips-tdep.c (mips_deal_with_atomic_sequence)
1610 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1611 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1612 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1613 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1615 * aarch64-tdep.c (aarch64_software_single_step): Use
1618 2018-08-27 Tom Tromey <tom@tromey.com>
1620 * linespec.c (complete_linespec_component): Add cast to "char".
1621 * completer.c (completion_tracker::build_completion_result): Add
1624 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1626 * solist.h (struct solist, struct target_so_ops): Fix
1629 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1631 * ada-tasks.c (ada_task_info_s): Remove typedef.
1632 (DEF_VEC_O(ada_task_info_s)): Remove.
1633 (struct ada_tasks_inferior_data): Initialize fields.
1634 <task_list>: Make an std::vector.
1635 (get_ada_tasks_inferior_data): Allocate with new.
1636 (ada_get_task_number): Adjust.
1637 (get_task_number_from_id): Likewise.
1638 (valid_task_id): Likewise.
1639 (ada_get_task_info_from_ptid): Likewise.
1640 (iterate_over_live_ada_tasks): Likewise.
1641 (add_ada_task): Likewise.
1642 (read_known_tasks): Likewise.
1643 (ada_build_task_list): Likewise.
1644 (print_ada_task_info): Likewise.
1645 (info_task): Likewise.
1646 (task_command_1): Likewise.
1648 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1650 * ada-lang.c (add_angle_brackets): Return std::string.
1652 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1654 * python/py-threadevent.c (py_get_event_thread): Initialize
1657 2018-08-24 Pedro Alves <palves@redhat.com>
1659 * python/py-bpevent.c (create_breakpoint_event_object): Use
1660 copy-initialization.
1661 * python/py-continueevent.c (emit_continue_event): Use
1662 copy-initialization.
1663 * python/py-exitedevent.c (create_exited_event_object): Return a
1665 (emit_exited_event): Use copy-initialization.
1666 * python/py-inferior.c (python_new_inferior)
1667 (python_inferior_deleted, add_thread_object): Use
1668 copy-initialization.
1669 * python/py-infevents.c (create_inferior_call_event_object)
1670 (create_register_changed_event_object)
1671 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1672 (emit_inferior_call_event, emit_memory_changed_event)
1673 (emit_register_changed_event): Use copy-initialization.
1674 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1675 Return a gdbpy_ref<>.
1676 (emit_new_objfile_event): Use copy-initialization.
1677 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1678 (emit_clear_objfiles_event): Use copy-initialization.
1679 * python/py-signalevent.c (create_signal_event_object): Use
1680 copy-initialization.
1681 * python/py-threadevent.c (create_thread_event_object): Use
1682 copy-initialization.
1684 2018-08-24 Pedro Alves <palves@redhat.com>
1685 Simon Marchi <simon.marchi@ericsson.com>
1688 * python/py-continueevent.c: Include "gdbthread.h".
1689 (create_continue_event_object): Add intro comment. Add 'ptid'
1690 parameter. Use it to find thread to pass to
1691 create_thread_event_object.
1692 (emit_continue_event): Pass PTID down to
1693 create_continue_event_object.
1694 * python/py-event.h (py_get_event_thread): Declare.
1695 (create_thread_event_object): Remove default from 'thread'
1697 * python/py-stopevent.c (create_stop_event_object): Use
1698 py_get_event_thread.
1699 * python/py-threadevent.c (get_event_thread): Rename to ...
1700 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1701 and use it to find the thread.
1702 (create_thread_event_object): Assert that THREAD isn't null.
1703 Don't find the event thread here.
1705 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1707 * block.h (blockrange, blockranges): New struct declarations.
1708 (struct block): Add new field named `ranges'.
1709 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1710 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1711 macros for accessing ranges in struct block.
1712 (make_blockranges): New declaration.
1713 block.c (make_blockranges): New function.
1714 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1716 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1717 * blockframe.c (cache_pc_function_block): New static global.
1718 (clear_pc_function_cache): Clear cache_pc_function_block.
1719 (find_pc_partial_function): Move comment to symtab.h. Add
1720 support for non-contiguous blocks.
1721 * cli/cli-cmds.c (block.h): Include.
1722 (print_disassembly): Handle printing of non-contiguous blocks.
1723 (disassemble_current_function): Likewise.
1724 (disassemble_command): Likewise.
1726 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1728 * blockframe.c (get_pc_function_start): Likewise.
1729 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1730 (gcc_symbol_address): Likewise.
1731 * compile/compile-object-run.c (compile_object_run): Likewise.
1732 * compile/compile.c (get_expr_block_and_pc): Likewise.
1733 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1734 (func_addr_to_tail_call_list): Likewise.
1735 * findvar.c (default_read_var_value): Likewise.
1736 * inline-frame.c (inline_frame_this_id): Likewise.
1737 (skip-inline_frames): Likewise.
1738 * infcmd.c (until_next_command): Likewise.
1739 * linespec.c (convert_linespec_to_sals): Likewise.
1740 * parse.c (parse_exp_in_context_1): Likewise.
1741 * printcmd.c (build_address_symbolic): likewise.
1742 (info_address_command): Likewise.
1743 symtab.c (find_function_start_sal): Likewise.
1744 (skip_prologue_sal): Likewise.
1745 (find_function_alias_target): Likewise.
1746 (find_gnu_ifunc): Likewise.
1747 * stack.c (find_frame_funname): Likewise.
1748 * symtab.c (fixup_symbol_section): Likewise.
1749 (find_function_start_sal): Likewise.
1750 (skip_prologue_sal): Likewsie.
1751 (find_function_alias_target): Likewise.
1752 (find_gnu_ifunc): Likewise.
1753 * tracepoint.c (info_scope_command): Likewise.
1754 * value.c (value_fn_field): Likewise.
1756 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1757 in place of find_pc_partial_function.
1758 * blockframe.c (find_function_entry_range_from_pc): New function.
1759 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1760 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1761 for each range in a block.
1764 2018-08-23 Xavier Roirand <roirand@adacore.com>
1766 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1769 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1771 * solib-svr4.c (read_program_headers_from_bfd): Return
1772 gdb::optional<gdb::byte_vector>.
1773 (svr4_exec_displacement): Adjust.
1775 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1777 * solib-svr4.c (read_program_header): Return
1778 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1779 (find_program_interpreter): Return
1780 gdb::optional<gdb::byte_vector>.
1781 (scan_dyntag_auxv): Adjust.
1782 (enable_break): Adjust.
1783 (svr4_exec_displacement): Adjust.
1785 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1787 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1788 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1790 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1792 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1794 * guile/scm-utils.c (gdbscm_printf): Likewise.
1795 * serial.c (serial_printf): Likewise.
1796 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1798 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1800 * stack.c (print_frame): Print frame architecture when printing on
1802 * NEWS: Mention new "arch" attribute in frame output.
1804 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1806 * arch/aarch64.h (aarch64_regnum): Update comment.
1808 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1810 * NEWS: Add SVE to 8.2 section.
1812 2018-08-21 Pedro Alves <palves@redhat.com>
1814 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1815 out from gdbscm_parse_function_args.
1816 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1817 gdbscm_parse_function_args_1.
1819 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1822 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1825 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1827 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1829 2018-08-19 Michael Spang <spang@google.com>
1832 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1833 for PT_TLS segments.
1835 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1837 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1838 dwarf_variable_value.
1839 * dwarf2-frame.c (class dwarf_expr_executor):
1840 Add override for dwarf_variable_value.
1841 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1842 (class symbol_needs_eval_context): Likewise.
1843 (indirect_synthetic_pointer): Add forward declaration.
1844 (sect_variable_value): New function.
1845 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1846 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1847 for DW_OP_GNU_variable_value.
1849 2018-08-16 Tom Tromey <tom@tromey.com>
1851 * top.c (read_command_file): Update.
1852 (command_line_input): Remove "repeat" argument.
1853 * ada-lang.c (get_selections): Update.
1854 * linespec.c (decode_line_2): Update.
1855 * defs.h (command_line_input): Remove argument.
1856 * cli/cli-script.c (read_next_line): Update.
1857 * python/py-gdb-readline.c: Update.
1859 2018-08-17 Tom Tromey <tom@tromey.com>
1861 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1864 2018-08-15 Tom Tromey <tom@tromey.com>
1866 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1868 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1870 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1871 If used, use find_pc_partial_function to find address range
1873 * mi/mi-main.c (mi_cmd_list_features): Report
1874 "data-disassemble-a-option" feature.
1875 * NEWS: Mention new -data-disassemble option -a.
1877 2018-08-13 Tom Tromey <tom@tromey.com>
1879 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1881 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1883 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1884 (aarch64_linux_collect_sve_regset): Likewise.
1885 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1886 * regcache.h (regcache_map_entry_size): New function.
1888 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1890 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1891 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1892 (SVE_HEADER_VL_LENGTH): Likewise.
1893 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1894 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1895 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1896 (SVE_HEADER_SIZE_OFFSET): Likewise.
1897 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1898 (SVE_HEADER_VL_OFFSET): Likewise.
1899 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1900 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1901 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1902 (SVE_HEADER_SIZE): Likewise.
1903 (aarch64_linux_core_read_vq): Add function.
1904 (aarch64_linux_core_read_description): Check for SVE section.
1906 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1908 * aarch64-fbsd-tdep.c
1909 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1911 * aarch64-linux-tdep.c
1912 (aarch64_linux_iterate_over_regset_sections): Likewise.
1913 * alpha-linux-tdep.c
1914 (alpha_linux_iterate_over_regset_sections):
1916 (alphanbsd_iterate_over_regset_sections): Likewise.
1918 (amd64fbsd_iterate_over_regset_sections): Likewise.
1919 * amd64-linux-tdep.c
1920 (amd64_linux_iterate_over_regset_sections): Likewise.
1922 (armbsd_iterate_over_regset_sections): Likewise.
1924 (arm_fbsd_iterate_over_regset_sections): Likewise.
1926 (arm_linux_iterate_over_regset_sections): Likewise.
1927 * corelow.c (get_core_registers_cb): Likewise.
1928 (core_target::fetch_registers): Likewise.
1929 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1930 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1931 * gdbarch.h (void): Regenerate.
1932 * gdbarch.sh: Add supply_size and collect_size.
1933 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1934 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1935 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1936 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1937 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1938 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1939 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1940 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1941 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1942 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1943 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1944 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1945 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1946 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1947 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1948 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1949 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1950 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1951 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1952 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1953 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1954 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1955 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1956 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1957 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1958 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1959 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1960 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1961 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1962 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1964 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1966 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1969 2018-08-10 Keith Seitz <keiths@redhat.com>
1971 * compile/compile-c-support.c (add_code_header, add_code_footer):
1972 Move into policy class.
1973 (c_push_user_expression, pop_user_expression_nop)
1974 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1975 (compile_program): New host class.
1976 (c_compile_program): New typedef.
1977 (c_compute_porgram): Use c_compile_program.
1979 2018-08-10 Keith Seitz <keiths@redhat.com>
1981 * compile/compile-internal.h (compile_instance::~compile_instance):
1982 Remove calls to htab_delete.
1983 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1984 * compile.c (compile_instance::compile_instance): Initialize
1985 htab unique pointers.
1986 (compile_instance::get_cached_type, compile_instance::insert_type)
1987 (compile_instance::error_symbol_once): Update for unique_ptr.
1989 2018-08-10 Keith Seitz <keiths@redhat.com>
1991 * compile/compile-c-symbols.c (struct symbol_error)
1992 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1993 (compile_instance::insert_symbol_error)
1994 (compile_instance::error_symbol_once): Move to ...
1995 * compile/compile.c: ... here.
1997 2018-08-10 Keith Seitz <keiths@redhat.com>
1999 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2000 instead of `new_compile_instance'.
2001 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2003 If the symbol error map is not initialized, create it.
2004 (generate_c_for_for_one_symbol): Do not check/initialize
2005 the symbol error map.
2006 * compile/compile-c-types.c (compile_c_instance): Make a class.
2008 (compile_instance::compile_instance): Initialize the type cache.
2009 (get_cached_type): New function.
2010 (insert_type): Update description.
2011 (compile_c_instance::m_default_cflags): Define.
2012 (convert_type): Update description. Use get_cached_type.
2013 (delete_instance): Moved to destructor.
2014 (new_compile_instance): Moved to constructor.
2015 * compile/compile-c.h (compile_c_instance): Make class inheriting
2016 from compile_instance.
2017 <base>: Remove field.
2018 <type_map, symbol_err_map>: Move to base class.
2019 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2020 * compile/compile-internal.h (compile_instance): Make class.
2021 <type_map_t, symbol_err_map_t>: Define.
2022 <fe>: Rename to `m_gcc_fe'.
2023 <scope, block, gcc_target_options>: Add `m_' prefix.
2024 <m_type_map, m_symbol_err_map>: New fields, moved from
2027 (convert_type, new_compile_instance): Remove.
2028 * compile/compile.c (cleanup_compile_instance): Remove.
2029 (compile_to_object): Use unique_ptr to eliminate cleanups.
2030 (compile_instance::set_print_callback, compile_instance::version)
2031 (compile_instance::set_verbose)
2032 (compile_instance::set_driver_filename)
2033 (compile_instance::set_triplet_regexp)
2034 (compile_instance::set_arguments)
2035 (compile_instance::set_source_file)
2036 (compile_instance::compile): Define.
2038 2018-08-10 Keith Seitz <keiths@redhat.com>
2040 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2041 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2042 gcc-c-fe.def to define C plugin.
2043 (delete_instance): Delete `c_plugin'.
2044 (new_compile_instance): Initialize `c_plugin'.
2045 * compile/compile-c.h: Include gcc_c_plugin.h.
2046 (struct compile_c_instance) <c_plugin>: New member.
2047 * gcc-c-plugin.h: New file.
2048 Update all callers with API change.
2050 2018-08-10 Keith Seitz <keiths@redhat.com>
2052 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2053 (HFILES_NO_SRCDIR): ... to here.
2054 Add compile-internal.h and compile-c.h.
2055 * compile/compile-c-support.c: Include compile-c.h.
2056 * compile/compile-c-symbols.c: Include compile-c.h.
2057 (generate_c_for_variable_locations): Update comment.
2058 * compile/compile-c-types.c: Include compile-c.h.
2059 * compile/compile-c.h: New file -- moved C language declarations
2060 from other files here.
2061 * compile/compile-internal.h: Do not include hashtab.h or
2062 common/enum-flags.h.
2063 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2064 (gcc_convert_symbol, gcc_symbol_address)
2065 (generate_c_for_variable_locations, c_get_mode_for_size)
2066 (c_get_range_decl_name): Definitions moved to compile-c.h.
2067 * compile/compile-loc2c.c: Include compile-c.h.
2069 2018-08-10 Keith Seitz <keiths@redhat.com>
2071 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2072 (c_symbol_substitution_name): ... this.
2075 2018-08-10 Keith Seitz <keiths@redhat.com>
2077 * compile/compile-c-support.c (c_compute_program): Use
2078 unique_xmalloc_ptr to eliminate cleanup.
2079 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2080 Return a unique_xmalloc_ptr and eliminate cleanup.
2081 * compile/compile-internal.h (generate_c_for_variable_locations):
2082 Return unique_xmalloc_ptr and update description.
2084 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2086 * corelow.c (core_target::get_core_register_section): Rename
2087 min_size to section_min_size.
2089 2018-08-09 Jim Wilson <jimw@sifive.com>
2091 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2092 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2093 * NEWS: Mention new GNU/Linux RISC-V target.
2094 * configure.host: Add riscv*-*-linux*.
2095 * configure.nat: Add riscv*.
2096 * configure.tgt: Add riscv*-*-linux*.
2097 * riscv-linux-nat.c: New file.
2098 * riscv-linux-tdep.c: New file.
2100 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2102 * infrun.c (resume): Make static, add forward declaration.
2103 (proceed): Update header comment.
2104 * infrun.h (resume): Delete declaration.
2106 2018-08-09 Tom Tromey <tom@tromey.com>
2108 * riscv-tdep.h: Minor formatting fixes.
2110 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2112 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2113 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2114 (test_mkdir_recursive): Likewise.
2115 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2117 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2119 * valarith.c (value_subscripted_rvalue): If an array is not in
2120 memory, and we don't know the upper bound, then we can't know that
2121 the requested element exists or not.
2123 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2125 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2126 (target_options_to_string): Add comment.
2128 2018-08-08 Tom Tromey <tom@tromey.com>
2130 * unittests/scoped_mmap-selftests.c: Check result of "write".
2132 2018-08-08 Jim Wilson <jimw@sifive.com>
2134 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2135 (decode_register_index_short): New.
2136 (decode_j_type_insn, decode_cj_type_insn): New.
2137 (decode_b_type_insn, decode_cb_type_insn): New.
2138 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2139 local xlen. Check xlen when decoding ambiguous compressed insns. In
2140 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2141 is_c_sw_insn instead of is_sw_insn.
2142 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2143 (riscv_software_single_step): New.
2144 * riscv-tdep.h (riscv_software_single_step): Declare.
2146 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2147 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2149 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2152 * target.c (dispose_inferior): Don't dispose of inferiors that are
2155 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2157 * remote.c (remote_target::download_tracepoint): Change char* to
2160 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2162 * target.h (target_options_to_string): Return an std::string.
2163 * target.c (str_comma_list_concat_elem): Return void, use
2165 (do_option): Likewise.
2166 (target_options_to_string): Return an std::string.
2167 * linux-nat.c (linux_nat_target::wait): Adjust.
2168 * target-debug.h (target_debug_print_options): Adjust.
2170 2018-08-07 Tom Tromey <tom@tromey.com>
2172 * Makefile.in (CPPFLAGS): New variable.
2173 (INTERNAL_CPPFLAGS): Use it.
2175 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2177 * NEWS: Mention the index cache.
2179 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2181 * common/pathstuff.h (get_standard_cache_dir): New.
2182 * common/pathstuff.c (get_standard_cache_dir): New.
2183 * build-id.h (build_id_to_string): New.
2184 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2185 DEBUG_STR_SUFFIX): Move to here.
2186 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2187 DEBUG_STR_SUFFIX): Move from there.
2188 (write_psymtabs_to_index): Make non-static, add basename
2189 parameter. Write to temporary files, rename when done.
2190 (save_gdb_index_command): Adjust call to
2191 write_psymtabs_to_index.
2192 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2194 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2195 (get_gdb_index_contents_from_cache): New.
2196 (get_gdb_index_contents_from_cache_dwz): New.
2197 (dwarf2_initialize_objfile): Read index from cache.
2198 (dwarf2_build_psymtabs): Save to index.
2199 * dwarf-index-cache.h: New file.
2200 * dwarf-index-cache.c: New file.
2201 * dwarf-index-write.h: New file.
2203 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2205 * gnulib/aclocal.m4: Re-generate.
2206 * gnulib/config.in: Re-generate.
2207 * gnulib/configure: Re-generate.
2208 * gnulib/import/Makefile.am: Re-generate.
2209 * gnulib/import/Makefile.in: Re-generate.
2210 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2211 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2212 * gnulib/import/m4/mkdir.m4: New file.
2213 * gnulib/import/mkdir.c: New file.
2214 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2217 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2219 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2220 * common/scoped_mmap.c: New file.
2221 * common/scoped_mmap.h (destroy): New method.
2222 (~scoped_mmap, reset): Use destroy.
2223 (scoped_mmap): New move constructor.
2224 (mmap_file): New declaration.
2225 * unittests/scoped_mmap-selftests.c (test_normal,
2226 test_invalid_filename, run_tests): New functions.
2227 (_initialize_scoped_mmap_selftests): Register selftest.
2229 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2231 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2232 (read_gdb_index_from_buffer): ... this. Remove section
2233 parameter, add buffer parameter.
2234 (get_gdb_index_contents_ftype,
2235 get_gdb_index_contents_dwz_ftype): New typedefs.
2236 (dwarf2_read_gdb_index): Add callback parameters to get the
2238 (get_gdb_index_contents_from_section): New.
2239 (dwarf2_initialize_objfile): Update call to
2240 dwarf2_read_gdb_index.
2242 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2244 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2245 (gdb_open_cloexec): Likewise.
2246 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2247 (commandline_from_pid): Likewise.
2248 (linux_xfer_osdata_threads): Likewise.
2249 (linux_xfer_osdata_fds): Likewise.
2250 * ada-lang.c (is_package_name): Likewise.
2251 * auxv.c (procfs_xfer_auxv): Likewise.
2252 * breakpoint.c (print_one_breakpoint_location): Use
2254 (print_one_catch_solib): Use string_printf.
2255 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2256 (add_pe_forwarded_sym): Likewise.
2257 * dwarf2read.c (create_type_unit_group): Likewise.
2258 (build_error_marker_type): Likewise.
2259 * infcall.c (get_function_name): Likewise.
2260 * valprint.c (print_converted_chars_to_obstack): Likewise.
2261 * xtensa-tdep.c (xtensa_register_type): Likewise.
2263 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2265 * remote.c (remote_target::download_tracepoint): Fix format
2268 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2270 * tracefile.c: Include common/byte-vector.h.
2271 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2272 with trace_regblock_size if needed. Update uses of buf.
2274 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2276 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2277 std::vector<unsigned char>.
2278 * tracepoint.c (collection_list::collection_list): Remove
2279 m_regs_mask initializer from initializer list. Resize
2280 m_regs_mask using the largest remote register number.
2281 (collection_list::add_remote_register): Remove size check on
2282 m_regs_mask. Use at to access element.
2283 (collection_list::stringify): Change type of temp_buf to
2284 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2285 stringify the register mask. Use pack_hex_byte for the register
2288 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2290 * tracepoint.h (class collection_list) <add_register>: Remove.
2291 <add_remote_register, add_ax_registers, add_local_register>:
2293 <add_memrange>: Add scope parameter.
2294 * tracepoint.c (encode_actions_1): Likewise.
2295 (collection_list::add_register): Rename to ...
2296 (collection_list::add_remote_register): ... this. Update
2298 (collection_list::add_ax_registers, add_local_register): New
2300 (collection_list::add_memrange): Add scope parameter. Call
2301 add_local_register instead of add_register.
2302 (finalize_tracepoint_aexpr): New function.
2303 (collection_list::collect_symbol): Update calls to add_memrange.
2304 Call add_local_register instead of add_register. Call
2305 add_ax_registers. Call finalize_tracepoint_aexpr.
2306 (encode_actions_1): Get remote regnos for $reg action. Call
2307 add_remote_register, add_ax_registers, and add_local_register.
2308 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2309 (validate_actionline): Call finalize_tracepoint_aexpr.
2311 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2313 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2314 Replace array buf with gdb::char_vector buf, of size
2315 get_remote_packet_size (). Replace references to buf and
2316 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2317 and xsnprintf with snprintf. Raise errors if the buffer is too
2320 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2322 * remote.c (remote_target::download_tracepoint): Fix the has_more
2323 predicate in the QTDP action list iteration.
2325 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2327 * remote.c (remote_target::download_tracepoint): Fix indentation
2330 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2332 * proc-api.c (_initialize_proc_api): Remove c, unused.
2333 * procfs.c (procfs_init_inferior): Remove signals, unused.
2334 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2337 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2338 Andrew Burgess <andrew.burgess@embecosm.com>
2340 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2341 'W_STOPCODE (0)' as this could be ambiguous.
2343 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2345 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2346 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2349 2018-08-02 Tom Tromey <tom@tromey.com>
2352 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2354 (process_structure_scope): Likewise.
2356 2018-08-02 Xavier Roirand <roirand@adacore.com>
2359 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2362 2018-08-02 Tom Tromey <tom@tromey.com>
2364 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2365 (darwin_suspend_inferior, darwin_resume_inferior)
2366 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2367 (darwin_check_new_threads): Check result of get_darwin_inferior.
2369 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2373 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2375 * varobj.c (varobj_get_path_expr_parent): Report an error if
2376 parent is a dynamic varobj.
2378 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2380 * gnulib/aclocal.m4: Re-generate.
2381 * gnulib/config.in: Re-generate.
2382 * gnulib/configure: Re-generate.
2383 * gnulib/import/Makefile.in: Re-generate.
2384 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2385 * gnulib/import/m4/onceonly.m4: Re-generate.
2387 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2389 * target-descriptions.c (struct xml_test_tdesc): New.
2390 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2391 (record_xml_tdesc): Update.
2392 (maintenance_check_xml_descriptions): Update.
2393 * target-descriptions.h (record_xml_tdesc): Update comment.
2395 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2397 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2398 checking array bounds are defined.
2400 2018-07-30 Tom Tromey <tom@tromey.com>
2402 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2403 irreflexivity violation.
2405 2018-07-30 Tom Tromey <tom@tromey.com>
2407 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2408 * value.c (unpack_long): Remove lint code.
2409 * valops.c (value_ind): Remove lint code.
2410 * valarith.c (value_x_binop, value_x_unop, value_equal)
2411 (value_pos): Remove lint code.
2413 2018-07-28 Tom de Vries <tdevries@suse.de>
2415 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2416 with undefined upper bound as <optimized out>.
2418 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2420 * gcore.in: Rename variable "name" to "prefix". Expand
2423 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2425 * windows-nat.c (windows_nat_target::create_inferior): Update to
2426 call close() in global namespace.
2428 2018-07-26 Tom Tromey <tom@tromey.com>
2430 * dwarf-index-write.c (add_address_entry): Don't add objfile
2432 * dbxread.c (find_stab_function): Rename from
2433 find_stab_function_addr. Return a bound_minimal_symbol.
2434 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2435 Don't add objfile offsets.
2436 (end_psymtab): Use raw_text_low, raw_text_high,
2437 MSYMBOL_VALUE_RAW_ADDRESS.
2438 (read_ofile_symtab): Update.
2439 (process_one_symbol): Update.
2440 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2442 (dw2_relocate): Remove.
2443 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2445 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2447 (process_psymtab_comp_unit_reader, add_partial_symbol)
2448 (add_partial_subprogram, dwarf2_ranges_read): Update.
2449 (load_partial_dies): Update.
2450 (add_address_entry): Don't add objfile offsets.
2451 (dwarf2_build_include_psymtabs): Update.
2452 (create_addrmap_from_aranges): Don't add objfile offsets.
2453 (dw2_find_pc_sect_compunit_symtab): Update.
2454 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2455 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2457 (parse_partial_symbols): Don't add objfile offsets. Use
2458 raw_text_low, raw_text_high. Update.
2459 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2460 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2461 or call 'relocate' quick function. Clear psymbol_map.
2462 * psympriv.h (struct partial_symbol) <address>: Add section
2464 <set_unrelocated_address>: Rename from set_address.
2465 <raw_text_low, raw_text_high>: New methods.
2466 <text_low, text_high>: Add objfile parameter.
2467 (add_psymbol_to_bcache): Add 'section' parameter. Call
2468 set_unrelocated_address.
2469 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2470 (find_pc_psymbol): Update.
2471 (fixup_psymbol_section, relocate_psymtabs): Remove.
2472 (dump_psymtab, psym_functions): Update.
2473 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2475 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2476 (start_psymtab_common): Update.
2477 * symfile-debug.c (debug_qf_relocate): Remove.
2478 (debug_sym_quick_functions): Update.
2479 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2480 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2483 2018-07-26 Tom Tromey <tromey@redhat.com>
2485 * dbxread.c (end_psymtab): Use text_high_valid and
2487 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2488 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2489 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2491 <text_low_valid, text_high_valid>: New fields.
2492 <set_text_low, set_text_high>: Update.
2493 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2495 2018-07-26 Tom Tromey <tom@tromey.com>
2497 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2499 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2500 textlow and texthigh fields.
2501 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2503 * mdebugread.c (parse_lines, parse_partial_symbols)
2504 (psymtab_to_symtab_1): Update.
2505 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2506 Rename fields. Update comment. Now private.
2507 <text_low, text_high, set_text_low, set_text_high>: New methods.
2508 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2509 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2510 (start_psymtab_common, maintenance_info_psymtabs)
2511 (maintenance_check_psymtabs): Update.
2512 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2514 (scan_xcoff_symtab): Update.
2516 2018-07-26 Tom Tromey <tromey@redhat.com>
2518 * psympriv.h (struct partial_symbol) <unrelocated_address,
2519 address, set_address>: New methods.
2520 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2521 (fixup_psymbol_section, relocate_psymtabs): Update.
2522 (print_partial_symbols): Add 'objfile' parameter. Update.
2523 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2526 2018-07-26 Tom Tromey <tom@tromey.com>
2528 * dwarf-index-write.c (write_psymbols, debug_names::insert)
2529 (debug_names::write_psymbols): Update.
2530 * psympriv.h (struct partial_symbol): Derive from
2531 general_symbol_info.
2532 <obj_section>: New method.
2533 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2534 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2535 (find_pc_sect_psymbol, fixup_psymbol_section)
2536 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2537 (print_partial_symbols, recursively_search_psymtabs)
2538 (compare_psymbols, psymbol_hash, psymbol_compare)
2539 (add_psymbol_to_bcache, maintenance_check_psymtabs)
2540 (psymbol_name_matches, psym_fill_psymbol_map): Update.
2542 2018-07-26 Tom Tromey <tromey@redhat.com>
2544 * dbxread.c (end_psymtab): Remove dead code.
2546 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
2548 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2549 DWARF unwinders are disabled.
2550 * dwarf2-frame.c: Add dwarf2read.h include.
2551 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2553 (dwarf2_frame_unwinders_enabled_p): Define.
2554 (show_dwarf_unwinders_enabled_p): New function.
2555 (_initialize_dwarf2_frame): Register switch to control DWARF
2557 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2558 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2559 (show_dwarf_cmdlist): Remove static keyword.
2560 * dwarf2read.h (set_dwarf_cmdlist): Declare.
2561 (show_dwarf_cmdlist): Declare.
2562 * NEWS: Document new feature.
2564 2018-07-26 Tom de Vries <tdevries@suse.de>
2566 PR breakpoints/23366
2567 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2569 2018-07-26 Tom de Vries <tdevries@suse.de>
2571 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2572 DW_AT_count can't be translated to a dynamic prop.
2574 2018-07-25 Tom de Vries <tdevries@suse.de>
2576 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2579 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
2581 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2583 2018-07-25 Joel Brobecker <brobecker@adacore.com>
2585 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2587 2018-07-24 Keith Seitz <keiths@redhat.comt
2590 * dwarf2read.c (dw2_add_symbol_to_list): New function.
2591 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2592 instead of add_symbol_to_list.
2593 (read_file_scope): Call prepare_one_comp_unit before reading
2596 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
2598 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2600 2018-07-24 Tom Tromey <tom@tromey.com>
2602 * utils.c (malloc, realloc, free): Don't declare.
2603 * configure, config.in: Rebuild.
2604 * configure.ac: Don't check for declarations of free, malloc, or
2607 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2609 * aarch64-linux-nat.c
2610 (aarch64_linux_nat_target::stopped_data_address): Remove unused
2612 * arm-linux-nat.c (fetch_regs): Likewise.
2613 (store_regs): Likewise.
2614 (fetch_vfp_regs): Likewise.
2615 (store_vfp_regs): Likewise.
2616 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2617 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2618 (arm_linux_nat_target::insert_watchpoint): Likewise.
2619 (arm_linux_nat_target::remove_watchpoint): Likewise.
2620 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2622 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2624 * ppc-linux-nat.c (fetch_register): Likewise.
2625 (fetch_all_gp_regs): Likewise.
2626 (fetch_ppc_registers): Likewise.
2627 (store_all_gp_regs): Likewise.
2628 (store_ppc_registers): Likewise.
2629 (hwdebug_insert_point): Likewise.
2630 (can_use_watchpoint_cond_accel): Likewise.
2631 * remote-sim.c (gdb_os_write_stdout): Likewise.
2633 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2634 Tom Tromey <tom@tromey.com>
2636 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2638 * configure: Rebuild.
2640 2018-07-22 Tom Tromey <tom@tromey.com>
2642 * regformats/regdat.sh: Define xmltarget_${name} inside
2643 #ifndef IN_PROCESS_AGENT.
2645 2018-07-22 Tom Tromey <tom@tromey.com>
2647 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2649 2018-07-22 Tom Tromey <tom@tromey.com>
2651 * symfile.c (reread_symbols): Notify iter, not objfile.
2653 2018-07-22 Tom Tromey <tom@tromey.com>
2655 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2657 (ravenscar_thread_target::prepare_to_store): Likewise.
2659 2018-07-22 Tom Tromey <tom@tromey.com>
2661 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2662 unused variable. Call value_fetch_lazy when needed.
2663 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2664 Remove unused variable. Call value_fetch_lazy when needed.
2666 2018-07-22 Tom Tromey <tom@tromey.com>
2668 * m32c-tdep.c (mark_dma): Return void.
2669 (make_regs): Remove unused declarations.
2671 2018-07-22 Tom Tromey <tom@tromey.com>
2673 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2674 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2675 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2676 bkscm_get_valid_block_smob_arg_unsafe for effect.
2678 2018-07-22 Tom Tromey <tom@tromey.com>
2680 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2683 2018-07-22 Tom Tromey <tom@tromey.com>
2685 * windows-nat.c (saved_context): Conditionally define.
2686 * remote.c (remote_target::remote_btrace_maybe_reopen):
2687 Conditionally declare "warned".
2688 * inflow.c (sigquit_ours): Conditionally define.
2689 (new_tty): Move "tty" declaration inside #if.
2690 * guile/guile.c (guile_datadir): Conditionally define.
2691 * charset.c (set_be_le_names): Move some declarations inside #if.
2692 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2694 (parse_xml_btrace_conf): Likewise.
2696 2018-07-22 Tom Tromey <tom@tromey.com>
2698 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2700 2018-07-22 Tom Tromey <tom@tromey.com>
2702 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2703 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2704 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2705 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2706 * stack.c (frame_apply_level_command): Remove unused variable.
2707 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2708 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2709 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2711 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2712 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2713 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2715 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2716 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2718 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2719 Remove unused variable.
2720 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2722 * common/tdesc.c (print_xml_feature::visit): Remove unused
2724 * compile/compile-object-load.c (store_regs): Remove unused
2726 * complaints.c (clear_complaints): Remove unused variable.
2727 * corelow.c (core_target_open): Remove unused variable.
2728 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2730 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2732 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2734 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2736 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2738 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2740 * ia64-tdep.c (examine_prologue): Remove unused variable.
2741 * infcall.c (run_inferior_call): Remove unused variable.
2742 * inferior.c (exit_inferior): Remove unused variable.
2743 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2744 * linespec.c (decode_line_2): Remove unused variable.
2745 * linux-nat.c (super_close): Remove.
2746 * linux-tdep.c (linux_info_proc): Remove unused variable.
2747 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2748 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2749 Remove unused variable.
2750 * parse.c (find_minsym_type_and_address): Remove unused variable.
2751 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2753 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2755 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2757 * record-btrace.c (record_btrace_target::store_registers): Remove
2759 (cmd_show_record_btrace_cpu): Remove unused variable.
2760 * riscv-tdep.c (riscv_register_reggroup_p)
2761 (riscv_push_dummy_call, riscv_return_value): Remove unused
2763 * rust-exp.y (literal): Remove unused variable.
2764 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2766 <STRUCTOP_ANONYMOUS>: Likewise.
2767 * s390-linux-tdep.c (s390_linux_init_abi_31)
2768 (s390_linux_init_abi_64): Remove unused variable.
2769 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2770 (file_select_thread, net_windows_open, _initialize_ser_windows):
2771 Remove unused variables.
2772 * symtab.c (find_pc_sect_line): Remove unused variable.
2773 * target-memory.c (compute_garbled_blocks): Remove unused
2775 (target_write_memory_blocks): Remove unused variable.
2776 * target.c (target_stack::unpush): Remove unused variables.
2777 * tracepoint.c (start_tracing, all_tracepoint_actions)
2778 (merge_uploaded_trace_state_variables)
2779 (print_one_static_tracepoint_marker): Remove unused variable.
2780 * unittests/basic_string_view/element_access/char/1.cc (test01):
2781 Remove unused variable.
2782 * windows-nat.c (windows_continue, windows_add_all_dlls)
2783 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2784 Remove unused variables.
2786 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2788 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2789 attr_profile in HAVE_ELF.
2790 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2793 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2795 * frame.c (frame_register_unwind): Change parameter name.
2796 (frame_unwind_register): Likewise.
2797 (frame_unwind_register_value): Likewise.
2798 (frame_unwind_register_signed): Likewise.
2799 (frame_unwind_register_unsigned): Likewise.
2800 * frame.h (frame_register_unwind): Likewise.
2801 (frame_unwind_register): Likewise.
2802 (frame_unwind_register_value): Likewise.
2803 (frame_unwind_register_signed): Likewise.
2804 (frame_unwind_register_unsigned): Likewise.
2805 (frame_unwind_arch): Likewise.
2807 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2809 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2812 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2814 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2815 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2818 2018-07-20 Keith Seitz <keiths@redhat.com>
2820 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2821 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2822 m_compunit_symtab, m_language>: Add "m_" prefix.
2824 * buildsym.c: Update all uses.
2826 2018-07-20 Tom Tromey <tom@tromey.com>
2828 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2829 * buildsym.h (record_line_ftype): Remove typedef.
2831 2018-07-20 Tom Tromey <tom@tromey.com>
2833 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2834 (end_expandable_symtab): Likewise.
2835 (end_symtab_get_static_block): Likewise.
2836 (end_symtab_from_static_block): Likewise.
2837 * buildsym-legacy.c (augment_type_symtab): Remove.
2838 (end_expandable_symtab): Remove.
2839 (end_symtab_get_static_block): Remove.
2840 (end_symtab_from_static_block): Remove.
2842 2018-07-20 Tom Tromey <tom@tromey.com>
2844 * dwarf2read.c: Include buildsym.h.
2845 (struct dwarf2_cu) <builder>: New method.
2846 (fixup_go_packaging): Update.
2847 (process_full_comp_unit, process_full_type_unit): Update. Don't
2848 use scoped_free_pendings.
2849 (using_directives): Add "cu" parameter, remove "language".
2850 (read_import_statement, setup_type_unit_groups, )
2851 (read_func_scope, read_lexical_block_scope)
2852 (dwarf2_record_block_ranges, read_namespace): Update.
2853 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2854 (lnp_state_machine::handle_end_sequence): Update.
2855 (class lnp_state_machine) <m_cu>: New member.
2856 <m_record_line_callback>: Remove.
2857 <m_currently_recording_lines>: New member.
2858 (lnp_state_machine::handle_set_file): Update.
2859 (noop_record_line): Remove.
2860 (dwarf_record_line_p): Add cu parameter.
2861 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2862 (lnp_state_machine::record_line)
2863 (lnp_state_machine::lnp_state_machine)
2864 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2865 (dwarf_decode_lines): Update.
2866 (dwarf2_start_subfile): Add cu parameter.
2867 (dwarf2_start_symtab, new_symbol): Update.
2868 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2869 Remove dwarf2_per_objfile parameter.
2870 (dwarf_decode_macros): Update.
2872 2018-07-20 Tom Tromey <tom@tromey.com>
2874 * stabsread.c (define_symbol): Update.
2875 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2876 * dwarf2read.c (new_symbol): Update.
2877 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2878 * cp-namespace.c: Include buildsym.h.
2879 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2880 * buildsym-legacy.c (get_buildsym_compunit): New function.
2882 2018-07-20 Tom Tromey <tom@tromey.com>
2884 * xcoffread.c: Include buildsym-legacy.h.
2885 * windows-nat.c: Include buildsym-legacy.h.
2886 * stabsread.c: Include buildsym-legacy.h.
2887 * mdebugread.c: Include buildsym-legacy.h.
2888 * buildsym-legacy.h: New file.
2889 * buildsym-legacy.c: New file, from buildsym.c.
2890 * go32-nat.c: Include buildsym-legacy.h.
2891 * dwarf2read.c: Include buildsym-legacy.h.
2892 * dbxread.c: Include buildsym-legacy.h.
2893 * cp-namespace.c: Include buildsym-legacy.h.
2894 * coffread.c: Include buildsym-legacy.h.
2895 * buildsym.h: Move some contents to buildsym-legacy.h.
2896 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2898 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2900 2018-07-20 Tom Tromey <tom@tromey.com>
2902 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2903 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2904 (buildsym_compunit::buildsym_compunit)
2905 (buildsym_compunit::~buildsym_compunit)
2906 (buildsym_compunit::get_macro_table): Define.
2908 2018-07-20 Tom Tromey <tom@tromey.com>
2910 * buildsym.c (reset_symtab_globals): Remove.
2911 (buildsym_compunit::end_symtab_from_static_block): Update.
2912 (buildsym_compunit::augment_type_symtab): Update.
2913 (end_symtab_from_static_block): Call free_buildsym_compunit.
2914 (augment_type_symtab, end_symtab, end_expandable_symtab):
2917 2018-07-20 Tom Tromey <tom@tromey.com>
2919 * arch-utils.c: Do not include buildsym.h.
2920 * mipsread.c: Do not include buildsym.h.
2921 * machoread.c: Do not include buildsym.h.
2922 * elfread.c: Do not include buildsym.h.
2924 2018-07-20 Tom Tromey <tom@tromey.com>
2926 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2928 (buildsym_compunit): Add new constructor.
2929 (struct buildsym_compunit) <get_last_source_file, finish_block,
2930 record_block_range, start_subfile, patch_subfile_names,
2931 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2932 set_last_source_start_addr, get_last_source_start_addr,
2933 get_local_using_directives, set_local_using_directives,
2934 get_global_using_directives, outermost_context_p,
2935 get_current_context_stack, get_context_stack_depth,
2936 get_current_subfile, get_local_symbols, get_file_symbols,
2937 get_global_symbols, record_debugformat, record_producer,
2938 push_context, pop_context, end_symtab_get_static_block,
2939 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2941 <record_pending_block, finish_block_internal, make_blockvector,
2942 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2946 2018-05-22 Tom Tromey <tom@tromey.com>
2948 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2950 (finish_block_internal): Update.
2952 2018-07-20 Tom Tromey <tom@tromey.com>
2954 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2956 (finish_block_internal): Update.
2958 2018-07-20 Tom Tromey <tom@tromey.com>
2960 * buildsym.h (EXTERN): Don't define or undef.
2961 * buildsym.c (EXTERN): Don't define.
2963 2018-07-20 Tom Tromey <tom@tromey.com>
2965 * buildsym.c: Remove TODO comment.
2967 2018-07-20 Tom Tromey <tom@tromey.com>
2969 * coffread.c (coff_symtab_read): Update.
2970 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2971 (xcoff_new_init): Update.
2972 * mipsread.c (mipscoff_new_init): Update.
2973 * mdebugread.c (mdebug_build_psymtabs): Update.
2974 * elfread.c (elf_new_init): Update.
2975 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2977 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2978 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2979 (stabsect_build_psymtabs): Update.
2980 * buildsym.h (buildsym_init): Don't declare.
2981 * buildsym.c: Update comment.
2982 (prepare_for_building): Remove.
2983 (start_symtab, restart_symtab): Update.
2984 (reset_symtab_globals): Update comment.
2985 (buildsym_init): Remove.
2987 2018-07-20 Tom Tromey <tom@tromey.com>
2989 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2990 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2991 (read_enum_type, common_block_start, common_block_end)
2992 (cleanup_undefined_types_1, finish_global_stabs): Update.
2993 * mdebugread.c (psymtab_to_symtab_1): Update.
2994 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2995 (read_lexical_block_scope, new_symbol): Update.
2996 * dbxread.c (process_one_symbol): Update.
2997 * coffread.c (coff_symtab_read, process_coff_symbol)
2998 (coff_read_enum_type): Update.
2999 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3001 (get_local_symbols, get_file_symbols, get_global_symbols): New
3003 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3005 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3006 (~scoped_free_pendings): Update.
3007 (finish_block, prepare_for_building, reset_symtab_globals)
3008 (end_symtab_get_static_block, end_symtab_with_blockvector)
3009 (augment_type_symtab, push_context): Update.
3010 (get_local_symbols, get_file_symbols, get_global_symbols): New
3012 (buildsym_init): Update.
3014 2018-07-20 Tom Tromey <tom@tromey.com>
3016 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3017 (process_full_type_unit): Likewise.
3018 (dwarf2_start_symtab): Set list_in_scope.
3020 2018-07-20 Tom Tromey <tom@tromey.com>
3022 * dwarf2read.c (process_psymtab_comp_unit_reader)
3023 (build_type_psymtabs_reader): Do not set list_in_scope.
3025 2018-07-20 Tom Tromey <tom@tromey.com>
3027 * buildsym.c (free_pendings): Remove.
3028 (add_symbol_to_list, scoped_free_pendings)
3029 (finish_block_internal, buildsym_init): Update.
3031 2018-07-20 Tom Tromey <tom@tromey.com>
3033 * xcoffread.c (read_xcoff_symtab): Update.
3034 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3036 * dbxread.c (process_one_symbol): Update.
3037 * coffread.c (coff_symtab_read): Update.
3038 * buildsym.h (finish_block): Update.
3039 * buildsym.c (finish_block): Remove "listhead" argument.
3040 (end_symtab_get_static_block): Update.
3042 2018-07-20 Tom Tromey <tom@tromey.com>
3044 * buildsym.h (class scoped_free_pendings): Remove constructor.
3045 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3047 <m_pending_block_obstack, m_pending_blocks>: New members.
3048 (pending_block_obstack, pending_blocks): Remove.
3049 (scoped_free_pendings::scoped_free_pendings): Default.
3050 (~scoped_free_pendings): Update.
3051 (free_pending_blocks): Remove.
3052 (finish_block_internal, record_pending_block, make_blockvector)
3053 (end_symtab_get_static_block, augment_type_symtab, push_context)
3054 (buildsym_init): Update.
3056 2018-07-20 Tom Tromey <tom@tromey.com>
3058 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3059 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3061 (pending_addrmap, pending_addrmap_obstack)
3062 (pending_addrmap_interesting): Remove.
3063 (scoped_free_pendings, record_block_range, make_blockvector)
3064 (prepare_for_building, reset_symtab_globals, buildsym_init):
3067 2018-07-20 Tom Tromey <tom@tromey.com>
3069 * xcoffread.c (process_linenos): Update.
3070 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3071 * mdebugread.c (psymtab_to_symtab_1): Update.
3072 * dwarf2read.c (setup_type_unit_groups)
3073 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3074 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3075 * dbxread.c (process_one_symbol): Update.
3076 * coffread.c (coff_symtab_read, enter_linenos)
3077 (process_coff_symbol): Update.
3078 * buildsym.h (current_subfile): Don't declare.
3079 (get_current_subfile): Declare.
3080 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3082 (start_subfile, free_buildsym_compunit, push_subfile)
3083 (prepare_for_building, start_symtab): Update.
3084 (get_current_subfile): New function.
3086 2018-07-20 Tom Tromey <tom@tromey.com>
3088 * coffread.c (coff_symtab_read): Update.
3089 * xcoffread.c (read_xcoff_symtab): Update.
3090 * dwarf2read.c (new_symbol): Update.
3091 (read_func_scope, read_lexical_block_scope): Update.
3092 * dbxread.c (process_one_symbol): Update.
3093 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3094 (outermost_context_p): Remove macro.
3095 (outermost_context_p, get_current_context_stack)
3096 (get_context_stack_depth): Declare.
3097 (pop_context): Return struct context_stack.
3098 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3100 (context_stack_size): Remove.
3101 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3102 (prepare_for_building, end_symtab_get_static_block)
3103 (augment_type_symtab, push_context): Update.
3104 (pop_context): Return struct context_stack.
3105 (outermost_context_p, get_current_context_stack)
3106 (get_context_stack_depth): New functions.
3107 (buildsym_init): Update.
3109 2018-07-20 Tom Tromey <tom@tromey.com>
3111 * rust-exp.y: Now a pure parser. Update all rules.
3112 (%union): Move earlier.
3113 (current_parser, work_obstack): Remove globals.
3114 (rust_parser, ~rust_parser): Update.
3115 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3116 lex_character, lex_number, lex_string, lex_identifier,
3117 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3118 convert_name, convert_params_to_expression,
3119 convert_ast_to_expression, ast_basic_type, ast_operation,
3120 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3121 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3122 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3123 ast_array_type, ast_slice_type, ast_reference_type,
3124 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3125 (rust_parse): Update.
3126 (rustyyerror, rustyylex): Add parser parameter.
3127 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3128 (rust_lex_stringish_test, rust_lex_test_sequence)
3129 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3130 (rust_lex_test_push_back, rust_lex_tests): Update.
3132 2018-07-19 Pedro Alves <palves@redhat.com>
3134 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3135 gdb::unique_xmalloc_ptr.
3136 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3137 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3138 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3139 copy-initialization.
3140 * guile/scm-pretty-print.c (ppscm_print_children): Use
3141 gdb::unique_xmalloc_ptr instead of cleanups.
3142 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3143 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3144 gdb::unique_xmalloc_ptr.
3145 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3146 Adjust to use gdb::unique_xmalloc_ptr.
3147 * guile/scm-utils.c (extract_arg): Adjust.
3148 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3149 gdb::unique_xmalloc_ptr instead of a cleanup.
3151 2018-07-19 Tom Tromey <tom@tromey.com>
3153 * utils.c (do_value_free_to_mark)
3154 (make_cleanup_value_free_to_mark): Remove.
3155 * utils.h (make_cleanup_value_free_to_mark): Remove.
3157 2018-07-19 Pedro Alves <palves@redhat.com>
3159 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3160 forwarding reference.
3162 2018-07-18 Pedro Alves <palves@redhat.com>
3164 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3165 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3168 2018-07-18 Pedro Alves <palves@redhat.com>
3170 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3172 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3174 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3175 directly instead of a cleanup.
3176 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3177 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3178 (vlscm_binop_gdbthrow): New, factored out from ...
3179 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3180 (vlscm_rich_compare): Use gdbscm_wrap.
3181 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3182 instead of a cleanup.
3183 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3185 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3186 Use xfree directly instead of a cleanup.
3187 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3188 Adjust to use gdbscm_wrap and scoped_value_mark.
3189 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3190 (gdbscm_value_address, gdbscm_value_dereference)
3191 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3193 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3194 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3196 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3197 gdbscm_wrap and scoped_value_mark.
3198 (gdbscm_value_to_string): Use xfree directly instead of a
3199 cleanup. Move 'buffer' unique_ptr to TRY scope.
3200 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3201 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3203 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3204 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3206 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3209 2018-07-18 Tom de Vries <tdevries@suse.de>
3211 * findvar.c (default_read_var_value): Also resolve dynamic type for
3212 LOC_OPTIMIZED_OUT vars.
3214 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3216 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3219 2018-07-17 Tom Tromey <tom@tromey.com>
3221 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3222 (compute_enum_list, pascm_set_param_value_x)
3223 (gdbscm_parameter_value): Update.
3224 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3225 (gdbscm_scm_to_host_string): Update.
3226 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3228 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3229 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3230 * guile/scm-string.c (gdbscm_scm_to_string): Return
3232 (gdbscm_scm_to_host_string): Likewise.
3234 2018-07-17 Tom Tromey <tom@tromey.com>
3236 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3237 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3238 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3239 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3242 2018-07-17 Tom Tromey <tom@tromey.com>
3244 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3245 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3247 * guile/scm-cmd.c (cmdscm_function): Update.
3248 * guile/scm-pretty-print.c
3249 (ppscm_print_exception_unless_memory_error): Update.
3250 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3251 Return unique_xmalloc_ptr.
3253 2018-07-17 Tom Tromey <tom@tromey.com>
3255 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3258 2018-07-17 Jim Wilson <jimw@sifive.com>
3260 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3261 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3262 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3263 unecessary braces after EF_RISCV_RVC test. Delete call to
3264 set_gdbarch_decr_pc_after_break.
3266 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3267 RISCV_LAST_FP_REGNUM + 1.
3268 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3270 2018-07-17 Tom Tromey <tom@tromey.com>
3272 * configure.ac: Remove --disable-gdbcli.
3273 * configure: Rebuild.
3274 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3275 (SUBDIR_CLI_CFLAGS): Remove.
3276 (SFILES): Use SUBDIR_CLI_SRCS.
3277 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3279 2018-07-17 Tom Tromey <tom@tromey.com>
3282 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3284 2018-07-16 Jim Wilson <jimw@sifive.com>
3286 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3288 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3290 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3292 (libunwind_frame_sniffer): Likewise.
3293 (libunwind_frame_prev_register): Likewise.
3294 (libunwind_sigtramp_frame_sniffer): Likewise.
3295 * ia64-tdep.c (ia64_access_reg): Likewise.
3296 (ia64_access_rse_reg): Likewise.
3297 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3298 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3300 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3302 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3304 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3306 * remote-sim.c (gdbsim_target::close,
3307 gdbsim_target::mourn_inferior): Remove unused variables.
3309 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3311 * ia64-tdep.c (ktab_buf): New global.
3312 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3313 (get_kernel_table): Adjust.
3315 2018-07-16 Tom Tromey <tom@tromey.com>
3317 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3318 * dwarf2read.c (using_directives, new_symbol): Use
3319 outermost_context_p.
3320 * dbxread.c (process_one_symbol): Use outermost_context_p.
3321 * coffread.c (coff_symtab_read): Use outermost_context_p.
3323 2018-07-16 Tom Tromey <tom@tromey.com>
3325 * dwarf2read.c (using_directives, read_func_scope)
3326 (read_lexical_block_scope): Update.
3327 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3328 * buildsym.h (local_using_directives, global_using_directives):
3330 (get_local_using_directives, set_local_using_directives)
3331 (get_global_using_directives): Declare.
3332 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3333 m_global_using_directives>: New members.
3334 (finish_block_internal, prepare_for_building)
3335 (reset_symtab_globals, end_symtab_get_static_block)
3336 (push_context): Update.
3337 (get_local_using_directives, set_local_using_directives)
3338 (get_global_using_directives): New functions.
3339 (buildsym_init): Update.
3341 2018-07-16 Tom Tromey <tom@tromey.com>
3343 * xcoffread.c (xcoff_initial_scan): Don't call
3344 free_pending_blocks.
3345 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3346 * buildsym.h (class scoped_free_pendings): Add constructor.
3347 (free_pending_blocks): Don't declare.
3348 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3349 (free_pending_blocks): Now static.
3351 2018-07-16 Tom Tromey <tom@tromey.com>
3353 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3354 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3356 (struct subfile_stack): Remove.
3357 (subfile_stack): Remove.
3358 (push_subfile, pop_subfile, buildsym_init): Update.
3360 2018-07-16 Tom Tromey <tom@tromey.com>
3362 * buildsym.c (push_subfile): Use gdb_assert.
3363 (pop_subfile): Use gdb_assert.
3365 2018-07-16 Tom Tromey <tom@tromey.com>
3367 * buildsym.h (merge_symbol_lists): Remove.
3368 * buildsym.c (merge_symbol_lists): Remove.
3370 2018-07-16 Tom Tromey <tom@tromey.com>
3372 * stabsread.c (scan_file_globals): Update comment.
3373 * stabsread.h (scan_file_globals): Move from buildsym.h.
3374 * buildsym.h (scan_file_globals): Move to stabsread.h.
3376 2018-07-16 Tom Tromey <tom@tromey.com>
3378 * xcoffread.c (xcoff_new_init): Update.
3379 * mipsread.c (mipscoff_new_init): Update.
3380 * mdebugread.c (mdebug_build_psymtabs): Update.
3381 * elfread.c (elf_new_init): Update.
3382 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3383 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3384 * buildsym.h (buildsym_new_init): Don't declare.
3385 * buildsym.c (buildsym_new_init): Remove.
3387 2018-07-16 Tom Tromey <tom@tromey.com>
3389 * stabsread.h (within_function): Move from buildsym.h.
3390 * stabsread.c (start_stabs): Clear within_function.
3391 * coffread.c (coff_start_symtab): Clear within_function.
3392 * buildsym.h (within_function): Move to stabsread.h.
3393 * buildsym.c (prepare_for_building): Update.
3395 2018-07-16 Tom Tromey <tom@tromey.com>
3397 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3398 * dwarf2read.c (dwarf2_start_symtab): Don't set
3399 processing_gcc_compilation.
3400 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3402 2018-07-16 Tom Tromey <tom@tromey.com>
3404 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3405 (next_symbol_text_func): Move from buildsym.h.
3406 * stabsread.c (hashname): Move from buildsym.c.
3407 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3408 (next_symbol_text_func, hashname): Move to stabsread.h.
3409 * buildsym.c: Don't include bcache.h
3410 (hashname): Move to stasbread.c.
3412 2018-07-16 Tom Tromey <tom@tromey.com>
3414 * buildsym.h (context_stack_size): Don't declare.
3415 * buildsym.c (context_stack_size): New global.
3417 2018-07-16 Tom Tromey <tom@tromey.com>
3419 * dbxread.c (processing_acc_compilation): New global.
3420 * buildsym.h (processing_acc_compilation): Don't declare.
3422 2018-07-16 Tom Tromey <tom@tromey.com>
3424 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3425 * dbxread.c (read_ofile_symtab): Update.
3426 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3427 * buildsym.h (last_source_start_addr): Remove.
3428 (set_last_source_start_addr, get_last_source_start_addr):
3430 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3432 (struct buildsym_compunit) <m_last_source_start_addr>: New
3434 (prepare_for_building): Remove start_addr parameter.
3435 (start_symtab, restart_symtab, end_symtab_get_static_block)
3436 (end_symtab_with_blockvector): Update.
3437 (set_last_source_start_addr, get_last_source_start_addr): New
3440 2018-07-16 Tom Tromey <tom@tromey.com>
3442 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3444 (have_line_numbers): Remove.
3445 (record_line, prepare_for_building, end_symtab_get_static_block)
3446 (augment_type_symtab): Update.
3448 2018-07-16 Tom Tromey <tom@tromey.com>
3450 * buildsym.c (~buildsym_compunit): Free the macro table.
3451 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3453 <m_pending_macros>: New member.
3454 (pending_macros): Remove.
3455 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3456 (reset_symtab_globals, end_symtab_get_static_block)
3457 (end_symtab_with_blockvector, augment_type_symtab)
3458 (buildsym_init): Update.
3460 2018-07-16 Tom Tromey <tom@tromey.com>
3462 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3464 (buildsym_compunit::set_last_source_file): New method.
3465 <m_last_source_file>: New member.
3466 (prepare_for_building): Remove "name" parameter.
3467 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3468 (last_source_file): Remove.
3469 (set_last_source_file, get_last_source_file): Update.
3471 2018-07-16 Tom Tromey <tom@tromey.com>
3473 * buildsym.c (prepare_for_building): Add assert.
3475 2018-07-16 Tom Tromey <tom@tromey.com>
3477 * buildsym.c (~buildsym_compunit): Update.
3478 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3479 (start_subfile, patch_subfile_names)
3480 (end_symtab_with_blockvector): Update.
3482 2018-07-16 Tom Tromey <tom@tromey.com>
3484 * buildsym.c (struct buildsym_compunit): Add constructor,
3485 destructor, initializers.
3486 (start_buildsym_compunit): Remove.
3487 (free_buildsym_compunit): Use "delete".
3488 (start_symtab, restart_symtab): Use "new".
3490 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
3492 * symfile.c (set_objfile_default_section_offset): Remove struct
3495 2018-07-14 Stafford Horne <shorne@gmail.com>
3497 * (Responsible Maintainers): Add myself as or1k maintainer.
3499 2018-07-13 Tom Tromey <tom@tromey.com>
3501 * symfile.c (set_objfile_default_section_offset): Use extra braces
3504 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3506 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3509 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3511 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3512 unittests/cli-utils-selftests.c
3513 * unittests/cli-utils-selftests.c: New file.
3515 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3517 * NEWS: Mention new commands. Mention change to 'thread apply'.
3519 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3521 * thread.c (thr_try_catch_cmd): New function.
3522 (thread_apply_all_command): Handle qcs flags.
3523 (thread_apply_command): Handle qcs flags.
3524 (taas_command): New function.
3525 (tfaas_command): New function.
3526 (_initialize_thread): Update to setup the new commands 'taas
3527 and 'tfaas'. Change doc string for 'thread apply'.
3529 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3531 * stack.c: (trailing_outermost_frame): New function, mostly
3532 extracted from backtrace_command_1.
3533 (leading_innermost_frame): New function.
3534 (backtrace_command_1): Update to call trailing_outermost_frame.
3535 (frame_apply_command_count): New function.
3536 (frame_apply_level_command): New function.
3537 (frame_apply_all_command): New function.
3538 (frame_apply_command): New function.
3539 (faas_command): New function.
3540 (frame_cmd_list): New variable.
3541 (_initialize_stack): Update to setup the new commands 'frame apply'
3544 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3546 * cli-utils.c (number_or_range_parser::get_number): Only handle
3547 numbers or convenience var as numbers.
3548 (parse_flags): New function.
3549 (parse_flags_qcs): New function.
3550 (number_or_range_parser::finished): Ensure parsing end is detected
3551 before end of string.
3552 * cli-utils.h (parse_flags): New function.
3553 (parse_flags_qcs): New function.
3554 (number_or_range_parser): Remove m_finished bool.
3555 (number_or_range_parser::skip_range): Set m_in_range to false.
3557 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
3559 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3562 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3563 Jan Kratochvil <jan.kratochvil@redhat.com>
3564 Paul Fertser <fercerpav@gmail.com>
3565 Tsutomu Seki <sekiriki@gmail.com>
3566 Pedro Alves <palves@redhat.com>
3568 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3569 'unittests/parse-connection-spec-selftests.c'.
3570 (COMMON_SFILES): Add 'common/netstuff.c'.
3571 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3572 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3573 * common/netstuff.c: New file.
3574 * common/netstuff.h: New file.
3575 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3576 (wait_for_connect): Update comment. New parameter
3577 'gdb::optional<int> sock' instead of 'struct serial *scb'.
3578 Use 'sock' directly instead of 'scb->fd'.
3579 (try_connect): New function, with code from 'net_open'.
3580 (net_open): Rewrite main loop to deal with multiple
3581 sockets/addresses. Handle IPv6-style hostnames; implement
3582 support for IPv6 connections.
3583 * unittests/parse-connection-spec-selftests.c: New file.
3585 2018-07-11 Pedro Alves <palves@redhat.com>
3588 * remote.c (remote_target::remote_detach_pid): Call
3589 set_current_process.
3591 2018-07-11 Pedro Alves <palves@redhat.com>
3593 * h8300-tdep.c (h8300_gdbarch_init): Remove
3594 set_gdbarch_ecoff_reg_to_regnum calls.
3596 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3599 * c-typeprint.c (c_type_print_base_struct_union): Don't print
3600 offsets/sizes for static members of a class/struct.
3602 2018-07-11 Alan Hayward <alan.hayward@arm.com>
3604 * target-descriptions.c (tdesc_register_bitsize): Rename.
3605 * target-descriptions.h (tdesc_register_bitsize): Likewise.
3606 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3607 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3609 2018-07-10 Tom Tromey <tom@tromey.com>
3611 * breakpoint.c (moribund_locations): Now static and a
3613 (breakpoint_init_inferior, moribund_breakpoint_here_p)
3614 (build_bpstat_chain, update_global_location_list)
3615 (breakpoint_retire_moribund): Update.
3616 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
3619 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3621 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3622 (riscv_register_reggroup_p): Use new function, remove unneeded
3624 (riscv_push_dummy_call): Extend assert to compare against xlen or
3625 flen based on register type.
3627 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3629 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3631 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
3633 * remote.c (show_hardware_watchpoint_limit): New function.
3634 (show_hardware_watchpoint_length_limit): New function.
3635 (show_hardware_breakpoint_limit): New function.
3636 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3637 where appropriate, update help text.
3639 2018-07-09 Tom Tromey <tom@tromey.com>
3641 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3642 (CLIBS): Don't mention NAT_CLIBS.
3644 2018-07-09 Tom Tromey <tom@tromey.com>
3646 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3647 (LIBGDB_OBS, clean mostlyclean): Update.
3648 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3650 2018-07-09 Tom Tromey <tom@tromey.com>
3652 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3653 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3654 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3656 2018-07-09 Tom Tromey <tom@tromey.com>
3658 * Makefile.in (ALLDEPFILES): Remove exec.c.
3659 (COMMON_OBS): Remove exec.o.
3660 (COMMON_SFILES): Add exec.c.
3662 2018-07-09 Tom Tromey <tom@tromey.com>
3664 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3666 2018-07-09 Tom Tromey <tom@tromey.com>
3668 * Makefile.in (clean mostlyclean): Remove stamp-version.
3669 (version.c): Depend on stamp-version.
3670 (stamp-version): New rule, from version.c rule.
3672 2018-07-09 Tom Tromey <tom@tromey.com>
3674 * Makefile.in (init.c): Depend on stamp-init.
3675 (stamp-init): New rule, from init.c rule.
3676 (clean mostlyclean): Remove stamp-init.
3678 2018-07-09 Tom Tromey <tom@tromey.com>
3680 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3681 SUBDIR_GCC_COMPILE_SRCS.
3683 2018-07-09 Tom Tromey <tom@tromey.com>
3685 * Makefile.in (init.c): Remove some unused sed rules.
3687 2018-07-09 Tom Tromey <tom@tromey.com>
3689 * Makefile.in (TSOBS): Remove.
3690 (INIT_FILES): Update.
3691 (LIBGDB_OBS): Update.
3692 (COMMON_SFILES): Add inflow.c.
3693 (SFILES): Remove inflow.c.
3695 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3697 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3699 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3701 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3702 get_saveloc_name, is_signal_frame_name, step_name,
3703 init_remote_name, create_addr_space_name,
3704 destroy_addr_space_name, search_unwind_table_name,
3705 find_dyn_list_name): Constify.
3707 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3709 * darwin-nat.c (darwin_pthread_kill): New function.
3710 (darwin_resume_thread): Use darwin_pthread_kill.
3712 2018-07-05 Tom de Vries <tdevries@suse.de>
3714 * macroexp.c (macro_buffer) <operator=>: New member function.
3716 2018-07-04 Tom Tromey <tom@tromey.com>
3718 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3720 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3722 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3723 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3724 * maint.c: Likewise.
3727 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3729 * NEWS: Create a new section for the next release branch.
3730 Rename the section of the current branch, now that it has
3733 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3735 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3736 * version.in: Bump version to 8.2.50.DATE-git.
3738 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3739 Pedro Alves <palves@redhat.com>
3741 * linux-nat.c (linux_init_ptrace): Rename to ...
3742 (linux_init_ptrace_procfs): ... this. Call
3743 linux_proc_init_warnings.
3744 (linux_nat_target::post_attach)
3745 (linux_nat_target::post_startup_inferior): Adjust.
3746 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3747 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3749 2018-07-04 Tom de Vries <tdevries@suse.de>
3751 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3753 (read_comp_unit_head): ... here.
3755 2018-07-03 Tom Tromey <tom@tromey.com>
3757 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3758 (stop_tracing, tstatus_command)
3759 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3760 (print_one_static_tracepoint_marker): Update.
3761 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3763 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3765 (all_tracepoints, static_tracepoints_here): Return std::vector.
3767 2018-07-03 Tom Tromey <tom@tromey.com>
3769 * common/ptid.c (ptid_equal): Remove.
3770 * common/ptid.h (ptid_equal): Don't declare.
3771 * ada-tasks.c: Update.
3772 * breakpoint.c: Update.
3773 * common/agent.c: Update.
3774 * corelow.c: Update.
3775 * darwin-nat-info.c: Update.
3776 * darwin-nat.c: Update.
3778 * dtrace-probe.c: Update.
3779 * dummy-frame.c: Update.
3780 * fbsd-nat.c: Update.
3782 * gdbthread.h: Update.
3783 * gnu-nat.c: Update.
3784 * go32-nat.c: Update.
3785 * inf-loop.c: Update.
3786 * inf-ptrace.c: Update.
3787 * infcall.c: Update.
3791 * linux-fork.c: Update.
3792 * linux-nat.c: Update.
3793 * linux-thread-db.c: Update.
3794 * mi/mi-cmd-var.c: Update.
3795 * mi/mi-interp.c: Update.
3796 * mi/mi-main.c: Update.
3797 * nto-procfs.c: Update.
3798 * ppc-linux-tdep.c: Update.
3800 * python/py-inferior.c: Update.
3801 * python/py-record-btrace.c: Update.
3802 * python/py-record.c: Update.
3803 * ravenscar-thread.c: Update.
3804 * regcache.c: Update.
3805 * remote-sim.c: Update.
3807 * sol-thread.c: Update.
3810 * tui/tui-stack.c: Update.
3812 * windows-nat.c: Update.
3813 * windows-tdep.c: Update.
3815 2018-07-03 Tom Tromey <tom@tromey.com>
3817 * common/ptid.c (ptid_match): Remove.
3818 * common/ptid.h (ptid_match): Don't declare.
3819 * fbsd-nat.c: Update.
3822 * linux-nat.c: Update.
3823 * record-btrace.c: Update.
3824 * regcache.c: Update.
3827 2018-07-03 Tom Tromey <tom@tromey.com>
3829 * common/ptid.c (ptid_tid_p): Remove.
3830 * common/ptid.h (ptid_tid_p): Don't declare.
3831 * sol-thread.c: Update.
3833 2018-07-03 Tom Tromey <tom@tromey.com>
3835 * common/ptid.c (ptid_lwp_p): Remove.
3836 * common/ptid.h (ptid_lwp_p): Don't declare.
3837 * fbsd-nat.c: Update.
3838 * linux-nat.c: Update.
3839 * nat/linux-procfs.c: Update.
3840 * nat/x86-linux-dregs.c: Update.
3841 * sol-thread.c: Update.
3843 2018-07-03 Tom Tromey <tom@tromey.com>
3845 * common/ptid.c (ptid_is_pid): Remove.
3846 * common/ptid.h (ptid_is_pid): Don't declare.
3848 * linux-nat.c: Update.
3849 * mi/mi-interp.c: Update.
3853 2018-07-03 Tom Tromey <tom@tromey.com>
3855 * common/ptid.c (ptid_get_tid): Remove.
3856 * common/ptid.h (ptid_get_tid): Don't declare.
3857 * ada-tasks.c: Update.
3858 * aix-thread.c: Update.
3859 * bsd-uthread.c: Update.
3860 * darwin-nat.c: Update.
3861 * fbsd-nat.c: Update.
3862 * i386-darwin-nat.c: Update.
3864 * linux-tdep.c: Update.
3865 * nto-procfs.c: Update.
3866 * ppc-ravenscar-thread.c: Update.
3867 * python/py-infthread.c: Update.
3868 * ravenscar-thread.c: Update.
3869 * sol-thread.c: Update.
3870 * sparc-ravenscar-thread.c: Update.
3871 * windows-nat.c: Update.
3873 2018-07-03 Tom Tromey <tom@tromey.com>
3875 * common/ptid.c (ptid_get_lwp): Remove.
3876 * common/ptid.h (ptid_get_lwp): Don't declare.
3877 * aarch64-linux-nat.c: Update.
3878 * ada-tasks.c: Update.
3879 * aix-thread.c: Update.
3880 * amd64-linux-nat.c: Update.
3881 * arm-linux-nat.c: Update.
3882 * corelow.c: Update.
3883 * fbsd-nat.c: Update.
3884 * fbsd-tdep.c: Update.
3885 * gnu-nat.c: Update.
3886 * i386-cygwin-tdep.c: Update.
3887 * i386-gnu-nat.c: Update.
3888 * i386-linux-nat.c: Update.
3889 * ia64-linux-nat.c: Update.
3890 * inf-ptrace.c: Update.
3892 * linux-fork.c: Update.
3893 * linux-nat.c: Update.
3894 * linux-tdep.c: Update.
3895 * linux-thread-db.c: Update.
3896 * mips-linux-nat.c: Update.
3897 * nat/aarch64-linux-hw-point.c: Update.
3898 * nat/aarch64-linux.c: Update.
3899 * nat/linux-btrace.c: Update.
3900 * nat/linux-osdata.c: Update.
3901 * nat/linux-procfs.c: Update.
3902 * nat/x86-linux-dregs.c: Update.
3903 * obsd-nat.c: Update.
3904 * ppc-fbsd-nat.c: Update.
3905 * ppc-linux-nat.c: Update.
3907 * python/py-infthread.c: Update.
3908 * ravenscar-thread.c: Update.
3910 * s390-linux-nat.c: Update.
3911 * sol-thread.c: Update.
3912 * sol2-tdep.c: Update.
3913 * spu-linux-nat.c: Update.
3914 * x86-linux-nat.c: Update.
3915 * xtensa-linux-nat.c: Update.
3917 2018-07-03 Tom Tromey <tom@tromey.com>
3919 * common/ptid.c (ptid_get_pid): Remove.
3920 * common/ptid.h (ptid_get_pid): Don't declare.
3921 * aarch64-linux-nat.c: Update.
3922 * ada-lang.c: Update.
3923 * aix-thread.c: Update.
3924 * alpha-bsd-nat.c: Update.
3925 * amd64-fbsd-nat.c: Update.
3926 * amd64-linux-nat.c: Update.
3927 * arm-linux-nat.c: Update.
3928 * arm-nbsd-nat.c: Update.
3930 * break-catch-syscall.c: Update.
3931 * breakpoint.c: Update.
3932 * bsd-uthread.c: Update.
3933 * corelow.c: Update.
3935 * darwin-nat.c: Update.
3936 * fbsd-nat.c: Update.
3937 * fbsd-tdep.c: Update.
3939 * gnu-nat.c: Update.
3940 * hppa-nbsd-nat.c: Update.
3941 * hppa-obsd-nat.c: Update.
3942 * i386-fbsd-nat.c: Update.
3943 * ia64-linux-nat.c: Update.
3944 * inf-ptrace.c: Update.
3946 * inferior.c: Update.
3947 * inferior.h: Update.
3950 * linux-fork.c: Update.
3951 * linux-nat.c: Update.
3952 * linux-tdep.c: Update.
3953 * linux-thread-db.c: Update.
3954 * m68k-bsd-nat.c: Update.
3955 * mi/mi-interp.c: Update.
3956 * mi/mi-main.c: Update.
3957 * mips-linux-nat.c: Update.
3958 * mips-nbsd-nat.c: Update.
3959 * mips64-obsd-nat.c: Update.
3960 * nat/aarch64-linux-hw-point.c: Update.
3961 * nat/aarch64-linux.c: Update.
3962 * nat/linux-btrace.c: Update.
3963 * nat/linux-osdata.c: Update.
3964 * nat/linux-procfs.c: Update.
3965 * nat/x86-linux-dregs.c: Update.
3966 * nto-procfs.c: Update.
3967 * obsd-nat.c: Update.
3968 * ppc-linux-nat.c: Update.
3969 * ppc-nbsd-nat.c: Update.
3970 * ppc-obsd-nat.c: Update.
3971 * proc-service.c: Update.
3973 * python/py-inferior.c: Update.
3974 * python/py-infthread.c: Update.
3975 * ravenscar-thread.c: Update.
3977 * remote-sim.c: Update.
3979 * rs6000-nat.c: Update.
3980 * s390-linux-nat.c: Update.
3981 * sh-nbsd-nat.c: Update.
3982 * sol-thread.c: Update.
3983 * sparc-nat.c: Update.
3984 * sparc64-tdep.c: Update.
3985 * spu-linux-nat.c: Update.
3986 * spu-tdep.c: Update.
3987 * target-debug.h: Update.
3990 * tid-parse.c: Update.
3991 * tracefile-tfile.c: Update.
3992 * vax-bsd-nat.c: Update.
3993 * windows-nat.c: Update.
3994 * x86-linux-nat.c: Update.
3995 * x86-nat.c: Update.
3997 2018-07-03 Tom Tromey <tom@tromey.com>
3999 * common/ptid.c (pid_to_ptid): Remove.
4000 * common/ptid.h (pid_to_ptid): Don't declare.
4001 * aix-thread.c: Update.
4002 * arm-linux-nat.c: Update.
4003 * common/ptid.c: Update.
4004 * common/ptid.h: Update.
4005 * corelow.c: Update.
4007 * darwin-nat.c: Update.
4008 * fbsd-nat.c: Update.
4009 * fork-child.c: Update.
4010 * gnu-nat.c: Update.
4011 * go32-nat.c: Update.
4012 * inf-ptrace.c: Update.
4014 * inferior.c: Update.
4016 * linux-fork.c: Update.
4017 * linux-nat.c: Update.
4018 * nat/aarch64-linux-hw-point.c: Update.
4019 * nat/fork-inferior.c: Update.
4020 * nat/x86-linux-dregs.c: Update.
4021 * nto-procfs.c: Update.
4022 * obsd-nat.c: Update.
4024 * progspace.c: Update.
4026 * rs6000-nat.c: Update.
4027 * s390-linux-nat.c: Update.
4028 * sol-thread.c: Update.
4029 * spu-linux-nat.c: Update.
4032 * tracefile-tfile.c: Update.
4033 * windows-nat.c: Update.
4035 2018-07-03 Tom Tromey <tom@tromey.com>
4037 * common/ptid.h (ptid_build): Don't declare.
4038 * common/ptid.c (ptid_build): Remove.
4039 * aix-thread.c: Update.
4040 * bsd-kvm.c: Update.
4041 * bsd-uthread.c: Update.
4042 * common/agent.c: Update.
4043 * common/ptid.c: Update.
4044 * common/ptid.h: Update.
4045 * corelow.c: Update.
4046 * darwin-nat.c: Update.
4047 * fbsd-nat.c: Update.
4048 * gnu-nat.c: Update.
4049 * linux-fork.c: Update.
4050 * linux-nat.c: Update.
4051 * linux-thread-db.c: Update.
4052 * nat/linux-osdata.c: Update.
4053 * nat/linux-procfs.c: Update.
4054 * nto-procfs.c: Update.
4055 * obsd-nat.c: Update.
4056 * proc-service.c: Update.
4058 * ravenscar-thread.c: Update.
4059 * remote-sim.c: Update.
4061 * sol-thread.c: Update.
4063 * windows-nat.c: Update.
4065 2018-07-03 Tom Tromey <tom@tromey.com>
4067 * infrun.c (follow_exec): Use exit_inferior_silent.
4068 * inferior.c (exit_inferior_num_silent): Remove.
4069 * inferior.h (exit_inferior_num_silent): Don't declare.
4071 2018-07-03 Tom Tromey <tom@tromey.com>
4074 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4075 inferior_ptid on error.
4077 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4078 Simon Marchi <simon.marchi@polymtl.ca>
4081 * disasm.h (gdb_disassembler): Add
4082 `m_disassembler_options_holder'. member
4083 * disasm.c (get_all_disassembler_options): New function.
4084 (gdb_disassembler::gdb_disassembler): Use it.
4085 (gdb_buffered_insn_length_init_dis): Likewise.
4086 (gdb_buffered_insn_length): Adjust accordingly.
4087 (set_disassembler_options): Handle options with arguments.
4088 (show_disassembler_options_sfunc): Likewise. Add a leading new
4089 line if showing options with descriptions.
4090 (disassembler_options_completer): Adapt to using the
4091 `disasm_options_and_args_t' structure.
4092 * mips-tdep.c (mips_disassembler_options): New variable.
4093 (mips_disassembler_options_o32): Likewise.
4094 (mips_disassembler_options_n32): Likewise.
4095 (mips_disassembler_options_n64): Likewise.
4096 (gdb_print_insn_mips): Don't set `disassembler_options'.
4097 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4099 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4100 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4101 `gdbarch_disassembler_options_implicit' and
4102 `gdbarch_valid_disassembler_options'.
4103 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4104 `disasm_options_and_args_t' structure.
4105 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4107 (valid_disassembler_options): Switch from `disasm_options_t' to
4108 the `disasm_options_and_args_t' structure.
4109 * NEWS: Document `set disassembler-options' support for the MIPS
4111 * gdbarch.h: Regenerate.
4112 * gdbarch.c: Regenerate.
4114 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4116 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4118 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4120 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4121 parameter in call to amd64_target_description.
4122 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4123 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4124 (amd64fbsd_init_abi): Likewise.
4125 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4126 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4127 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4128 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4130 2018-06-29 Pedro Alves <palves@redhat.com>
4132 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4133 "segments" parameter.
4134 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4135 (_initialize_amd64_tdep): Update call to
4136 amd64_create_target_description.
4137 (amd64_target_description): Add "segments" parameter. Adjust
4138 the implementation to use it.
4139 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4140 call to amd64_create_target_description.
4141 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4142 * gdb/arch/amd64.h (amd64_create_target_description): Add
4143 "segments" register.
4144 * gdb/arch/amd64.c (amd64_create_target_description): Add
4145 "segments" parameter. Call create_feature_i386_64bit_segments
4146 only if SEGMENTS is true.
4147 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4148 call to amd64_create_target_description.
4150 2018-06-29 Pedro Alves <palves@redhat.com>
4152 * thread.c (thread_target_id_str): New, factored out from ...
4153 (print_thread_info_1): ... here. Use it to compute the max
4154 "Target Id" column width.
4156 2018-06-29 Pedro Alves <palves@redhat.com>
4158 * remote.c (remote_target::extra_thread_info): Delete
4159 'display_buf' and 'n' locals. from the cache, regardless of
4160 packet mechanims is in use. Use cache for qThreadExtra and qP
4163 2018-06-29 Pedro Alves <palves@redhat.com>
4165 * blockframe.c (find_pc_sect_containing_function): New function.
4166 * breakpoint.c (print_breakpoint_location): Don't call
4167 find_pc_sect_function.
4168 * linespec.c (create_sals_line_offset): Record the location's
4170 * linespec.c (convert_address_location_to_sals): Fill in sal's
4171 symbol with find_pc_sect_containing_function.
4172 * symtab.c (find_function_start_sal): Rename to ...
4173 (find_function_start_sal_1): ... this.
4174 (find_function_start_sal): Reimplement as wrapper around
4175 find_function_start_sal_1, and use
4176 find_pc_sect_containing_function to fill in the sal's symbol.
4177 (find_function_start_sal(symbol*, bool)): Adjust.
4178 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4180 (find_pc_sect_containing_function): Declare.
4182 2018-06-29 Pedro Alves <palves@redhat.com>
4184 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4185 true if the the location has no symbol.
4187 2018-06-28 Tom Tromey <tom@tromey.com>
4189 * NEWS: Mention --enable-codesign.
4190 * silent-rules.mk (ECHO_SIGN): New variable.
4191 * configure.ac: Add --enable-codesign.
4192 * configure: Rebuild.
4193 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4194 (gdb$(EXEEXT)): Optionally invoke codesign.
4196 2018-06-28 Pedro Alves <palves@redhat.com>
4198 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4200 (switch_to_thread_no_regs): Adjust comment.
4201 * infcmd.c (stop_pc): Delete.
4202 (post_create_inferior, info_program_command): Replace references
4203 to stop_pc with references to thread_info->suspend.stop_pc.
4204 * inferior.h (stop_pc): Delete declaration.
4205 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4206 (handle_inferior_event_1, handle_signal_stop)
4207 (process_event_stop_test, keep_going_stepped_thread)
4208 (handle_step_into_function, handle_step_into_function_backward)
4209 (print_stop_location): Replace references to stop_pc with
4210 references to thread_info->suspend.stop_pc.
4211 (struct infcall_suspend_state) <stop_pc>: Delete field.
4212 (save_infcall_suspend_state, restore_infcall_suspend_state):
4213 Remove references to inf_stat->stop_pc.
4214 * linux-fork.c (fork_load_infrun_state): Likewise.
4215 * record-btrace.c (record_btrace_set_replay): Likewise.
4216 * record-full.c (record_full_goto_entry): Likewise.
4217 * remote.c (print_one_stopped_thread): Likewise.
4218 * target.c (target_resume): Extend comment.
4219 * thread.c (set_executing_thread): New.
4220 (set_executing): Use it.
4221 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4222 Remove references to stop_pc.
4224 2018-06-28 Pedro Alves <palves@redhat.com>
4226 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4227 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4229 2018-06-28 Tom Tromey <tom@tromey.com>
4231 * coffread.c (coff_symfile_finish): Update.
4232 * xcoffread.c (xcoff_symfile_finish): Update.
4233 * elfread.c (elf_symfile_finish): Update.
4234 * symfile.h (dwarf2_free_objfile): Don't declare.
4235 * dwarf2read.c (_initialize_dwarf2_read): Use
4236 register_objfile_data_with_cleanup.
4237 (dwarf2_free_objfile): Now static. Change signature.
4239 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4241 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4242 option "-o" to add-symbol-file-load to add an offset to each
4243 section's load address.
4244 * symfile.c (set_objfile_default_section_offset): New function.
4246 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4248 * symfile.c (add_symbol_file_command): Make sure that sections
4249 with the same name are sorted in the same order.
4251 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4253 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4254 require the second argument. If omitted, load sections at the
4255 addresses specified in the file.
4257 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4259 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4260 (_initialize_symfile): Add option "-o" to symbol-file to add an
4261 offset to each section of the symbol file.
4263 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4265 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4267 2018-06-27 Tom Tromey <tom@tromey.com>
4269 * stack.c (_initialize_stack): Update "func" help text.
4271 2018-06-27 Tom Tromey <tom@tromey.com>
4273 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4275 (unwind_infopy_str, pyuw_create_unwind_info)
4276 (unwind_infopy_add_saved_register, pyuw_sniffer)
4277 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4279 (struct saved_reg): Add constructor.
4280 <value>: Now a gdbpy_ref<>.
4282 2018-06-27 Tom Tromey <tom@tromey.com>
4284 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4286 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4288 * gdb-gdb.py.in: Format using autopep8.
4290 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4292 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4293 (type_lookup_function): Recognize CORE_ADDR values.
4295 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4297 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4300 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4302 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4305 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4307 * gdb-gdb.py: Move to...
4308 * gdb-gdb.py.in: ... here.
4309 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4310 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4312 (distclean): Remove gdb-gdb.py when cleaning.
4313 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4314 * configure: Re-generate.
4316 2018-06-27 Pedro Alves <palves@redhat.com>
4318 * proc-service.c (get_ps_regcache): New.
4319 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4320 (ps_lsetfpregs): Use it.
4322 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4325 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4326 (dwarf_decode_lines_1): Adjust.
4328 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4330 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4332 <info_proc>: Likewise.
4334 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4336 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4337 to windows_fetch_one_register, and only handle the case of
4338 fetching one register. Move the code that reloads the context
4339 and iterates over all registers if R is negative to...
4340 (windows_nat_target::fetch_registers): ... here.
4341 (do_windows_store_inferior_registers): Rename to
4342 windows_store_one_register, and only handle the case of storing
4343 one register. Move the code that handles the case where r is
4345 (windows_nat_target::store_registers) ... here.
4347 2018-06-26 Tom Tromey <tom@tromey.com>
4350 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4351 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4353 (rust_internal_print_type): Add podata parameter.
4354 (rust_print_type): Update.
4356 2018-06-26 Tom Tromey <tom@tromey.com>
4358 * typeprint.h (struct print_offset_data) <update, finish,
4359 maybe_print_hole>: New methods.
4360 <indentation>: New constant.
4361 * typeprint.c (print_offset_data::indentation): Define.
4362 (print_offset_data::maybe_print_hole, print_offset_data::update)
4363 (print_offset_data::finish): Move from c-typeprint.c and rename.
4364 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4365 (print_spaces_filtered_with_print_options): Update.
4366 (c_print_type_union_field_offset, maybe_print_hole)
4367 (c_print_type_struct_field_offset): Move to typeprint.c and
4369 (c_type_print_base_struct_union): Update.
4371 2018-06-25 Pedro Alves <palves@redhat.com>
4373 * gdbthread.h (thread_info_ref, delete_thread)
4374 (delete_thread_silent, first_thread_of_inferior)
4375 (any_thread_of_inferior, switch_to_thread)
4376 (enable_thread_stack_temporaries)
4377 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4378 (get_last_thread_stack_temporary)
4379 (value_in_thread_stack_temporaries, can_access_registers_thread):
4380 Spell out "struct thread_info" instead of just "thread_info".
4381 * inferior.h (notice_new_inferior): Likewise.
4383 2018-06-25 Pedro Alves <palves@redhat.com>
4385 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4386 pass thread_info pointer to delete_thread.
4387 (windows_nat_target::detach): Pass inferior pointer to
4389 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4391 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4392 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4393 and pass a thread_info pointer to delete_thread.
4394 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4395 pass thread_info pointer to delete_thread.
4396 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4397 delete_thread_silent call.
4398 * procfs.c (procfs_target::detach): Pass inferior pointer to
4400 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4401 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4402 delete_thread_silent call.
4403 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4404 pass thread_info pointer to delete_thread.
4405 (windows_nat_target::detach): Pass inferior pointer to
4408 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4410 * regcache.c (readable_regcache::read_part): Fix asserts.
4411 (reg_buffer::raw_collect_part): New function.
4412 (regcache::write_part): Fix asserts.
4413 (reg_buffer::raw_supply_part): New function.
4414 (regcache::transfer_regset_register): New helper function.
4415 (regcache::transfer_regset): Call new functions.
4416 (regcache_supply_regset): Use gdb_byte*.
4417 (regcache::supply_regset): Likewise.
4418 (regcache_collect_regset): Likewise.
4419 (regcache::collect_regset): Likewise.
4420 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4421 (reg_buffer::raw_supply_part): Likewise.
4422 (regcache::transfer_regset_register): Likewise.
4423 (regcache::transfer_regset): Use gdb_byte*.
4425 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4427 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4429 2018-06-21 Pedro Alves <palves@redhat.com>
4431 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4432 instead of a ptid_t. All callers adjusted.
4433 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4435 (print_ada_task_info, display_current_task_id, task_command_1):
4437 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4439 (breakpoint_kind): Adjust.
4440 (remove_breakpoints_pid): Rename to ...
4441 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4442 pointer. All callers adjusted.
4443 (bpstat_clear_actions): Use inferior_thread.
4444 (get_bpstat_thread): New.
4445 (bpstat_do_actions): Use it.
4446 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4447 to take a thread_info pointer. All callers adjusted.
4448 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4449 (breakpoint_re_set_thread): Use inferior_thread.
4450 * breakpoint.h (struct inferior): Forward declare.
4451 (bpstat_stop_status): Update.
4452 (remove_breakpoints_pid): Delete.
4453 (remove_breakpoints_inf): New.
4454 * bsd-uthread.c (bsd_uthread_target::wait)
4455 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4456 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4457 (maint_btrace_packet_history_cmd)
4458 (maint_btrace_clear_packet_history_cmd): Adjust.
4459 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4461 * cli/cli-interp.c: Include "inferior.h".
4462 * common/refcounted-object.h (struct
4463 refcounted_object_ref_policy): New.
4464 * compile/compile-object-load.c: Include gdbthread.h.
4465 (store_regs): Use inferior_thread.
4466 * corelow.c (core_target::close): Use current_inferior.
4467 (core_target_open): Adjust to use first_thread_of_inferior and use
4468 the current inferior.
4469 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4470 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4471 <thread>: ... this new field. All references adjusted.
4472 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4473 Take a thread_info pointer instead of a ptid_t.
4474 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4475 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4476 thread_info pointer instead of a ptid_t.
4477 * elfread.c: Include "inferior.h".
4478 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4479 Use inferior_thread.
4480 * eval.c (evaluate_subexp): Likewise.
4481 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4483 * gdb_proc_service.h (struct thread_info): Forward declare.
4484 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4485 <thread>: ... this new field. All references adjusted.
4486 * gdbarch.h, gdbarch.c: Regenerate.
4487 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4488 'thread' parameter. All implementations and callers adjusted.
4489 * gdbthread.h (thread_info) <set_running>: New method.
4490 (delete_thread, delete_thread_silent): Take a thread_info pointer
4492 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4493 (first_thread_of_process): Delete, replaced by ...
4494 (first_thread_of_inferior): ... this new function. All callers
4496 (any_live_thread_of_process): Delete, replaced by ...
4497 (any_live_thread_of_inferior): ... this new function. All callers
4499 (switch_to_thread, switch_to_no_thread): Declare.
4500 (is_executing): Delete.
4501 (enable_thread_stack_temporaries): Update comment.
4502 <enable_thread_stack_temporaries>: Take a thread_info pointer
4503 instead of a ptid_t. Incref the thread.
4504 <~enable_thread_stack_temporaries>: Decref the thread.
4507 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4508 (get_last_thread_stack_temporary)
4509 (value_in_thread_stack_temporaries, can_access_registers_thread):
4510 Take a thread_info pointer instead of a ptid_t. All callers
4512 * infcall.c (get_call_return_value): Use inferior_thread.
4513 (run_inferior_call): Work with thread pointers instead of ptid_t.
4514 (call_function_by_hand_dummy): Work with thread pointers instead
4515 of ptid_t. Use thread_info_ref.
4516 * infcmd.c (proceed_thread_callback): Access thread's state
4518 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4519 access thread's state directly.
4520 (continue_command): Use inferior_thread.
4521 (info_program_command): Use find_thread_ptid and access thread
4523 (proceed_after_attach_callback): Use thread state directly.
4524 (notice_new_inferior): Take a thread_info pointer instead of a
4525 ptid_t. All callers adjusted.
4526 (exit_inferior): Take an inferior pointer instead of a pid. All
4528 (exit_inferior_silent): New.
4529 (detach_inferior): Delete.
4530 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4531 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4532 (detach_inferior_command, kill_inferior_command): Use
4533 find_inferior_id instead of valid_gdb_inferior_id and
4534 gdb_inferior_id_to_pid.
4535 (inferior_command): Use inferior and thread pointers.
4536 * inferior.h (struct thread_info): Forward declare.
4537 (notice_new_inferior): Take a thread_info pointer instead of a
4538 ptid_t. All callers adjusted.
4539 (detach_inferior): Delete declaration.
4540 (exit_inferior, exit_inferior_silent): Take an inferior pointer
4541 instead of a pid. All callers adjusted.
4542 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4543 (valid_gdb_inferior_id): Delete.
4544 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4545 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4546 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4548 <inf>: ... this new field.
4549 <step_ptid>: Delete, replaced by ...
4550 <step_thread>: ... this new field.
4551 (get_displaced_stepping_state): Take an inferior pointer instead
4552 of a pid. All callers adjusted.
4553 (displaced_step_in_progress_any_inferior): Adjust.
4554 (displaced_step_in_progress_thread): Take a thread pointer instead
4555 of a ptid_t. All callers adjusted.
4556 (displaced_step_in_progress, add_displaced_stepping_state): Take
4557 an inferior pointer instead of a pid. All callers adjusted.
4558 (get_displaced_step_closure_by_addr): Adjust.
4559 (remove_displaced_stepping_state): Take an inferior pointer
4560 instead of a pid. All callers adjusted.
4561 (displaced_step_prepare_throw, displaced_step_prepare)
4562 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4563 All callers adjusted.
4564 (start_step_over): Adjust.
4565 (infrun_thread_ptid_changed): Remove bit updating ptids in the
4566 displaced step queue.
4567 (do_target_resume): Adjust.
4568 (fetch_inferior_event): Use inferior_thread.
4569 (context_switch, get_inferior_stop_soon): Take an
4570 execution_control_state pointer instead of a ptid_t. All callers
4572 (switch_to_thread_cleanup): Delete.
4573 (stop_all_threads): Use scoped_restore_current_thread.
4574 * inline-frame.c: Include "gdbthread.h".
4575 (inline_state) <inline_state>: Take a thread pointer instead of a
4576 ptid_t. All callers adjusted.
4577 <ptid>: Delete, replaced by ...
4578 <thread>: ... this new field.
4579 (find_inline_frame_state): Take a thread pointer instead of a
4580 ptid_t. All callers adjusted.
4581 (skip_inline_frames, step_into_inline_frame)
4582 (inline_skipped_frames, inline_skipped_symbol): Take a thread
4583 pointer instead of a ptid_t. All callers adjusted.
4584 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4585 (inline_skipped_frames, inline_skipped_symbol): Likewise.
4586 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4588 * linux-nat.c (get_detach_signal): Likewise.
4589 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4590 (thread_db_notice_clone): Adjust.
4591 (thread_db_find_new_threads_silently)
4592 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4593 a thread pointer instead of a ptid_t. All callers adjusted.
4594 * mi/mi-cmd-var.c: Include "inferior.h".
4595 (mi_cmd_var_update_iter): Update to use thread pointers.
4596 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4598 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4600 (mi_output_running): ... this new function.
4601 (mi_on_resume_1): Adjust to use it.
4602 (mi_user_selected_context_changed): Adjust to use inferior_thread.
4603 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4605 (interrupt_thread_callback): : Adjust to use thread and inferior
4607 * proc-service.c: Include "gdbthread.h".
4608 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4609 * progspace-and-thread.c: Include "inferior.h".
4610 * progspace.c: Include "inferior.h".
4611 * python/py-exitedevent.c (create_exited_event_object): Adjust to
4612 hold a reference to an inferior_object.
4613 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4615 * python/py-inferior.c (struct inferior_object): Give the type a
4616 tag name instead of a typedef.
4617 (python_on_normal_stop): No need to check if the current thread is
4619 (inferior_to_inferior_object): Change return type to
4620 inferior_object. All callers adjusted.
4621 (find_thread_object): Delete, bits factored out to ...
4622 (thread_to_thread_object): ... this new function.
4623 * python/py-infthread.c (create_thread_object): Use
4624 inferior_to_inferior_object.
4625 (thpy_is_stopped): Use thread pointer directly.
4626 (gdbpy_selected_thread): Use inferior_thread.
4627 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4628 field, replaced with ...
4629 <thread>: ... this new field. All users adjusted.
4630 (btpy_insn_or_gap_new): Drop const.
4631 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
4633 * python/py-record.c: Include "gdbthread.h".
4634 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4635 a ptid_t. All callers adjusted.
4636 (gdbpy_current_recording): Use inferior_thread.
4637 * python/py-record.h (recpy_record_object) <ptid>: Delete
4638 field, replaced with ...
4639 <thread>: ... this new field. All users adjusted.
4640 (recpy_element_object) <ptid>: Delete
4641 field, replaced with ...
4642 <thread>: ... this new field. All users adjusted.
4643 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4644 a ptid_t. All callers adjusted.
4645 * python/py-threadevent.c: Include "gdbthread.h".
4646 (get_event_thread): Use thread_to_thread_object.
4647 * python/python-internal.h (struct inferior_object): Forward
4649 (find_thread_object, find_inferior_object): Delete declarations.
4650 (thread_to_thread_object, inferior_to_inferior_object): New
4652 * record-btrace.c: Include "inferior.h".
4653 (require_btrace_thread): Use inferior_thread.
4654 (record_btrace_frame_sniffer)
4655 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4656 (get_thread_current_frame): Use scoped_restore_current_thread and
4658 (get_thread_current_frame): Use thread pointer directly.
4659 (record_btrace_replay_at_breakpoint): Use thread's inferior
4661 * record-full.c: Include "inferior.h".
4662 * regcache.c: Include "gdbthread.h".
4663 (get_thread_arch_regcache): Use the inferior's address space
4665 (get_thread_regcache, registers_changed_thread): New.
4666 * regcache.h (get_thread_regcache(thread_info *thread)): New
4668 (registers_changed_thread): New.
4669 (remote_target) <remote_detach_1>: Swap order of parameters.
4670 (remote_add_thread): <remote_add_thread>: Return the new thread.
4671 (get_remote_thread_info(ptid_t)): New overload.
4672 (remote_target::remote_notice_new_inferior): Use thread pointers
4674 (remote_target::process_initial_stop_replies): Use
4675 thread_info::set_running.
4676 (remote_target::remote_detach_1, remote_target::detach)
4677 (extended_remote_target::detach): Adjust.
4678 * stack.c (frame_show_address): Use inferior_thread.
4679 * target-debug.h (target_debug_print_thread_info_pp): New.
4680 * target-delegates.c: Regenerate.
4681 * target.c (default_thread_address_space): Delete.
4682 (memory_xfer_partial_1): Use current_inferior.
4683 (target_detach): Use current_inferior.
4684 (target_thread_address_space): Delete.
4685 (generic_mourn_inferior): Use current_inferior.
4686 * target.h (struct target_ops) <thread_address_space>: Delete.
4687 (target_thread_address_space): Delete.
4688 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4690 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4691 thread pointer instead of a ptid_t. Adjust all callers.
4692 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4693 (first_thread_of_process): Delete, replaced by ...
4694 (first_thread_of_inferior): ... this new function. All callers
4696 (any_thread_of_process): Rename to ...
4697 (any_thread_of_inferior): ... this, and take an inferior pointer.
4698 (any_live_thread_of_process): Rename to ...
4699 (any_live_thread_of_inferior): ... this, and take an inferior
4701 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4702 (value_in_thread_stack_temporaries)
4703 (get_last_thread_stack_temporary): Take a thread pointer instead
4704 of a ptid_t. Adjust all callers.
4705 (thread_info::set_running): New.
4706 (validate_registers_access): Use inferior_thread.
4707 (can_access_registers_ptid): Rename to ...
4708 (can_access_registers_thread): ... this, and take a thread
4710 (print_thread_info_1): Adjust to compare thread pointers instead
4712 (switch_to_no_thread, switch_to_thread): Make extern.
4713 (scoped_restore_current_thread::~scoped_restore_current_thread):
4714 Use m_thread pointer directly.
4715 (scoped_restore_current_thread::scoped_restore_current_thread):
4716 Use inferior_thread.
4717 (thread_command): Use thread pointer directly.
4718 (thread_num_make_value_helper): Use inferior_thread.
4719 * top.c (execute_command): Use inferior_thread.
4720 * tui/tui-interp.c: Include "inferior.h".
4721 * varobj.c (varobj_create): Use inferior_thread.
4722 (value_of_root_1): Use find_thread_global_id instead of
4723 global_thread_id_to_ptid.
4725 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4727 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4729 (regcache::write_part): Likewise.
4730 (readable_regcache::cooked_read_part): Update comment.
4731 (readable_regcache::cooked_write_part): Likewise.
4732 * regcache.h: (readable_regcache::read_part): Likewise.
4733 (regcache::write_part): Likewise.
4735 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4736 Dirk Schubert <dirk.schubert@arm.com>
4738 * aarch64-linux-nat.c (post_attach): New.
4739 (aarch64_linux_nat_target::post_attach): Override post_attach to
4740 record the number of hardware debug registers.
4742 2018-06-20 Tom Tromey <tom@tromey.com>
4744 * python/py-param.c (add_setshow_generic): Make parameters const.
4745 (parmpy_init): Update.
4747 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4749 * regcache.h (regcache_cooked_read_ftype): Rename to...
4750 (register_read_ftype): ...this, change type to function_view.
4751 (class reg_buffer) <save>: Remove src parameter.
4752 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4753 parameter non-const in first overload. Remove src parameter in
4755 * regcache.c (do_cooked_read): Remove.
4756 (readonly_detached_regcache::readonly_detached_regcache): Make
4757 parameter non-const, adjust call to other constructor.
4758 (reg_buffer::save): Remove src parameter.
4759 * frame.c (do_frame_register_read): Remove.
4760 (frame_save_as_regcache): Use lambda function.
4761 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4762 parameter to ppu2spu_data *.
4763 (ppu2spu_sniffer): Use lambda function.
4765 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4767 * record-full.c (record_full_target::insert_breakpoint): Remove
4768 "struct" keyword, add const.
4770 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4772 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4773 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4774 * configure.ac: Remove AC_PREREQ, add missing quoting.
4775 * gnulib/configure.ac: Modernize usage of
4776 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4777 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4778 (AUTOMAKE_VERSION): Bump to 1.15.1.
4779 * configure: Re-generate.
4780 * config.in: Re-generate.
4781 * aclocal.m4: Re-generate.
4782 * gnulib/aclocal.m4: Re-generate.
4783 * gnulib/config.in: Re-generate.
4784 * gnulib/configure: Re-generate.
4785 * gnulib/import/Makefile.in: Re-generate.
4787 2018-06-19 Pedro Alves <palves@redhat.com>
4789 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4790 (lookup_minimal_symbol_by_pc_section): ... here with
4791 gdb_assert_not_reached added.
4793 2018-06-19 Pedro Alves <palves@redhat.com>
4795 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4796 parameter with a block parameter. Compare location's block symbol
4797 with the frame's block instead of addresses.
4798 (skip_inline_frames): Pass the current block instead of the
4799 frame's address. Break out as soon as we determine the frame
4800 should not be skipped.
4802 2018-06-18 Tom Tromey <tom@tromey.com>
4804 * solib-aix.c (solib_aix_get_section_offsets): Return
4806 (solib_aix_solib_create_inferior_hook): Update.
4808 2018-06-18 Tom Tromey <tom@tromey.com>
4810 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4812 2018-06-18 Tom Tromey <tom@tromey.com>
4814 * solib-frv.c (frv_relocate_main_executable): Use
4816 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4819 2018-06-18 Tom Tromey <tom@tromey.com>
4821 * objfiles.h (inhibit_section_map_updates): Update.
4822 (resume_section_map_updates, resume_section_map_updates_cleanup):
4824 * solib-svr4.c (svr4_handle_solib_event): Update.
4825 * objfiles.c (inhibit_section_map_updates): Return
4826 scoped_restore_tmpl<int>.
4827 (resume_section_map_updates, resume_section_map_updates_cleanup):
4830 2018-06-18 Tom Tromey <tom@tromey.com>
4832 * valprint.h (read_string): Update.
4833 * valprint.c (read_string): Change type of "buffer".
4834 (val_print_string): Update.
4835 * python/py-value.c (valpy_string): Update.
4836 * language.h (struct language_defn) <la_get_string>: Change
4838 (default_get_string, c_get_string): Update.
4839 * language.c (default_get_string): Change type of "buffer".
4840 * guile/scm-value.c (gdbscm_value_to_string): Update.
4841 * c-lang.c (c_get_string): Change type of "buffer".
4843 2018-06-18 Tom Tromey <tom@tromey.com>
4845 * ser-mingw.c (struct pipe_state_destroyer): New.
4846 (pipe_state_up): New typedef.
4847 (cleanup_pipe_state): Remove.
4848 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4850 2018-06-18 Tom Tromey <tom@tromey.com>
4852 * rust-lang.h (rust_yyerror): Don't declare.
4853 * rust-lang.c (rust_language_defn): Update.
4854 * rust-exp.y (yyerror): Now static.
4855 * parse.c (parse_exp_in_context_1): Update.
4856 * p-lang.h (p_yyerror): Don't declare.
4857 * p-lang.c (p_language_defn): Update.
4858 * p-exp.y (yyerror): Now static.
4859 * opencl-lang.c (opencl_language_defn): Update.
4860 * objc-lang.c (objc_language_defn): Update.
4861 * m2-lang.h (m2_yyerror): Don't declare.
4862 * m2-lang.c (m2_language_defn): Update.
4863 * m2-exp.y (yyerror): Now static.
4864 * language.h (struct language_defn) <la_error>: Remove.
4865 * language.c (unk_lang_error): Remove.
4866 (unknown_language_defn, auto_language_defn): Remove.
4867 * go-lang.h (go_yyerror): Don't declare.
4868 * go-lang.c (go_language_defn): Update.
4869 * go-exp.y (yyerror): Now static.
4870 * f-lang.h (f_yyerror): Don't declare.
4871 * f-lang.c (f_language_defn): Update.
4872 * f-exp.y (yyerror): Now static.
4873 * d-lang.h (d_yyerror): Don't declare.
4874 * d-lang.c (d_language_defn): Update.
4875 * d-exp.y (yyerror): Now static.
4876 * c-lang.h (c_yyerror): Don't declare.
4877 * c-lang.c (c_language_defn, cplus_language_defn)
4878 (asm_language_defn, minimal_language_defn): Update.
4879 * c-exp.y (yyerror): Now static.
4880 * ada-lang.h (ada_yyerror): Don't declare.
4881 * ada-lang.c (ada_language_defn): Update.
4882 * ada-exp.y (yyerror): Now static.
4884 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4886 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4887 (store_sveregs_to_thread): Likewise.
4888 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4889 (aarch64_linux_store_inferior_registers): Likewise.
4890 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4892 (aarch64_sve_regs_copy_to_regcache): Likewise.
4893 (aarch64_sve_regs_copy_from_regcache): Likewise.
4894 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4896 (aarch64_sve_regs_copy_to_regcache): Likewise.
4897 (aarch64_sve_regs_copy_from_regcache): Likewise.
4898 (sve_context): Structure from Linux headers.
4899 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4900 (SVE_SIG_ZREG_SIZE): Likewise.
4901 (SVE_SIG_PREG_SIZE): Likewise.
4902 (SVE_SIG_FFR_SIZE): Likewise.
4903 (SVE_SIG_REGS_OFFSET): Likewise.
4904 (SVE_SIG_ZREGS_OFFSET): Likewise.
4905 (SVE_SIG_ZREG_OFFSET): Likewise.
4906 (SVE_SIG_ZREGS_SIZE): Likewise.
4907 (SVE_SIG_PREGS_OFFSET): Likewise.
4908 (SVE_SIG_PREG_OFFSET): Likewise.
4909 (SVE_SIG_PREGS_SIZE): Likewise.
4910 (SVE_SIG_FFR_OFFSET): Likewise.
4911 (SVE_SIG_REGS_SIZE): Likewise.
4912 (SVE_SIG_CONTEXT_SIZE): Likewise.
4913 (SVE_PT_REGS_MASK): Likewise.
4914 (SVE_PT_REGS_FPSIMD): Likewise.
4915 (SVE_PT_REGS_SVE): Likewise.
4916 (SVE_PT_VL_INHERIT): Likewise.
4917 (SVE_PT_VL_ONEXEC): Likewise.
4918 (SVE_PT_REGS_OFFSET): Likewise.
4919 (SVE_PT_FPSIMD_OFFSET): Likewise.
4920 (SVE_PT_FPSIMD_SIZE): Likewise.
4921 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4922 (SVE_PT_SVE_PREG_SIZE): Likewise.
4923 (SVE_PT_SVE_FFR_SIZE): Likewise.
4924 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4925 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4926 (__SVE_SIG_TO_PT): Likewise.
4927 (SVE_PT_SVE_OFFSET): Likewise.
4928 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4929 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4930 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4931 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4932 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4933 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4934 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4935 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4936 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4937 (SVE_PT_SVE_SIZE): Likewise.
4938 (SVE_PT_SIZE): Likewise.
4939 (HAS_SVE_STATE): New define.
4941 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4943 * nat/aarch64-sve-linux-sigcontext.h: New file.
4944 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4946 (SVE_VQ_MIN): Likewise.
4947 (SVE_VQ_MAX): Likewise.
4948 (SVE_VL_MIN): Likewise.
4949 (SVE_VL_MAX): Likewise.
4950 (SVE_NUM_ZREGS): Likewise.
4951 (SVE_NUM_PREGS): Likewise.
4952 (sve_vl_valid): Likewise.
4953 (struct user_sve_header): Likewise.
4955 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4956 Richard Bunt <Richard.Bunt@arm.com>
4958 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4959 was requested by GDB.
4961 2018-06-15 Tom de Vries <tdevries@suse.de>
4963 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4965 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4967 * gnulib/update-gnulib.sh: Print expected versions of
4970 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4972 * arch-utils.c (default_type_align): Use type_length_units.
4973 * gdbtypes.c (type_align): Use type_length_units.
4975 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4977 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4978 of 'define' command.
4980 2018-06-14 Tom de Vries <tdevries@suse.de>
4983 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4984 get_no_prettyformat_print_options.
4986 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4988 * sparc-nat.h: Include target.h.
4989 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4990 <fetch_registers>: Remove this argument in function call.
4991 <store_registers>: Remove this argument in function call, remove
4993 <low_forget_process>: Call sparc64_forget_process instead of
4994 sparc_forget_process.
4996 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4998 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4999 (procfs_target::make_corefile_notes): Adjust to new
5000 target_read_alloc return type.
5002 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5003 Stephen Roberts <stephen.roberts@arm.com>
5006 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5007 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5008 Move should_notify_stop local into more inner scope.
5010 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5011 Stephen Roberts <stephen.roberts@arm.com>
5014 * infrun.c (resume_1): Add call to mark_async_event_handler.
5016 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5018 * infrun.c (do_target_wait): Change old version of $pc printed.
5020 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5022 * dwarf2read.c (read_index_from_section): Rename to...
5023 (read_gdb_index_from_section): ... this, update all callers.
5024 (dwarf2_read_index): Rename to...
5025 (dwarf2_read_gdb_index): ... this, update all callers.
5027 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5029 * gdb/hppa-linux-nat.c
5030 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5031 hppa_linux_nat_target::fetch_registers.
5033 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5035 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5036 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5037 (AARCH64_DWARF_SVE_FFR): Likewise.
5038 (AARCH64_DWARF_SVE_P0): Likewise.
5039 (AARCH64_DWARF_SVE_Z0): Likewise.
5041 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5043 * common/common-regcache.h (raw_compare): New function.
5044 * regcache.c (regcache::raw_compare): Likewise.
5045 * regcache.h (regcache::raw_compare): New declaration.
5047 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5049 * common/common-regcache.h (reg_buffer_common): New structure.
5050 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5051 (reg_buffer::raw_supply): Likewise.
5052 (reg_buffer::raw_supply_integer): Likewise.
5053 (reg_buffer::raw_supply_zeroed): Likewise.
5054 (reg_buffer::raw_collect): Likewise.
5055 (reg_buffer::raw_collect_integer): Likewise.
5056 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5057 (reg_buffer::raw_supply): Likewise.
5058 (reg_buffer::raw_supply_integer): Likewise.
5059 (reg_buffer::raw_supply_zeroed): Likewise.
5060 (reg_buffer::raw_collect): Likewise.
5061 (reg_buffer::raw_collect_integer): Likewise.
5063 2018-06-10 Tom Tromey <tom@tromey.com>
5065 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5066 (class remote_state) <stop_reply_queue>: Now std::vector.
5067 (remote_state::~remote_state)
5068 (remote_target::stop_reply_queue_length): Update.
5069 (struct queue_iter_param, remove_child_of_pending_fork)
5070 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5071 (check_pending_event_prevents_wildcard_vcont_callback)
5072 (remove_stop_reply_for_inferior)
5073 (remove_stop_reply_of_remote_state)
5074 (remote_notif_remove_once_on_match)
5075 (stop_reply_match_ptid_and_ws)
5076 (remote_kill_child_of_pending_fork): Remove.
5077 (remote_target::remove_new_fork_children)
5078 (remote_target::check_pending_events_prevent_wildcard_vcont)
5079 (remote_target::discard_pending_stop_replies)
5080 (remote_target::discard_pending_stop_replies_in_queue)
5081 (remote_target::remote_notif_remove_queued_reply)
5082 (remote_target::queued_stop_reply)
5083 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5084 (remote_target::wait, remote_target::kill_new_fork_children)
5085 (remote_target::async): Update.
5087 2018-06-10 Tom Tromey <tom@tromey.com>
5089 * record-full.c (record_full_arch_list_cleanups): Remove.
5090 (record_full_message): Use try/catch.
5091 (record_full_wait_cleanups): Remove.
5092 (record_full_wait_1): Use try/catch.
5093 (record_full_restore): Likewise.
5095 2018-06-10 Tom Tromey <tom@tromey.com>
5097 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5098 declare VEC. Add constructor.
5099 <in_target_beneath>: Now bool.
5100 (record_full_breakpoints): Now a std::vector, static.
5101 (record_full_sync_record_breakpoints)
5102 (record_full_init_record_breakpoints)
5103 (record_full_target::insert_breakpoint)
5104 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5106 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5108 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5109 * serial.c (serial_interface_lookup): Remove struct keyword.
5111 2018-06-10 Tom Tromey <tom@tromey.com>
5113 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5115 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5117 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5119 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5120 "beneath" as a method.
5121 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5122 Use "beneath" as a method.
5124 2018-06-10 Tom Tromey <tom@tromey.com>
5126 * tracefile.c (struct trace_file_writer_deleter): New.
5127 <operator()>: Rename from trace_file_writer_xfree.
5128 (trace_file_writer_up): New typedef.
5129 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5131 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5133 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5134 <m_registers, m_register_status>: Change type to
5136 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5139 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5141 * common/common-regcache.h (enum register_status): Add
5142 underlying type "signed char".
5143 * regcache.h (reg_buffer) <m_register_status>: Change type to
5145 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5146 register_status instead of signed char.
5147 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5148 (reg_buffer::get_register_status): Remove cast.
5149 (readable_regcache::raw_read): Remove cast.
5150 (readable_regcache::cooked_read): Remove cast.
5152 2018-06-09 Tom Tromey <tom@tromey.com>
5154 * source.c (reverse_search_command, forward_search_command): Use
5157 2018-06-09 Tom Tromey <tom@tromey.com>
5159 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5160 (serial_ops_list): Now static, std::vector.
5161 (serial_interface_lookup, serial_add_interface): Update.
5163 2018-06-09 Tom Tromey <tom@tromey.com>
5165 * dwarf2read.c (process_cu_includes): Update.
5166 (process_full_comp_unit): Update.
5167 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5170 2018-06-08 Paul Koning <paul_koning@dell.com>
5174 * python/python.c (do_start_initialization):
5175 Avoid call to internal Python API.
5176 (init__gdb_module): New function.
5178 2018-06-08 Gary Benson <gbenson@redhat.com>
5180 * linux-thread-db.c (valprint.h): New include.
5181 (struct check_thread_db_info): New structure.
5182 (check_thread_db_on_load, tdb_testinfo): New static globals.
5183 (check_thread_db, check_thread_db_callback): New functions.
5184 (try_thread_db_load_1): Run integrity checks if requested.
5185 (maintenance_check_libthread_db): New function.
5186 (_initialize_thread_db): Register "maint check libthread-db"
5187 and "maint set/show check-libthread-db".
5188 * NEWS: Mention the above new commands.
5190 2018-06-08 Tom Tromey <tom@tromey.com>
5192 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5195 2018-06-08 Tom Tromey <tom@tromey.com>
5197 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5199 2018-06-08 Tom Tromey <tom@tromey.com>
5201 * common/btrace-common.h (struct btrace_data): Add constructor,
5202 destructor, move assignment operator.
5203 <empty, clear, fini>: New methods.
5204 <format>: Initialize.
5205 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5206 (btrace_data_empty): Don't declare.
5207 * common/btrace-common.c (btrace_data_init): Remove.
5208 (btrace_data::fini): Rename from btrace_data_fini.
5209 (btrace_data::empty): Rename from btrace_data_empty.
5210 (btrace_data::clear): Rename from btrace_data_clear. Return
5212 * btrace.h (make_cleanup_btrace_data): Don't declare.
5213 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5214 (parse_xml_btrace): Update.
5215 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5216 (maint_btrace_clear_packet_history_cmd): Update.
5218 2018-06-07 Pedro Alves <palves@redhat.com>
5220 * target.h (target_ops) <beneath>: Now a method. All references
5222 (class target_stack): New.
5223 * target.c (g_target_stack): New.
5224 (g_current_top_target): Delete.
5225 (current_top_target): Get the top target out of g_target_stack.
5226 (target_stack::push, target_stack::unpush): New.
5227 (push_target, unpush_target): Reimplement.
5228 (target_is_pushed): Reimplement in terms of g_target_stack.
5229 (target_ops::beneath, target_stack::find_beneath): New.
5231 2018-06-07 Pedro Alves <palves@redhat.com>
5233 * target.h (find_target_beneath): Delete declaration.
5234 * target.c (find_target_beneath): Delete definition.
5235 * aix-thread.c: All callers of find_target_beneath adjusted to
5236 call target_ops::beneath instead.
5237 * bsd-uthread.c: Likewise.
5238 * linux-thread-db.c: Likewise.
5239 * ravenscar-thread.c: Likewise.
5240 * sol-thread.c: Likewise.
5241 * spu-multiarch.c: Likewise.
5243 2018-06-07 Pedro Alves <palves@redhat.com>
5245 * target.h (target_ops) <beneath>: Now a method. All references
5247 (target_ops) <m_beneath>: New.
5248 * target.c (target_ops::beneath): New.
5249 * corelow.c: Adjust all references to target_ops::beneath.
5250 * linux-thread-db.c: Likewise.
5251 * make-target-delegates: Likewise.
5252 * record-btrace.c: Likewise.
5253 * record-full.c: Likewise.
5254 * remote.c: Likewise.
5255 * target.c: Likewise.
5256 * target-delegates.c: Regenerate.
5258 2018-06-07 Pedro Alves <palves@redhat.com>
5260 * target.h (target_stack): Delete.
5261 (current_top_target): Declare function.
5262 * target.c (target_stack): Delete.
5263 (g_current_top_target): New.
5264 (current_top_target): New function.
5265 * auxv.c: Use current_top_target instead of target_stack
5267 * avr-tdep.c: Likewise.
5268 * breakpoint.c: Likewise.
5269 * corefile.c: Likewise.
5270 * elfread.c: Likewise.
5272 * exceptions.c: Likewise.
5273 * frame.c: Likewise.
5274 * gdbarch-selftests.c: Likewise.
5275 * gnu-v3-abi.c: Likewise.
5276 * ia64-tdep.c: Likewise.
5277 * ia64-vms-tdep.c: Likewise.
5278 * infcall.c: Likewise.
5279 * infcmd.c: Likewise.
5280 * infrun.c: Likewise.
5281 * linespec.c: Likewise.
5282 * linux-tdep.c: Likewise.
5283 * minsyms.c: Likewise.
5284 * ppc-linux-nat.c: Likewise.
5285 * ppc-linux-tdep.c: Likewise.
5286 * procfs.c: Likewise.
5287 * regcache.c: Likewise.
5288 * remote.c: Likewise.
5289 * rs6000-tdep.c: Likewise.
5290 * s390-linux-nat.c: Likewise.
5291 * s390-tdep.c: Likewise.
5292 * solib-aix.c: Likewise.
5293 * solib-darwin.c: Likewise.
5294 * solib-dsbt.c: Likewise.
5295 * solib-spu.c: Likewise.
5296 * solib-svr4.c: Likewise.
5297 * solib-target.c: Likewise.
5298 * sparc-tdep.c: Likewise.
5299 * sparc64-tdep.c: Likewise.
5300 * spu-tdep.c: Likewise.
5301 * symfile.c: Likewise.
5302 * symtab.c: Likewise.
5303 * target-descriptions.c: Likewise.
5304 * target-memory.c: Likewise.
5305 * target.c: Likewise.
5306 * target.h: Likewise.
5307 * tracefile-tfile.c: Likewise.
5308 * tracepoint.c: Likewise.
5309 * valops.c: Likewise.
5310 * valprint.c: Likewise.
5311 * value.c: Likewise.
5312 * windows-tdep.c: Likewise.
5313 * mi/mi-main.c: Likewise.
5315 2018-06-07 Tom Tromey <tom@tromey.com>
5317 * valprint.h (build_address_symbolic): Declare.
5318 * printcmd.c (print_address_symbolic): Update.
5319 (build_address_symbolic): Change "name" and "filename" to
5321 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5323 * defs.h (build_address_symbolic): Remove declaration.
5325 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5327 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5328 (aarch64_vnv_type): Add function.
5329 (aarch64_pseudo_register_name): Add V regs for SVE.
5330 (aarch64_pseudo_register_type): Likewise.
5331 (aarch64_pseudo_register_reggroup_p): Likewise.
5332 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5333 (aarch64_pseudo_read_value): Add V regs for SVE.
5334 (aarch64_pseudo_write_2): Use V0 offset for SVE
5335 (aarch64_pseudo_write): Add V regs for SVE.
5336 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5338 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5340 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5341 (sve_vl_from_vq): Likewise.
5343 2018-06-05 Tom Tromey <tom@tromey.com>
5345 * cli/cli-cmds.c (show_version): Update.
5346 * top.c (print_gdb_version): Add "interactive" parameter.
5348 * main.c (captured_main_1): Update.
5349 * top.h (print_gdb_version): Add "interactive" parameter and a
5352 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5354 * common/enum-flags.h: Add trailing semicolon to example in
5357 2018-06-05 Tom Tromey <tom@tromey.com>
5360 * NEWS: Add entry about pager.
5361 * utils.c (pagination_disabled_for_command): New global.
5362 (prompt_for_continue): Allow "c" response to prompt.
5363 (reinitialize_more_filter): Clear
5364 pagination_disabled_for_command.
5365 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5367 2018-06-04 Tom Tromey <tom@tromey.com>
5369 * ada-lang.h (ada_lookup_symbol_list): Update.
5370 * ada-lang.c (resolve_subexp): Update.
5371 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5373 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5374 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5375 results parameter to std::vector.
5376 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5378 * ada-exp.y (block_lookup): Update.
5379 (select_possible_type_sym): Change type of syms. Remove nsyms
5381 (write_var_or_type, write_name_assoc): Update.
5383 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5385 * windows-nat.c (windows_nat_target::xfer_partial): Return
5386 TARGET_XFER_E_IO if we need to delegate to the target beneath
5387 but BENEATH is NULL.
5389 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5391 * Makefile.in (config.status): Add configure.nat as a
5394 2018-06-04 Tom Tromey <tom@tromey.com>
5396 * cp-name-parser.y (cpname_state): Add method declarations.
5397 (HANDLE_QUAL): Update.
5398 (cpname_state::d_grab, cpname_state::fill_comp)
5399 (cpname_state::make_operator, cpname_state::make_dtor)
5400 (cpname_state::make_builtin_type, cpname_state::make_name)
5401 (cpname_state::d_qualify, cpname_state::d_int_type)
5402 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5403 (%union): Move earlier.
5405 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5407 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5409 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5411 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5412 (aarch64_pseudo_write_1): Likewise.
5413 (aarch64_pseudo_read_value): Use helper.
5414 (aarch64_pseudo_write): Likewise.
5416 2018-06-04 Pedro Alves <palves@redhat.com>
5418 * darwin-nat.c (darwin_ops): Delete.
5419 (darwin_attach_pid): Use get_native_target.
5421 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5423 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5424 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5426 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5428 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5429 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5430 (aarch64_gdbarch_init): Check for SVE.
5431 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5433 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5435 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5436 * aarch64-tdep.h (aarch64_read_description): Likewise.
5437 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5438 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5439 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5440 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5441 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5443 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
5445 * value.c (value_fetch_lazy_bitfield): New.
5446 (value_fetch_lazy_memory): New.
5447 (value_fetch_lazy_register): New.
5448 (value_fetch_lazy): Factor out to smaller functions.
5450 2018-06-01 Tom Tromey <tom@tromey.com>
5452 * cp-name-parser.y (backslashable, represented): Now const.
5454 2018-06-01 Tom Tromey <tom@tromey.com>
5456 * cp-name-parser.y: Include parser-defs.h.
5457 (parser_fprintf): Remove declaration.
5459 2018-06-01 Tom Tromey <tom@tromey.com>
5461 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5463 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5464 (global_result): Remove globals.
5465 (struct cpname_state): New.
5466 (yyparse): Don't declare.
5467 (yylex, yyerror): Move declarations after %union.
5468 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5469 (make_name): Add state parameter.
5471 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5473 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5475 (yylex): Add lvalp, state parameters.
5476 (yyerror): Add state parameter.
5477 (cp_demangled_name_to_comp): Update.
5479 2018-06-01 Tom Tromey <tom@tromey.com>
5481 * cp-name-parser.y (parser_fprintf): Declare.
5482 (GDB_YY_REMAP_PREFIX): Define.
5483 Include yy-remap.h. Don't redefine yy* identifiers.
5485 2018-06-01 Tom Tromey <tom@tromey.com>
5487 * python/py-type.c (typy_legacy_template_argument): Update.
5488 * cp-support.h (cp_demangled_name_to_comp): Update.
5489 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5490 parameter to be a "std::string *".
5493 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
5495 * ada-lex.l: Include "diagnostics.h" instead of
5496 "common/diagnostics.h".
5497 * unittests/environ-selftests.c: Likewise.
5498 * common/diagnostics.h: Moved to ../include.
5500 2018-06-01 Joel Brobecker <brobecker@adacore.com>
5502 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5503 to language_mode_manual while calling breakpoint_re_set_one.
5505 2018-06-01 Tom Tromey <tom@tromey.com>
5507 * valops.c (value_cast_structs, destructor_name_p): Update.
5508 * symtab.c (gdb_mangle_name): Update.
5509 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5511 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5512 (pascal_object_print_value_fields, pascal_object_print_value):
5514 * p-typeprint.c (pascal_type_print_derivation_info): Update.
5515 * linespec.c (find_methods): Update.
5516 * gdbtypes.h (type_name_no_tag): Remove.
5517 (type_name_or_error): Rename from type_name_no_tag_or_error.
5518 * gdbtypes.c (type_name_no_tag): Remove.
5519 (type_name_or_error): Rename from type_name_no_tag_or_error.
5520 (lookup_struct_elt_type, check_typedef): Update.
5521 * expprint.c (print_subexp_standard): Update.
5522 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5523 * d-namespace.c (d_lookup_nested_symbol): Update.
5524 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5525 (cp_print_class_member): Update.
5526 * cp-namespace.c (cp_lookup_nested_symbol): Update.
5527 * completer.c (add_struct_fields): Update.
5528 * c-typeprint.c (cp_type_print_derivation_info)
5529 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5531 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5532 (ada_prefer_type, ada_is_exception_sym): Update.
5534 2018-06-01 Tom Tromey <tom@tromey.com>
5536 * valops.c (enum_constant_from_type, value_namespace_elt)
5537 (value_maybe_namespace_elt): Update.
5538 * valarith.c (find_size_for_pointer_math): Update.
5539 * target-descriptions.c (make_gdb_type): Update.
5540 * symmisc.c (print_symbol): Update.
5541 * stabsread.c (define_symbol, read_type)
5542 (complain_about_struct_wipeout, add_undefined_type)
5543 (cleanup_undefined_types_1): Update.
5544 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5545 (rust_range_type_p, val_print_struct, rust_print_struct_def)
5546 (rust_internal_print_type, rust_composite_type)
5547 (rust_evaluate_funcall, rust_evaluate_subexp)
5548 (rust_inclusive_range_type_p): Update.
5549 * python/py-type.c (typy_get_tag): Update.
5550 * p-typeprint.c (pascal_type_print_base): Update.
5551 * mdebugread.c (parse_symbol, parse_type): Update.
5552 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5554 * guile/scm-type.c (gdbscm_type_tag): Update.
5555 * go-lang.c (sixg_string_p): Update.
5556 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5558 * gdbtypes.h (struct main_type) <tag_name>: Remove.
5559 (TYPE_TAG_NAME): Remove.
5560 * gdbtypes.c (type_name_no_tag): Simplify.
5561 (check_typedef, check_types_equal, recursive_dump_type)
5562 (copy_type_recursive, arch_composite_type): Update.
5563 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
5564 in summary mode when needed.
5565 * eval.c (evaluate_funcall): Update.
5566 * dwarf2read.c (fixup_go_packaging, read_structure_type)
5567 (process_structure_scope, read_enumeration_type)
5568 (read_namespace_type, read_module_type, determine_prefix): Update.
5569 * cp-support.c (inspect_type): Update.
5570 * coffread.c (process_coff_symbol, decode_base_type): Update.
5571 * c-varobj.c (c_is_path_expr_parent): Update.
5572 * c-typeprint.c (c_type_print_base_struct_union): Update.
5573 (c_type_print_base_1): Update. Print struct/class/union/enum in
5574 summary when using C language.
5575 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5576 (gen_maybe_namespace_elt): Update.
5577 * ada-lang.c (ada_type_name): Simplify.
5578 (empty_record, ada_template_to_fixed_record_type_1)
5579 (template_to_static_fixed_type)
5580 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5582 2018-06-01 Tom Tromey <tom@tromey.com>
5584 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5586 * c-typeprint.c (c_print_type_1): Add "language" parameter.
5587 (c_print_type): Update.
5588 (c_print_type): New overload.
5589 (c_type_print_varspec_prefix, c_type_print_args)
5590 (c_type_print_varspec_suffix, c_print_type_no_offsets)
5591 (c_type_print_base_struct_union, c_type_print_base_1)
5592 (cp_type_print_method_args): Add "language" parameter.
5593 (c_type_print_base): Update.
5594 * c-lang.h (c_print_type): Add new overload.
5596 2018-06-01 Tom Tromey <tom@tromey.com>
5598 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5599 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5601 2018-06-01 Alan Hayward <alan.hayward@arm.com>
5603 * aarch64-tdep.c (aarch64_sve_register_names): New const
5605 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5606 (AARCH64_SVE_Z_REGS_NUM): New define.
5607 (AARCH64_SVE_P_REGS_NUM): Likewise.
5608 (AARCH64_SVE_NUM_REGS): Likewise.
5610 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5612 * nat/linux-ptrace.h [__alpha__]
5613 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5616 2018-05-31 Maciej W. Rozycki <macro@mips.com>
5618 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5619 the endianness selected.
5620 * NEWS: Document `set endian auto' mode operation update.
5622 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5624 * Makefile.in: Add new header.
5625 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5626 (sve_vl_from_vg): Likewise.
5627 (sve_vq_from_vl): Likewise.
5628 (sve_vl_from_vq): Likewise.
5629 (sve_vq_from_vg): Likewise.
5630 (sve_vg_from_vq): Likewise.
5631 * configure.nat: Add new c file.
5632 * nat/aarch64-sve-linux-ptrace.c: New file.
5633 * nat/aarch64-sve-linux-ptrace.h: New file.
5635 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5637 * aarch64-linux-nat.c (aarch64_linux_read_description):
5639 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5641 * aarch64-tdep.c (tdesc_aarch64_list): Add.
5642 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5643 (aarch64_gdbarch_init): Add parmeter zero.
5644 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5645 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5646 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5648 * doc/gdb.texinfo: Describe SVE feature
5649 * features/aarch64-sve.c: New file.
5651 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5654 * gdbarch.sh (significant_addr_bit): Default to zero when
5655 not set by target architecture.
5656 * gdbarch.c: Re-generated.
5657 * utils.c (address_significant): Update.
5659 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5661 * stack.c (func_command): Remove trailing newline in call to error.
5663 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5665 * regcache.h (regcache_raw_collect): Remove, update callers to
5666 use regcache::raw_collect.
5667 * regcache.c (regcache_raw_collect): Remove.
5669 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5671 * regcache.h (regcache_raw_supply): Remove, update callers to
5672 use detached_regcache::raw_supply.
5673 * regcache.c (regcache_raw_supply): Remove.
5675 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5677 * regcache.h (regcache_cooked_write_part): Remove, update
5678 callers to use regcache::cooked_write_part.
5679 * regcache.c (regcache_cooked_write_part): Remove.
5681 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5683 * regcache.h (regcache_cooked_read_part): Remove, update callers
5684 to use readable_regcache::cooked_read_part.
5685 * regcache.c (regcache_cooked_read_part): Remove.
5687 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5689 * regcache.h (regcache_cooked_read_value): Remove, update
5690 callers to use readable_regcache::cooked_read_value.
5691 * regcache.c (regcache_cooked_read_value): Remove.
5693 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5695 * regcache.h (regcache_cooked_write): Remove, update callers to
5696 use regcache::cooked_write.
5697 * regcache.c (regcache_cooked_write): Remove.
5699 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5701 * regcache.h (regcache_invalidate): Remove, update callers to
5702 use detached_regcache::invalidate instead.
5703 * regcache.c (regcache_invalidate): Remove.
5705 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5707 * regcache.h (regcache_raw_write_part): Remove, update callers
5708 to use regcache::raw_write_part instead.
5709 * regcache.c (regcache_raw_write_part): Remove.
5711 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5713 * regcache.h (regcache_raw_read_part): Remove, update callers to
5714 use readable_regcache::raw_read_part instead.
5715 * regcache.c (regcache_raw_read_part): Remove.
5717 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5719 * regcache.h (regcache_cooked_read): Remove, update callers to
5720 use readable_regcache::cooked_read instead.
5721 * regcache.c (regcache_cooked_read): Remove.
5723 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5725 * regcache.h (regcache_raw_write): Remove, update callers to use
5726 regcache::raw_write instead.
5727 * regcache.c (regcache_raw_write): Remove.
5729 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5731 * regcache.h (regcache_raw_read): Remove, update callers to use
5732 readable_regcache::raw_read instead.
5733 * regcache.c (regcache_raw_read): Remove.
5735 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5737 * regcache.h (regcache_raw_update): Remove, update callers to
5738 use readable_regcache::raw_update instead.
5739 * regcache.c (regcache_raw_update): Remove.
5741 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5743 * regcache.h (regcache_register_status): Remove, update callers
5744 to use reg_buffer::get_register_status directly instead.
5745 * regcache.c (regcache_register_status): Remove.
5747 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5749 * regcache.h (regcache_get_ptid): Remove, update all callers to
5750 call regcache::ptid instead.
5751 * regcache.c (regcache_get_ptid): Remove.
5753 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5755 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5757 2018-05-30 Pedro Alves <palves@redhat.com>
5759 * common/common-exceptions.h (exception_rethrow): Use
5762 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5764 * breakpoint.c (print_solib_event, check_status_catch_solib):
5765 Remove struct keyword in range-based for loops.
5766 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5767 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5769 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5771 * symfile.c (addr_info_make_relative): Likewise.
5772 * thread.c (value_in_thread_stack_temporaries): Likewise.
5774 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5777 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5778 aggregate type to get its real type before accessing it.
5780 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5782 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5783 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5784 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5785 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5786 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5787 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5788 * printcmd.c (info_address_command): Likewise.
5790 2018-05-29 Tom Tromey <tom@tromey.com>
5792 * windows-nat.c (handle_exception): Update fall-through comment.
5794 2018-05-29 Tom Tromey <tom@tromey.com>
5796 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5797 (struct program_space) <added_solibs>: Now a std::vector.
5798 * breakpoint.c (print_solib_event): Update.
5799 (check_status_catch_solib): Update.
5800 * progspace.c (clear_program_space_solib_cache): Update.
5801 * solib.c (update_solib_list): Update.
5803 2018-05-29 Tom Tromey <tom@tromey.com>
5805 * python/py-type.c (typy_richcompare): Update.
5806 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5807 * gdbtypes.h (types_deeply_equal): Return bool.
5808 (types_equal): Likewise.
5809 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5811 (check_types_equal): Change worklist to std::vector. Return
5813 (struct type_equality_entry): Add constructor.
5814 (compare_maybe_null_strings): Return bool.
5815 (check_types_worklist): Return bool. Change worklist to
5817 (types_deeply_equal): Use std::vector.
5818 (types_equal): Return bool.
5819 (compare_maybe_null_strings): Simplify.
5821 2018-05-29 Tom Tromey <tom@tromey.com>
5823 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5825 2018-05-29 Tom Tromey <tom@tromey.com>
5827 * objc-lang.h: Don't include cp-support.h.
5828 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5831 2018-05-27 Tom Tromey <tom@tromey.com>
5833 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5835 2018-05-25 Tom Tromey <tom@tromey.com>
5837 * value.c (value::location): Initialize.
5839 2018-05-25 Tom Tromey <tom@tromey.com>
5841 * dbxread.c (init_bincl_list): Remove.
5842 (bincl_list): Now a std::vector.
5843 (bincls_allocated, next_bincl): Remove.
5844 (free_bincl_list, do_free_bincl_list_cleanup)
5845 (make_cleanup_free_bincl_list): Remove.
5846 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5848 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5849 (struct header_file_location): Add constructor.
5850 (add_bincl_to_list): Remove.
5852 2018-05-25 Tom Tromey <tom@tromey.com>
5854 * tui/tui.c (tui_enable): Update.
5855 * mi/mi-interp.c (mi_interp::init): Update.
5856 * interps.h (class interp) <name>: New method.
5857 <m_name>: Rename from name.
5858 (~scoped_restore_interp): Update.
5859 * interps.c (interp::interp): Update.
5860 (interp_add, interp_set, interp_lookup_existing)
5861 (current_interp_named_p): Update.
5863 2018-05-25 Tom Tromey <tom@tromey.com>
5865 * interps.c (interp_name): Remove.
5866 * mi/mi-interp.c (mi_interp::init): Update.
5867 * interps.h (interp_name): Remove.
5868 (~scoped_restore_interp): Update.
5869 * tui/tui.c (tui_enable): Update.
5871 2018-05-25 Tom Tromey <tom@tromey.com>
5873 * utils.c (fputs_maybe_filtered): Update.
5874 * linespec.c (decode_line_full): Update.
5875 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5876 (mi_print_breakpoint_for_event, mi_solib_loaded)
5877 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5878 (mi_user_selected_context_changed): Update.
5879 * mi/mi-main.c (mi_execute_command): Update.
5880 * cli/cli-script.c (execute_control_command): Update.
5881 * python/python.c (execute_gdb_command): Update.
5882 * solib.c (info_sharedlibrary_command): Update.
5883 * interps.c (interp_ui_out): Remove.
5884 * interps.h (interp_ui_out): Remove.
5886 2018-05-25 Tom Tromey <tom@tromey.com>
5888 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5889 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5890 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5892 2018-05-25 Tom Tromey <tom@tromey.com>
5894 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5895 * interps.c (interp_exec): Use scoped_restore.
5897 2018-05-25 Tom Tromey <tom@tromey.com>
5899 * remote.c (remote_target::remote_file_get): Use
5901 (remote_target::remote_file_put): Likewise.
5903 2018-05-25 Tom Tromey <tom@tromey.com>
5905 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5907 (get_pe_section_index, add_pe_exported_sym): Update.
5908 (read_pe_exported_syms): Use gdb::def_vector.
5910 2018-05-25 Tom Tromey <tom@tromey.com>
5912 * frame.c (remove_prev_frame): Remove.
5913 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5915 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5917 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5919 * mips-linux-nat.c (supply_fpregset): Always call
5920 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5921 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5922 `mips_fill_fpregset'.
5923 * mips-linux-tdep.c (mips_supply_fpregset)
5924 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5925 (mips_fill_fpregset_wrapper): Remove functions.
5926 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5927 (mips_linux_fpregset): Remove variable.
5928 (mips_linux_iterate_over_regset_sections): Use
5929 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5930 (mips_linux_o32_sigframe_init): Remove comment.
5932 2018-05-25 Pedro Alves <palves@redhat.com>
5934 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5935 (struct readahead_cache, struct packet_reg, struct
5936 remote_arch_state, class remote_state): Move higher up in the
5938 (remote_target::m_remote_state): Now an object instead of a pointer.
5939 (remote_target::get_remote_state): Adjust.
5941 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5943 * stack.c (select_and_print_frame): Delete.
5944 (struct function_bounds): Move struct within function.
5945 (func_command): Most content moved into new function
5946 find_frame_for_function, use new function, print result, add
5948 (find_frame_for_function): New function, now returns a result.
5950 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5952 * stack.c (iterate_over_block_arg_vars): Fix comment.
5953 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5955 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5959 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5961 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5963 * frame.h (class scoped_restore_selected_frame): New class.
5964 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5965 of any exception, use scoped_restore_selected_frame to restore the
5968 2018-05-24 Pedro Alves <palves@redhat.com>
5970 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5973 2018-05-23 Tom Tromey <tom@tromey.com>
5975 * complaints.c (struct complaints): Remove.
5976 (symfile_complaint_book): Remove.
5977 (series): New global.
5978 (complaint_internal): Update.
5979 (clear_complaints): Update.
5981 2018-05-23 Tom Tromey <tom@tromey.com>
5983 * complaints.c (counters): New global.
5984 (struct complain): Remove.
5985 (struct complaints) <root>: Remove.
5986 (complaint_sentinel): Remove.
5987 (symfile_complaint_book): Update.
5988 (find_complaint) Remove.
5989 (complaint_internal, clear_complaints): Update.
5991 2018-05-23 Tom Tromey <tom@tromey.com>
5993 * complaints.c (struct complain) <file, line>: Remove.
5994 (find_complaint): Remove file, line parameters.
5995 (complaint_internal): Update.
5997 2018-05-23 Tom Tromey <tom@tromey.com>
5999 * complaints.c (vcomplaint): Remove.
6000 (complaint_internal) Merge in contents of vcomplaint.
6002 2018-05-23 Tom Tromey <tom@tromey.com>
6004 * complaints.c (struct complaints) <explanation>: Remove.
6005 (symfile_explanations): Remove.
6006 (symfile_complaint_book): Update.
6007 (vcomplaint): Update.
6008 (struct explanation): Remove.
6010 2018-05-23 Tom Tromey <tom@tromey.com>
6012 * complaints.c (symfile_complaints): Remove.
6013 (complaint_internal): Remove "complaints" parameter.
6014 (clear_complaints, vcomplaint): Remove "c" parameter.
6015 (get_complaints): Remove.
6016 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6017 (dwarf2_debug_line_missing_file_complaint)
6018 (dwarf2_debug_line_missing_end_sequence_complaint)
6019 (dwarf2_complex_location_expr_complaint)
6020 (dwarf2_const_value_length_mismatch_complaint)
6021 (dwarf2_section_buffer_overflow_complaint)
6022 (dwarf2_macro_malformed_definition_complaint)
6023 (dwarf2_invalid_attrib_class_complaint)
6024 (create_addrmap_from_index, dw2_symtab_iter_next)
6025 (dw2_expand_marked_cus)
6026 (dw2_debug_names_iterator::find_vec_in_debug_names)
6027 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6028 (create_debug_type_hash_table, init_cutu_and_read_dies)
6029 (partial_die_parent_scope, add_partial_enumeration)
6030 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6031 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6032 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6033 (create_cus_hash_table, create_dwp_hash_table)
6034 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6035 (dwarf2_rnglists_process, dwarf2_ranges_process)
6036 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6037 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6038 (handle_struct_member_die, process_structure_scope)
6039 (read_array_type, read_common_block, read_module_type)
6040 (read_tag_pointer_type, read_typedef, read_base_type)
6041 (read_subrange_type, load_partial_dies, partial_die_info::read)
6042 (partial_die_info::read, partial_die_info::read)
6043 (partial_die_info::read, read_checked_initial_length_and_offset)
6044 (dwarf2_string_attr, read_formatted_entries)
6045 (dwarf_decode_line_header)
6046 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6047 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6048 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6049 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6050 (get_signatured_type, get_DW_AT_signature_type)
6051 (decode_locdesc, file_file_name, consume_improper_spaces)
6052 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6053 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6054 (dwarf2_symbol_mark_computed, set_die_type)
6055 (read_attribute_value): Update.
6056 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6058 * dbxread.c (unknown_symtype_complaint)
6059 (lbrac_mismatch_complaint, repeated_header_complaint)
6060 (set_namestring, function_outside_compilation_unit_complaint)
6061 (read_dbx_symtab, process_one_symbol): Update.
6062 * gdbtypes.c (stub_noname_complaint): Update.
6063 * windows-nat.c (handle_unload_dll): Update.
6064 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6065 (decode_base_type): Update.
6066 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6067 (eb_complaint, record_include_begin, record_include_end)
6068 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6069 (process_xcoff_symbol, read_symbol)
6070 (function_outside_compilation_unit_complaint)
6071 (scan_xcoff_symtab): Update.
6072 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6073 * buildsym.c (finish_block_internal, make_blockvector)
6074 (end_symtab_get_static_block, augment_type_symtab): Update.
6075 * dtrace-probe.c (dtrace_process_dof)
6076 (dtrace_static_probe_ops::get_probes): Update.
6077 * complaints.h (struct complaint): Don't declare.
6078 (symfile_complaints): Remove.
6079 (complaint_internal): Remove "complaints" parameter.
6080 (complaint): Likewise.
6081 (clear_complaints): Likewise.
6082 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6083 (reread_symbols): Update.
6084 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6085 (dwarf2_frame_cache, decode_frame_entry): Update.
6086 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6087 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6088 (info_selectors_command): Update.
6089 * macrotab.c (macro_include, check_for_redefinition)
6090 (macro_undef): Update.
6091 * objfiles.c (filter_overlapping_sections): Update.
6092 * stabsread.c (invalid_cpp_abbrev_complaint)
6093 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6094 (define_symbol, error_type, read_type, rs6000_builtin_type)
6095 (stabs_method_name_from_physname, read_member_functions)
6096 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6097 (attach_fields_to_type, complain_about_struct_wipeout)
6098 (read_range_type, read_args, common_block_start)
6099 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6101 * mdebugread.c (index_complaint, unknown_ext_complaint)
6102 (basic_type_complaint, bad_tag_guess_complaint)
6103 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6104 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6105 (parse_procedure, parse_lines)
6106 (function_outside_compilation_unit_complaint)
6107 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6108 (bad_tag_guess_complaint, reg_value_complaint): Update.
6109 * cp-support.c (demangled_name_complaint): Update.
6110 * macroscope.c (sal_macro_scope): Update.
6111 * dwarf-index-write.c (class debug_names): Update.
6113 2018-05-23 Tom Tromey <tom@tromey.com>
6115 * complaints.c (clear_complaints): Remove "noisy" parameter.
6116 * complaints.h (clear_complaints): Update.
6117 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6118 (reread_symbols): Update.
6120 2018-05-23 Tom Tromey <tom@tromey.com>
6122 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6124 (vcomplaint, clear_complaints): Update.
6125 (symfile_explanations): Remove some messages.
6127 2018-05-23 Tom Tromey <tom@tromey.com>
6129 * complaints.c (internal_complaint): Remove.
6130 * complaints.h (internal_complaint): Remove.
6132 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6134 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6136 2018-05-22 Pedro Alves <palves@redhat.com>
6138 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6139 (remote_fileio_badfd, remote_fileio_return_errno)
6140 (remote_fileio_return_success, remote_fileio_func_open)
6141 (remote_fileio_func_open, remote_fileio_func_close)
6142 (remote_fileio_func_read, remote_fileio_func_write)
6143 (remote_fileio_func_lseek, remote_fileio_func_rename)
6144 (remote_fileio_func_unlink, remote_fileio_func_stat)
6145 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6146 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6147 remote_target parameter.
6148 (remote_fio_func_map) <func>: Add remote_target parameter.
6149 (do_remote_fileio_request, remote_fileio_request):
6150 * remote-fileio.h (remote_fileio_request):
6151 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6152 remote_target parameter.
6153 (remote_notif_process, handle_notification): Adjust to pass down
6155 (remote_notif_state_allocate): Add remote_target parameter. Save
6157 * remote-notif.h (struct remote_target): Forward declare.
6158 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6159 remote_target parameter.
6160 (struct remote_notif_state) <remote>: New field.
6161 (remote_notif_ack, remote_notif_parse): Add remote_target
6163 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6164 remote_target parameter.
6165 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6166 (threads_listing_context, rmt_thread_action, protocol_feature)
6167 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6168 (packet_result, struct threads_listing_context, remote_state):
6169 Move definitions and declarations higher up.
6170 (remote_target) <~remote_target>: Declare.
6171 (remote_download_command_source, remote_file_put, remote_file_get)
6172 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6173 (remote_hostio_pread_vFile, remote_hostio_send_command)
6174 (remote_hostio_set_filesystem, remote_hostio_open)
6175 (remote_hostio_close, remote_hostio_unlink, remote_state)
6176 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6177 (get_memory_write_packet_size, get_memory_read_packet_size)
6178 (append_pending_thread_resumptions, remote_detach_1)
6179 (append_resumption, remote_resume_with_vcont)
6180 (add_current_inferior_and_thread, wait_ns, wait_as)
6181 (process_stop_reply, remote_notice_new_inferior)
6182 (process_initial_stop_replies, remote_add_thread)
6183 (btrace_sync_conf, remote_btrace_maybe_reopen)
6184 (remove_new_fork_children, kill_new_fork_children)
6185 (discard_pending_stop_replies, stop_reply_queue_length)
6186 (check_pending_events_prevent_wildcard_vcont)
6187 (discard_pending_stop_replies_in_queue, stop_reply)
6188 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6189 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6190 (remote_interrupt_as, remote_interrupt_ns)
6191 (remote_get_noisy_reply, remote_query_attached)
6192 (remote_add_inferior, remote_current_thread, get_current_thread)
6193 (set_thread, set_general_thread, set_continue_thread)
6194 (set_general_process, write_ptid)
6195 (remote_unpack_thread_info_response, remote_get_threadinfo)
6196 (parse_threadlist_response, remote_get_threadlist)
6197 (remote_threadlist_iterator, remote_get_threads_with_ql)
6198 (remote_get_threads_with_qxfer)
6199 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6200 (get_offsets, remote_check_symbols, remote_supported_packet)
6201 (remote_query_supported, remote_packet_size)
6202 (remote_serial_quit_handler, remote_detach_pid)
6203 (remote_vcont_probe, remote_resume_with_hc)
6204 (send_interrupt_sequence, interrupt_query)
6205 (remote_notif_get_pending_events, fetch_register_using_p)
6206 (send_g_packet, process_g_packet, fetch_registers_using_g)
6207 (store_register_using_P, store_registers_using_G)
6208 (set_remote_traceframe, check_binary_download)
6209 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6210 (remote_xfer_live_readonly_partial, remote_read_bytes)
6211 (remote_send_printf, remote_flash_write, readchar)
6212 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6213 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6214 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6215 (extended_remote_disable_randomization, extended_remote_run)
6216 (send_environment_packet, extended_remote_environment_support)
6217 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6218 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6219 (packet_command): Now methods of ...
6220 (remote_target): ... this class.
6221 (m_remote_state) <remote_target>: New field.
6222 (struct remote_state) <stop_reply_queue,
6223 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6225 (remote_state::remote_state): Allocate stop_reply_queue.
6226 (remote_state): Delete global.
6227 (get_remote_state_raw): Delete.
6228 (remote_target::get_remote_state): Allocate m_remote_state on
6230 (get_current_remote_target): New.
6231 (remote_ops, extended_remote_ops): Delete.
6232 (wait_forever_enabled_p, remote_async_inferior_event_token):
6233 Delete, moved to struct remote_state.
6234 (remote_target::close): Delete self. Destruction bits split to
6236 (remote_target::~remote_target): ... this.
6237 (show_memory_packet_size): Adjust to use
6238 get_current_remote_target.
6239 (struct protocol_feature) <func>: Add remote_target parameter.
6240 All callers adjusted.
6241 (curr_quit_handler_target): New.
6242 (remote_serial_quit_handler): Reimplement.
6243 (remote_target::open_1): Adjust to use get_current_remote_target.
6244 Heap-allocate remote_target/extended_remote_target instances.
6245 (vcont_builder::vcont_builder): Add remote_target parameter, and
6246 save it in m_remote. All callers adjusted.
6247 (vcont_builder::m_remote): New field.
6248 (vcont_builder::restart, vcont_builder::flush)
6249 (vcont_builder::push_action): Use it.
6250 (remote_target::commit_resume): Use it.
6251 (struct queue_iter_param) <remote>: New field.
6252 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6253 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6254 (check_pending_event_prevents_wildcard_vcont_callback)
6255 (remote_target::check_pending_events_prevent_wildcard_vcont)
6256 (remote_target::discard_pending_stop_replies)
6257 (remote_target::discard_pending_stop_replies_in_queue)
6258 (remote_target::remote_notif_remove_queued_reply): Fill in
6260 (remote_notif_get_pending_events): New.
6261 (remote_target::readchar, remote_target::remote_serial_write):
6262 Save/restore curr_quit_handler_target.
6264 (kill_new_fork_children): Fill in 'remote' field.
6265 (packet_command): Use get_current_remote_target, defer to
6266 remote_target method of same name.
6267 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6268 parameter, and save it in m_remote. All callers adjusted.
6269 (scoped_remote_fd::release): Use m_remote.
6270 (scoped_remote_fd::m_remote): New field.
6271 (remote_file_put, remote_file_get, remote_file_delete): Use
6272 get_current_remote_target, defer to remote_target method of same
6274 (remote_btrace_reset): Add remote_state paremeter. Update all
6276 (remote_async_inferior_event_handler). Pass down 'data'.
6277 (remote_new_objfile): Use get_current_remote_target.
6278 (remote_target::vcont_r_supported): New.
6279 (set_range_stepping): Use get_current_remote_target and
6280 remote_target::vcont_r_supported.
6281 (_initialize_remote): Don't allocate 'remote_state' and
6282 'stop_reply_queue' globals.
6283 * remote.h (struct remote_target): Forward declare.
6284 (getpkt, putpkt, remote_notif_get_pending_events): Add
6285 'remote_target' parameter.
6287 2018-05-22 Pedro Alves <palves@redhat.com>
6289 * remote.c (vcont_builder): Now a class. Make all data members
6291 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6293 (vcont_builder_restart): Rename to ...
6294 (vcont_builder::restart): ... this.
6295 (vcont_builder_flush): Rename to ...
6296 (vcont_builder::flush): ... this.
6297 (vcont_builder_push_action): Rename to ...
6298 (vcont_builder::push_action): ... this.
6299 (remote_target::commit_resume): Adjust.
6301 2018-05-22 Pedro Alves <palves@redhat.com>
6303 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6304 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6305 (get_fixed_memory_packet_size): New.
6306 (get_memory_packet_size): Use it.
6307 (set_memory_packet_size): Don't override the config size with
6308 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6309 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6310 Don't refer to get_memory_packet_size if not connected to a remote
6311 target. Show "(default)" if configured size is 0.
6313 2018-05-22 Pedro Alves <palves@redhat.com>
6315 * remote.c (remote_target::mourn_inferior): Move
6316 discard_pending_stop_replies call here from ...
6317 (_initialize_remote): ... here.
6319 2018-05-22 Pedro Alves <palves@redhat.com>
6321 * remote.c (compare_section_command): Remove set_general_process
6324 2018-05-22 Pedro Alves <palves@redhat.com>
6326 * remote.c (struct packet_reg, struct remote_arch_state):
6327 Move higher up in the file.
6328 (remote_state) <m_arch_states>: Store remote_arch_state values
6329 instead of remote_arch_state pointers.
6330 (remote_state::get_remote_arch_state): Adjust.
6332 2018-05-22 Pedro Alves <palves@redhat.com>
6334 * remote.c: Include <unordered_map>.
6335 (remote_state): Now a class.
6336 (remote_state) <get_remote_arch_state>: Declare method.
6337 <get_remote_arch_state>: New field.
6338 (remote_arch_state) <remote_arch_state>: Declare ctor.
6339 <regs>: Now a unique_ptr.
6340 (remote_gdbarch_data_handle): Delete.
6341 (get_remote_arch_state): Delete.
6342 (remote_state::get_remote_arch_state): New.
6343 (get_remote_state): Adjust to call remote_state's
6344 get_remote_arch_state method.
6345 (init_remote_state): Delete, bits factored out to ...
6346 (remote_arch_state::remote_arch_state): ... this new method.
6347 (get_remote_packet_size, get_memory_packet_size)
6348 (process_g_packet, remote_target::fetch_registers)
6349 (remote_target::prepare_to_store, store_registers_using_G)
6350 (remote_target::store_registers, remote_target::get_trace_status):
6351 Adjust to call remote_state's method.
6352 (_initialize_remote): Remove reference to
6353 remote_gdbarch_data_handle.
6355 2018-05-22 Pedro Alves <palves@redhat.com>
6357 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6358 pread>: New method declarations.
6359 (remote_target::open_1): Adjust.
6360 (readahead_cache_invalidate): Rename to ...
6361 (readahead_cache::invalidate): ... this, and adjust to be a class
6363 (readahead_cache_invalidate_fd): Rename to ...
6364 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6366 (remote_hostio_pwrite): Adjust.
6367 (remote_hostio_pread_from_cache): Rename to ...
6368 (readahead_cache::pread): ... this, and adjust to be a class
6370 (remote_hostio_close): Adjust.
6372 2018-05-22 Pedro Alves <palves@redhat.com>
6374 * remote.c (remote_hostio_close_cleanup): Delete.
6375 (class scoped_remote_fd): New.
6376 (remote_file_put, remote_file_get): Use it.
6378 2018-05-22 Pedro Alves <palves@redhat.com>
6380 (struct vCont_action_support): Use bool and initialize all fields.
6381 (struct readahead_cache): Initialize all fields.
6382 (remote_state): Use bool and initialize all fields.
6383 (remote_state::remote_state, remote_state::~remote_state): New.
6384 (new_remote_state): Delete.
6385 (_initialize_remote): Use new to allocate remote_state.
6387 2018-05-22 Pedro Alves <palves@redhat.com>
6391 * c-exp.y: Include "c-support.h".
6392 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6393 of tolower. Use c_ident_is_alpha to scan names.
6394 * c-lang.c: Include "c-support.h".
6395 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6396 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6397 * c-support.h: New file, with bits factored out from ...
6398 * cp-name-parser.y: ... this file.
6399 Include "c-support.h".
6400 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6401 c-support.h and renamed.
6402 (symbol_end, yylex): Adjust.
6404 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6406 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6407 parameter type to CORE_ADDR.
6408 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6409 parameter type in declaration to CORE_ADDR.
6410 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6411 target_auxv_search to get AT_HWCAP and use the result to get the
6413 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6414 to CORE_ADDR. Remove the cast of the return value to unsigned
6415 long. Fix error predicate of target_auxv_search.
6416 (ppc_linux_nat_target::read_description): Change the type of the
6417 hwcap variable to CORE_ADDR.
6419 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6421 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6422 if the size of fpscr is larger than 32 bits.
6424 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6426 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6427 (ppc32_linux_vsxregmap): New global.
6428 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6429 regcache_supply_regset, and regcache_collect_regset.
6430 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6431 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6432 (fetch_vsx_register, store_vsx_register): Remove.
6433 (fetch_vsx_registers): Add regno parameter. Get regset using
6434 ppc_linux_vsxregset. Use regset to supply registers.
6435 (store_vsx_registers): Add regno parameter. Get regset using
6436 ppc_linux_vsxregset. Use regset to collect registers.
6437 (fetch_register): Call fetch_vsx_registers instead of
6439 (store_register): Call store_vsx_registers instead of
6441 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6442 new regno parameter.
6443 (store_ppc_registers): Call store_vsx_registers with -1 for the
6444 new regno parameter.
6445 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6446 (ppc_collect_vsxregset): Remove.
6448 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6450 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6452 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6453 for vector register offset fields.
6454 (ppc64_fbsd_reg_offsets): Likewise.
6455 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6456 to vector register offset fields.
6457 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6458 to vector register offset fields.
6459 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6460 vector register offset fields.
6461 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6462 initializers for vector register offset fields.
6463 (rs6000_aix64_reg_offsets): Likewise.
6464 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6465 (ppc_supply_vrregset): Remove.
6466 (ppc_collect_vrregset): Remove.
6467 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6468 (ppc_linux_vrregset) : New function.
6469 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6470 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6471 (ppc32_linux_vrregset): Remove.
6472 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6473 and use result instead of ppc32_linux_vrregset.
6474 (ppc32_linux_reg_offsets): Remove initializers for vector register
6476 (ppc64_linux_reg_offsets): Likewise.
6477 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6478 * ppc-linux-nat.c: Include regset.h.
6479 (gdb_vrregset_t): Adjust comment to account for little-endian
6481 (supply_vrregset, fill_vrregset): Remove.
6482 (fetch_altivec_register, store_altivec_register): Remove.
6483 (fetch_altivec_registers): Add regno parameter. Get regset using
6484 ppc_linux_vrregset. Use regset to supply registers.
6485 (store_altivec_registers): Add regno parameter. Get regset using
6486 ppc_linux_vrregset. Use regset to collect registers.
6487 (fetch_register): Call fetch_altivec_registers instead of
6488 fetch_altivec_register.
6489 (store_register): Call store_altivec_registers instead of
6490 store_altivec_register.
6491 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6492 the new regno parameter.
6493 (store_ppc_registers): Call store_altivec_registers with -1 for
6494 the new regno parameter.
6496 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6498 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6499 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6500 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6501 (gdb_vrregset_t): Change array type size to
6502 PPC_LINUX_SIZEOF_VRREGSET.
6503 (gdb_vsxregset_t): Change array type size to
6504 PPC_LINUX_SIZEOF_VSXREGSET.
6505 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6506 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6507 PPC_LINUX_SIZEOF_VSXREGSET.
6509 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6511 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6512 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6514 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6515 ppc_linux_target_wordsize with tid.
6516 (ppc_linux_nat_target::read_description): Call ppc_linux_target
6518 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6519 (ppc64_64bit_inferior_p): Add static and inline specifiers.
6520 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6521 tid parameter. Remove static specifier.
6522 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6523 (ppc_linux_target_wordsize): New declaration.
6525 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6527 * arch/ppc-linux-common.c: New file.
6528 * arch/ppc-linux-common.h: New file.
6529 * arch/ppc-linux-tdesc.h: New file.
6530 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6531 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6532 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6533 arch/ppc-linux-tdesc.h.
6534 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6535 arch/ppc-linux-tdesc.h.
6536 (ppc_linux_nat_target::read_description): Remove target
6537 description matching code. Fill a ppc_linux_features struct and
6538 call ppc_linux_match_description with it. Move comment about ISA
6539 2.05 to ppc-linux-common.c.
6540 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6541 arch/ppc-linux-tdesc.h.
6542 (ppc_linux_core_read_description): Remove target description
6543 matching code. Fill a ppc_linux_features struct and call
6544 ppc_linux_match_description with it.
6545 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6546 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6547 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6548 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6549 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6550 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6551 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6552 (tdesc_powerpc_e500l): Remove.
6554 2018-05-22 Joel Brobecker <brobecker@adacore.com>
6556 * ada-lang.c (catch_assert_command): Pass empty string instead
6557 of NULL for excep_string argument.
6559 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6561 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6562 the width of the requested register exceeds the width of the
6565 2018-05-21 Tom Tromey <tom@tromey.com>
6567 * printcmd.c (output_command): Remove.
6568 (output_command_const): Rename to output_command.
6569 * valprint.h (output_command): Rename from output_command_const.
6570 * tracepoint.c (trace_dump_actions): Call output_command.
6572 2018-05-21 Tom Tromey <tom@tromey.com>
6574 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6575 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6576 * ada-lang.h (create_ada_exception_catchpoint): Update.
6577 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6579 (create_excep_cond_exprs, ~ada_catchpoint)
6580 (should_stop_exception, print_one_exception)
6581 (print_mention_exception, print_recreate_exception): Update.
6582 (ada_get_next_arg): Remove.
6583 (catch_ada_exception_command_split): Use std::string. Change type
6584 of "excep_string", "cond_string".
6585 (catch_ada_exception_command): Update.
6586 (create_ada_exception_catchpoint): Change type of excep_string.
6587 (ada_exception_sal): Remove excep_string parameter.
6588 (~ada_catchpoint): Remove.
6590 2018-05-21 Tom Tromey <tom@tromey.com>
6592 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6595 2018-05-21 Tom Tromey <tom@tromey.com>
6597 * ada-lang.c (ada_exception_message_1, ada_exception_message):
6598 Return unique_xmalloc_ptr.
6599 (print_it_exception): Update.
6601 2018-05-21 Tom Tromey <tom@tromey.com>
6603 * tracepoint.c (trace_dump_actions): Use std::string.
6605 2018-05-21 Tom Tromey <tom@tromey.com>
6607 * symfile.c (reread_symbols): Use std::string for original_name.
6609 2018-05-21 Tom Tromey <tom@tromey.com>
6611 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6612 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
6615 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
6617 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6619 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6620 * objfiles.c (get_objfile_bfd_data): Allocate
6621 objfile_per_bfd_storage with obstack_new when allocating on
6624 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6626 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6628 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6629 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6630 * mdebugread.c (mdebug_build_psymtabs): Likewise.
6631 (add_pending): Likewise.
6632 (parse_symbol): Likewise.
6633 (parse_partial_symbols): Likewise.
6634 (psymtab_to_symtab_1): Likewise.
6635 (new_psymtab): Likewise.
6636 (elfmdebug_build_psymtabs): Likewise.
6637 * minsyms.c (terminate_minimal_symbol_table): Likewise.
6638 * objfiles.c (get_objfile_bfd_data): Likewise.
6639 (objfile_register_static_link): Likewise.
6640 * psymtab.c (allocate_psymtab): Likewise.
6641 * stabsread.c (read_member_functions): Likewise.
6642 * xcoffread.c (xcoff_end_psymtab): Likewise.
6644 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6646 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6647 compiler supports std::is_trivially_constructible.
6648 * common/poison.h: Include obstack.h.
6649 (IsMallocable): Define to is_trivially_constructible if the
6650 compiler supports it, define to true_type otherwise.
6654 (XOBNEWVEC): Redefine.
6655 * gdb_obstack.h (obstack_zalloc): New.
6656 (OBSTACK_ZALLOC): Redefine.
6657 (obstack_calloc): New.
6658 (OBSTACK_CALLOC): Redefine.
6660 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6661 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6663 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6664 obstack_calloc/obstack_zalloc.
6665 (gdbarch_obstack_zalloc): Remove.
6666 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6668 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6670 * stack.c (backtrace_command_1): Remove useless variable int i.
6672 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6674 * stack.c (print_frame_info): Fix comment.
6676 2018-05-18 Tom Tromey <tom@tromey.com>
6678 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6679 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6680 (~dwarf2_per_objfile): Update
6681 (dwarf2_get_dwz_file): Use new.
6682 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6685 2018-05-18 Tom Tromey <tom@tromey.com>
6687 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6689 * dwarf2read.c (struct dwp_file): Add constructor and
6691 (open_and_init_dwp_file): Return a unique_ptr.
6692 (dwarf2_per_objfile, create_dwp_hash_table)
6693 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6694 (lookup_dwo_unit_in_dwp): Update.
6695 (open_and_init_dwp_file, get_dwp_file): Update.
6697 2018-05-18 Tom Tromey <tom@tromey.com>
6699 * dwarf2read.c (dwarf2_per_objfile): Update.
6700 (struct mapped_index): Add initializers.
6701 (dwarf2_read_index): Use new.
6702 (dw2_symtab_iter_init): Update.
6703 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6706 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6708 * dwarf2read.c (mapped_index) <total_size>: Remove.
6710 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6712 * unittests/format_pieces-selftests.c (test_format_specifier):
6715 2018-05-18 Tom Tromey <tom@tromey.com>
6717 * c-typeprint.c (maybe_print_hole): New function.
6718 (c_print_type_struct_field_offset): Update.
6719 (c_type_print_base_struct_union): Call maybe_print_hole.
6721 2018-05-17 Keith Seitz <keiths@redhat.com>
6723 * breakpoint.c (build_bpstat_chain): New function, moved from
6725 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6726 If no stop chain is passed, call build_bpstat_chain to build it.
6727 * breakpoint.h (build_bpstat_chain): Declare.
6728 (bpstat_stop_status): Move documentation here from breakpoint.c.
6729 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6730 build the stop chain and pass it to skip_inline_frames.
6731 Pass this stop chain to bpstat_stop_status.
6732 * inline-frame.c: Include breakpoint.h.
6733 (stopped_by_user_bp_inline_frame): New function.
6734 (skip_inline_frames): Add parameter `stop_chain'.
6735 Move documention to inline-frame.h.
6736 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6737 whether the frame should be elided.
6738 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6739 Add moved documentation and update for new parameter.
6741 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6744 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6745 unittests/format_pieces-selftests.c.
6746 * common/format.h (format_piece) <operator==>: New.
6747 (format_pieces) <operator[]>: Remove.
6748 * common/format.c (format_pieces::format_pieces): Handle \e.
6749 * unittests/format_pieces-selftests.c: New.
6751 2018-05-17 Tom Tromey <tom@tromey.com>
6754 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6755 (dw2_instantiate_symtab): Add skip_partial parameter.
6756 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6757 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6758 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6759 (dw2_expand_symtabs_matching_one)
6760 (dw2_find_pc_sect_compunit_symtab)
6761 (dw2_debug_names_lookup_symbol)
6762 (dw2_debug_names_expand_symtabs_for_function): Update.
6763 (init_cutu_and_read_dies): Add skip_partial parameter.
6764 (process_psymtab_comp_unit, build_type_psymtabs_1)
6765 (process_skeletonless_type_unit, load_partial_comp_unit)
6766 (psymtab_to_symtab_1): Update.
6767 (load_full_comp_unit): Add skip_partial parameter.
6768 (process_imported_unit_die, dwarf2_read_addr_index)
6769 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6770 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6771 (read_signatured_type): Update.
6773 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6775 * value.c (release_value): Remove unused variable.
6776 (record_latest_value): Likewise.
6777 (access_value_history): Likewise.
6778 (preserve_values): Likewise.
6780 2018-05-17 Tom Tromey <tom@tromey.com>
6782 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6785 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6788 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6789 Also handle registers whose width is not a multiple of
6791 (linux_nat_trad_target::store_register): Likewise.
6793 2018-05-16 Tom Tromey <tom@tromey.com>
6795 * gdbcore.h (core_bfd): Redefine.
6796 * corelow.c (core_target::close): Update.
6797 (core_target_open): Update.
6798 * progspace.h (struct program_space) <cbfd>: Now a
6801 2018-05-16 Tom Tromey <tom@tromey.com>
6804 * symfile-add-flags.h (enum symfile_add_flags)
6805 <SYMFILE_NOT_FILENAME>: New constant.
6806 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6807 objfile name from BFD.
6808 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6809 * minidebug.c (find_separate_debug_file_in_section): Put
6810 ".gnu_debugdata" into BFD's file name.
6812 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6814 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6817 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6820 * aarch64-tdep.c (aarch64_analyze_prologue,
6821 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6822 Indicate not interested in errors.
6824 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6826 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6827 Supply the MIPS_ZERO_REGNUM register.
6829 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6831 * mips-tdep.c (mask_address_var): Make variable static.
6833 2018-05-14 Tom Tromey <tom@tromey.com>
6835 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6837 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6839 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6840 FXSAVE_ADDR for the mxcsr register.
6842 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6844 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6846 2018-05-11 Pedro Alves <palves@redhat.com>
6848 * corelow.c (core_target) <core_target>: No longer inline.
6849 Initialize m_core_gdbarch, m_core_vec and build the section table
6851 <~core_target>: New.
6852 <core_gdbarch, get_core_register_section>: New methods.
6853 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6854 factored out from ...
6855 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6857 (sniff_core_bfd): Add gdbarch parameter.
6858 (core_close): Delete, merged into ...
6859 (core_target::close): ... here. Delete self.
6860 (core_close_cleanup): Delete.
6861 (core_target_open): Allocate a core_target on the heap. Use a
6862 unique_ptr instead of a cleanup. Bits moved into the core_target
6863 ctor. Adjust to use core_target methods instead of globals.
6864 (get_core_register_section): Rename to ...
6865 (core_target::get_core_register_section): ... this and adjust.
6866 (struct get_core_registers_cb_data): New.
6867 (get_core_registers_cb): Use it. Use bool.
6868 (core_target::fetch_registers, core_target::files_info)
6869 (core_target::xfer_partial, core_target::read_description)
6870 (core_target::pid_to, core_target::thread_name): Adjust to
6871 reference class fields instead of globals.
6872 * target.h (struct target_ops_deleter, target_ops_up): New.
6874 2018-05-11 Pedro Alves <palves@redhat.com>
6876 * corefile.c (core_file_command): Move to corelow.c.
6877 * corelow.c (the_core_target): Delete.
6878 (core_file_command): Moved from corefile.c. Check exec_bfd
6879 instead of the_core_target. Use target_detach instead of calling
6880 into the_core_target directly.
6881 (maybe_say_no_core_file_now): New.
6882 (core_target::detach): Use it.
6883 (_initialize_corelow): Remove references to the_core_target.
6884 * gdbcore.h (the_core_target): Delete.
6886 2018-05-11 Tom Tromey <tromey@redhat.com>
6887 Pedro Alves <palves@redhat.com>
6889 * corefile.c (core_bfd): Remove.
6890 * gdbcore.h (core_bfd): Now a macro.
6891 * progspace.h (struct program_space) <cbfd>: New field.
6893 2018-05-11 Tom Tromey <tom@tromey.com>
6895 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6898 2018-05-10 Tom Tromey <tom@tromey.com>
6900 * configure: Rebuild.
6901 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6903 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6906 * regformats/regdat.sh: Adjust script, following the addition
6907 of the new expedite_regs parameter to init_target_desc.
6909 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6912 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6913 set_gdbarch_significant_addr_bit.
6914 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6915 set_gdbarch_significant_addr_bit.
6916 * utils.c (address_significant): Update to sign extend addr.
6918 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6920 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6921 (xtensa_linux_init_abi): Limit tdep->num_regs by
6922 tdep->num_nopriv_regs.
6923 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6924 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6927 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6929 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6931 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6933 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6934 (I387_MXCSR_INIT_VAL): New constant.
6935 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6936 buffer if it was supplied by the inferior.
6937 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6938 (i387_xsave_get_clear_bv): New function.
6939 (i387_supply_xsave): Only read x87 control registers from the
6940 xsave buffer if the feature is enabled, and the state will have
6941 been written, otherwise, provide a suitable default.
6942 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6943 including x87 control registers. Update control registers if they
6944 have changed from the default value, and mark features as enabled
6946 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6948 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6950 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6952 2018-05-07 Tom Tromey <tom@tromey.com>
6954 * configure: Rebuild.
6955 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6957 2018-05-07 Tom Tromey <tom@tromey.com>
6960 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6961 bit. Use correct value for VDIV.
6963 2018-05-04 Tom Tromey <tom@tromey.com>
6965 * configure: Rebuild.
6966 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6968 2018-05-04 Tom Tromey <tom@tromey.com>
6970 * linux-record.c (record_linux_system_call) <case
6971 RECORD_SYS_RECVFROM>: Add "break".
6973 2018-05-04 Tom Tromey <tom@tromey.com>
6975 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6976 Add missing "break".
6977 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6978 Add missing "break".
6980 2018-05-04 Tom Tromey <tom@tromey.com>
6982 * rs6000-tdep.c (ppc_process_record_op4)
6983 (ppc_process_record_op63): Add fall-through comment.
6985 2018-05-04 Tom Tromey <tom@tromey.com>
6987 * i386-tdep.c (i386_process_record): Add fall-through comment.
6989 2018-05-04 Tom Tromey <tom@tromey.com>
6991 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6994 2018-05-04 Tom Tromey <tom@tromey.com>
6996 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6997 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6998 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7000 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7002 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7005 2018-05-04 Tom Tromey <tom@tromey.com>
7007 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7009 2018-05-04 Tom Tromey <tom@tromey.com>
7011 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7012 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7013 * symfile.c (section_is_mapped): Fix fall-through comment.
7014 * stabsread.c (define_symbol, read_member_functions): Fix
7015 fall-through comment.
7016 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7018 * remote.c (remote_wait_as): Fix fall-through comment.
7019 * p-exp.y (yylex): Fix fall-through comment.
7020 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7022 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7023 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7024 * jv-exp.y (yylex): Fix fall-through comment.
7025 * go-exp.y (lex_one_token): Fix fall-through comment.
7026 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7027 fall-through comment.
7028 * f-exp.y (yylex): Fix fall-through comment.
7029 * dwarf2read.c (process_die): Fix fall-through comments.
7030 * dbxread.c (process_one_symbol): Fix fall-through comment.
7031 * d-exp.y (lex_one_token): Fix fall-through comment.
7032 * cp-name-parser.y (yylex): Fix fall-through comment.
7033 * coffread.c (coff_symtab_read): Fix fall-through comment.
7034 * c-exp.y (lex_one_token): Fix fall-through comment.
7035 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7037 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7040 2018-05-04 Tom Tromey <tom@tromey.com>
7043 * NEWS: Mention gdb.execute change.
7044 * gdbcmd.h (execute_control_command): Don't declare.
7045 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7046 execute_control_commands, execute_control_commands_to_string.
7047 * cli/cli-script.h (execute_control_commands)
7048 (execute_control_commands_to_string): Declare.
7049 (execute_control_command): Add from_tty parameter.
7050 * cli/cli-script.c (execute_control_commands)
7051 (execute_control_commands_to_string): New functions.
7052 (execute_user_command): Use execute_control_commands.
7053 (execute_control_command_1): Add "from_tty" parameter. Update.
7054 (execute_control_command): Likewise.
7056 2018-05-04 Tom Tromey <tom@tromey.com>
7059 * NEWS: Mention that breakpoint commands are writable.
7060 * python/py-breakpoint.c (bppy_set_commands): New function.
7061 (breakpoint_object_getset) <"commands">: Use it.
7063 2018-05-04 Tom Tromey <tom@tromey.com>
7065 * tracepoint.c (actions_command): Update.
7066 * mi/mi-cmd-break.c (mi_command_line_array)
7067 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7068 (mi_read_next_line): Remove.
7069 (mi_cmd_break_commands): Update.
7070 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7072 * cli/cli-script.c (get_command_line): Update.
7073 (process_next_line): Use function_view. Constify.
7074 (recurse_read_control_structure, read_command_lines)
7075 (read_command_lines_1): Change argument types to function_view.
7076 (do_define_command, document_command): Update.
7077 * breakpoint.h (check_tracepoint_command): Don't declare.
7078 * breakpoint.c (check_tracepoint_command): Remove.
7079 (commands_command_1, create_tracepoint_from_upload): Update.
7081 2018-05-04 Tom Tromey <tom@tromey.com>
7084 * cli/cli-script.h (enum command_control_type) <define_control>:
7086 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7087 (build_command_line, execute_control_command_1)
7088 (process_next_line): Likewise.
7089 (do_define_command): New function, extracted from define_command.
7090 (define_command): Use it.
7092 2018-05-04 Tom Tromey <tom@tromey.com>
7094 * tracepoint.c (actions_command): Update.
7095 * cli/cli-script.h (read_command_lines): Update.
7096 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7097 (MAX_TMPBUF): Remove define.
7098 (define_command): Use string_printf.
7099 (document_command): Likewise.
7100 * breakpoint.c (commands_command_1): Update.
7102 2018-05-04 Tom Tromey <tom@tromey.com>
7104 * top.c (execute_command): Update.
7105 * cli/cli-script.h (print_command_lines): Now varargs.
7106 * cli/cli-script.c (print_command_lines): Now varargs.
7107 (execute_control_command_1) <case while_control, case if_control>:
7110 2018-05-04 Tom Tromey <tom@tromey.com>
7112 * tracepoint.c (all_tracepoint_actions): Rename from
7113 all_tracepoint_actions_and_cleanup. Change return type.
7114 (actions_command, encode_actions_1, encode_actions)
7115 (trace_dump_actions, tdump_command): Update.
7116 * remote.c (remote_download_command_source): Update.
7117 * python/python.c (gdbpy_eval_from_control_command)
7118 (python_command, python_interactive_command): Update.
7119 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7120 * guile/guile.c (guile_command)
7121 (gdbscm_eval_from_control_command, guile_command): Update.
7122 * compile/compile.c (compile_code_command)
7123 (compile_print_command, compile_to_object): Update.
7124 * cli/cli-script.h (struct command_lines_deleter): New.
7125 (counted_command_line): New typedef.
7126 (struct command_line): Add constructor, destructor.
7127 <body_list>: Remove.
7128 <body_list_0, body_list_1>: New members.
7129 (command_line_up): Remove typedef.
7130 (read_command_lines, read_command_lines_1, get_command_line):
7132 (copy_command_lines): Don't declare.
7133 * cli/cli-script.c (build_command_line): Use "new".
7134 (get_command_line): Return counted_command_line.
7135 (print_command_lines, execute_user_command)
7136 (execute_control_command_1, while_command, if_command): Update.
7137 (realloc_body_list): Remove.
7138 (process_next_line, recurse_read_control_structure): Update.
7139 (read_command_lines, read_command_lines_1): Return counted_command_line.
7140 (free_command_lines): Use "delete".
7141 (copy_command_lines): Remove.
7142 (define_command, document_command, show_user_1): Update.
7143 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7144 a counted_command_line.
7145 * breakpoint.h (counted_command_line): Remove typedef.
7146 (breakpoint_set_commands): Update.
7147 * breakpoint.c (check_no_tracepoint_commands)
7148 (validate_commands_for_breakpoint): Update.
7149 (breakpoint_set_commands): Change commands to be a
7150 counted_command_line.
7151 (commands_command_1, update_dprintf_command_list)
7152 (create_tracepoint_from_upload): Update.
7154 2018-05-04 Tom Tromey <tom@tromey.com>
7156 * cli/cli-decode.h (cmd_list_element): New constructor.
7157 (~cmd_list_element): New destructor.
7158 (struct cmd_list_element): Add initializers.
7159 * cli/cli-decode.c (do_add_cmd): Use "new".
7160 (delete_cmd): Use "delete".
7162 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7163 Pedro Alves <palves@redhat.com>
7165 PR breakpoints/19806 and support for PR external/20207.
7166 * NEWS: Mention Aarch64 watchpoint improvements.
7167 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7168 watchpoints and PR external/20207 watchpoints.
7169 * nat/aarch64-linux-hw-point.c
7170 (kernel_supports_any_contiguous_range): New.
7171 (aarch64_watchpoint_offset): New.
7172 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7173 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7174 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7175 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7176 next_addr_orig_p. Support PR external/20207 watchpoints.
7177 (aarch64_downgrade_regs): New.
7178 (aarch64_dr_state_insert_one_point): New parameters offset and
7180 (aarch64_dr_state_remove_one_point): Likewise.
7181 (aarch64_handle_breakpoint): Update caller.
7182 (aarch64_handle_aligned_watchpoint): Likewise.
7183 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7185 (aarch64_linux_set_debug_regs): Remove const from state. Call
7186 aarch64_downgrade_regs.
7187 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7188 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7189 (DR_CONTROL_MASK): ... this.
7190 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7191 (unsigned int aarch64_watchpoint_offset): New prototype.
7192 (aarch64_linux_set_debug_regs): Remove const from state.
7193 * utils.c (align_up, align_down): Move to ...
7194 * common/common-utils.c (align_up, align_down): ... here.
7195 * utils.h (align_up, align_down): Move to ...
7196 * common/common-utils.h (align_up, align_down): ... here.
7198 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7200 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7201 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7202 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7203 Re-implement to match the ABI as summarized in GCC's
7204 gcc/config/sparc/sparc.c. All callers updated.
7205 (sparc32_store_arguments): Remove assertion.
7207 2018-05-04 Tom Tromey <tom@tromey.com>
7209 * printcmd.c: Don't include tui.h.
7210 (decode_format): Use skip_spaces.
7212 2018-05-04 Tom Tromey <tom@tromey.com>
7215 * printcmd.c (last_count): New global.
7216 (x_command): Use saved count when repeating.
7218 2018-05-04 Tom Tromey <tom@tromey.com>
7220 * nto-procfs.c (do_closedir_cleanup): Remove.
7221 (procfs_pidlist): Use gdb_dir_up.
7222 * procfs.c (do_closedir_cleanup): Remove.
7223 (proc_update_threads): Use gdb_dir_up.
7224 * common/filestuff.h (struct gdb_dir_deleter): New.
7225 (gdb_dir_up): New typedef.
7227 2018-05-04 Tom Tromey <tom@tromey.com>
7229 * ada-lang.c (print_mention_exception): Use std::string.
7231 2018-05-04 Tom Tromey <tom@tromey.com>
7233 * ada-lang.c (create_excep_cond_exprs): Update.
7234 (ada_exception_catchpoint_cond_string): Use std::string.
7236 2018-05-04 Tom Tromey <tom@tromey.com>
7238 * ada-lang.c (xget_renaming_scope): Return std::string.
7239 (old_renaming_is_invisible): Update.
7241 2018-05-04 Tom Tromey <tom@tromey.com>
7243 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7244 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7246 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7248 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7250 2018-05-04 Tom Tromey <tom@tromey.com>
7252 * remote.c (remote_query_supported_append): Change type.
7253 (remote_check_symbols): Update.
7255 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7258 * configure.ac: Prepend libpython.
7259 * python/python-config.py: Likewise.
7260 * configure: Regenerate.
7262 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7264 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7266 2018-05-03 Pedro Alves <palves@redhat.com>
7269 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7270 override. Write 'true' instead of '1'.
7271 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7274 2018-05-02 Pedro Alves <palves@redhat.com>
7276 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7277 add_inf_child_target.
7278 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7279 add_inf_child_target.
7280 * aix-thread.c (aix_thread_target_info): New.
7281 (aix_thread_target) <shortname, longname, doc>: Delete.
7283 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7284 add_inf_child_target.
7285 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7286 add_inf_child_target.
7287 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7288 add_inf_child_target.
7289 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7290 add_inf_child_target.
7291 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7292 add_inf_child_target.
7293 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7294 add_inf_child_target.
7295 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7296 add_inf_child_target.
7297 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7298 add_inf_child_target.
7299 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7300 add_inf_child_target.
7301 * bfd-target.c (target_bfd_target_info): New.
7302 (target_bfd) <shortname, longname, doc>: Delete.
7304 * bsd-kvm.c (bsd_kvm_target_info): New.
7305 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7307 (bsd_kvm_target::open): Rename to ...
7308 (bsd_kvm_target_open): ... this. Adjust.
7309 * bsd-uthread.c (bsd_uthread_target_info): New.
7310 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7312 * corefile.c (core_file_command): Adjust.
7313 * corelow.c (core_target_info): New.
7314 (core_target) <shortname, longname, doc>: Delete.
7316 (core_target::open): Rename to ...
7317 (core_target_open): ... this. Adjust.
7318 * ctf.c (ctf_target_info): New.
7319 (ctf_target) <shortname, longname, doc>: Delete.
7321 (ctf_target::open): Rename to ...
7322 (ctf_target_open): ... this.
7323 (_initialize_ctf): Adjust.
7324 * exec.c (exec_target_info): New.
7325 (exec_target) <shortname, longname, doc>: Delete.
7327 (exec_target::open): Rename to ...
7328 (exec_target_open): ... this.
7329 * gdbcore.h (core_target_open): Declare.
7330 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7331 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7332 add_inf_child_target.
7333 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7334 add_inf_child_target.
7335 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7336 add_inf_child_target.
7337 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7338 add_inf_child_target.
7339 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7340 add_inf_child_target.
7341 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7342 add_inf_child_target.
7343 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7344 add_inf_child_target.
7345 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7346 add_inf_child_target.
7347 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7348 add_inf_child_target.
7349 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7350 add_inf_child_target.
7351 * inf-child.c (inf_child_target_info): New.
7352 (inf_child_target::info): New.
7353 (inf_child_open_target): Remove 'target' parameter. Use
7354 get_native_target instead.
7355 (inf_child_target::open): Delete.
7356 (add_inf_child_target): New.
7357 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7360 (add_inf_child_target): Declare.
7361 (inf_child_open_target): Declare.
7362 * linux-thread-db.c (thread_db_target_info): New.
7363 (thread_db_target) <shortname, longname, doc>: Delete.
7365 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7366 add_inf_child_target.
7367 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7368 add_inf_child_target.
7369 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7370 add_inf_child_target.
7371 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7372 add_inf_child_target.
7373 * make-target-delegates (print_class): Adjust.
7374 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7375 add_inf_child_target.
7376 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7377 add_inf_child_target.
7378 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7379 add_inf_child_target.
7380 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7381 add_inf_child_target.
7382 * nto-procfs.c (nto_native_target_info): New.
7383 (nto_procfs_target_native) <shortname, longname, doc>:
7386 (nto_procfs_target_info): New.
7387 (nto_procfs_target_procfs) <shortname, longname, doc>:
7390 (init_procfs_targets): Adjust.
7391 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7392 add_inf_child_target.
7393 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7394 add_inf_child_target.
7395 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7396 add_inf_child_target.
7397 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7398 add_inf_child_target.
7399 * ravenscar-thread.c (ravenscar_target_info): New.
7400 (ravenscar_thread_target) <shortname, longname, doc>:
7403 * record-btrace.c (record_btrace_target_info):
7404 (record_btrace_target) <shortname, longname, doc>: Delete.
7406 (record_btrace_target::open): Rename to ...
7407 (record_btrace_target_open): ... this. Adjust.
7408 * record-full.c (record_longname, record_doc): New.
7409 (record_full_base_target) <shortname, longname, doc>: Delete.
7411 (record_full_target_info): New.
7412 (record_full_target): <shortname>: Delete.
7414 (record_full_core_open_1, record_full_open_1): Update comments.
7415 (record_full_base_target::open): Rename to ...
7416 (record_full_open): ... this.
7417 (cmd_record_full_restore): Update.
7418 (_initialize_record_full): Update.
7419 * remote-sim.c (remote_sim_target_info): New.
7420 (gdbsim_target) <shortname, longname, doc>: Delete.
7422 (gdbsim_target::open): Rename to ...
7423 (gdbsim_target_open): ... this.
7424 (_initialize_remote_sim): Adjust.
7425 * remote.c (remote_doc): New.
7426 (remote_target_info): New.
7427 (remote_target) <shortname, longname, doc>: Delete.
7429 (extended_remote_target_info): New.
7430 (extended_remote_target) <shortname, longname, doc>: Delete.
7432 (remote_target::open_1): Make static. Adjust.
7433 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7434 * s390-linux-nat.c (_initialize_s390_nat): Use
7435 add_inf_child_target.
7436 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7437 add_inf_child_target.
7438 * sol-thread.c (thread_db_target_info): New.
7439 (sol_thread_target) <shortname, longname, doc>: Delete.
7441 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7442 add_inf_child_target.
7443 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7444 add_inf_child_target.
7445 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7446 add_inf_child_target.
7447 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7448 add_inf_child_target.
7449 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7450 add_inf_child_target.
7451 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7452 add_inf_child_target.
7453 * spu-linux-nat.c (_initialize_spu_nat): Use
7454 add_inf_child_target.
7455 * spu-multiarch.c (spu_multiarch_target_info): New.
7456 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7458 * target-delegates.c: Regenerate.
7459 * target.c: Include <unordered_map>.
7460 (target_ops_p): Delete.
7461 (DEF_VEC_P(target_ops_p)): Delete.
7462 (target_factories): New.
7463 (test_target_info): New.
7464 (test_target_ops::info): New.
7465 (open_target): Adjust to use target_factories.
7466 (add_target_with_completer): Rename to ...
7467 (add_target): ... this. Change prototype. Register target_info
7468 and open callback in target_factories. Register target_info in
7469 command context instead of target_ops.
7470 (add_target): Delete old implementation.
7471 (add_deprecated_target_alias): Change prototype. Adjust.
7472 (the_native_target): New.
7473 (set_native_target, get_native_target): New.
7474 (find_default_run_target): Use the_native_target.
7475 (find_attach_target, find_run_target): Simplify.
7476 (target_ops::open): Delete.
7477 (dummy_target_info): New.
7478 (dummy_target::shortname, dummy_target::longname)
7479 (dummy_target::doc): Delete.
7480 (dummy_target::info): New.
7481 (debug_target::shortname, debug_target::longname)
7482 (debug_target::doc): Delete.
7483 (debug_target::info): New.
7484 * target.h (struct target_info): New.
7485 (target_ops::~target_ops): Add comment.
7486 (target_ops::info): New.
7487 (target_ops::shortname, target_ops::longname, target_ops::doc): No
7488 longer virtual. Implement in terms of target_info.
7489 (set_native_target, get_native_target): Declare.
7490 (target_open_ftype): New.
7491 (add_target, add_target_with_completer)
7492 (add_deprecated_target_alias): Change prototype.
7493 (test_target) <shortname, longname, doc>: Delete.
7495 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7496 add_inf_child_target.
7497 * tracefile-tfile.c (tfile_target_info): New.
7498 (tfile_target) <shortname, longname, doc>: Delete.
7500 (tfile_target::open): Rename to ...
7501 (tfile_target_open): ... this.
7502 (_initialize_tracefile_tfile): Adjust.
7503 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7504 add_inf_child_target.
7505 * windows-nat.c (_initialize_windows_nat): Use
7506 add_inf_child_target.
7507 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7508 add_inf_child_target.
7510 2018-05-02 Pedro Alves <palves@redhat.com>
7512 * linux-nat.h (linux_nat_target) <low_new_thread,
7513 low_delete_thread, low_new_fork, low_forget_process,
7514 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7515 New virtual methods.
7516 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7517 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7518 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7519 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7520 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7522 * linux-fork.c (delete_fork): Adjust to call low method.
7523 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7524 (linux_nat_new_fork, linux_nat_forget_process_hook)
7525 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7526 (linux_nat_status_is_event):
7527 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7528 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7530 (sigtrap_is_event): Rename to ...
7531 (linux_nat_target::low_status_is_event): ... this.
7532 (linux_nat_set_status_is_event): Delete.
7533 (save_stop_reason, linux_nat_wait_1)
7534 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7536 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7537 (linux_nat_set_new_fork, linux_nat_set_forget_process)
7538 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7539 (linux_nat_set_prepare_to_resume): Delete.
7540 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7541 low virtual methods.
7542 * amd64-linux-nat.c: Likewise.
7543 * arm-linux-nat.c: Likewise.
7544 * i386-linux-nat.c: Likewise.
7545 * ia64-linux-nat.c: Likewise.
7546 * mips-linux-nat.c: Likewise.
7547 * ppc-linux-nat.c: Likewise.
7548 * s390-linux-nat.c: Likewise.
7549 * sparc64-linux-nat.c: Likewise.
7550 * x86-linux-nat.c: Likewise.
7551 * x86-linux-nat.h: Include "nat/x86-linux.h".
7552 (x86_linux_nat_target) <low_new_fork, low_forget_process,
7553 low_prepare_to_resume, low_new_thread, low_delete_thread>:
7556 2018-05-02 Pedro Alves <palves@redhat.com>
7558 * target.h (target_ops)
7559 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7560 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7561 stopped_by_watchpoint, have_continuable_watchpoint,
7562 stopped_data_address, watchpoint_addr_within_range,
7563 can_accel_watchpoint_condition, can_run, thread_alive,
7564 has_all_memory, has_memory, has_stack, has_registers,
7565 has_execution, can_async_p, is_async_p, supports_non_stop,
7566 always_non_stop_p, can_execute_reverse, supports_multi_process,
7567 supports_enable_disable_tracepoint,
7568 supports_disable_randomization, supports_string_tracing,
7569 supports_evaluation_of_breakpoint_conditions,
7570 can_run_breakpoint_commands, filesystem_is_local,
7571 can_download_tracepoint, get_trace_state_variable_value,
7572 set_trace_notes, get_tib_address, use_agent, can_use_agent,
7573 record_is_replaying, record_will_replay,
7574 augmented_libraries_svr4_read>: Adjust to return bool.
7575 * aarch64-linux-nat.c: All implementations adjusted.
7576 * aix-thread.c: All implementations adjusted.
7577 * arm-linux-nat.c: All implementations adjusted.
7578 * breakpoint.c: All implementations adjusted.
7579 * bsd-kvm.c: All implementations adjusted.
7580 * bsd-uthread.c: All implementations adjusted.
7581 * corelow.c: All implementations adjusted.
7582 * ctf.c: All implementations adjusted.
7583 * darwin-nat.c: All implementations adjusted.
7584 * darwin-nat.h: All implementations adjusted.
7585 * exec.c: All implementations adjusted.
7586 * fbsd-nat.c: All implementations adjusted.
7587 * fbsd-nat.h: All implementations adjusted.
7588 * gnu-nat.c: All implementations adjusted.
7589 * gnu-nat.h: All implementations adjusted.
7590 * go32-nat.c: All implementations adjusted.
7591 * ia64-linux-nat.c: All implementations adjusted.
7592 * inf-child.c: All implementations adjusted.
7593 * inf-child.h: All implementations adjusted.
7594 * inf-ptrace.c: All implementations adjusted.
7595 * inf-ptrace.h: All implementations adjusted.
7596 * linux-nat.c: All implementations adjusted.
7597 * linux-nat.h: All implementations adjusted.
7598 * mips-linux-nat.c: All implementations adjusted.
7599 * nto-procfs.c: All implementations adjusted.
7600 * ppc-linux-nat.c: All implementations adjusted.
7601 * procfs.c: All implementations adjusted.
7602 * ravenscar-thread.c: All implementations adjusted.
7603 * record-btrace.c: All implementations adjusted.
7604 * record-full.c: All implementations adjusted.
7605 * remote-sim.c: All implementations adjusted.
7606 * remote.c: All implementations adjusted.
7607 * s390-linux-nat.c: All implementations adjusted.
7608 * sol-thread.c: All implementations adjusted.
7609 * spu-multiarch.c: All implementations adjusted.
7610 * target-delegates.c: All implementations adjusted.
7611 * target.c: All implementations adjusted.
7612 * target.h: All implementations adjusted.
7613 * tracefile-tfile.c: All implementations adjusted.
7614 * tracefile.c: All implementations adjusted.
7615 * tracefile.h: All implementations adjusted.
7616 * windows-nat.c: All implementations adjusted.
7617 * x86-linux-nat.h: All implementations adjusted.
7618 * x86-nat.h: All implementations adjusted.
7620 2018-05-02 Pedro Alves <palves@redhat.com>
7622 * make-target-delegates (scan_target_h): Don't trim lines here.
7623 Replace sequences of tabs and/or whitespace with a single
7625 (top level, parsing methods): Trim each line before processing it
7628 2018-05-02 Pedro Alves <palves@redhat.com>
7629 John Baldwin <jhb@freebsd.org>
7631 * target.h (enum strata) <debug_stratum>: New.
7632 (struct target_ops) <all delegation methods>: Replace by C++
7633 virtual methods, and drop "to_" prefix. All references updated
7635 <to_shortname, to_longname, to_doc, to_data,
7636 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7637 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7638 virtual methods. All references updated throughout.
7639 <can_attach, supports_terminal_ours, can_create_inferior,
7640 get_thread_control_capabilities, attach_no_wait>: New
7642 <insert_breakpoint, remove_breakpoint>: Now
7643 TARGET_DEFAULT_NORETURN methods.
7644 <info_proc>: Now returns bool.
7646 (OPS_MAGIC): Delete.
7647 (current_target): Delete. All references replaced by references
7649 (target_stack): ... this. New.
7650 (target_shortname, target_longname): Adjust.
7651 (target_can_run): Now a function declaration.
7652 (default_child_has_all_memory, default_child_has_memory)
7653 (default_child_has_stack, default_child_has_registers)
7654 (default_child_has_execution): Remove target_ops parameter.
7655 (complete_target_initialization): Delete.
7656 (memory_breakpoint_target): New template class.
7657 (test_target_ops): Refactor as a C++ class with virtual methods.
7658 * make-target-delegates (NAME_PART): Tighten.
7659 (POINTER_PART, CP_SYMBOL): New.
7660 (SIMPLE_RETURN_PART): Reimplement.
7661 (VEC_RETURN_PART): Expect less.
7662 (RETURN_PART, VIRTUAL_PART): New.
7663 (METHOD): Adjust to C++ virtual methods.
7664 (scan_target_h): Remove reference to C99.
7665 (dname): Output "target_ops::" prefix.
7666 (write_function_header): Adjust to output a C++ class method.
7667 (write_declaration): New.
7668 (write_delegator): Adjust to output a C++ class method.
7669 (tdname): Output "dummy_target::" prefix.
7670 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7672 (tdefault_names, debug_names): Delete.
7673 (return_types, tdefaults, styles, argtypes_array): New.
7674 (top level): All methods are delegators.
7676 (top level): Print dummy_target and debug_target classes.
7677 * target-delegates.c: Regenerate.
7678 * target-debug.h (target_debug_print_enum_info_proc_what)
7679 (target_debug_print_thread_control_capabilities)
7680 (target_debug_print_thread_info_p): New.
7681 * target.c (dummy_target): Delete.
7682 (the_dummy_target, the_debug_target): New.
7683 (target_stack): Now extern.
7684 (set_targetdebug): Push/unpush debug target.
7685 (default_child_has_all_memory, default_child_has_memory)
7686 (default_child_has_stack, default_child_has_registers)
7687 (default_child_has_execution): Remove target_ops parameter.
7688 (complete_target_initialization): Delete.
7689 (add_target_with_completer): No longer call
7690 complete_target_initialization.
7691 (target_supports_terminal_ours): Use regular delegation.
7692 (update_current_target): Delete.
7693 (push_target): No longer check magic number. Don't call
7694 update_current_target.
7695 (unpush_target): Don't call update_current_target.
7696 (target_is_pushed): No longer check magic number.
7697 (target_require_runnable): Skip for all stratums over
7699 (target_ops::info_proc): New.
7700 (target_info_proc): Use find_target_at and
7701 find_default_run_target.
7702 (target_supports_disable_randomization): Use regular delegation.
7703 (target_get_osdata): Use find_target_at.
7704 (target_ops::open, target_ops::close, target_ops::can_attach)
7705 (target_ops::attach, target_ops::can_create_inferior)
7706 (target_ops::create_inferior, target_ops::can_run)
7707 (target_can_run): New.
7708 (default_fileio_target): Use regular delegation.
7709 (target_ops::fileio_open, target_ops::fileio_pwrite)
7710 (target_ops::fileio_pread, target_ops::fileio_fstat)
7711 (target_ops::fileio_close, target_ops::fileio_unlink)
7712 (target_ops::fileio_readlink): New.
7713 (target_fileio_open_1, target_fileio_unlink)
7714 (target_fileio_readlink): Always call the target method. Handle
7716 (return_zero, return_zero_has_execution): Delete.
7717 (init_dummy_target): Delete.
7718 (dummy_target::dummy_target, dummy_target::shortname)
7719 (dummy_target::longname, dummy_target::doc)
7720 (debug_target::debug_target, debug_target::shortname)
7721 (debug_target::longname, debug_target::doc): New.
7722 (target_supports_delete_record): Use regular delegation.
7723 (setup_target_debug): Delete.
7724 (maintenance_print_target_stack): Skip debug_stratum.
7725 (initialize_targets): Instantiate the_dummy_target and
7727 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7729 (target_auxv_search, fprint_target_auxv): Adjust.
7730 (info_auxv_command): Adjust to use target_stack.
7731 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7732 * exceptions.c (print_flush): Handle a NULL target_stack.
7733 * regcache.c (target_ops_no_register): Refactor as class with
7736 * exec.c (exec_target): New class.
7737 (exec_ops): Now an exec_target.
7738 (exec_open, exec_close_1, exec_get_section_table)
7739 (exec_xfer_partial, exec_files_info, exec_has_memory)
7740 (exec_make_note_section): Refactor as exec_target methods.
7741 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7743 (exec_target::find_memory_regions): New.
7744 (_initialize_exec): Don't call init_exec_ops.
7745 * gdbcore.h (exec_file_clear): Delete.
7747 * corefile.c (core_target): Delete.
7748 (core_file_command): Adjust.
7749 * corelow.c (core_target): New class.
7750 (the_core_target): New.
7751 (core_close): Remove target_ops parameter.
7752 (core_close_cleanup): Adjust.
7753 (core_target::close): New.
7754 (core_open, core_detach, get_core_registers, core_files_info)
7755 (core_xfer_partial, core_thread_alive, core_read_description)
7756 (core_pid_to_str, core_thread_name, core_has_memory)
7757 (core_has_stack, core_has_registers, core_info_proc): Rework as
7758 core_target methods.
7759 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7760 (_initialize_corelow): Initialize the_core_target.
7761 * gdbcore.h (core_target): Delete.
7762 (the_core_target): New.
7764 * ctf.c: (ctf_target): New class.
7765 (ctf_ops): Now a ctf_target.
7766 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7767 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7768 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7770 (init_ctf_ops): Delete.
7771 (_initialize_ctf): Don't call it.
7772 * tracefile-tfile.c (tfile_target): New class.
7773 (tfile_ops): Now a tfile_target.
7774 (tfile_open, tfile_close, tfile_files_info)
7775 (tfile_get_tracepoint_status, tfile_trace_find)
7776 (tfile_fetch_registers, tfile_xfer_partial)
7777 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7778 Refactor as tfile_target methods.
7779 (tfile_xfer_partial_features): Remove target_ops parameter.
7780 (init_tfile_ops): Delete.
7781 (_initialize_tracefile_tfile): Don't call it.
7782 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7783 (tracefile_has_stack, tracefile_has_registers)
7784 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7785 tracefile_target methods.
7786 (init_tracefile_ops): Delete.
7787 (tracefile_target::tracefile_target): New.
7788 * tracefile.h: Include "target.h".
7789 (tracefile_target): New class.
7790 (init_tracefile_ops): Delete.
7792 * spu-multiarch.c (spu_multiarch_target): New class.
7793 (spu_ops): Now a spu_multiarch_target.
7794 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7795 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7796 (spu_search_memory, spu_mourn_inferior): Refactor as
7797 spu_multiarch_target methods.
7798 (init_spu_ops): Delete.
7799 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7800 complete_target_initialization.
7802 * ravenscar-thread.c (ravenscar_thread_target): New class.
7803 (ravenscar_ops): Now a ravenscar_thread_target.
7804 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7805 (ravenscar_thread_alive, ravenscar_pid_to_str)
7806 (ravenscar_fetch_registers, ravenscar_store_registers)
7807 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7808 (ravenscar_stopped_by_hw_breakpoint)
7809 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7810 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7811 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7813 (init_ravenscar_thread_ops): Delete.
7814 (_initialize_ravenscar): Remove references to
7815 init_ravenscar_thread_ops and complete_target_initialization.
7817 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7818 (bsd_uthread_target): New class.
7819 (bsd_uthread_ops): Now a bsd_uthread_target.
7820 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7821 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7822 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7823 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7824 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7825 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7826 (bsd_uthread_target): Delete function.
7827 (_initialize_bsd_uthread): Remove reference to
7828 complete_target_initialization.
7830 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7831 (target_bfd): ... this new class.
7832 (target_bfd_xfer_partial, target_bfd_get_section_table)
7833 (target_bfd_close): Refactor as target_bfd methods.
7834 (target_bfd::~target_bfd): New.
7835 (target_bfd_reopen): Adjust.
7836 (target_bfd::close): New.
7838 * record-btrace.c (record_btrace_target): New class.
7839 (record_btrace_ops): Now a record_btrace_target.
7840 (record_btrace_open, record_btrace_stop_recording)
7841 (record_btrace_disconnect, record_btrace_close)
7842 (record_btrace_async, record_btrace_info)
7843 (record_btrace_insn_history, record_btrace_insn_history_range)
7844 (record_btrace_insn_history_from, record_btrace_call_history)
7845 (record_btrace_call_history_range)
7846 (record_btrace_call_history_from, record_btrace_record_method)
7847 (record_btrace_is_replaying, record_btrace_will_replay)
7848 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7849 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7850 (record_btrace_store_registers, record_btrace_prepare_to_store)
7851 (record_btrace_to_get_unwinder)
7852 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7853 (record_btrace_commit_resume, record_btrace_wait)
7854 (record_btrace_stop, record_btrace_can_execute_reverse)
7855 (record_btrace_stopped_by_sw_breakpoint)
7856 (record_btrace_supports_stopped_by_sw_breakpoint)
7857 (record_btrace_stopped_by_hw_breakpoint)
7858 (record_btrace_supports_stopped_by_hw_breakpoint)
7859 (record_btrace_update_thread_list, record_btrace_thread_alive)
7860 (record_btrace_goto_begin, record_btrace_goto_end)
7861 (record_btrace_goto, record_btrace_stop_replaying_all)
7862 (record_btrace_execution_direction)
7863 (record_btrace_prepare_to_generate_core)
7864 (record_btrace_done_generating_core): Refactor as
7865 record_btrace_target methods.
7866 (init_record_btrace_ops): Delete.
7867 (_initialize_record_btrace): Remove reference to
7868 init_record_btrace_ops.
7869 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7870 the execution_direction global.
7871 (record_full_base_target, record_full_target)
7872 (record_full_core_target): New classes.
7873 (record_full_ops): Now a record_full_target.
7874 (record_full_core_ops): Now a record_full_core_target.
7875 (record_full_target::detach, record_full_target::disconnect)
7876 (record_full_core_target::disconnect)
7877 (record_full_target::mourn_inferior, record_full_target::kill):
7879 (record_full_open, record_full_close, record_full_async): Refactor
7880 as methods of the record_full_base_target class.
7881 (record_full_resume, record_full_commit_resume): Refactor
7882 as methods of the record_full_target class.
7883 (record_full_wait, record_full_stopped_by_watchpoint)
7884 (record_full_stopped_data_address)
7885 (record_full_stopped_by_sw_breakpoint)
7886 (record_full_supports_stopped_by_sw_breakpoint)
7887 (record_full_stopped_by_hw_breakpoint)
7888 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7889 methods of the record_full_base_target class.
7890 (record_full_store_registers, record_full_xfer_partial)
7891 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7892 Refactor as methods of the record_full_target class.
7893 (record_full_can_execute_reverse, record_full_get_bookmark)
7894 (record_full_goto_bookmark, record_full_execution_direction)
7895 (record_full_record_method, record_full_info, record_full_delete)
7896 (record_full_is_replaying, record_full_will_replay)
7897 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7898 (record_full_stop_replaying): Refactor as methods of the
7899 record_full_base_target class.
7900 (record_full_core_resume, record_full_core_kill)
7901 (record_full_core_fetch_registers)
7902 (record_full_core_prepare_to_store)
7903 (record_full_core_store_registers, record_full_core_xfer_partial)
7904 (record_full_core_insert_breakpoint)
7905 (record_full_core_remove_breakpoint)
7906 (record_full_core_has_execution): Refactor
7907 as methods of the record_full_core_target class.
7908 (record_full_base_target::supports_delete_record): New.
7909 (init_record_full_ops): Delete.
7910 (init_record_full_core_ops): Delete.
7911 (record_full_save): Refactor as method of the
7912 record_full_base_target class.
7913 (_initialize_record_full): Remove references to
7914 init_record_full_ops and init_record_full_core_ops.
7916 * remote.c (remote_target, extended_remote_target): New classes.
7917 (remote_ops): Now a remote_target.
7918 (extended_remote_ops): Now an extended_remote_target.
7919 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7920 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7921 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7922 (remote_pass_signals, remote_set_syscall_catchpoint)
7923 (remote_program_signals, )
7924 (remote_thread_always_alive): Remove target_ops parameter.
7925 (remote_thread_alive, remote_thread_name)
7926 (remote_update_thread_list, remote_threads_extra_info)
7927 (remote_static_tracepoint_marker_at)
7928 (remote_static_tracepoint_markers_by_strid)
7929 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7930 (remote_open): Refactor as methods of remote_target.
7931 (extended_remote_open, extended_remote_detach)
7932 (extended_remote_attach, extended_remote_post_attach):
7933 (extended_remote_supports_disable_randomization)
7934 (extended_remote_create_inferior): : Refactor as method of
7935 extended_remote_target.
7936 (remote_set_permissions, remote_open_1, remote_detach)
7937 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7938 (remote_resume, remote_commit_resume, remote_stop)
7939 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7940 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7941 (remote_prepare_to_store, remote_store_registers)
7942 (remote_flash_erase, remote_flash_done, remote_files_info)
7943 (remote_kill, remote_mourn, remote_insert_breakpoint)
7944 (remote_remove_breakpoint, remote_insert_watchpoint)
7945 (remote_watchpoint_addr_within_range)
7946 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7947 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7948 (remote_supports_stopped_by_sw_breakpoint)
7949 (remote_stopped_by_hw_breakpoint)
7950 (remote_supports_stopped_by_hw_breakpoint)
7951 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7952 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7953 (remote_verify_memory): Refactor as methods of remote_target.
7954 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7956 (remote_xfer_partial, remote_get_memory_xfer_limit)
7957 (remote_search_memory, remote_rcmd, remote_memory_map)
7958 (remote_pid_to_str, remote_get_thread_local_address)
7959 (remote_get_tib_address, remote_read_description): Refactor as
7960 methods of remote_target.
7961 (remote_target::fileio_open, remote_target::fileio_pwrite)
7962 (remote_target::fileio_pread, remote_target::fileio_close): New.
7963 (remote_hostio_readlink, remote_hostio_fstat)
7964 (remote_filesystem_is_local, remote_can_execute_reverse)
7965 (remote_supports_non_stop, remote_supports_disable_randomization)
7966 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7967 (remote_supports_enable_disable_tracepoint)
7968 (remote_supports_string_tracing)
7969 (remote_can_run_breakpoint_commands, remote_trace_init)
7970 (remote_download_tracepoint, remote_can_download_tracepoint)
7971 (remote_download_trace_state_variable, remote_enable_tracepoint)
7972 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7973 (remote_trace_start, remote_get_trace_status)
7974 (remote_get_tracepoint_status, remote_trace_stop)
7975 (remote_trace_find, remote_get_trace_state_variable_value)
7976 (remote_save_trace_data, remote_get_raw_trace_data)
7977 (remote_set_disconnected_tracing, remote_core_of_thread)
7978 (remote_set_circular_trace_buffer, remote_traceframe_info)
7979 (remote_get_min_fast_tracepoint_insn_len)
7980 (remote_set_trace_buffer_size, remote_set_trace_notes)
7981 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7982 (remote_disable_btrace, remote_teardown_btrace)
7983 (remote_read_btrace, remote_btrace_conf)
7984 (remote_augmented_libraries_svr4_read, remote_load)
7985 (remote_pid_to_exec_file, remote_can_do_single_step)
7986 (remote_execution_direction, remote_thread_handle_to_thread_info):
7987 Refactor as methods of remote_target.
7988 (init_remote_ops, init_extended_remote_ops): Delete.
7989 (remote_can_async_p, remote_is_async_p, remote_async)
7990 (remote_thread_events, remote_upload_tracepoints)
7991 (remote_upload_trace_state_variables): Refactor as methods of
7993 (_initialize_remote): Remove references to init_remote_ops and
7994 init_extended_remote_ops.
7996 * remote-sim.c (gdbsim_target): New class.
7997 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7998 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7999 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8000 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8001 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8002 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8003 Refactor as methods of gdbsim_target.
8004 (gdbsim_ops): Now a gdbsim_target.
8005 (init_gdbsim_ops): Delete.
8006 (gdbsim_cntrl_c): Adjust.
8007 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8009 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8010 (the_amd64_linux_nat_target): New.
8011 (amd64_linux_fetch_inferior_registers)
8012 (amd64_linux_store_inferior_registers): Refactor as methods of
8013 amd64_linux_nat_target.
8014 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8015 * i386-linux-nat.c: Don't include "linux-nat.h".
8016 (i386_linux_nat_target): New class.
8017 (the_i386_linux_nat_target): New.
8018 (i386_linux_fetch_inferior_registers)
8019 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8020 as methods of i386_linux_nat_target.
8021 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8022 * inf-child.c (inf_child_ops): Delete.
8023 (inf_child_fetch_inferior_registers)
8024 (inf_child_store_inferior_registers): Delete.
8025 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8026 methods of inf_child_target.
8027 (inf_child_target::supports_terminal_ours)
8028 (inf_child_target::terminal_init)
8029 (inf_child_target::terminal_inferior)
8030 (inf_child_target::terminal_ours_for_output)
8031 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8032 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8034 (inf_child_open, inf_child_disconnect, inf_child_close)
8035 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8036 (inf_child_post_startup_inferior, inf_child_can_run)
8037 (inf_child_pid_to_exec_file): Refactor as methods of
8039 (inf_child_follow_fork): Delete.
8040 (inf_child_target::can_create_inferior)
8041 (inf_child_target::can_attach): New.
8042 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8043 (inf_child_target::has_stack, inf_child_target::has_registers)
8044 (inf_child_target::has_execution): New.
8045 (inf_child_fileio_open, inf_child_fileio_pwrite)
8046 (inf_child_fileio_pread, inf_child_fileio_fstat)
8047 (inf_child_fileio_close, inf_child_fileio_unlink)
8048 (inf_child_fileio_readlink, inf_child_use_agent)
8049 (inf_child_can_use_agent): Refactor as methods of
8051 (return_zero, inf_child_target): Delete.
8052 (inf_child_target::inf_child_target): New.
8053 * inf-child.h: Include "target.h".
8054 (inf_child_target): Delete function prototype.
8055 (inf_child_target): New class.
8056 (inf_child_open_target, inf_child_mourn_inferior)
8057 (inf_child_maybe_unpush_target): Delete.
8058 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8059 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8060 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8061 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8062 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8063 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8064 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8065 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8066 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8067 methods of inf_ptrace_target.
8068 (inf_ptrace_target): Delete function.
8069 * inf-ptrace.h: Include "inf-child.h".
8070 (inf_ptrace_target): Delete function declaration.
8071 (inf_ptrace_target): New class.
8072 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8073 * linux-nat.c (linux_target): New.
8074 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8075 (linux_nat_target::~linux_nat_target): New.
8076 (linux_child_post_attach, linux_child_post_startup_inferior)
8077 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8078 (linux_child_remove_fork_catchpoint)
8079 (linux_child_insert_vfork_catchpoint)
8080 (linux_child_remove_vfork_catchpoint)
8081 (linux_child_insert_exec_catchpoint)
8082 (linux_child_remove_exec_catchpoint)
8083 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8084 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8085 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8086 (linux_nat_stopped_data_address)
8087 (linux_nat_stopped_by_sw_breakpoint)
8088 (linux_nat_supports_stopped_by_sw_breakpoint)
8089 (linux_nat_stopped_by_hw_breakpoint)
8090 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8091 (linux_nat_kill, linux_nat_mourn_inferior)
8092 (linux_nat_xfer_partial, linux_nat_thread_alive)
8093 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8094 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8095 (linux_child_static_tracepoint_markers_by_strid)
8096 (linux_nat_is_async_p, linux_nat_can_async_p)
8097 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8098 (linux_nat_supports_multi_process)
8099 (linux_nat_supports_disable_randomization, linux_nat_async)
8100 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8101 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8102 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8103 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8104 methods of linux_nat_target.
8105 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8106 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8108 (check_stopped_by_watchpoint): Adjust.
8109 (linux_xfer_partial): Delete.
8110 (linux_target_install_ops, linux_target, linux_nat_add_target):
8112 (linux_nat_target::linux_nat_target): New.
8113 * linux-nat.h: Include "inf-ptrace.h".
8114 (linux_nat_target): New.
8115 (linux_target, linux_target_install_ops, linux_nat_add_target):
8116 Delete function declarations.
8117 (linux_target): Declare global.
8118 * linux-thread-db.c (thread_db_target): New.
8119 (thread_db_target::thread_db_target): New.
8120 (thread_db_ops): Delete.
8121 (the_thread_db_target): New.
8122 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8123 (thread_db_update_thread_list, thread_db_pid_to_str)
8124 (thread_db_extra_thread_info)
8125 (thread_db_thread_handle_to_thread_info)
8126 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8127 (thread_db_resume): Refactor as methods of thread_db_target.
8128 (init_thread_db_ops): Delete.
8129 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8130 * x86-linux-nat.c: Don't include "linux-nat.h".
8131 (super_post_startup_inferior): Delete.
8132 (x86_linux_nat_target::~x86_linux_nat_target): New.
8133 (x86_linux_child_post_startup_inferior)
8134 (x86_linux_read_description, x86_linux_enable_btrace)
8135 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8136 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8137 methods of x86_linux_nat_target.
8138 (x86_linux_create_target): Delete. Bits folded ...
8139 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8141 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8142 (x86_linux_nat_target): New class.
8143 (x86_linux_create_target): Delete.
8144 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8145 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8146 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8147 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8148 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8149 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8151 (x86_use_watchpoints): Delete.
8152 * x86-nat.h: Include "breakpoint.h" and "target.h".
8153 (x86_use_watchpoints): Delete.
8154 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8155 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8156 (x86_insert_watchpoint, x86_remove_watchpoint)
8157 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8158 (x86_stopped_by_hw_breakpoint): New declarations.
8159 (x86_nat_target): New template class.
8161 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8162 (the_ppc_linux_nat_target): New.
8163 (ppc_linux_fetch_inferior_registers)
8164 (ppc_linux_can_use_hw_breakpoint)
8165 (ppc_linux_region_ok_for_hw_watchpoint)
8166 (ppc_linux_ranged_break_num_registers)
8167 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8168 (ppc_linux_insert_mask_watchpoint)
8169 (ppc_linux_remove_mask_watchpoint)
8170 (ppc_linux_can_accel_watchpoint_condition)
8171 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8172 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8173 (ppc_linux_watchpoint_addr_within_range)
8174 (ppc_linux_masked_watch_num_registers)
8175 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8176 (ppc_linux_read_description): Refactor as methods of
8177 ppc_linux_nat_target.
8178 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8180 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8181 (procfs_target): New class.
8182 (the_procfs_target): New.
8183 (procfs_target): Delete function.
8184 (procfs_auxv_parse, procfs_attach, procfs_detach)
8185 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8186 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8187 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8188 (procfs_create_inferior, procfs_update_thread_list)
8189 (procfs_thread_alive, procfs_pid_to_str)
8190 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8191 (procfs_stopped_data_address, procfs_insert_watchpoint)
8192 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8193 (proc_find_memory_regions, procfs_info_proc)
8194 (procfs_make_note_section): Refactor as methods of procfs_target.
8195 (_initialize_procfs): Adjust.
8196 * sol-thread.c (sol_thread_target): New class.
8197 (sol_thread_ops): Now a sol_thread_target.
8198 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8199 (sol_thread_fetch_registers, sol_thread_store_registers)
8200 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8201 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8202 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8203 (init_sol_thread_ops): Delete.
8204 (_initialize_sol_thread): Adjust. Remove references to
8205 init_sol_thread_ops and complete_target_initialization.
8207 * windows-nat.c (windows_nat_target): New class.
8208 (windows_fetch_inferior_registers)
8209 (windows_store_inferior_registers, windows_resume, windows_wait)
8210 (windows_attach, windows_detach, windows_pid_to_exec_file)
8211 (windows_files_info, windows_create_inferior)
8212 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8213 (windows_close, windows_pid_to_str, windows_xfer_partial)
8214 (windows_get_tib_address, windows_get_ada_task_ptid)
8215 (windows_thread_name, windows_thread_alive): Refactor as
8216 windows_nat_target methods.
8217 (do_initial_windows_stuff): Adjust.
8218 (windows_target): Delete function.
8219 (_initialize_windows_nat): Adjust.
8221 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8222 (darwin_mourn_inferior, darwin_kill_inferior)
8223 (darwin_create_inferior, darwin_attach, darwin_detach)
8224 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8225 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8226 (darwin_supports_multi_process): Refactor as darwin_nat_target
8228 (darwin_resume_to, darwin_files_info): Delete.
8229 (_initialize_darwin_inferior): Rename to ...
8230 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8231 * darwin-nat.h: Include "inf-child.h".
8232 (darwin_nat_target): New class.
8233 (darwin_complete_target): Delete.
8234 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8235 (darwin_target): New.
8236 (i386_darwin_fetch_inferior_registers)
8237 (i386_darwin_store_inferior_registers): Refactor as methods of
8239 (darwin_complete_target): Delete, with ...
8240 (_initialize_i386_darwin_nat): ... bits factored out here.
8242 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8243 (the_alpha_linux_nat_target): New.
8244 (alpha_linux_register_u_offset): Refactor as
8245 alpha_linux_nat_target method.
8246 (_initialize_alpha_linux_nat): Adjust.
8247 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8248 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8249 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8250 methods of linux_nat_trad_target.
8251 (linux_trad_target): Delete.
8252 * linux-nat-trad.h (linux_trad_target): Delete function.
8253 (linux_nat_trad_target): New class.
8254 * mips-linux-nat.c (mips_linux_nat_target): New class.
8255 (super_fetch_registers, super_store_registers, super_close):
8257 (the_mips_linux_nat_target): New.
8258 (mips64_linux_regsets_fetch_registers)
8259 (mips64_linux_regsets_store_registers)
8260 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8261 (mips_linux_register_u_offset, mips_linux_read_description)
8262 (mips_linux_can_use_hw_breakpoint)
8263 (mips_linux_stopped_by_watchpoint)
8264 (mips_linux_stopped_data_address)
8265 (mips_linux_region_ok_for_hw_watchpoint)
8266 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8267 (mips_linux_close): Refactor as methods of mips_linux_nat.
8268 (_initialize_mips_linux_nat): Adjust to C++ification.
8270 * aix-thread.c (aix_thread_target): New class.
8271 (aix_thread_ops): Now an aix_thread_target.
8272 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8273 (aix_thread_fetch_registers, aix_thread_store_registers)
8274 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8275 (aix_thread_thread_alive, aix_thread_pid_to_str)
8276 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8277 Refactor as methods of aix_thread_target.
8278 (init_aix_thread_ops): Delete.
8279 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8280 and complete_target_initialization.
8281 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8282 (rs6000_nat_target): New class.
8283 (the_rs6000_nat_target): New.
8284 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8285 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8286 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8287 (super_create_inferior): Delete.
8288 (_initialize_rs6000_nat): Adjust to C++ification.
8290 * arm-linux-nat.c (arm_linux_nat_target): New class.
8291 (the_arm_linux_nat_target): New.
8292 (arm_linux_fetch_inferior_registers)
8293 (arm_linux_store_inferior_registers, arm_linux_read_description)
8294 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8295 (arm_linux_remove_hw_breakpoint)
8296 (arm_linux_region_ok_for_hw_watchpoint)
8297 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8298 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8299 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8300 arm_linux_nat_target.
8301 (_initialize_arm_linux_nat): Adjust to C++ification.
8303 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8304 (the_aarch64_linux_nat_target): New.
8305 (aarch64_linux_fetch_inferior_registers)
8306 (aarch64_linux_store_inferior_registers)
8307 (aarch64_linux_child_post_startup_inferior)
8308 (aarch64_linux_read_description)
8309 (aarch64_linux_can_use_hw_breakpoint)
8310 (aarch64_linux_insert_hw_breakpoint)
8311 (aarch64_linux_remove_hw_breakpoint)
8312 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8313 (aarch64_linux_region_ok_for_hw_watchpoint)
8314 (aarch64_linux_stopped_data_address)
8315 (aarch64_linux_stopped_by_watchpoint)
8316 (aarch64_linux_watchpoint_addr_within_range)
8317 (aarch64_linux_can_do_single_step): Refactor as methods of
8318 aarch64_linux_nat_target.
8319 (super_post_startup_inferior): Delete.
8320 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8322 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8323 (the_hppa_linux_nat_target): New.
8324 (hppa_linux_fetch_inferior_registers)
8325 (hppa_linux_store_inferior_registers): Refactor as methods of
8326 hppa_linux_nat_target.
8327 (_initialize_hppa_linux_nat): Adjust to C++ification.
8329 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8330 (the_ia64_linux_nat_target): New.
8331 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8332 (ia64_linux_stopped_data_address)
8333 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8334 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8335 ia64_linux_nat_target methods.
8336 (super_xfer_partial): Delete.
8337 (_initialize_ia64_linux_nat): Adjust to C++ification.
8339 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8340 (the_m32r_linux_nat_target): New.
8341 (m32r_linux_fetch_inferior_registers)
8342 (m32r_linux_store_inferior_registers): Refactor as
8343 m32r_linux_nat_target methods.
8344 (_initialize_m32r_linux_nat): Adjust to C++ification.
8346 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8347 (the_m68k_linux_nat_target): New.
8348 (m68k_linux_fetch_inferior_registers)
8349 (m68k_linux_store_inferior_registers): Refactor as
8350 m68k_linux_nat_target methods.
8351 (_initialize_m68k_linux_nat): Adjust to C++ification.
8353 * s390-linux-nat.c (s390_linux_nat_target): New class.
8354 (the_s390_linux_nat_target): New.
8355 (s390_linux_fetch_inferior_registers)
8356 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8357 (s390_insert_watchpoint, s390_remove_watchpoint)
8358 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8359 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8360 (s390_auxv_parse, s390_read_description): Refactor as methods of
8361 s390_linux_nat_target.
8362 (_initialize_s390_nat): Adjust to C++ification.
8364 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8365 (the_sparc_linux_nat_target): New.
8366 (_initialize_sparc_linux_nat): Adjust to C++ification.
8367 * sparc-nat.c (sparc_fetch_inferior_registers)
8368 (sparc_store_inferior_registers): Remove target_ops parameter.
8369 * sparc-nat.h (sparc_fetch_inferior_registers)
8370 (sparc_store_inferior_registers): Remove target_ops parameter.
8371 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8372 (the_sparc64_linux_nat_target): New.
8373 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8375 * spu-linux-nat.c (spu_linux_nat_target): New class.
8376 (the_spu_linux_nat_target): New.
8377 (spu_child_post_startup_inferior, spu_child_post_attach)
8378 (spu_child_wait, spu_fetch_inferior_registers)
8379 (spu_store_inferior_registers, spu_xfer_partial)
8380 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8382 (_initialize_spu_nat): Adjust to C++ification.
8384 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8385 (the_tilegx_linux_nat_target): New.
8386 (fetch_inferior_registers, store_inferior_registers):
8387 Refactor as methods.
8388 (_initialize_tile_linux_nat): Adjust to C++ification.
8390 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8391 (the_xtensa_linux_nat_target): New.
8392 (xtensa_linux_fetch_inferior_registers)
8393 (xtensa_linux_store_inferior_registers): Refactor as
8394 xtensa_linux_nat_target methods.
8395 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8397 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8398 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8399 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8400 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8401 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8402 (fbsd_stopped_by_sw_breakpoint)
8403 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8404 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8405 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8406 (fbsd_post_startup_inferior, fbsd_post_attach)
8407 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8408 (fbsd_set_syscall_catchpoint)
8409 (super_xfer_partial, super_resume, super_wait)
8410 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8411 (fbsd_handle_debug_trap): Remove target_ops parameter.
8412 (fbsd_nat_add_target): Delete.
8413 * fbsd-nat.h: Include "inf-ptrace.h".
8414 (fbsd_nat_add_target): Delete.
8415 (USE_SIGTRAP_SIGINFO): Define.
8416 (fbsd_nat_target): New class.
8418 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8419 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8420 (amd64bsd_target): Delete.
8421 * amd64-bsd-nat.h: New file.
8422 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8424 (amd64_fbsd_nat_target): New class.
8425 (the_amd64_fbsd_nat_target): New.
8426 (amd64fbsd_read_description): Refactor as method of
8427 amd64_fbsd_nat_target.
8428 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8429 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8430 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8431 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8432 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8433 (i386bsd_target): Delete.
8434 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8435 (i386bsd_fetch_inferior_registers)
8436 (i386bsd_store_inferior_registers): Declare.
8437 (i386_bsd_nat_target): New class.
8438 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8439 (the_i386_fbsd_nat_target): New.
8440 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8441 i386_fbsd_nat_target methods.
8442 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8443 (_initialize_i386fbsd_nat): Adjust to C++ification.
8444 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8445 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8446 (_initialize_x86_bsd_nat): Adjust to C++ification.
8447 * x86-bsd-nat.h: Include "x86-nat.h".
8448 (x86bsd_target): Delete declaration.
8449 (x86bsd_nat_target): New class.
8451 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8452 (the_aarch64_fbsd_nat_target): New.
8453 (aarch64_fbsd_fetch_inferior_registers)
8454 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8455 aarch64_fbsd_nat_target.
8456 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8457 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8458 (the_alpha_bsd_nat_target): New.
8459 (alphabsd_fetch_inferior_registers)
8460 (alphabsd_store_inferior_registers): Refactor as
8461 alpha_bsd_nat_target methods.
8462 (_initialize_alphabsd_nat): Refactor as methods of
8463 alpha_bsd_nat_target.
8464 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8465 (the_amd64_nbsd_nat_target): New.
8466 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8467 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8468 (the_amd64_obsd_nat_target): New.
8469 (_initialize_amd64obsd_nat): Adjust to C++ification.
8470 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8471 (the_arm_fbsd_nat_target): New.
8472 (arm_fbsd_fetch_inferior_registers)
8473 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8474 (_initialize_arm_fbsd_nat): Refactor as methods of
8475 arm_fbsd_nat_target.
8476 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8477 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8478 (the_arm_netbsd_nat_target): New.
8479 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8480 arm_netbsd_nat_target.
8481 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8482 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8483 (the_hppa_nbsd_nat_target): New.
8484 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8485 hppa_nbsd_nat_target methods.
8486 (_initialize_hppanbsd_nat): Adjust to C++ification.
8487 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8488 (the_hppa_obsd_nat_target): New.
8489 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8490 methods of hppa_obsd_nat_target.
8491 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
8493 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8494 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
8496 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8497 (_initialize_i386obsd_nat): Use add_target.
8498 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8499 (the_m68k_bsd_nat_target): New.
8500 (m68kbsd_fetch_inferior_registers)
8501 (m68kbsd_store_inferior_registers): Refactor as methods of
8502 m68k_bsd_nat_target.
8503 (_initialize_m68kbsd_nat): Adjust to C++ification.
8504 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8505 (the_mips_fbsd_nat_target): New.
8506 (mips_fbsd_fetch_inferior_registers)
8507 (mips_fbsd_store_inferior_registers): Refactor as methods of
8508 mips_fbsd_nat_target.
8509 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
8511 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8512 (the_mips_nbsd_nat_target): New.
8513 (mipsnbsd_fetch_inferior_registers)
8514 (mipsnbsd_store_inferior_registers): Refactor as methods of
8515 mips_nbsd_nat_target.
8516 (_initialize_mipsnbsd_nat): Adjust to C++ification.
8517 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8518 (the_mips64_obsd_nat_target): New.
8519 (mips64obsd_fetch_inferior_registers)
8520 (mips64obsd_store_inferior_registers): Refactor as methods of
8521 mips64_obsd_nat_target.
8522 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
8524 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8526 * nbsd-nat.h: Include "inf-ptrace.h".
8527 (nbsd_nat_target): New class.
8528 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8529 (obsd_wait): Refactor as methods of obsd_nat_target.
8530 (obsd_add_target): Delete.
8531 * obsd-nat.h: Include "inf-ptrace.h".
8532 (obsd_nat_target): New class.
8533 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8534 (the_ppc_fbsd_nat_target): New.
8535 (ppcfbsd_fetch_inferior_registers)
8536 (ppcfbsd_store_inferior_registers): Refactor as methods of
8537 ppc_fbsd_nat_target.
8538 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
8540 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8541 (the_ppc_nbsd_nat_target): New.
8542 (ppcnbsd_fetch_inferior_registers)
8543 (ppcnbsd_store_inferior_registers): Refactor as methods of
8544 ppc_nbsd_nat_target.
8545 (_initialize_ppcnbsd_nat): Adjust to C++ification.
8546 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8547 (the_ppc_obsd_nat_target): New.
8548 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8549 methods of ppc_obsd_nat_target.
8550 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
8552 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8553 (the_sh_nbsd_nat_target): New.
8554 (shnbsd_fetch_inferior_registers)
8555 (shnbsd_store_inferior_registers): Refactor as methods of
8557 (_initialize_shnbsd_nat): Adjust to C++ification.
8558 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8559 (inf_ptrace_xfer_partial): Delete.
8560 (sparc_xfer_partial, sparc_target): Delete.
8561 * sparc-nat.h (sparc_fetch_inferior_registers)
8562 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8563 (sparc_target): Delete function declaration.
8564 (sparc_target): New template class.
8565 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8566 (_initialize_sparcnbsd_nat): Adjust to C++ification.
8567 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8568 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
8570 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8571 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8572 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8573 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
8575 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8576 (the_vax_bsd_nat_target): New.
8577 (vaxbsd_fetch_inferior_registers)
8578 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8580 (_initialize_vaxbsd_nat): Adjust to C++ification.
8582 * bsd-kvm.c (bsd_kvm_target): New class.
8583 (bsd_kvm_ops): Now a bsd_kvm_target.
8584 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8585 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8586 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8588 (bsd_kvm_return_one): Delete.
8589 (bsd_kvm_add_target): Adjust to C++ification.
8591 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8592 (nto_procfs_target_procfs): New classes.
8593 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8594 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8595 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8596 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8597 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8598 (procfs_remove_hw_breakpoint, procfs_resume)
8599 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8600 (procfs_kill_inferior, procfs_store_registers)
8601 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8602 as methods of nto_procfs_target.
8603 (nto_procfs_ops): Now an nto_procfs_target_procfs.
8604 (nto_native_ops): Delete.
8605 (procfs_open, procfs_native_open): Delete.
8606 (nto_native_ops): Now an nto_procfs_target_native.
8607 (init_procfs_targets): Adjust to C++ification.
8608 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8609 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8610 Refactor as methods of nto_procfs_target.
8612 * go32-nat.c (go32_nat_target): New class.
8613 (the_go32_nat_target): New.
8614 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8615 (go32_store_registers, go32_xfer_partial, go32_files_info)
8616 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8617 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8618 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8619 (go32_pid_to_str): Refactor as methods of go32_nat_target.
8620 (go32_target): Delete.
8621 (_initialize_go32_nat): Adjust to C++ification.
8623 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8624 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8625 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8626 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8628 (gnu_target): Delete.
8629 * gnu-nat.h (gnu_target): Delete.
8630 (gnu_nat_target): New class.
8631 * i386-gnu-nat.c (gnu_base_target): New.
8632 (i386_gnu_nat_target): New class.
8633 (the_i386_gnu_nat_target): New.
8634 (_initialize_i386gnu_nat): Adjust to C++ification.
8636 2018-05-02 Pedro Alves <palves@redhat.com>
8638 * bfd-target.c (target_bfd_xclose): Rename to ...
8639 (target_bfd_close): ... this.
8640 (target_bfd_reopen): Adjust.
8641 * target.c (target_close): Remove references to to_xclose.
8642 * target.h (target_ops::to_xclose): Delete.
8643 (target_ops::to_close): Update comments.
8645 2018-05-02 Pedro Alves <palves@redhat.com>
8647 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8649 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8650 * inf-ptrace.c (inf_ptrace_register_u_offset)
8651 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8652 (inf_ptrace_store_register, inf_ptrace_store_registers)
8653 (inf_ptrace_trad_target): Move to ...
8654 * linux-nat-trad.c: ... this new file.
8655 * linux-nat-trad.h: New file.
8656 * linux-nat.c (linux_target_install_ops): Make extern.
8657 (linux_trad_target): Delete.
8658 * linux-nat.h (linux_trad_target): Delete declaration.
8659 (linux_target_install_ops): Declare.
8660 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8663 2018-05-02 Pedro Alves <palves@redhat.com>
8665 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8666 procfs_target/add_target here.
8667 * procfs.c (procfs_target): Make static.
8668 (_initialize_procfs): Call add_target here.
8669 * procfs.h (struct target_ops): Remove forward declaration.
8670 (procfs_target): Remove declaration.
8671 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8673 2018-05-02 Pedro Alves <palves@redhat.com>
8675 * procfs.c (procfs_stopped_by_watchpoint)
8676 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8677 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8679 (procfs_use_watchpoints): Delete, move contents...
8680 (procfs_target): ... here.
8681 * procfs.h (procfs_use_watchpoints): Delete declaration.
8682 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8683 procfs_use_watchpoints.
8684 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8685 procfs_use_watchpoints.
8687 2018-05-02 Tom Tromey <tom@tromey.com>
8690 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8691 and var_zuinteger_unlimited.
8692 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8693 and PARAM_ZUINTEGER_UNLIMITED.
8694 (set_parameter_value): Handle var_zuinteger and
8695 var_zuinteger_unlimited.
8696 (add_setshow_generic): Likewise.
8697 (parmpy_init): Likewise.
8699 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8702 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8703 pointer is not null before dereferencing it.
8705 2018-04-30 Tom Tromey <tom@tromey.com>
8707 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8710 2018-04-30 Tom Tromey <tom@tromey.com>
8712 * breakpoint.c (mention): Remove use of is_mi_like_p.
8713 (print_mention_ranged_breakpoint): Likewise.
8714 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8717 2018-04-30 Tom Tromey <tom@tromey.com>
8719 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8721 2018-04-30 Tom Tromey <tom@tromey.com>
8723 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8724 (info_spu_event_command): Remove some uses of is_mi_like_p.
8726 2018-04-30 Tom Tromey <tom@tromey.com>
8728 * python/py-framefilter.c (py_print_single_arg)
8729 (enumerate_locals, py_print_args, py_print_frame): Remove some
8730 uses of is_mi_like_p.
8732 2018-04-30 Tom Tromey <tom@tromey.com>
8735 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8736 * ui-out.h (ui_out::is_mi_like_p): Now const.
8737 (ui_out::do_is_mi_like_p): Now const.
8738 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8740 2018-04-30 Tom Tromey <tom@tromey.com>
8742 * varobj.c (varobj_set_visualizer): Use new_reference.
8743 * python/python.c (gdbpy_decode_line): Use new_reference.
8744 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8747 2018-04-30 Tom Tromey <tom@tromey.com>
8749 * varobj.c (install_new_value): Use new_reference.
8750 * value.h (value_incref): Return void. Swap intro comment with
8752 * value.c (set_value_parent): Use new_reference.
8753 (value_incref): Return void. Update intro comment.
8754 (release_value): Use new_reference.
8755 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8757 2018-04-30 Tom Tromey <tom@tromey.com>
8759 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8760 * gdb_bfd.h (new_bfd_ref): Remove.
8761 (gdb_bfd_open): Update comment.
8762 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8763 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8764 (gdb_bfd_fdopenr): Use new_reference.
8765 * exec.c (exec_file_attach): Use new_reference.
8767 2018-04-30 Tom Tromey <tom@tromey.com>
8769 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8772 2018-04-30 Tom Tromey <tom@tromey.com>
8774 * jit.c (jit_read_code_entry): Use type_align.
8775 * i386-tdep.c (i386_gdbarch_init): Don't call
8776 set_gdbarch_long_long_align_bit.
8777 * gdbarch.sh: Remove long_long_align_bit.
8778 * gdbarch.c, gdbarch.h: Rebuild.
8779 * arc-tdep.c (arc_type_align): New function.
8780 (arc_gdbarch_init): Use arc_type_align. Don't call
8781 set_gdbarch_long_long_align_bit.
8783 2018-04-30 Tom Tromey <tom@tromey.com>
8785 * rust-lang.c (rust_type_alignment): Remove.
8786 (rust_composite_type): Use type_align.
8788 2018-04-30 Tom Tromey <tom@tromey.com>
8790 * NEWS: Mention Type.align.
8791 * python/py-type.c (typy_get_alignof): New function.
8792 (type_object_getset): Add "alignof".
8794 2018-04-30 Tom Tromey <tom@tromey.com>
8798 * std-operator.def (UNOP_ALIGNOF): New operator.
8799 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8801 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8802 * c-lang.c (c_op_print_tab): Add alignof.
8803 * c-exp.y (ALIGNOF): New token.
8804 (exp): Add "ALIGNOF" production.
8805 (ident_tokens): Add _Alignof and alignof.
8807 2018-04-30 Tom Tromey <tom@tromey.com>
8809 * i386-tdep.c (i386_type_align): New function.
8810 (i386_gdbarch_init): Update.
8811 * gdbarch.sh (type_align): New method.
8812 * gdbarch.c, gdbarch.h: Rebuild.
8813 * arch-utils.h (default_type_align): Declare.
8814 * arch-utils.c (default_type_align): New function.
8815 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8816 (struct type) <align_log2>: New field.
8817 <instance_flags>: Now a bitfield.
8818 (TYPE_RAW_ALIGN): New macro.
8819 (type_align, type_raw_align, set_type_align): Declare.
8820 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8822 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8823 (get_alignment, maybe_set_alignment): New functions.
8824 (read_structure_type, read_enumeration_type, read_array_type)
8825 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8826 (read_subrange_type, read_base_type): Set type alignment.
8828 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8830 * dwarf2read.c (read_index_from_section): Use bool.
8832 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8835 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8838 2018-04-29 John Reiser <jreiser@BitWagon.com>
8841 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8842 last step, and do it atomically.
8844 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8846 * compile/compile-c-types.c (convert_int, convert_float):
8849 2018-04-27 Tom Tromey <tom@tromey.com>
8852 * rust-lang.c (rust_inclusive_range_type_p): New function.
8853 (rust_range): Handle inclusive ranges.
8854 (rust_compute_range): Likewise.
8855 * rust-exp.y (struct rust_op) <inclusive>: New field.
8856 (DOTDOTEQ): New constant.
8857 (range_expr): Add "..=" productions.
8858 (operator_tokens): Add "..=" token.
8859 (ast_range): Add "inclusive" parameter.
8860 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8862 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8864 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8865 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8867 * expprint.c (print_subexp_standard): Handle new bounds values.
8868 (dump_subexp_body_standard): Likewise.
8870 2018-04-27 Tom Tromey <tom@tromey.com>
8872 * configure: Rebuild.
8873 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8874 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8876 (class symbol_needs_eval_context): Likewise.
8877 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8878 (mock_mapped_index::symbol_name_at): Use "override". Remove
8880 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8882 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8883 * aarch64-tdep.c (instruction_reader::read): Use "override".
8884 (instruction_reader_test::read): Likewise.
8885 * arm-tdep.c (instruction_reader::read): Use "override".
8886 (instruction_reader_thumb::read): Likewise.
8888 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8891 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8892 instead of remote_send.
8893 (remote_send): Remove.
8895 2018-04-26 Pedro Alves <palves@redhat.com>
8897 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8898 find_function_start_sal instead of find_pc_line.
8900 2018-04-26 Pedro Alves <palves@redhat.com>
8902 * breakpoint.c (set_breakpoint_location_function): Handle
8904 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8905 * elfread.c (elf_symtab_read): Give data symbols with
8906 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8907 (elf_rel_plt_read): Update comment.
8908 * linespec.c (convert_linespec_to_sals): Handle
8910 (minsym_found): Handle mst_data_gnu_ifunc.
8911 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8912 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8913 * parse.c (find_minsym_type_and_address): Handle
8915 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8916 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8917 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8919 <mst_data_gnu_ifunc>: New enumerator.
8921 2018-04-26 Pedro Alves <palves@redhat.com>
8923 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8924 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8925 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8927 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8928 (lookup_minimal_symbol_by_pc): Adjust.
8929 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8930 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8931 * minsyms.h (lookup_msym_prefer): New enum.
8932 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8933 parameter by a lookup_msym_prefer parameter.
8935 2018-04-26 Pedro Alves <palves@redhat.com>
8937 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8938 ends in "@plt" instead of looking at the symbol's section.
8940 2018-04-26 Pedro Alves <palves@redhat.com>
8942 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8944 (find_pc_partial_function_gnu_ifunc): Rename to ...
8945 (find_pc_partial_function): ... this, and remove references to
8947 (find_pc_partial_function): Delete old implementation.
8948 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8950 2018-04-26 Pedro Alves <palves@redhat.com>
8952 * linespec.c (struct bound_minimal_symbol_search_key): New.
8953 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8954 skip first line if we found a GNU ifunc minimal symbol by name.
8955 (compare_msymbols): Change parameters to work with a destructured
8957 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8960 2018-04-26 Pedro Alves <palves@redhat.com>
8962 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8963 ifunc targets here. Instead, if we have an ifunc minsym, use its
8965 (add_location_to_breakpoint): Store the minsym and the objfile in
8966 the breakpoint location.
8967 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8968 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8969 Record the minsym in the sal.
8970 * symtab.h (symtab_and_line) <msymbol>: New field.
8972 2018-04-26 Pedro Alves <palves@redhat.com>
8974 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8975 unless we actually resolved the ifunc.
8977 2018-04-26 Pedro Alves <palves@redhat.com>
8979 * c-exp.y (variable production): Prefer ifunc minsyms over
8980 regular function symbols.
8981 * symtab.c (find_gnu_ifunc): New function.
8982 * minsyms.h (lookup_msym_prefer): New enum.
8983 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8984 parameter by a lookup_msym_prefer parameter.
8985 * symtab.h (find_gnu_ifunc): New declaration.
8987 2018-04-26 Pedro Alves <palves@redhat.com>
8989 * blockframe.c (find_gnu_ifunc_target_type): New function.
8990 (find_function_type): New.
8991 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8992 return a value with a memory address.
8993 (eval_call): For calls to GNU ifunc functions, try to find the
8994 type of the target function from the type that the resolver
8996 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8998 * infcall.c (find_function_return_type): Delete.
8999 (find_function_addr): Add 'function_type' parameter. For calls to
9000 GNU ifunc functions, try to find the type of the target function
9001 from the type that the resolver returns, and return it via
9003 (call_function_by_hand_dummy): Adjust to use the function type
9004 returned by find_function_addr.
9005 (find_function_addr): Add 'function_type' parameter and move
9007 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9010 2018-04-26 Pedro Alves <palves@redhat.com>
9012 * c-exp.y (variable production): Skip finding an alias for ifunc
9015 2018-04-26 Pedro Alves <palves@redhat.com>
9017 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9019 2018-04-25 Pedro Alves <palves@redhat.com>
9021 * infcmd.c (kill_command): Print the pid as string, not the whole
9022 thread's ptid. Add comment. s/has been killed/killed/ in output
9024 * remote.c (remote_detach_1): Print the pid as string, not the
9025 whole thread's ptid.
9027 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9028 Sergio Durigan Junior <sergiodj@redhat.com>
9029 Pedro Alves <palves@redhat.com>
9031 * infcmd.c (kill_command): Print message when inferior has
9033 * inferior.c (print_inferior_events): Remove 'static'. Set as
9035 (add_inferior): Improve message printed when
9036 'print_inferior_events' is on.
9037 (exit_inferior): Remove message printed when
9038 'print_inferior_events' is on.
9039 (detach_inferior): Improve message printed when
9040 'print_inferior_events' is on.
9041 (initialize_inferiors): Use 'add_inferior_silent' to set
9042 'current_inferior_'.
9043 * inferior.h (print_inferior_events): Declare here as
9045 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9046 '[Detaching...]' messages when 'print_inferior_events' is on.
9047 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9048 as prefix/suffix for messages. Remove periods. Fix erroneous
9049 'Detaching after fork from child...', replace it by '... from
9051 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9052 prefix/suffix when printing 'Detaching...' messages. Print
9053 them when 'print_inferior_events' is on.
9054 * remote.c (remote_detach_1): Print message when detaching
9055 from inferior and '!is_fork_parent'.
9057 2018-04-24 Tom Tromey <tom@tromey.com>
9059 * cli-out.h: Reindent.
9061 2018-04-24 Tom Tromey <tom@tromey.com>
9063 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9064 (cli_ui_out::do_field_string): Use fputs_filtered.
9065 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9067 2018-04-23 Tom Tromey <tom@tromey.com>
9069 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9070 gdb::unique_xmalloc_ptr.
9072 2018-04-23 Tom Tromey <tom@tromey.com>
9074 * configure: Rebuild.
9076 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9079 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9080 prepare_for_testing. Set normal_bp to r_debug_state if target
9083 2018-04-21 Pedro Alves <palves@redhat.com>
9084 Rajendra SY <rajendra.sy@gmail.com>
9086 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9087 * remote.c (extended_remote_attach): In all-stop mode, mark the
9088 thread as executing.
9090 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9092 * thread.c (thread_apply_all_command): Fix comment.
9093 (thread_command): Fix comment.
9095 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9097 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9099 * features/aarch64-core.c (create_feature_aarch64_core):
9101 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9103 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9105 * features/i386/32bit-avx512.c
9106 (create_feature_i386_32bit_avx512): Likewise.
9107 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9109 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9111 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9113 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9115 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9117 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9119 * features/i386/64bit-avx512.c
9120 (create_feature_i386_64bit_avx512): Likewise.
9121 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9123 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9125 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9127 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9129 * features/i386/64bit-segments.c
9130 (create_feature_i386_64bit_segments): Likewise.
9131 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9133 * features/i386/x32-core.c
9134 (create_feature_i386_x32_core): Likewise.
9135 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9136 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9137 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9138 * target-descriptions.c: In generated code, don't pass xml
9141 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9143 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9144 (print_xml_feature::visit_post): Likewise.
9145 (print_xml_feature::visit): Likewise.
9146 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9147 (print_xml_feature): Add new class.
9148 * regformats/regdat.sh: Null xmltarget on feature targets.
9149 * target-descriptions.c (struct target_desc): Add xmltarget.
9150 (maintenance_check_tdesc_xml_convert): Add unittest function.
9151 (tdesc_get_features_xml): Add function to get xml.
9152 (maintenance_check_xml_descriptions): Test xml generation.
9153 * xml-tdesc.c (string_read_description_xml): Add function.
9154 * xml-tdesc.h (string_read_description_xml): Add declaration.
9156 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9158 * features/Makefile: Add feature marker to targets with new style
9159 target descriptions.
9160 * regformats/aarch64.dat: Regenerate.
9161 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9162 * regformats/i386/amd64-avx-linux.dat: Likewise.
9163 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9164 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9165 * regformats/i386/amd64-linux.dat: Likewise.
9166 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9167 * regformats/i386/amd64.dat: Likewise.
9168 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9169 * regformats/i386/i386-avx-linux.dat: Likewise.
9170 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9171 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9172 * regformats/i386/i386-linux.dat: Likewise.
9173 * regformats/i386/i386-mmx-linux.dat: Likewise.
9174 * regformats/i386/i386-mpx-linux.dat: Likewise.
9175 * regformats/i386/i386.dat: Likewise.
9176 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9177 * regformats/i386/x32-avx-linux.dat: Likewise.
9178 * regformats/i386/x32-linux.dat: Likewise.
9179 * regformats/tic6x-c62x-linux.dat: Likewise.
9180 * regformats/tic6x-c64x-linux.dat: Likewise.
9181 * regformats/tic6x-c64xp-linux.dat: Likewise.
9182 * regformats/regdat.sh: Parse feature marker.
9184 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9186 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9187 (tdesc_osabi_name): Likewise.
9188 * target-descriptions.c (tdesc_architecture_name): Add new
9190 (tdesc_osabi_name): Likewise.
9192 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9194 * common/tdesc.c (tdesc_predefined_type): Move to here.
9195 (tdesc_named_type): Likewise.
9196 (tdesc_create_vector): Likewise.
9197 (tdesc_create_struct): Likewise.
9198 (tdesc_set_struct_size): Likewise.
9199 (tdesc_create_union): Likewise.
9200 (tdesc_create_flags): Likewise.
9201 (tdesc_create_enum): Likewise.
9202 (tdesc_add_field): Likewise.
9203 (tdesc_add_typed_bitfield): Likewise.
9204 (tdesc_add_bitfield): Likewise.
9205 (tdesc_add_flag): Likewise.
9206 (tdesc_add_enum_value): Likewise.
9207 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9208 (struct tdesc_type_vector): Likewise.
9209 (struct tdesc_type_field): Likewise.
9210 (struct tdesc_type_with_fields): Likewise.
9211 (tdesc_create_enum): Add declaration.
9212 (tdesc_add_typed_bitfield): Likewise.
9213 (tdesc_add_enum_value): Likewise.
9214 * target-descriptions.c (tdesc_type_field): Move from here.
9215 (tdesc_type_builtin): Likewise.
9216 (tdesc_type_vector): Likewise.
9217 (tdesc_type_with_fields): Likewise.
9218 (tdesc_predefined_types): Likewise.
9219 (tdesc_named_type): Likewise.
9220 (tdesc_create_vector): Likewise.
9221 (tdesc_create_struct): Likewise.
9222 (tdesc_set_struct_size): Likewise.
9223 (tdesc_create_union): Likewise.
9224 (tdesc_create_flags): Likewise.
9225 (tdesc_create_enum): Likewise.
9226 (tdesc_add_field): Likewise.
9227 (tdesc_add_typed_bitfield): Likewise.
9228 (tdesc_add_bitfield): Likewise.
9229 (tdesc_add_flag): Likewise.
9230 (tdesc_add_enum_value): Likewise.
9231 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9232 (tdesc_add_typed_bitfield): Likewise.
9233 (tdesc_add_enum_value): Likewise.
9235 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9237 * common/tdesc.c (tdesc_feature::accept): Move to here.
9238 (tdesc_feature::operator==): Likewise.
9239 (tdesc_create_reg): Likewise.
9240 * common/tdesc.h (tdesc_type_kind): Likewise.
9241 (struct tdesc_type): Likewise.
9242 (struct tdesc_feature): Likewise.
9243 * regformats/regdat.sh: Create a feature.
9244 * target-descriptions.c (tdesc_type_kind): Move from here.
9245 (tdesc_type): Likewise.
9246 (tdesc_type_up): Likewise.
9247 (tdesc_feature): Likewise.
9248 (tdesc_create_reg): Likewise.
9250 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9252 * Makefile.in: Add arch/tdesc.c
9253 * common/tdesc.c: New file.
9254 * common/tdesc.h (tdesc_element_visitor): Move to here.
9255 (tdesc_element): Likewise.
9256 (tdesc_reg): Likewise.
9257 (tdesc_reg_up): Likewise.
9258 * regformats/regdef.h (reg): Add offset to constructors.
9259 * target-descriptions.c (tdesc_element_visitor): Move from here.
9260 (tdesc_element): Likewise.
9261 (tdesc_reg): Likewise.
9262 (tdesc_reg_up): Likewise.
9264 2018-04-17 Tom Tromey <tom@tromey.com>
9266 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9269 2018-04-17 Tom Tromey <tom@tromey.com>
9271 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9273 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9275 * symtab.c (print_symbol_info): Skip printing filename and line
9276 number when `last' is NULL.
9277 (symtab_symbol_info): Use empty string instead of NULL for first
9278 invocation of print_symbol_info.
9279 (rbreak_command): Pass NULL to `last' parameter of
9282 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9284 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9287 2018-04-16 Pedro Alves <palves@redhat.com>
9289 * MAINTAINERS (sh): Remove.
9290 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9291 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9292 (ALLDEPFILES): Remove sh64-tdep.c.
9293 * NEWS: Mentions that support for SH-5/SH64 is removed.
9294 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9295 (sh*-*-openbsd*): Ditto.
9296 (sh64-*-elf*): Remove.
9298 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9299 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9300 * sh-tdep.c: No longer include "sh64-tdep.h".
9301 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9302 * sh64-tdep.c, sh64-tdep.h: Remove files.
9304 2018-04-16 Pedro Alves <palves@redhat.com>
9306 * MAINTAINERS: Remove m88k.
9307 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9308 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9309 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9310 * NEWS: Mention that support for m88k was removed.
9311 * configure.host (m88*-*-*): Remove support.
9312 * configure.nat (m88k-*-*): Remove support.
9313 * configure.tgt (m88*-*-openbsd*): Remove.
9314 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9316 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9318 * configure.tgt (x86_tobjs): New variable.
9319 (amd64_tobjs, i386_tobjs): Use it.
9321 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9323 * symtab.c (print_symbol_info): Precede the symbol definition by
9324 the line number when available.
9325 * NEWS: Advertise this enhancement.
9327 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9329 * NEWS (New options): announce set/show record btrace cpu.
9330 * btrace.c: Include record-btrace.h.
9331 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9332 the vendor is unknown.
9333 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9334 Maybe overwrite the btrace configuration's cpu.
9335 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9336 (btrace_fetch): Add cpu parameter. Update callers.
9337 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9338 Maybe overwrite the btrace configuration's cpu. Skip enabling
9339 errata workarounds if the vendor is unknown.
9340 * python/py-record-btrace.c: Include record-btrace.h.
9341 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9342 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9343 * record-btrace.c (record_btrace_cpu_state_kind): New.
9344 (record_btrace_cpu): New.
9345 (set_record_btrace_cpu_cmdlist): New.
9346 (record_btrace_get_cpu): New.
9347 (require_btrace_thread, record_btrace_info)
9348 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9349 (cmd_set_record_btrace_cpu_none): New.
9350 (cmd_set_record_btrace_cpu_auto): New.
9351 (cmd_set_record_btrace_cpu): New.
9352 (cmd_show_record_btrace_cpu): New.
9353 (_initialize_record_btrace): Initialize set/show record btrace cpu
9355 * record-btrace.h (record_btrace_get_cpu): New.
9357 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9359 * record.c (set_record_command): Fix typo in message.
9361 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9363 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9365 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9367 * infrun.c (process_event_stop_test): Call
9368 gdbarch_in_indirect_branch_thunk.
9369 * gdbarch.sh (in_indirect_branch_thunk): New.
9370 * gdbarch.c: Regenerated.
9371 * gdbarch.h: Regenerated.
9374 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9375 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9376 (ALLDEPFILES): Add x86-tdep.c.
9377 * arch-utils.h (default_in_indirect_branch_thunk): New.
9378 * arch-utils.c (default_in_indirect_branch_thunk): New.
9379 * i386-tdep: Include x86-tdep.h.
9380 (i386_in_indirect_branch_thunk): New.
9381 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9383 * amd64-tdep: Include x86-tdep.h.
9384 (amd64_in_indirect_branch_thunk): New.
9385 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9387 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9390 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9391 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9392 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9395 2018-04-12 Tom Tromey <tom@tromey.com>
9397 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9398 (rust_evaluate_subexp): Likewise.
9400 2018-04-12 Pedro Alves <palves@redhat.com>
9402 * procfs.c (procfs_detach): Make forward declaration's prototype
9403 match definition's protototype.
9404 (proc_get_LDT_entry): Remove stale do_cleanups call.
9406 2018-04-12 Pedro Alves <palves@redhat.com>
9408 * target.h (target_ops::to_has_exited): Delete.
9409 (target_has_exited): Delete.
9410 * target-delegates.c: Regenerate.
9412 2018-04-11 Pedro Alves <palves@redhat.com>
9414 * target.c (fileio_fh_t::t): Add comment.
9415 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9416 (target_fileio_close): Handle a NULL target.
9417 (invalidate_fileio_fh): New.
9418 (target_close): Call it.
9419 * remote.c (remote_hostio_send_command): No longer check whether
9420 remote_desc is open.
9422 2018-04-11 Pedro Alves <palves@redhat.com>
9424 * target.c (fileio_fh_t): Make it a named struct instead of a
9426 (fileio_fh_t::is_closed): New method.
9427 (DEF_VEC_O (fileio_fh_t)): Remove.
9428 (fileio_fhandles): Now a std::vector.
9429 (is_closed_fileio_fh): Delete.
9430 (acquire_fileio_fd): Adjust. Rename parameters.
9431 (release_fileio_fd): Adjust.
9432 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9433 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9434 (target_fileio_close): Adjust.
9436 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
9438 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9441 2018-04-10 Pedro Alves <palves@redhat.com>
9443 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9444 (scoped_finish_thread_state): New class.
9445 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9447 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9448 (fetch_inferior_event, normal_stop): Likewise.
9449 * thread.c (finish_thread_state_cleanup): Delete.
9451 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9452 Pedro Alves <palves@redhat.com>
9454 * value.c: Include "selftest.h" and "common/array-view.h".
9455 (struct range) <operator ==>: New.
9456 (test_ranges_contain): New.
9457 (check_ranges_vector): New.
9458 (test_insert_into_bit_range_vector): New.
9459 (_initialize_values): Register selftests.
9460 * common/array-view.h (operator==, operator!=): New.
9462 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9464 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9466 * inline-frame.c: Include <algorithm>.
9467 (struct inline_state): Add constructor.
9468 (inline_state_s): Remove.
9469 (DEF_VEC_O(inline_state_s)): Remove.
9470 (inline_states): Change type to std::vector.
9471 (find_inline_frame_state): Adjust to std::vector.
9472 (allocate_inline_frame_state): Remove.
9473 (clear_inline_frame_state): Adjust to std::vector.
9474 (skip_inline_frames): Adjust to std::vector.
9476 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9478 * tracepoint.h (struct trace_state_variable): Add constructor.
9479 <name>: Change type to std::string.
9480 * tracepoint.c (tsv_s): Remove.
9481 (DEF_VEC_O(tsv_s)): Remove.
9482 (tvariables): Change to std::vector.
9483 (create_trace_state_variable): Adjust to std::vector.
9484 (find_trace_state_variable): Likewise.
9485 (find_trace_state_variable_by_number): Likewise.
9486 (delete_trace_state_variable): Likewise.
9487 (trace_variable_command): Adjust to std::string.
9488 (delete_trace_variable_command): Likewise.
9489 (tvariables_info_1): Adjust to std::vector.
9490 (save_trace_state_variables): Likewise.
9491 (start_tracing): Likewise.
9492 (merge_uploaded_trace_state_variables): Adjust to std::vector
9494 * target.h (struct target_ops)
9495 <to_download_trace_state_variable>: Pass reference to
9496 trace_state_variable.
9497 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9498 * target-delegates.c: Re-generate.
9499 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9500 (mi_tsv_deleted): Likewise.
9501 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9502 * remote.c (remote_download_trace_state_variable): Change
9503 pointer to reference and adjust.
9504 * make-target-delegates (parse_argtypes): Handle references.
9505 (write_function_header): Likewise.
9506 (munge_type): Likewise.
9508 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9510 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9511 string_view-selftests.c.
9512 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9514 * unittests/basic_string_view/cons/char/1.cc: Likewise.
9515 * unittests/basic_string_view/cons/char/2.cc: Likewise.
9516 * unittests/basic_string_view/cons/char/3.cc: Likewise.
9517 * unittests/basic_string_view/element_access/char/1.cc:
9519 * unittests/basic_string_view/element_access/char/empty.cc:
9521 * unittests/basic_string_view/element_access/char/front_back.cc:
9523 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9524 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9526 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9528 * unittests/basic_string_view/modifiers/swap/char/1.cc:
9530 * unittests/basic_string_view/operations/compare/char/1.cc:
9532 * unittests/basic_string_view/operations/compare/char/13650.cc:
9534 * unittests/basic_string_view/operations/copy/char/1.cc:
9536 * unittests/basic_string_view/operations/data/char/1.cc:
9538 * unittests/basic_string_view/operations/find/char/1.cc:
9540 * unittests/basic_string_view/operations/find/char/2.cc:
9542 * unittests/basic_string_view/operations/find/char/3.cc:
9544 * unittests/basic_string_view/operations/find/char/4.cc:
9546 * unittests/basic_string_view/operations/rfind/char/1.cc:
9548 * unittests/basic_string_view/operations/rfind/char/2.cc:
9550 * unittests/basic_string_view/operations/rfind/char/3.cc:
9552 * unittests/basic_string_view/operations/substr/char/1.cc:
9554 * unittests/basic_string_view/operators/char/2.cc: Likewise.
9555 * unittests/string_view-selftests.c: New file.
9557 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9559 * unittests/basic_string_view/capacity/1.cc: New file.
9560 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9561 * unittests/basic_string_view/cons/char/1.cc: New file.
9562 * unittests/basic_string_view/cons/char/2.cc: New file.
9563 * unittests/basic_string_view/cons/char/3.cc: New file.
9564 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9565 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9566 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9567 * unittests/basic_string_view/element_access/char/1.cc: New file.
9568 * unittests/basic_string_view/element_access/char/2.cc: New file.
9569 * unittests/basic_string_view/element_access/char/empty.cc: New file.
9570 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9571 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9572 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9573 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9574 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9575 * unittests/basic_string_view/include.cc: New file.
9576 * unittests/basic_string_view/inserters/char/1.cc: New file.
9577 * unittests/basic_string_view/inserters/char/2.cc: New file.
9578 * unittests/basic_string_view/inserters/char/3.cc: New file.
9579 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9580 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9581 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9582 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9583 * unittests/basic_string_view/literals/types.cc: New file.
9584 * unittests/basic_string_view/literals/values.cc: New file.
9585 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9586 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9587 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9588 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9589 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9590 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9591 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9592 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9593 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9594 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9595 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9596 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9597 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9598 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9599 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9600 * unittests/basic_string_view/operations/data/char/1.cc: New file.
9601 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9602 * unittests/basic_string_view/operations/find/char/1.cc: New file.
9603 * unittests/basic_string_view/operations/find/char/2.cc: New file.
9604 * unittests/basic_string_view/operations/find/char/3.cc: New file.
9605 * unittests/basic_string_view/operations/find/char/4.cc: New file.
9606 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9607 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9608 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9609 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9610 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9611 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9612 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9613 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9614 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9615 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9616 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9617 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9618 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9619 * unittests/basic_string_view/operators/char/2.cc: New file.
9620 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9621 * unittests/basic_string_view/range_access/char/1.cc: New file.
9622 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9623 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9624 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9625 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9626 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9627 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9628 * unittests/basic_string_view/requirements/typedefs.cc: New file.
9629 * unittests/basic_string_view/typedefs.cc: New file.
9630 * unittests/basic_string_view/types/1.cc: New file.
9632 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9634 * common/gdb_string_view.h: Remove libstdc++ implementation
9635 details, adjust to gdb reality.
9636 * common/gdb_string_view.tcc: Likewise.
9637 * cli/cli-script.c (struct string_view): Remove.
9638 (user_args) <m_args>: Change element type to gdb::string_view.
9639 (user_args::insert_args): Adjust.
9641 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9643 * common/gdb_string_view.h: New file.
9644 * common/gdb_string_view.tcc: New file.
9646 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9648 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9649 * configure: Re-generate.
9651 2018-04-09 Pedro Alves <palves@redhat.com>
9653 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9654 (set_target_gdbarch): Call
9655 gdb::observers::architecture_changed.notify instead of
9656 observer_notify_architecture_changed.
9658 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9660 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9661 (do_restore_current_traceframe_cleanup): Remove.
9662 (restore_current_traceframe_cleanup_dtor): Remove.
9663 (make_cleanup_restore_current_traceframe): Remove.
9664 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9666 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9667 * infrun.c (fetch_inferior_event): Use
9668 scoped_restore_current_traceframe.
9670 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9672 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9674 <n_allocated_type_units>: Remove.
9675 <all_type_units>: Change to std::vector.
9676 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9677 to std::vector change.
9678 (dwarf2_per_objfile::get_cutu): Likewise.
9679 (dwarf2_per_objfile::get_tu): Likewise.
9680 (create_signatured_type_table_from_index): Likewise.
9681 (create_signatured_type_table_from_debug_names): Likewise.
9682 (dw2_symtab_iter_next): Likewise.
9683 (dw2_print_stats): Likewise.
9684 (dw2_expand_all_symtabs): Likewise.
9685 (dw2_expand_marked_cus): Likewise.
9686 (dw2_debug_names_iterator::next): Likewise.
9687 (dwarf2_initialize_objfile): Likewise.
9688 (add_signatured_type_cu_to_table): Likewise.
9689 (create_all_type_units): Likewise.
9690 (add_type_unit): Likewise.
9691 (struct tu_abbrev_offset): Add constructor.
9692 (build_type_psymtabs_1): Adjust to std::vector change.
9693 (print_tu_stats): Likewise.
9694 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9695 (write_debug_names): Likewise.
9697 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9699 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9700 Make an std::vector.
9701 <n_comp_units>: Remove.
9702 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9703 to std::vector change.
9704 (dwarf2_per_objfile::get_cutu): Likewise.
9705 (dwarf2_per_objfile::get_cu): Likewise.
9706 (create_cus_from_index): Likewise.
9707 (create_addrmap_from_index): Likewise.
9708 (create_addrmap_from_aranges): Likewise.
9709 (dwarf2_read_index): Likewise.
9710 (dw2_find_last_source_symtab): Likewise.
9711 (dw2_map_symtabs_matching_filename): Likewise.
9712 (dw2_symtab_iter_next): Likewise.
9713 (dw2_print_stats): Likewise.
9714 (dw2_expand_all_symtabs): Likewise.
9715 (dw2_expand_symtabs_with_fullname): Likewise.
9716 (dw2_expand_marked_cus): Likewise.
9717 (dw2_map_symbol_filenames): Likewise.
9718 (create_cus_from_debug_names): Likewise.
9719 (dwarf2_read_debug_names): Likewise.
9720 (dw2_debug_names_iterator::next): Likewise.
9721 (dwarf2_initialize_objfile): Likewise.
9722 (set_partial_user): Likewise.
9723 (dwarf2_build_psymtabs_hard): Likewise.
9724 (read_comp_units_from_section): Remove arguments, adjust to
9726 (create_all_comp_units): Adjust to std::vector and
9727 read_comp_units_from_section changes.
9728 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9730 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9731 (psyms_seen_size): Likewise.
9732 (write_gdbindex): Likewise.
9733 (write_debug_names): Likewise.
9735 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9737 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9738 with dwarf2_per_objfile.
9739 (create_cus_from_index): Likewise.
9740 (create_signatured_type_table_from_index): Likewise.
9741 (dwarf2_read_index): Likewise.
9742 (dwarf2_initialize_objfile): Likewise.
9743 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9744 per_cu rather than get_dwarf2_per_objfile.
9746 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9748 * dwarf2read.h (struct signatured_type): Forward declare.
9749 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9751 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9752 (dw2_get_cutu): ...this.
9753 (dwarf2_per_objfile::get_cu): Rename from...
9754 (dw2_get_cu): ...this.
9755 (dwarf2_per_objfile::get_tu): New.
9756 (create_addrmap_from_index): Adjust.
9757 (create_addrmap_from_aranges): Adjust.
9758 (dw2_find_last_source_symtab): Adjust.
9759 (dw2_map_symtabs_matching_filename): Adjust.
9760 (dw2_symtab_iter_next): Adjust.
9761 (dw2_print_stats): Adjust.
9762 (dw2_expand_all_symtabs): Adjust.
9763 (dw2_expand_symtabs_with_fullname): Adjust.
9764 (dw2_expand_marked_cus): Adjust.
9765 (dw_expand_symtabs_matching_file_matcher): Adjust.
9766 (dw2_map_symbol_filenames): Adjust.
9767 (dw2_debug_names_iterator::next): Adjust.
9768 (dwarf2_initialize_objfile): Adjust.
9769 (set_partial_user): Adjust.
9770 (dwarf2_build_psymtabs_hard): Adjust.
9772 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9774 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9775 Remove unused variables.
9776 (dw2_map_symtabs_matching_filename): Likewise.
9777 (dwarf2_record_block_ranges): Likewise.
9778 (dwarf2_read_addr_index): Likewise.
9779 (follow_die_offset): Likewise.
9781 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9783 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9784 to symbol_file_add_main.
9786 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9789 * mi/mi-console.c (do_fputc_async_safe): New.
9790 (mi_console_file::write_async_safe): New.
9791 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9792 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9794 * ui-file.c (ui_file::putstrn): Adjust call to
9795 fputstrn_unfiltered.
9796 * utils.c (printchar): Replace do_fputs and do_fprintf
9797 parameters by do_fputc.
9798 (fputstr_filtered): Adjust call to printchar.
9799 (fputstr_unfiltered): Likewise.
9800 (fputstrn_filtered): Likewise.
9801 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9803 * utils.h (do_fputc_ftype): New typedef.
9804 (fputstrn_unfiltered): Add do_fputc parameter.
9806 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9808 * regformats/i386/i386-avx.dat: Remove.
9810 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9813 * amd64-tdep.c (amd64_none_init_abi): New function.
9814 (amd64_x32_none_init_abi): New function.
9815 (_initialize_amd64_tdep): Register handlers for x86-64 and
9816 x64_32 with GDB_OSABI_NONE.
9817 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9818 GDB_OSABI_NONE osabi.
9820 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9823 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9825 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9826 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9828 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9830 * common/byte-vector.h (char_vector): New type.
9831 * target.h (target_read_alloc): Return
9832 gdb::optional<byte_vector>.
9833 (target_read_stralloc): Return gdb::optional<char_vector>.
9834 (target_get_osdata): Return gdb::optional<char_vector>.
9835 * target.c (target_read_alloc_1): Templatize. Replacement
9836 manual memory management with vector.
9837 (target_read_alloc): Change return type, adjust.
9838 (target_read_stralloc): Change return type, adjust.
9839 (target_get_osdata): Change return type, adjust.
9840 * auxv.c (struct auxv_info) <length>: Remove.
9841 <data>: Change type to gdb::optional<byte_vector>.
9842 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9843 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9844 (target_auxv_search): Adjust.
9845 (fprint_target_auxv): Adjust.
9846 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9847 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9848 (linux_make_corefile_notes): Adjust.
9849 * osdata.c (get_osdata): Adjust.
9850 * remote.c (remote_get_threads_with_qxfer): Adjust.
9851 (remote_memory_map): Adjust.
9852 (remote_traceframe_info): Adjust.
9853 (btrace_read_config): Adjust.
9854 (remote_read_btrace): Adjust.
9855 (remote_pid_to_exec_file): Adjust.
9856 * solib-aix.c (solib_aix_get_library_list): Adjust.
9857 * solib-dsbt.c (decode_loadmap): Don't free buf.
9858 (dsbt_get_initial_loadmaps): Adjust.
9859 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9860 * solib-target.c (solib_target_current_sos): Adjust.
9861 * tracepoint.c (sdata_make_value): Adjust.
9862 * xml-support.c (xinclude_start_include): Adjust.
9863 (xml_fetch_content_from_file): Adjust.
9864 * xml-support.h (xml_fetch_another): Change return type.
9865 (xml_fetch_content_from_file): Change return type.
9866 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9867 * xml-tdesc.c (file_read_description_xml): Adjust.
9868 (fetch_available_features_from_target): Change return type.
9869 (target_fetch_description_xml): Adjust.
9870 (target_read_description_xml): Adjust.
9872 2018-04-06 Tom Tromey <tom@tromey.com>
9874 * value.c (~value): Update.
9875 (struct value) <contents>: Now unique_xmalloc_ptr.
9876 (value_contents_bits_eq, allocate_value_contents)
9877 (value_contents_raw, value_contents_all_raw)
9878 (value_contents_for_printing, value_contents_for_printing_const)
9879 (set_value_enclosing_type): Update.
9881 2018-04-06 Tom Tromey <tom@tromey.com>
9883 * value.c (range_s): Remove typedef, VEC.
9884 (struct range): Add operator<.
9885 (range_lessthan): Remove.
9886 (ranges_contain): Change type.
9888 (struct value) <unavailable, optimized_out>: Now std::vector.
9889 (value_entirely_available)
9890 (value_entirely_covered_by_range_vector)
9891 (value_entirely_unavailable, value_entirely_optimized_out):
9893 (insert_into_bit_range_vector): Change argument type.
9894 (find_first_range_overlap): Likewise.
9895 (struct ranges_and_idx, value_contents_bits_eq)
9896 (require_not_optimized_out, require_available): Update.
9897 (ranges_copy_adjusted): Change argument types.
9898 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9900 2018-04-06 Tom Tromey <tom@tromey.com>
9902 * value.c (~value): Update.
9903 (struct value) <parent>: Now a value_ref_ptr.
9904 (value_parent, set_value_parent, value_address, value_copy):
9907 2018-04-06 Tom Tromey <tom@tromey.com>
9909 * value.c (struct value): Add constructor, destructor, and member
9911 (allocate_value_lazy, value_decref): Update.
9913 2018-04-06 Tom Tromey <tom@tromey.com>
9915 * value.c (struct value) <released, next>: Remove.
9916 (all_values): Now a std::vector.
9917 (allocate_value_lazy): Update.
9918 (value_next): Remove.
9919 (value_mark, value_free_to_mark, release_value)
9920 (value_release_to_mark): Update.
9922 2018-04-06 Tom Tromey <tom@tromey.com>
9924 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9925 (free_value_chain): Remove.
9926 * value.c (free_value_chain): Remove.
9927 (value_release_to_mark): Return a std::vector.
9928 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9930 (check_condition): Update.
9931 * eval.c (fetch_subexp_value): Change "val_chain" to a
9933 * breakpoint.c (update_watchpoint): Update.
9934 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9936 2018-04-06 Tom Tromey <tom@tromey.com>
9938 * value.h (free_all_values): Remove.
9939 * value.c (free_all_values): Remove.
9941 2018-04-06 Tom Tromey <tom@tromey.com>
9943 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9944 (value_history_chain, value_history_count): Remove.
9945 (value_history): New global.
9946 (record_latest_value, access_value_history, show_values)
9947 (preserve_values): Update.
9949 2018-04-06 Tom Tromey <tom@tromey.com>
9951 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9952 * varobj.c (varobj_set_display_format, varobj_set_value)
9953 (install_default_visualizer, construct_visualizer)
9954 (install_new_value, ~varobj, varobj_get_value_type)
9955 (my_value_of_variable, varobj_editable_p): Update.
9956 * c-varobj.c (c_describe_child, c_value_of_variable)
9957 (cplus_number_of_children, cplus_describe_child): Update.
9958 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9959 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9960 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9962 2018-04-06 Tom Tromey <tom@tromey.com>
9964 * printcmd.c (last_examine_address): Change type to
9966 (do_examine, x_command): Update.
9968 2018-04-06 Tom Tromey <tom@tromey.com>
9970 * value.c (release_value): Update.
9971 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9972 (struct bpstats) <val>: Now a value_ref_ptr.
9973 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9974 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9975 (~watchpoint, print_it_watchpoint, watch_command_1)
9976 (invalidate_bp_value_on_memory_change): Update.
9978 2018-04-06 Tom Tromey <tom@tromey.com>
9980 * varobj.c (varobj_clear_saved_item)
9981 (update_dynamic_varobj_children, install_new_value, ~varobj):
9983 * value.h (value_incref): Move declaration earlier.
9984 (value_decref): Rename from value_free.
9985 (struct value_ref_policy): New.
9986 (value_ref_ptr): New typedef.
9987 (struct value_deleter): Remove.
9988 (gdb_value_up): Remove typedef.
9989 (release_value): Change return type.
9990 (release_value_or_incref): Remove.
9991 * value.c (set_value_parent): Update.
9992 (value_incref): Change return type.
9993 (value_decref): Rename from value_free.
9994 (value_free_to_mark, free_all_values, free_value_chain): Update.
9995 (release_value): Return value_ref_ptr.
9996 (release_value_or_incref): Remove.
9997 (record_latest_value, set_internalvar, clear_internalvar):
9999 * stack.c (info_frame_command): Don't call value_free.
10000 * python/py-value.c (valpy_dealloc, valpy_new)
10001 (value_to_value_object): Update.
10002 * printcmd.c (do_examine): Update.
10003 * opencl-lang.c (lval_func_free_closure): Update.
10004 * mi/mi-main.c (register_changed_p): Don't call value_free.
10005 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10006 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10007 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10009 * guile/scm-value.c (vlscm_free_value_smob)
10010 (vlscm_scm_from_value): Update.
10011 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10012 (frame_unwind_register_unsigned, get_frame_register_bytes)
10013 (put_frame_register_bytes): Don't call value_free.
10014 * findvar.c (address_from_register): Don't call value_free.
10015 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10016 * dwarf2loc.c (entry_data_value_free_closure)
10017 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10018 (dwarf2_evaluate_loc_desc_full): Update.
10019 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10020 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10021 (~watchpoint, watch_command_1)
10022 (invalidate_bp_value_on_memory_change): Update.
10023 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10025 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10028 * warning.m4: Add -Wno-error=deprecated-register.
10029 * configure: Re-generate.
10031 2018-04-05 Tom Tromey <tom@tromey.com>
10033 * linespec.h: Remove include of "vec.h".
10035 2018-04-05 Tom Tromey <tom@tromey.com>
10037 * linespec.c (typep): Remove typedef.
10038 (find_methods, find_superclass_methods): Take a std::vector.
10039 (find_method): Use std::vector.
10041 2018-04-05 Tom Tromey <tom@tromey.com>
10043 * utils.c (compare_strings): Remove.
10044 * utils.h (compare_strings): Remove.
10045 * objc-lang.h (find_imps): Update.
10046 * objc-lang.c (find_methods): Take a std::vector.
10047 (uniquify_strings, find_imps): Likewise.
10048 * linespec.c (find_methods): Take a std::vector.
10049 (decode_objc): Use std::vector.
10050 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10052 (find_method, find_function_symbols): Use std::vector.
10054 2018-04-05 Tom Tromey <tom@tromey.com>
10056 * completer.c (completion_tracker::completion_tracker): Remove
10058 (completion_tracker::discard_completions): Likewise.
10059 * breakpoint.c (ambiguous_names_p): Remove cast.
10060 * ada-lang.c (_initialize_ada_language): Remove cast.
10061 * utils.h (streq): Update.
10062 (streq_hash): Add new declaration.
10063 * utils.c (streq): Return bool.
10064 (streq_hash): New function.
10066 2018-04-05 Tom Tromey <tom@tromey.com>
10068 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10069 Remove a string copy.
10071 2018-04-05 Tom Tromey <tom@tromey.com>
10073 * linespec.c (filter_results): Use std::vector.
10074 (decode_line_2, decode_line_full): Update.
10076 2018-04-05 Tom Tromey <tom@tromey.com>
10078 * linespec.c (canonical_to_fullform): Return std::string.
10079 (filter_results): Update.
10080 (struct decode_line_2_item): Add constructor.
10081 <fullform, displayform>: Now std::string.
10082 (decode_line_2_compare_items): Now a std::sort comparator.
10083 (decode_line_2): Update.
10085 2018-04-05 Tom Tromey <tom@tromey.com>
10087 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10088 (unexpected_linespec_error): Update.
10089 (linespec_parse_basic, parse_linespec): Update.
10091 2018-04-05 Tom Tromey <tom@tromey.com>
10093 * linespec.c (linespec_parse_basic): Reindent.
10095 2018-04-05 Tom Tromey <tom@tromey.com>
10097 * minsyms.h (iterate_over_minimal_symbols): Update.
10098 * minsyms.c (iterate_over_minimal_symbols): Take a
10099 gdb::function_view.
10100 * linespec.c (struct collect_minsyms): Remove.
10101 (compare_msyms): Now a std::sort comparator.
10102 (add_minsym): Add parameters.
10103 (search_minsyms_for_name): Update. Use std::vector.
10105 2018-04-03 Tom Tromey <tom@tromey.com>
10107 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10110 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10112 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10114 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10117 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10118 printing static type.
10120 2018-04-01 Tom Tromey <tom@tromey.com>
10122 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10123 (rs6000_xfer_shared_libraries): Update.
10125 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10127 * common/gdb_vecs.h (char_ptr): Remove.
10128 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10130 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10132 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10134 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10136 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10138 * tracepoint.h (struct uploaded_tp): Initialize fields.
10139 <actions, step_actions, cmd_strings>: Change type to
10140 std::vector<char *>.
10141 * tracepoint.c (get_uploaded_tp): Allocate with new.
10142 (free_uploaded_tps): Free with delete.
10143 (parse_tracepoint_definition): Adjust to std::vector change.
10144 * breakpoint.c (read_uploaded_action): Likewise.
10145 (create_tracepoint_from_upload): Likewise.
10146 * ctf.c (ctf_write_uploaded_tp): Likewise.
10147 (SET_ARRAY_FIELD): Likewise.
10148 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10150 2018-03-30 Tom Tromey <tom@tromey.com>
10152 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10154 (svr4_keep_data_in_core): Update.
10155 (svr4_read_so_list): Update.
10157 2018-03-30 Tom Tromey <tom@tromey.com>
10159 * windows-nat.c (handle_output_debug_string, handle_exception):
10161 * target.h (target_read_string): Update.
10162 * target.c (target_read_string): Change "string" to
10163 unique_xmalloc_ptr.
10164 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10166 * solib-frv.c (frv_current_sos): Update.
10167 * solib-dsbt.c (dsbt_current_sos): Update.
10168 * solib-darwin.c (darwin_current_sos): Update.
10169 * linux-thread-db.c (inferior_has_bug): Update.
10170 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10171 Update. Remove alloca.
10172 * ada-lang.c (ada_main_name): Update.
10174 2018-03-30 Tom Tromey <tom@tromey.com>
10176 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10177 (struct dwo_file_deleter): New.
10178 (dwo_file_up): New typedef.
10179 (open_and_init_dwo_file): Use dwo_file_up.
10180 (free_dwo_file_cleanup): Remove.
10182 2018-03-30 Tom Tromey <tom@tromey.com>
10184 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10185 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10187 2018-03-30 Tom Tromey <tom@tromey.com>
10189 * dwarf2read.c (class free_cached_comp_units): New class.
10190 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10191 (free_cached_comp_units): Remove function.
10193 2018-03-30 Tom Tromey <tom@tromey.com>
10195 * utils.h (make_cleanup_unpush_target): Remove.
10196 * inf-ptrace.c (struct target_unpusher): New.
10197 (target_unpush_up) New typedef.
10198 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10200 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10202 2018-03-27 Tom Tromey <tom@tromey.com>
10204 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10206 2018-03-27 Pedro Alves <palves@redhat.com>
10207 Tom Tromey <tom@tromey.com>
10209 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10210 destructor. Now a class.
10211 (gdb_readline_wrapper_cleanup): Remove function.
10212 (gdb_readline_wrapper): Remove cleanups.
10214 2018-03-27 Tom Tromey <tom@tromey.com>
10216 * typeprint.h (struct type_print_options) <local_typedefs,
10217 global_typedefs>: Remove "struct" keyword.
10218 (class typedef_hash_table): New class.
10219 (recursively_update_typedef_hash, add_template_parameters)
10220 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10221 (find_typedef_in_hash): Don't declare.
10222 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10223 (typedef_hash_table::recursively_update): Rename from
10224 recursively_update_typedef_hash. Now a member.
10225 (typedef_hash_table::add_template_parameters): Rename from
10226 add_template_parameters. Now a member.
10227 (typedef_hash_table::typedef_hash_table): Now a constructor;
10228 rename from create_typedef_hash.
10229 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10230 rename from free_typedef_hash.
10231 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10232 (do_free_global_table): Remove.
10233 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10234 from copy_type_recursive.
10235 (create_global_typedef_table): Remove.
10236 (typedef_hash_table::find_global_typedef): Now a member of
10237 typedef_hash_table.
10238 (typedef_hash_table::find_typedef): Rename from
10239 find_typedef_in_hash; now a member.
10240 (whatis_exp): Update.
10241 * extension.h (struct ext_lang_type_printers): Add constructor and
10243 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10245 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10246 Now a constructor; rename from start_ext_lang_type_printers.
10247 (ext_lang_type_printers): Now a destructor; rename from
10248 free_ext_lang_type_printers.
10249 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10251 (c_type_print_base_struct_union): Update. Remove cleanups.
10253 2018-03-27 Tom Tromey <tom@tromey.com>
10255 * dwarf-index-write.c: Include <cmath>.
10257 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10259 * NEWS: Add entry describing new "set|show varsize-limit" command.
10260 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10262 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10265 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10267 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10268 dwarf-index-write.c
10269 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10270 * dwarf-index-common.c: New file.
10271 * dwarf-index-common.h: New file.
10272 * dwarf-index-write.c: New file.
10273 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10274 (struct dwarf2_section_info): Move from here.
10275 (dwarf2_section_info_def): Likewise.
10276 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10277 (offset_type): Likewise.
10278 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10279 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10280 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10281 (byte_swap): Likewise.
10282 (MAYBE_SWAP): Likewise.
10283 (dwarf2_per_cu_ptr): Likewise.
10284 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10285 (struct tu_stats): Likewise.
10286 (struct dwarf2_per_objfile): Likewise.
10287 (struct dwarf2_per_cu_data): Likewise.
10288 (struct signatured_type): Likewise.
10289 (sig_type_ptr): Likewise.
10290 (DEF_VEC_P (sig_type_ptr)): Likewise.
10291 (INDEX4_SUFFIX): Likewise.
10292 (INDEX5_SUFFIX): Likewise.
10293 (DEBUG_STR_SUFFIX): Likewise.
10294 (dwarf2_read_section): Make non-static.
10295 (mapped_index_string_hash): Move from here.
10296 (dwarf5_djb_hash): Likewise.
10297 (file_write): Likewise.
10298 (class data_buf): Likewise.
10299 (struct symtab_index_entry): Likewise.
10300 (struct mapped_symtab): Likewise.
10301 (find_slot): Likewise.
10302 (hash_expand): Likewise.
10303 (add_index_entry): Likewise.
10304 (uniquify_cu_indices): Likewise.
10305 (class c_str_view): Likewise.
10306 (class c_str_view_hasher): Likewise.
10307 (class vector_hasher): Likewise.
10308 (write_hash_table): Likewise.
10309 (psym_index_map): Likewise.
10310 (struct addrmap_index_data): Likewise.
10311 (add_address_entry): Likewise.
10312 (add_address_entry_worker): Likewise.
10313 (write_address_map): Likewise.
10314 (symbol_kind): Likewise.
10315 (write_psymbols): Likewise.
10316 (struct signatured_type_index_data): Likewise.
10317 (write_one_signatured_type): Likewise.
10318 (recursively_count_psymbols): Likewise.
10319 (recursively_write_psymbols): Likewise.
10320 (class debug_names): Likewise.
10321 (check_dwarf64_offsets): Likewise.
10322 (psyms_seen_size): Likewise.
10323 (write_gdbindex): Likewise.
10324 (write_debug_names): Likewise.
10325 (assert_file_size): Likewise.
10326 (write_psymtabs_to_index): Likewise.
10327 (save_gdb_index_command): Likewise.
10328 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10330 * dwarf2read.h: New file.
10332 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10335 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10336 symbol name if the CU's language stores symbol names in linkage
10338 * language.h (struct language_defn)
10339 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10340 all instances of this struct.
10342 2018-03-26 Tom Tromey <tom@tromey.com>
10344 * stack.c (backtrace_command_1): Remove verbose code.
10346 2018-03-26 Tom Tromey <tom@tromey.com>
10348 * python/py-framefilter.c (py_print_type): Don't catch
10349 exceptions. Return void.
10350 (py_print_value): Likewise.
10351 (py_print_single_arg): Likewise.
10352 (enumerate_args): Don't catch exceptions.
10353 (py_print_args): Likewise.
10354 (py_print_frame): Likewise.
10355 (gdbpy_apply_frame_filter): Catch exceptions here.
10357 2018-03-26 Tom Tromey <tom@tromey.com>
10359 * stack.c (_initialize_stack): Remove trailing newlines from help
10360 text. Add "Usage" line to "backtrace" help.
10362 2018-03-26 Tom Tromey <tom@tromey.com>
10365 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10367 2018-03-26 Tom Tromey <tom@tromey.com>
10369 * python/py-framefilter.c (py_print_single_arg): Return
10370 EXT_LANG_BT_ERROR from catch.
10372 2018-03-26 Tom Tromey <tom@tromey.com>
10374 PR backtrace/15584:
10375 * stack.c (backtrace_command_1): Move some code into no-filters
10378 2018-03-26 Tom Tromey <tom@tromey.com>
10380 * python/py-framefilter.c (throw_quit_or_print_exception): New
10382 (gdbpy_apply_frame_filter): Use it.
10384 2018-03-26 Tom Tromey <tom@tromey.com>
10387 * python/py-framefilter.c (py_print_type, py_print_value)
10388 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10391 2018-03-26 Tom Tromey <tom@tromey.com>
10393 * python/py-framefilter.c (enumerate_args): Use
10394 gdb::unique_xmalloc_ptr.
10396 2018-03-26 Tom Tromey <tom@tromey.com>
10398 * python/py-framefilter.c (py_print_frame): Return
10400 (gdbpy_apply_frame_filter): Update comment.
10401 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10403 <EXT_LANG_BT_NO_FILTERS>: Change value.
10405 2018-03-26 Tom Tromey <tom@tromey.com>
10407 PR backtrace/15582:
10408 * stack.c (backtrace_command): Parse "hide" argument.
10409 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10410 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10413 2018-03-26 Tom Tromey <tom@tromey.com>
10415 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10417 (backtrace_command): Remove "fulltrace", add "flags".
10419 2018-03-26 Tom Tromey <tom@tromey.com>
10421 * stack.c (backtrace_command): Rewrite command line parsing.
10423 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10425 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10427 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10429 * filename-seen-cache.h: Add include guard.
10431 2018-03-26 Keith Seitz <keiths@redhat.com>
10433 * symfile.c (place_section): Remove "struct" from section_addr_info
10435 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10436 "struct" keyword from section_addr_info.
10438 2018-03-26 Alan Hayward <alan.hayward@arm.com>
10440 * regformats/regdef.h (reg): Add constructors.
10442 2018-03-25 Pedro Alves <palves@redhat.com>
10444 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10445 if then/else bodies in var_func_name extraction.
10447 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
10449 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10450 lookup_minimal_symbol() to find symbol entry.
10451 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10453 2018-03-23 Keith Seitz <keiths@redhat.com>
10456 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10457 nested type definitions for C++, too.
10459 2018-03-23 Tom Tromey <tom@tromey.com>
10461 * machoread.c (struct oso_el): Add a constructor. Don't define as
10463 (macho_register_oso): Remove.
10464 (macho_symtab_read): Take a std::vector.
10465 (oso_el_compare_name): Now a std::sort comparator.
10466 (macho_symfile_read_all_oso): Take a std::vector.
10467 (macho_symfile_read): Use std::vector. Remove cleanups.
10469 2018-03-22 Tom Tromey <tom@tromey.com>
10471 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10472 (record_full_goto_bookmark): Use std::string.
10474 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10477 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10480 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10482 * rs6000-tdep.c (store_insn_p): New function.
10483 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10484 and cr_reg to their unshifted values. Use store_insn_p to
10485 match LR saves using either R1 or fdata->alloca_reg. Use
10486 store_insn_p to match CR saves. Set alloca_reg_offset
10487 when alloca_reg and framep are set. Remove lr_reg shift
10488 when assigning to fdata->lr_register.
10490 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
10492 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10493 command line args instead of emitting a warning.
10495 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10497 * tracepoint.h (struct static_tracepoint_marker): Initialize
10498 fields, define default constructor, move constructor and move
10499 assignment, disable the rest.
10500 <str_id, extra>: Make std::string.
10501 (release_static_tracepoint_marker): Remove.
10502 (free_current_marker): Remove.
10503 * tracepoint.c (free_current_marker): Remove.
10504 (parse_static_tracepoint_marker_definition): Adjust to
10505 std::string, use new hex2str overload.
10506 (release_static_tracepoint_marker): Remove.
10507 (print_one_static_tracepoint_marker): Get marker by reference
10508 and adjust to std::string.
10509 (info_static_tracepoint_markers_command): Adjust to std::vector
10511 * target.h (static_tracepoint_marker_p): Remove typedef.
10512 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10513 (struct target_ops) <to_static_tracepoint_marker_at>: Return
10515 <to_static_tracepoint_markers_by_strid>: Return std::vector.
10517 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10518 (target_debug_print_std_vector_static_tracepoint_marker): New.
10519 (target_debug_print_struct_static_tracepoint_marker_p): Rename
10521 (target_debug_print_static_tracepoint_marker_p): ... this.
10522 * target-delegates.c: Re-generate.
10523 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10525 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10526 (decode_static_tracepoint_spec): Adjust to std::vector.
10527 (tracepoint_print_one_detail): Adjust to std::string.
10528 (strace_marker_decode_location): Adjust to std::string.
10529 (update_static_tracepoint): Adjust to std::string, remove call
10530 to release_static_tracepoint_marker.
10531 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10532 Adjust to std::vector.
10533 * remote.c (remote_static_tracepoint_marker_at): Return bool.
10534 (remote_static_tracepoint_markers_by_strid): Adjust to
10536 * common/rsp-low.h (hex2str): New overload with explicit count
10538 * common/rsp-low.c (hex2str): New overload with explicit count
10540 * unittests/rsp-low-selftests.c (test_hex2str): New function.
10541 (_initialize_rsp_low_selftests): Add test_hex2str test.
10542 * unittests/tracepoint-selftests.c
10543 (test_parse_static_tracepoint_marker_definition): Adjust to
10546 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10548 * tracepoint.c (parse_static_tracepoint_marker_definition):
10549 Consider case where the definition is followed by more
10551 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10552 tracepoint-selftests.c.
10553 * unittests/tracepoint-selftests.c: New.
10555 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10557 * MAINTAINERS (Write After Approval): Add Pedro Franco de
10560 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10562 * symtab.c (find_pc_sect_line): fixed indentation.
10564 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10566 * symtab.c (find_pc_sect_line): now uses binary search.
10568 2018-03-19 Tom Tromey <tom@tromey.com>
10570 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10571 "IDENT" production.
10573 2018-03-19 Pedro Alves <palves@redhat.com>
10574 Tom Tromey <tom@tromey.com>
10576 * unittests/observable-selftests.c: New file.
10577 * common/observable.h: New file.
10578 * observable.h: New file.
10579 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10580 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10581 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10582 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10583 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10584 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10585 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10586 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10587 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10588 python/py-breakpoint.c, python/py-finishbreakpoint.c,
10589 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10590 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10591 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10592 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10593 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10594 tui/tui-interp.c, valops.c: Update all users.
10595 * tui/tui-hooks.c (tui_bp_created_observer)
10596 (tui_bp_deleted_observer, tui_bp_modified_observer)
10597 (tui_inferior_exit_observer, tui_before_prompt_observer)
10598 (tui_normal_stop_observer, tui_register_changed_observer):
10600 (tui_observers_token): New global.
10601 (attach_or_detach, tui_attach_detach_observers): New functions.
10602 (tui_install_hooks, tui_remove_hooks): Use
10603 tui_attach_detach_observers.
10604 * record-btrace.c (record_btrace_thread_observer): Remove.
10605 (record_btrace_thread_observer_token): New global.
10606 * observer.sh: Remove.
10607 * observer.c: Rename to observable.c.
10608 * observable.c (namespace gdb_observers): Define new objects.
10609 (observer_debug): Move into gdb_observers namespace.
10610 (struct observer, struct observer_list, xalloc_observer_list_node)
10611 (xfree_observer_list_node, generic_observer_attach)
10612 (generic_observer_detach, generic_observer_notify): Remove.
10613 (_initialize_observer): Update.
10614 Don't include observer.inc.
10615 * Makefile.in (generated_files): Remove observer.h, observer.inc.
10616 (clean mostlyclean): Likewise.
10617 (observer.h, observer.inc): Remove targets.
10618 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10619 (COMMON_SFILES): Use observable.c, not observer.c.
10620 * .gitignore: Remove observer.h.
10622 2018-03-18 Tom Tromey <tom@tromey.com>
10624 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10626 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10628 2018-03-17 Tom Tromey <tom@tromey.com>
10630 * auto-load.c (auto_load_objfile_script_1): Use std::string.
10632 2018-03-17 Tom Tromey <tom@tromey.com>
10634 * target.c (class scoped_target_fd): New.
10635 (target_fileio_close_cleanup): Remove.
10636 (target_fileio_read_alloc_1): Use scoped_target_fd.
10638 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
10640 * silent-rules.mk: New.
10641 * Makefile.in: Include silent-rules.mk
10642 (srcdir, VPATH, top_srcdir): Move up.
10643 (COMPILE): Add ECHO_CXX.
10644 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10645 (init.c): Add ECHO_INIT_C.
10646 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10647 (version.c): Add ECHO_GEN.
10648 (printcmd.o): Add ECHO_CXX.
10649 (target-float.o): Add ECHO_CXX.
10650 (ada-exp.o): Add ECHO_CXX.
10651 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10652 (insight$(EXEEXT)): Add ECHO_CXXLD.
10653 * gnulib/configure.ac: Add AM_SILENT_RULES.
10654 * gnulib/aclocal.m4: Re-generate.
10655 * gnulib/configure: Re-generate.
10656 * gnulib/import/Makefile.in: Re-generate.
10658 2018-03-16 Tom Tromey <tom@tromey.com>
10660 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10661 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10662 * utils.c (do_free_section_addr_info)
10663 (make_cleanup_free_section_addr_info): Remove.
10664 * symfile.h (struct other_sections): Add constructor.
10665 (struct section_addr_info): Remove.
10666 (section_addr_info): New typedef.
10667 (struct sym_fns) <sym_offsets>: Change type of parameter.
10668 (build_section_addr_info_from_objfile)
10669 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10670 (default_symfile_offsets, symbol_file_add)
10671 (symbol_file_add_from_bfd)
10672 (build_section_addr_info_from_section_table): Update.
10673 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10674 * symfile.c (alloc_section_addr_info): Remove.
10675 (build_section_addr_info_from_section_table): Change return type.
10677 (build_section_addr_info_from_bfd)
10678 (build_section_addr_info_from_objfile): Likewise.
10679 (free_section_addr_info): Remove.
10680 (relative_addr_info_to_section_offsets): Change type of "addrs".
10681 (addrs_section_compar): Now a std::sort comparator.
10682 (addrs_section_sort): Change return type.
10683 (addr_info_make_relative): Change type of "addrs". Update.
10684 (default_symfile_offsets, syms_from_objfile_1)
10685 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10686 (symbol_file_add_separate): Update.
10687 (symbol_file_add): Change type of "addrs". Update.
10688 (add_symbol_file_command): Update. Remove cleanups.
10689 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10691 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10692 * solib.c (solib_read_symbols): Update.
10693 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10694 * machoread.c (macho_symfile_offsets): Update.
10695 * jit.c (jit_bfd_try_read_symtab): Update.
10697 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10699 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10700 unittests/utils-selftests.c.
10701 * unittests/utils-selftests.c: New file.
10703 2018-03-14 Tom Tromey <tom@tromey.com>
10706 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10709 2018-03-14 Tom Tromey <tom@tromey.com>
10712 * printcmd.c (printf_pointer): Allow "-" in format.
10714 2018-03-14 Tom Tromey <tom@tromey.com>
10716 * printcmd.c (_initialize_printcmd): Add usage to printf.
10718 2018-03-14 Yao Qi <qiyao@sourceware.org>
10720 * MAINTAINERS: Update my email address.
10722 2018-03-13 Tom Tromey <tom@tromey.com>
10724 * machoread.c (macho_check_dsym): Change filenamep to a
10726 (macho_symfile_read): Update.
10727 * symfile.c (load_command): Use std::string.
10729 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10731 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10732 to error message string.
10733 (riscv_register_name): Use xsnprintf instead of sprintf.
10734 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10736 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10738 (riscv_push_dummy_call): Likewise.
10740 2018-03-12 Tom Tromey <tom@tromey.com>
10742 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10743 Use gdb::byte_vector.
10744 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10746 2018-03-12 Yao Qi <yao.qi@linaro.org>
10748 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10749 parameter type to readable_regcache.
10750 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10753 2018-03-11 Tom Tromey <tom@tromey.com>
10755 * dwarf2read.c (struct nextfield): Add initializers.
10756 (struct nextfnfield): Remove.
10757 (struct fnfieldlist): Add initializers. Remove "length" and
10758 "head", use std::vector.
10759 (struct decl_field_list): Remove.
10760 (struct field_info): Add initializers.
10761 <fields, baseclasses>: Now std::vector.
10762 <nbaseclasses, nfnfields, typedef_field_list_count,
10763 nested_types_list_count>: Remove.
10764 (dwarf2_add_field, dwarf2_add_type_defn)
10765 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10766 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10767 (process_structure_scope): Update.
10769 2018-03-11 Tom Tromey <tom@tromey.com>
10771 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10772 for use by std::sort.
10773 (build_type_psymtabs_1): Use std::vector.
10775 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10777 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10778 and LIBMPFR in the printed configuration.
10780 2018-03-08 Tom Tromey <tom@tromey.com>
10782 * source.c (get_filename_and_charpos): Use scoped_fd.
10783 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10784 (procfs_pidlist): Likewise.
10785 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10786 (iterate_over_mappings): Likewise.
10788 2018-03-08 Tom Tromey <tom@tromey.com>
10790 * infcall.c (struct call_return_meta_info)
10791 <stack_temporaries_enabled>: Remove.
10792 (get_call_return_value, call_function_by_hand_dummy): Update.
10793 * thread.c (disable_thread_stack_temporaries): Remove.
10794 (enable_thread_stack_temporaries): Remove.
10795 (thread_stack_temporaries_enabled_p): Return bool.
10796 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10797 (get_last_thread_stack_temporary): Update.
10798 * eval.c (evaluate_subexp): Update.
10799 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10800 class, not a function.
10801 (value_ptr, value_vec): Remove typedefs.
10802 (class thread_info) <stack_temporaries_enabled>: Now bool.
10803 <stack_temporaries>: Now a std::vector.
10804 (thread_stack_temporaries_enabled_p)
10805 (value_in_thread_stack_temporaries): Return bool.
10807 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10809 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10810 (getpkt_or_notif_sane_1): Likewise.
10812 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10814 * build-id.c (build_id_to_debug_bfd): Use std::string.
10816 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10818 * build-id.c (find_separate_debug_file_by_buildid): Return
10820 * build-id.h (find_separate_debug_file_by_buildid): Return
10822 * coffread.c (coff_symfile_read): Adjust to std::string.
10823 * elfread.c (elf_symfile_read): Adjust to std::string.
10824 * symfile.c (separate_debug_file_exists): Change parameter to
10826 (find_separate_debug_file): Return std::string.
10827 (find_separate_debug_file_by_debuglink): Return std::string.
10828 * symfile.h (find_separate_debug_file_by_debuglink): Return
10831 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10833 * common/xml-utils.c (xml_escape_text): Move code to...
10834 (xml_escape_text_append): ... this new function.
10835 * common/xml-utils.h (xml_escape_text_append): New declaration.
10836 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10838 (_initialize_xml_utils): register test_xml_escape_text_append as
10841 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10843 * defs.h: Remove MAX_REGISTER_SIZE.
10844 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10846 * python/py-unwind.c (pyuw_sniffer): Likewise.
10848 2018-03-07 Tom Tromey <tom@tromey.com>
10850 * linux-tdep.c (linux_info_proc): Update.
10851 * target.h (struct target_ops) <to_fileio_readlink>: Return
10853 (target_fileio_readlink): Return optional<string>.
10854 * remote.c (remote_hostio_readlink): Return optional<string>.
10855 * inf-child.c (inf_child_fileio_readlink): Return
10857 * target.c (target_fileio_readlink): Return optional<string>.
10859 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10861 * regcache.c (cooked_read_test): Add riscv to the list of
10862 architectures that have a save_reggroup.
10864 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10866 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10867 value is not a dynamic class object.
10869 2018-03-06 Tom Tromey <tom@tromey.com>
10871 * rust-exp.y: Formatting fixes.
10873 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10875 * riscv-tdep.c (riscv_register_name): Remove target description
10877 (riscv_gdbarch_init): Remove target description check.
10879 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10881 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10883 * riscv-tdep.h: Likewise.
10885 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10887 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10888 (riscv_pseudo_register_write): Delete.
10889 (riscv_gdbarch_init): Remove all use of pseudo registers.
10891 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10893 * record-btrace.c (btrace_print_lines): Replace cleanup
10894 parameter with RAII equivalents.
10895 (btrace_insn_history): Replace cleanup with RAII equivalents.
10896 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10897 make_cleanup_ui_out_tuple_begin_end): Remove.
10898 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10899 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10900 make_cleanup_ui_out_list_begin_end): Remove.
10902 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10904 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10905 parameter types to std::vector. Use bool.
10906 (record_btrace_wait): Replace VEC(tp_t) with
10907 std::vector<thread_info *>.
10908 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10910 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10912 * record-btrace.c (record_btrace_disable_callback): Remove.
10913 (struct scoped_btrace_disable): New.
10914 (record_btrace_open): Use scoped_btrace_disable.
10916 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10918 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10919 reading values from registers.
10921 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10923 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10926 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10928 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10929 change parameter type. Use GDB's print functions, and use
10930 core_addr_to_string where appropriate.
10931 (riscv_push_dummy_call): Use core_addr_to_string where
10932 appropriate, update call to riscv_print_arg_location, and reindent
10934 (riscv_return_value): Update call to riscv_print_arg_location.
10936 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10937 Tim Newsome <tim@sifive.com>
10938 Albert Ou <a0u@eecs.berkeley.edu>
10939 Darius Rad <darius@bluespec.com>
10941 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10942 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10943 (ALLDEPFILES): Add riscv-tdep.c
10944 * configure.tgt: Add riscv support.
10945 * riscv-tdep.c: New file.
10946 * riscv-tdep.h: New file.
10947 * NEWS: Mention new target.
10948 * MAINTAINERS: Add entry for riscv.
10950 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10952 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10953 fields within aggregates.
10955 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10957 * record-btrace.c (btrace_print_lines): Change type of flags to
10958 gdb_disassembly_flags.
10960 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10962 * fbsd-nat.c: Include "inf-ptrace.h".
10963 (USE_SIGTRAP_SIGINFO): Conditionally define.
10964 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10965 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10966 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10968 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10970 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10972 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10973 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10974 "supports_stopped_by_hw_breakpoint" target methods.
10976 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10978 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10979 * fbsd-nat.c (debug_fbsd_nat): New variable.
10980 (show_fbsd_nat_debug): New function.
10981 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10982 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10984 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10986 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10987 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10989 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10990 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10993 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10995 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10996 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10998 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11000 * charset.c (struct charset_vector): New.
11001 (charsets): Change type to charset_vector.
11002 (find_charset_names): Adjust.
11004 (_initialize_charset): Adjust.
11006 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11008 * progspace.h (struct program_space) <deleted_solibs>: Change
11009 type to std::vector<std::string>.
11010 * progspace.c (clear_program_space_solib_cache): Adjust.
11011 * breakpoint.c (print_solib_event): Adjust.
11012 (check_status_catch_solib): Adjust.
11013 * solib.c (update_solib_list): Adjust.
11014 * ui-out.h (class ui_out) <field_string>: New overload.
11015 * ui-out.c (ui_out::field_string): New overload.
11017 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11019 * progspace.h (struct program_space): Add constructor and
11020 destructor, initialize fields.
11021 (add_program_space): Remove.
11022 * progspace.c (add_program_space): Rename to...
11023 (program_space::program_space): ... this.
11024 (release_program_space): Rename to...
11025 (program_space::~program_space): ... this.
11026 (delete_program_space): Use delete to delete program_space.
11027 (initialize_progspace): Use new to allocate program_space.
11028 * inferior.c (add_inferior_with_spaces): Likewise.
11029 (clone_inferior_command): Likewise.
11030 * infrun.c (follow_fork_inferior): Likewise.
11031 (handle_vfork_child_exec_or_exit): Likewise.
11033 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11035 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11036 (delim_string_to_char_ptr_vec): Return std::vector of
11037 gdb::unique_xmalloc_ptr.
11038 (dirnames_to_char_ptr_vec_append): Take std::vector of
11039 gdb::unique_xmalloc_ptr.
11040 (dirnames_to_char_ptr_vec): Return std::vector of
11041 gdb::unique_xmalloc_ptr.
11042 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11043 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11044 (delim_string_to_char_ptr_vec): Return an std::vector of
11045 gdb::unique_xmalloc_ptr, adjust the code.
11046 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11047 gdb::unique_xmalloc_ptr, adjust the code.
11048 (dirnames_to_char_ptr_vec): Return an std::vector of
11049 gdb::unique_xmalloc_ptr, adjust the code.
11050 * auto-load.c (auto_load_safe_path_vec): Change type to
11051 std::vector of gdb::unique_xmalloc_ptr.
11052 (auto_load_expand_dir_vars): Return an std::vector of
11053 gdb::unique_xmalloc_ptr, adjust the code.
11054 (auto_load_safe_path_vec_update): Adjust.
11055 (filename_is_in_auto_load_safe_path_vec): Adjust.
11056 (auto_load_objfile_script_1): Adjust.
11057 * build-id.c (build_id_to_debug_bfd): Adjust.
11058 * linux-thread-db.c (thread_db_load_search): Adjust.
11059 * source.c (add_path): Adjust.
11061 * symfile.c (find_separate_debug_file): Adjust.
11062 * utils.c (do_free_char_ptr_vec): Remove.
11063 (make_cleanup_free_char_ptr_vec): Remove.
11065 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11068 * common/pathstuff.c: Conditionally include "<windows.h>".
11070 2018-03-01 Georg Sauthoff <mail@georg.so>
11073 * gcore.in: Quote variables and switch interpreter to bash.
11075 2018-03-01 Tom Tromey <tom@tromey.com>
11077 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11078 assertion. Add assertion for discriminant_index.
11079 (quirk_rust_enum): Use correct base type name in univariant case.
11081 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11083 * record.c (get_call_history_modifiers): Return a
11084 record_print_flags.
11085 (cmd_record_call_history): Adjust.
11086 * record-btrace.c (record_btrace_call_history): Adjust.
11087 (record_btrace_call_history_range): Adjust.
11088 (record_btrace_call_history_from): Adjust.
11089 * target-debug.h (target_debug_print_record_print_flags): New.
11090 * target-delegates.c: Re-generate.
11091 * target.c (target_call_history): Change flags type.
11092 (target_call_history_from): Likewise.
11093 (target_call_history_range): Likewise.
11094 * target.h (struct target_ops) <target_call_history>: Likewise.
11095 (target_call_history_from): Likewise.
11096 (target_call_history_range): Likewise.
11098 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11099 Simon Marchi <simon.marchi@polymtl.ca>
11101 * common/common-utils.c: Include "sys/stat.h".
11102 (is_regular_file): Move here from "source.c"; change return
11104 * common/common-utils.h (is_regular_file): New prototype.
11105 * common/pathstuff.c (contains_dir_separator): New function.
11106 * common/pathstuff.h (contains_dir_separator): New prototype.
11107 * source.c: Don't include "sys/stat.h".
11108 (is_regular_file): Move to "common/common-utils.c".
11110 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11112 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11113 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11114 * auto-load.c: Include "common/pathstuff.h".
11115 * common/common-def.h (current_directory): Move here.
11116 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11118 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11120 * common/pathstuff.c: New file.
11121 * common/pathstuff.h: New file.
11122 * compile/compile.c: Include "common/pathstuff.h".
11123 * defs.h (current_directory): Move to "common/common-defs.h".
11124 * dwarf2read.c: Include "common/pathstuff.h".
11125 * exec.c: Likewise.
11126 * guile/scm-safe-call.c: Likewise.
11127 * linux-thread-db.c: Likewise.
11128 * main.c: Likewise.
11129 * nto-tdep.c: Likewise.
11130 * objfiles.c: Likewise.
11131 * source.c: Likewise.
11132 * symtab.c: Likewise.
11133 * utils.c: Include "common/pathstuff.h".
11134 (gdb_realpath): Move to "common/pathstuff.c".
11135 (gdb_realpath_keepfile): Likewise.
11136 (gdb_abspath): Likewise.
11137 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11138 (gdb_realpath_keepfile): Likewise.
11139 (gdb_abspath): Likewise.
11141 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11143 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11144 wildcard process pid for super_resume for kernels with a
11147 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11149 * compile/compile.c (get_args): Add additional comments
11150 explaining function.
11152 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11153 Tom Tromey <tom@tromey.com>
11155 * target.h (memory_write_request_s): Remove typedef. Don't define
11157 (target_write_memory_blocks): Change argument to std::vector.
11158 (struct memory_write_request): Add constructor.
11159 * target-memory.c (compare_block_starting_address): Return bool.
11160 Change argument types.
11161 (claim_memory): Change arguments to use std::vector.
11162 (split_regular_and_flash_blocks, blocks_to_erase)
11163 (compute_garbled_blocks): Likewise.
11164 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11165 (target_write_memory_blocks): Change argument to std::vector.
11166 * symfile.c (struct load_section_data): Add constructor and
11167 destructor. Use std::vector for "requests".
11168 (struct load_progress_data): Add initializers.
11169 (load_section_callback): Update. Use "new".
11170 (clear_memory_write_data): Remove.
11171 (generic_load): Update.
11173 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11175 * arch/aarch64.h: Use common/tdesc.h.
11177 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11179 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11180 architecture with a 64-bit ABI.
11182 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11184 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11185 ahead of target description loading.
11187 2018-02-26 Tom Tromey <tom@tromey.com>
11189 * stack.c (backtrace_command_1): Update.
11190 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11192 * python/py-framefilter.c (py_print_frame)
11193 (gdbpy_apply_frame_filter): Change type of "flags".
11194 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11196 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11197 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11198 * extension.h (enum frame_filter_flag): Rename from
11199 frame_filter_flags.
11200 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11201 (apply_ext_lang_frame_filter): Change type of "flags".
11202 * extension.c (apply_ext_lang_frame_filter): Change type of
11204 * extension-priv.h (struct extension_language_ops)
11205 <apply_frame_filter>: Change type of "flags".
11207 2018-02-26 Tom Tromey <tom@tromey.com>
11210 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11211 off-by-one in py_end computation.
11212 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11214 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11217 2018-02-26 Tom Tromey <tom@tromey.com>
11219 * dwarf2read.c (struct variant_field): New.
11220 (struct nextfield) <variant>: New field.
11221 (dwarf2_add_field): Handle DW_TAG_variant_part.
11222 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11223 discriminated union.
11224 (read_structure_type): Handle DW_TAG_variant_part.
11225 (handle_struct_member_die): New function, extracted from
11226 process_structure_scope. Handle DW_TAG_variant.
11227 (process_structure_scope): Handle discriminated unions. Call
11228 handle_struct_member_die.
11230 2018-02-26 Tom Tromey <tom@tromey.com>
11232 * rust-lang.h (rust_last_path_segment): Declare.
11233 * rust-lang.c (rust_last_path_segment): Now public. Change
11235 (struct disr_info): Remove.
11236 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11237 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11238 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11239 (rust_enum_p, rust_enum_variant): New function.
11240 (rust_underscore_fields): Remove "offset" parameter.
11241 (rust_print_enum): New function.
11242 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11243 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11244 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11246 (rust_internal_print_type): New function, from rust_print_type.
11248 (rust_print_type): Call rust_internal_print_type.
11249 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11250 Update enum handling.
11251 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11252 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11253 (rust_union_quirks): New functions.
11254 (process_full_comp_unit, process_full_type_unit): Call
11256 (process_structure_scope): Update rust_unions if necessary.
11258 2018-02-26 Tom Tromey <tom@tromey.com>
11260 * value.h (value_union_variant): Declare.
11261 * valops.c (value_union_variant): New function.
11262 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11263 (struct discriminant_info): New.
11264 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11266 (struct main_type) <flag_discriminated_union>: New field.
11268 2018-02-26 Tom Tromey <tom@tromey.com>
11270 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11271 unittests/unpack-selftests.c.
11272 * unittests/unpack-selftests.c: New file.
11273 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11275 2018-02-26 Yao Qi <yao.qi@linaro.org>
11277 * dwarf2read.c (struct partial_die_info) <read>: New method.
11278 (read_partial_die): Remove the declaration.
11279 (load_partial_dies): Update.
11280 (partial_die_info::partial_die_info):
11281 (read_partial_die): Change it to partial_die_info::read.
11283 2018-02-26 Yao Qi <yao.qi@linaro.org>
11285 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11286 (fixup_partial_die): Remove declaration.
11287 (scan_partial_symbols): Update.
11288 (partial_die_parent_scope): Likewise.
11289 (partial_die_full_name): Likewise.
11290 (fixup_partial_die): Change it to partial_die_info::fixup.
11292 2018-02-26 Yao Qi <yao.qi@linaro.org>
11294 * dwarf2read.c (read_partial_die): Update the declaration.
11295 (load_partial_dies): Caller update.
11296 (read_partial_die): Remove one argument abbrev_len.
11298 2018-02-26 Yao Qi <yao.qi@linaro.org>
11300 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11301 assignment operator.
11302 (load_partial_dies): Use ctor and copy ctor.
11303 (read_partial_die): Update.
11304 (dwarf2_cu::find_partial_die): Use ctor.
11306 2018-02-26 Yao Qi <yao.qi@linaro.org>
11308 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11309 (find_partial_die_in_comp_unit): Change it to
11310 dwarf2_cu::find_partial_die.
11311 (find_partial_die): Update.
11313 2018-02-26 Yao Qi <yao.qi@linaro.org>
11315 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11318 2018-02-26 Yao Qi <yao.qi@linaro.org>
11320 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11322 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11324 * arch/amd64.h: Use common/tdesc.h.
11325 * arch/i386.c: Likewise.
11326 * arch/i386.h: Likewise.
11327 * arch/tic6x.c: Likewise.
11328 * arch/tdesc.h: Move file from here...
11329 * common/tdesc.h: ...to here.
11330 * features/aarch64-core.c: Regenerate.
11331 * features/aarch64-fpu.c: Regenerate.
11332 * features/i386/32bit-avx.c: Regenerate.
11333 * features/i386/32bit-avx512.c: Regenerate.
11334 * features/i386/32bit-core.c: Regenerate.
11335 * features/i386/32bit-linux.c: Regenerate.
11336 * features/i386/32bit-mpx.c: Regenerate.
11337 * features/i386/32bit-pkeys.c: Regenerate.
11338 * features/i386/32bit-sse.c: Regenerate.
11339 * features/i386/64bit-avx.c: Regenerate.
11340 * features/i386/64bit-avx512.c: Regenerate.
11341 * features/i386/64bit-core.c: Regenerate.
11342 * features/i386/64bit-linux.c: Regenerate.
11343 * features/i386/64bit-mpx.c: Regenerate.
11344 * features/i386/64bit-pkeys.c: Regenerate.
11345 * features/i386/64bit-segments.c: Regenerate.
11346 * features/i386/64bit-sse.c: Regenerate.
11347 * features/i386/x32-core.c: Regenerate.
11348 * features/tic6x-c6xp.c: Regenerate.
11349 * features/tic6x-core.c: Regenerate.
11350 * features/tic6x-gp.c: Regenerate.
11351 * target-descriptions.c: Use common/tdesc.h.
11352 * target-descriptions.h: Likewise.
11354 2018-02-24 Tom Tromey <tom@tromey.com>
11356 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11357 (try_thread_db_load_from_dir, thread_db_load_search): Use
11359 (info_auto_load_libthread_db_compare): Return bool. Change
11361 (info_auto_load_libthread_db): Use std::vector, std::string.
11364 2018-02-24 Tom Tromey <tom@tromey.com>
11366 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11368 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11370 * gdbarch.c: Rebuild.
11371 * gdbarch.h: Rebuild.
11372 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11373 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11374 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11377 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11379 * gdbtypes.h (sect_offset): Change type to uint64_t.
11380 (sect_offset_str): New function.
11381 * dwarf2read.c (create_addrmap_from_aranges): Use
11383 (error_check_comp_unit_head): Likewise.
11384 (create_debug_type_hash_table): Likewise.
11385 (read_cutu_die_from_dwo): Likewise.
11386 (init_cutu_and_read_dies): Likewise.
11387 (init_cutu_and_read_dies_no_follow): Likewise.
11388 (process_psymtab_comp_unit_reader): Likewise.
11389 (partial_die_parent_scope): Likewise.
11390 (peek_die_abbrev): Likewise.
11391 (process_queue): Likewise.
11392 (dwarf2_physname): Likewise.
11393 (read_namespace_alias): Likewise.
11394 (read_import_statement): Likewise.
11395 (create_dwo_cu_reader): Likewise.
11396 (create_cus_hash_table): Likewise.
11397 (lookup_dwo_cutu): Likewise.
11398 (inherit_abstract_dies): Likewise.
11399 (read_func_scope): Likewise.
11400 (read_call_site_scope): Likewise.
11401 (dwarf2_add_member_fn): Likewise.
11402 (read_common_block): Likewise.
11403 (read_module_type): Likewise.
11404 (read_typedef): Likewise.
11405 (read_subrange_type): Likewise.
11406 (load_partial_dies): Likewise.
11407 (read_partial_die): Likewise.
11408 (find_partial_die): Likewise.
11409 (read_str_index): Likewise.
11410 (dwarf2_string_attr): Likewise.
11411 (build_error_marker_type): Likewise.
11412 (lookup_die_type): Likewise.
11413 (dump_die_shallow): Likewise.
11414 (follow_die_ref): Likewise.
11415 (dwarf2_fetch_die_loc_sect_off): Likewise.
11416 (dwarf2_fetch_constant_bytes): Likewise.
11417 (follow_die_sig): Likewise.
11418 (get_signatured_type): Likewise.
11419 (get_DW_AT_signature_type): Likewise.
11420 (dwarf2_find_containing_comp_unit): Likewise.
11421 (set_die_type): Likewise.
11423 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11425 * arch/aarch64.c: Include "common-defs.h".
11426 * arch/amd64.c: Likewise.
11427 * arch/i386.c: Likewise.
11429 2018-02-21 Tom Tromey <tom@tromey.com>
11431 * value.h: (extract_field_op): Update.
11432 * eval.c (extract_field_op): Return a const char *.
11433 * expression.h (parse_expression_for_completion): Update.
11434 * completer.c (complete_expression): Update.
11435 (add_struct_fields): Make fieldname const.
11436 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11437 (mark_completion_tag, parse_exp_in_context_1): Update.
11438 (parse_expression_for_completion): Change "name" to
11439 unique_xmalloc_ptr*.
11441 2018-02-21 Tom Tromey <tom@tromey.com>
11443 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11445 2018-02-21 Yao Qi <yao.qi@linaro.org>
11447 * avr-tdep.c (avr_read_pc): Change parameter type to
11449 * gdbarch.sh (read_pc): Likewise.
11450 * gdbarch.c: Re-generated.
11451 * gdbarch.h: Re-generated.
11452 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11454 * ia64-tdep.c (ia64_read_pc): Likewise.
11455 * mips-tdep.c (mips_read_pc): Likewise.
11456 * spu-tdep.c (spu_read_pc): Likewise.
11458 2018-02-21 Yao Qi <yao.qi@linaro.org>
11460 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11461 * regcache-dump.c: New file.
11462 * regcache.c: Move register_dump to regcache-dump.c.
11463 (maintenance_print_registers): Likewise.
11464 (maintenance_print_raw_registers): Likewise.
11465 (maintenance_print_cooked_registers): Likewise.
11466 (maintenance_print_register_groups): Likewise.
11467 (maintenance_print_remote_registers): Likewise.
11468 (_initialize_regcache): Likewise.
11469 * regcache.h (register_dump): Moved from regcache.c.
11471 2018-02-21 Yao Qi <yao.qi@linaro.org>
11473 * regcache.c (regcache::regcache): Update.
11474 (regcache::invalidate): Move it to detached_regcache::invalidate.
11475 (get_thread_arch_aspace_regcache): Update.
11476 (regcache::raw_update): Update.
11477 (regcache::cooked_read): Remove some code.
11478 (regcache::cooked_read_value): Likewise.
11479 (regcache::raw_write): Remove assert on m_readonly_p.
11480 (regcache::raw_supply_integer): Move it to
11481 detached_regcache::raw_supply_integer.
11482 (regcache::raw_supply_zeroed): Likewise.
11483 * regcache.h (detached_regcache) <raw_supply_integer>: New
11485 <raw_supply_zeroed, invalidate>: Likewise.
11486 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11487 <invalidate>: Likewise.
11488 <m_readonly_p>: Removed.
11490 2018-02-21 Yao Qi <yao.qi@linaro.org>
11492 * infcmd.c (get_return_value): Let stop_regs point to
11493 get_current_regcache.
11494 * regcache.c (regcache::regcache): Remove.
11495 (register_dump_reg_buffer): New class.
11496 (regcache_print): Adjust.
11497 * regcache.h (regcache): Remove constructors.
11499 2018-02-21 Yao Qi <yao.qi@linaro.org>
11501 * regcache.c (class register_dump): New class.
11502 (register_dump_regcache, register_dump_none): New class.
11503 (register_dump_remote, register_dump_groups): New class.
11504 (regcache_print): Update.
11505 * regcache.h (regcache_dump_what): Move it to regcache.c.
11506 (regcache) <dump>: Remove.
11508 2018-02-21 Yao Qi <yao.qi@linaro.org>
11510 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11512 (jit_unwind_reg_set_impl): Call raw_supply.
11513 (jit_frame_sniffer): Use reg_buffer_rw.
11514 * record-full.c (record_full_core_regbuf): Change its type.
11515 (record_full_core_open_1): Use reg_buffer_rw.
11516 (record_full_close): Likewise.
11517 (record_full_core_fetch_registers): Use regcache->raw_supply.
11518 (record_full_core_store_registers): Likewise.
11519 * regcache.c (regcache::get_register_status): Move it to
11521 (regcache_raw_set_cached_value): Remove.
11522 (regcache::raw_set_cached_value): Remove.
11523 (regcache::raw_write): Call raw_supply.
11524 (regcache::raw_supply): Move it to reg_buffer_rw.
11525 * regcache.h (regcache_raw_set_cached_value): Remove.
11526 (reg_buffer_rw): New class.
11528 2018-02-21 Yao Qi <yao.qi@linaro.org>
11530 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11531 readonly_detached_regcache.
11532 (dummy_frame_prev_register): Use regcache->cooked_read.
11533 * frame.c (frame_save_as_regcache): Change return type.
11534 (frame_pop): Update.
11535 * frame.h (frame_save_as_regcache): Update declaration.
11536 * inferior.h (get_infcall_suspend_state_regcache): Update
11538 * infrun.c (infcall_suspend_state) <registers>: use
11539 readonly_detached_regcache.
11540 (save_infcall_suspend_state): Don't use regcache_dup.
11541 (get_infcall_suspend_state_regcache): Change return type.
11542 * linux-fork.c (struct fork_info) <savedregs>: Change to
11543 readonly_detached_regcache.
11545 (fork_save_infrun_state): Don't use regcache_dup.
11546 (info_checkpoints_command): Adjust.
11547 * mi/mi-main.c (register_changed_p): Update declaration.
11548 (mi_cmd_data_list_changed_registers): Use
11549 readonly_detached_regcache.
11550 (register_changed_p): Change parameter type to
11551 readonly_detached_regcache.
11552 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11553 readonly_detached_regcache.
11554 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11555 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11557 (regcache::save): Move it to reg_buffer.
11558 (regcache::restore): Change parameter type.
11559 (regcache_dup): Remove.
11560 * regcache.h (reg_buffer) <save>: New method.
11561 (readonly_detached_regcache): New class.
11562 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11563 readonly_detached_regcache.
11564 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11566 2018-02-21 Yao Qi <yao.qi@linaro.org>
11568 * frame.c (frame_save_as_regcache): Use regcache method save.
11569 (frame_pop): Use regcache method restore.
11570 * infrun.c (restore_infcall_suspend_state): Likewise.
11571 * linux-fork.c (fork_load_infrun_state): Likewise.
11572 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11574 * regcache.c (regcache_save): Remove.
11575 (regcache::restore): More asserts.
11576 (regcache_cpy): Remove.
11577 * regcache.h (regcache_save): Remove the declaration.
11578 (regcache::restore): Move from private to public.
11579 Remove the friend declaration of regcache_cpy.
11580 (regcache_cpy): Remove declaration.
11582 2018-02-21 Yao Qi <yao.qi@linaro.org>
11584 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11585 parameter type to 'readable_regcache *'.
11586 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11587 * arm-tdep.c (arm_neon_quad_read): Likewise.
11588 (arm_pseudo_read): Likewise.
11589 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11590 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11591 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11592 * gdbarch.c: Re-generated.
11593 * gdbarch.h: Re-generated.
11594 * gdbarch.sh (pseudo_register_read): Change parameter type to
11595 'readable_regcache *'.
11596 (pseudo_register_read_value): Likewise.
11597 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11598 (h8300_pseudo_register_read): Likewise.
11599 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11600 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11601 (i386_pseudo_register_read_into_value): Likewise.
11602 (i386_pseudo_register_read_value): Likewise.
11603 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11605 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11606 * m32c-tdep.c (m32c_raw_read): Likewise.
11607 (m32c_read_flg): Likewise.
11608 (m32c_banked_register): Likewise.
11609 (m32c_banked_read): Likewise.
11610 (m32c_sb_read): Likewise.
11611 (m32c_part_read): Likewise.
11612 (m32c_cat_read): Likewise.
11613 (m32c_r3r2r1r0_read): Likewise.
11614 (m32c_pseudo_register_read): Likewise.
11615 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11616 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11617 (mep_pseudo_cr64_read): Likewise.
11618 (mep_pseudo_register_read): Likewise.
11619 * mips-tdep.c (mips_pseudo_register_read): Likewise.
11620 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11621 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11622 * regcache.c (regcache::raw_read): Move it to readable_regcache.
11623 (regcache::cooked_read): Likewise.
11624 (regcache::cooked_read_value): Likewise.
11625 (regcache_cooked_read_signed):
11626 (regcache::cooked_read): Likewise.
11627 * regcache.h (readable_regcache): New class.
11628 (regcache): Inherit readable_regcache. Move some methods to
11630 * rl78-tdep.c (rl78_pseudo_register_read): Change
11631 parameter type to 'readable_regcache *'.
11632 * rs6000-tdep.c (do_regcache_raw_read): Remove.
11633 (e500_pseudo_register_read): Change parameter type to
11634 'readable_regcache *'.
11635 (dfp_pseudo_register_read): Likewise.
11636 (vsx_pseudo_register_read): Likewise.
11637 (efpr_pseudo_register_read): Likewise.
11638 * s390-tdep.c (s390_pseudo_register_read): Likewise.
11639 * sh-tdep.c (sh_pseudo_register_read): Likewise.
11640 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11641 (sh64_pseudo_register_read): Likewise.
11642 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11643 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11644 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11645 (spu_pseudo_register_read): Likewise.
11646 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11647 (xtensa_pseudo_register_read): Likewise.
11649 2018-02-21 Yao Qi <yao.qi@linaro.org>
11651 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11652 (regcache::arch): Move it to reg_buffer::arch.
11653 (regcache::register_buffer): Likewise.
11654 (regcache::assert_regnum): Likewise.
11655 (regcache::num_raw_registers): Likewise.
11656 * regcache.h (reg_buffer): New class.
11657 (regcache): Inherit reg_buffer.
11659 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11661 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11662 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11664 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11666 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11668 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11670 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11671 (SFILES): Remove common/*.c files.
11672 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11673 * common/common.host: Add common reference.
11674 * configure.ac: Likewise.
11675 * configure: Regenerate.
11677 2018-02-16 Yao Qi <yao.qi@linaro.org>
11679 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11680 (block_initialize_namespace): Use new.
11681 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11682 (dwarf2_free_objfile): Use delete.
11683 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11684 (copy_type_recursive): Use new.
11685 * gdb_obstack.h (allocate_on_obstack): New.
11687 2018-02-15 Yao Qi <yao.qi@linaro.org>
11690 * inferior.c (exit_inferior_1): Reset inf->control.
11692 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11694 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11697 2018-02-14 Pedro Alves <palves@redhat.com>
11699 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11700 frame_cleanup_after_sniffer on exception.
11702 2018-02-14 Tom Tromey <tom@tromey.com>
11704 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11706 (solib_bfd_open): Make pathname const.
11707 * solib.c (solib_bfd_open): Make pathname const.
11708 * solib-spu.c (spu_bfd_fopen): Make name const.
11709 (spu_bfd_open): Make pathname const.
11710 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11711 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11713 2018-02-14 Tom Tromey <tom@tromey.com>
11715 * symfile.c (symfile_bfd_open): Update.
11716 * source.h (openp, source_full_path_of, find_and_open_source):
11717 Change argument type to unique_xmalloc_ptr.
11718 * source.c (openp): Take a unique_xmalloc_ptr.
11719 (source_full_path_of, find_and_open_source): Likewise.
11720 (open_source_file, symtab_to_fullname): Update.
11721 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11722 unique_xmalloc_ptr.
11723 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11724 (exec_file_find): Update.
11725 * psymtab.c (psymtab_to_fullname): Update.
11726 * nto-tdep.h (nto_find_and_open_solib): Update.
11727 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11728 unique_xmalloc_ptr.
11729 * exec.c (exec_file_attach): Update.
11730 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11731 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11733 2018-02-14 Tom Tromey <tom@tromey.com>
11735 * solib.c: Include source.h.
11736 * nto-tdep.c: Include source.h.
11737 * mi/mi-cmd-env.c: Include source.h.
11738 * infcmd.c: Include source.h.
11739 * exec.c: Include source.h.
11740 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11741 (add_path, directory_switch, source_path, init_source_path): Move
11743 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11744 (add_path, directory_switch, source_path, init_source_path):
11747 2018-02-14 Tom Tromey <tom@tromey.com>
11749 * solist.h (exec_file_find, solib_find): Return
11750 unique_xmalloc_ptr.
11751 (solib_bfd_fopen): Take a const char *.
11752 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11753 (exec_file_find, solib_find): Likewise.
11754 (solib_bfd_fopen): Do not take ownership of "pathname".
11755 (solib_bfd_open): Use unique_xmalloc_ptr.
11756 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11757 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11758 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11759 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11761 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11763 * ada-lang.c (name_match_type_from_name): Remove reference to
11764 ada_name_for_lookup in function's documentation.
11765 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11767 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11769 * defs.h (enum openp_flags): New enum.
11770 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11771 Move to enum openp_flags.
11772 (openp_flags): New enum flags.
11773 (openp): Change parameter type to openp_flags.
11774 * source.c (openp): Change parameter type to openp_flags.
11775 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11776 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11778 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11780 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11783 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11785 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11787 (class dwarf2_queue_guard): ...the destructor of this new class.
11788 (dw2_do_instantiate_symtab): Create instance of the new class
11789 dwarf2_queue_guard, remove cleanup.
11791 2018-02-09 Tom Tromey <tom@tromey.com>
11793 * source.c (find_source_lines): Don't reference past the end of
11796 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11798 * remote.c (remote_btrace_maybe_reopen): Change error message.
11799 * btrace.c (btrace_enable): Likewise.
11800 (parse_xml_btrace): Likewise.
11801 (parse_xml_btrace_conf): Likewise.
11803 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11805 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11806 (linux_enable_pt, linux_enable_bts): Call
11807 diagnose_perf_event_open_fail.
11809 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11811 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11812 Remove parameter and change return type. Update callers. Move it.
11813 (linux_enable_bts, linux_enable_pt): Improve error message.
11814 (linux_enable_pt): Remove zero buffer size check.
11815 (linux_enable_btrace): Improve error messages. Remove NULL return
11818 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11820 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11821 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11822 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11823 (linux_supports_pt, linux_supports_btrace): Remove.
11824 (linux_enable_bts): Call cpu_supports_bts.
11825 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11826 * remote.c (remote_supports_btrace): Remove.
11827 (init_remote_ops): Remove remote_supports_btrace.
11828 * target-delegates.c: Regenerated.
11829 * target.c (target_supports_btrace): Remove.
11830 * target.h (target_ops) <to_supports_btrace>: Remove
11831 (target_supports_btrace): Remove.
11832 * x86-linux-nat.c (x86_linux_create_target): Remove
11833 linux_supports_btrace.
11835 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11837 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11839 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11840 exception and use message in own exception.
11842 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11844 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11845 (perf_event_pt_event_type): Use gdb_file_up.
11846 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11847 scoped_fd, and scoped_mmap.
11849 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11851 * common/scoped_mmap.h: New.
11852 * unittests/scoped_mmap-selftest.c: New.
11853 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11854 unittests/scoped_mmap-selftest.c.
11856 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11858 * common/scoped_fd.h: New.
11859 * unittests/scoped_fd-selftest.c: New.
11860 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11861 unittests/scoped_fd-selftest.c.
11863 2018-02-09 Tom Tromey <tom@tromey.com>
11865 * auto-load.c (auto_load_section_scripts): Use
11866 gdb::unique_xmalloc_ptr.
11868 2018-02-09 Tom Tromey <tom@tromey.com>
11870 * auto-load.c (execute_script_contents): Use std::string.
11872 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11874 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11875 Python function, rather than a new command.
11877 2018-02-08 Tom Tromey <tom@tromey.com>
11879 * solib.c (solib_find_1): Use std::string.
11880 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11882 2018-02-08 Tom Tromey <tom@tromey.com>
11884 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11886 2018-02-08 Tom Tromey <tom@tromey.com>
11888 * source.c (find_source_lines): Use gdb::def_vector.
11890 2018-02-08 Tom Tromey <tom@tromey.com>
11892 * macrocmd.c (struct temporary_macro_definition): New.
11893 (macro_define_command): Use temporary_macro_definition. Remove
11895 (free_macro_definition_ptr): Remove.
11897 2018-02-08 Tom Tromey <tom@tromey.com>
11899 * macroexp.c (maybe_expand): Use std::string.
11901 2018-02-08 Tom Tromey <tom@tromey.com>
11903 * macroexp.c (struct macro_buffer): Add initializers for some
11905 (init_buffer, init_shared_buffer, free_buffer)
11906 (free_buffer_return_text): Remove.
11907 (macro_buffer): New constructors.
11908 (~macro_buffer): New destructor.
11909 (macro_buffer::set_shared): New method.
11910 (macro_buffer::resize_buffer, macro_buffer::appendc)
11911 (macro_buffer::appendmem): Now methods, not free functions.
11912 (set_token, append_tokens_without_splicing, stringify)
11913 (macro_stringify): Update.
11914 (gather_arguments): Change return type. Remove argc_p argument,
11915 add args_ptr argument. Use std::vector.
11916 (substitute_args): Remove argc argument. Accept std::vector.
11917 (expand): Update. Use std::vector.
11918 (scan, macro_expand, macro_expand_next): Update.
11920 2018-02-08 Tom Tromey <tom@tromey.com>
11922 * symtab.c (default_collect_symbol_completion_matches_break_on):
11923 Use unique_xmalloc_ptr.
11924 * macroscope.h: (sal_macro_scope, user_macro_scope)
11925 (default_macro_scope): Return unique_xmalloc_ptr.
11926 * macroscope.c (sal_macro_scope, user_macro_scope)
11927 (default_macro_scope): Return unique_xmalloc_ptr.
11928 * macroexp.h (macro_expand, macro_expand_once): Return
11929 unique_xmalloc_ptr.
11930 * macroexp.c (macro_expand, macro_expand_once): Return
11931 unique_xmalloc_ptr.
11932 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11933 (info_macro_command, info_macros_command): Use
11934 unique_xmalloc_ptr.
11935 * compile/compile-c-support.c (write_macro_definitions): Use
11936 unique_xmalloc_ptr.
11937 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11939 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11941 * value.c (value_static_field): Assign field type instead of
11942 containing type when returning an optimized out value.
11944 2018-02-06 Yao Qi <yao.qi@linaro.org>
11946 * ft32-tdep.c (ft32_read_pc): Remove.
11947 (ft32_write_pc): Remove.
11948 (ft32_gdbarch_init): Update.
11949 * m32r-tdep.c (m32r_read_pc): Remove.
11950 (m32r_gdbarch_init): Update.
11951 * mep-tdep.c (mep_read_pc): Remove.
11952 (mep_gdbarch_init): Update.
11953 * microblaze-tdep.c (microblaze_write_pc): Remove.
11954 (microblaze_gdbarch_init): Update.
11955 * mn10300-tdep.c (mn10300_read_pc): Remove.
11956 (mn10300_write_pc): Remove.
11957 (mn10300_gdbarch_init): Update.
11958 * moxie-tdep.c (moxie_read_pc): Remove.
11959 (moxie_write_pc): Remove.
11960 (moxie_gdbarch_init): Update.
11962 2018-02-06 Yao Qi <yao.qi@linaro.org>
11964 * expprint.c (print_subexp_standard): Handle
11965 OP_F77_UNDETERMINED_ARGLIST.
11966 (dump_subexp_body_standard): Likewise.
11968 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11970 * target-descriptions.c (tdesc_element_visitor) Add empty
11972 (tdesc_type): Move make_gdb_type from here.
11973 (tdesc_type_builtin): Likewise.
11974 (tdesc_type_vector): Likewise.
11975 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11976 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11977 (make_gdb_type_union): Likewise.
11978 (make_gdb_type_flags): Likewise.
11979 (make_gdb_type_enum): Likewise.
11980 (make_gdb_type): New function.
11981 (tdesc_register_type): Use static make_gdb_type.
11983 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11985 * infcmd.c (default_print_one_register_info): Align natural-format
11986 column values consistently one under another.
11987 (pad_to_column): New function.
11989 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11991 * dwarf2read.c (dwarf2_physname): Move commment.
11993 2018-02-01 Leszek Swirski <leszeks@google.com>
11995 * varobj.c (varobj_formatted_print_options): Allow recursive
11996 pretty printing if pretty printing is enabled.
11998 2018-02-01 Leszek Swirski <leszeks@google.com>
12000 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12001 names after a structop as a filename.
12003 2018-02-01 Yao Qi <yao.qi@linaro.org>
12005 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12006 (arm_record_coproc_data_proc): Likewise.
12008 2018-02-01 Yao Qi <yao.qi@linaro.org>
12010 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12012 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12014 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12015 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12017 2018-01-31 Pedro Alves <palves@redhat.com>
12019 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12020 * inflow.c (child_terminal_save_inferior): Wrap reference to
12021 tcgetpgrp in HAVE_TERMIOS_H.
12022 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12024 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12025 always iterate over all inferiors.
12026 (gdbsim_cntrl_c): Adjust.
12027 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12029 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12031 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12032 index type is objfile-owned if the element type is as well.
12034 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12038 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12040 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12041 "features/s390x-linux64.c".
12042 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12043 s390_linux32 and s390x_linux64.
12044 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12046 * s390-tdep.c: Include "features/s390-linux32.c" and
12047 "features/s390x-linux64.c".
12048 (s390_tdesc_valid): Add check for tdesc_has_registers.
12049 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12050 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12051 tdesc_s390x_linux64.
12052 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12053 tdesc_s390x_linux64 to...
12054 * s390-tdep.h: ...here.
12056 2018-01-30 Pedro Alves <palves@redhat.com>
12059 * config.in, configure: Regenerate.
12060 * configure.ac: Check for getpgid.
12061 * go32-nat.c (go32_pass_ctrlc): New.
12062 (go32_target): Install it.
12063 * inf-child.c (inf_child_target): Install
12064 child_terminal_save_inferior, child_pass_ctrlc and
12066 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12067 (inf_ptrace_target): No longer install it.
12068 * infcmd.c (interrupt_target_1): Adjust.
12069 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12070 (child_interrupt): Declare.
12071 (inferior::terminal_state): New.
12072 * inflow.c (struct terminal_info): Update comments.
12073 (inferior_process_group): Delete.
12074 (terminal_is_ours): Delete.
12075 (gdb_tty_state): New.
12076 (child_terminal_init): Adjust.
12077 (is_gdb_terminal, sharing_input_terminal_1)
12078 (sharing_input_terminal): New functions.
12079 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12080 Set the process's actual process group in the foreground if
12081 possible. Handle is_ours_for_output/is_ours distinction. Don't
12082 mark terminal as the inferior's if not sharing GDB's terminal.
12083 Don't check attach_flag.
12084 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12085 pass down a target_terminal_state.
12086 (child_terminal_save_inferior): New, factored out from ...
12087 (child_terminal_ours_1): ... this. Handle
12088 target_terminal_state::is_ours_for_output.
12089 (child_interrupt, child_pass_ctrlc): New.
12090 (inflow_inferior_exit): Clear the inferior's terminal_state.
12091 (copy_terminal_info): Copy the inferior's terminal state.
12092 (_initialize_inflow): Remove reference to terminal_is_ours.
12093 * inflow.h (inferior_process_group): Delete.
12094 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12095 * procfs.c (procfs_target): Don't install procfs_interrupt.
12096 (procfs_interrupt): Delete.
12097 * remote.c (remote_serial_quit_handler): Adjust.
12098 (remote_interrupt): Remove ptid parameter. Adjust.
12099 * target-delegates.c: Regenerate.
12100 * target.c: Include "terminal.h".
12101 (target_terminal::terminal_state): Rename to ...
12102 (target_terminal::m_terminal_state): ... this.
12103 (target_terminal::init): Adjust.
12104 (target_terminal::inferior): Adjust to per-inferior
12106 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12107 (target_terminal::ours, target_terminal::ours_for_output): Use
12108 target_terminal_is_ours_kind.
12109 (target_interrupt): Remove ptid parameter. Adjust.
12110 (default_target_pass_ctrlc): Adjust.
12111 * target.h (target_ops::to_terminal_save_inferior): New field.
12112 (target_ops::to_interrupt): Remove ptid_t parameter.
12113 (target_interrupt): Remove ptid_t parameter. Update comment.
12114 (target_pass_ctrlc): Update comment.
12115 * target/target.h (target_terminal_state): New scoped enum,
12116 factored out of ...
12117 (target_terminal::terminal_state): ... here.
12118 (target_terminal::inferior): Update comments.
12119 (target_terminal::restore_inferior): New.
12120 (target_terminal::is_inferior, target_terminal::is_ours)
12121 (target_terminal::is_ours_for_output): Adjust.
12122 (target_terminal::scoped_restore_terminal_state): Adjust to
12123 rename, and call restore_inferior() instead of inferior().
12124 (target_terminal::scoped_restore_terminal_state::m_state): Change
12126 (target_terminal::terminal_state): Rename to ...
12127 (target_terminal::m_terminal_state): ... this and change type.
12129 2018-01-30 Pedro Alves <palves@redhat.com>
12131 * linux-nat.c (wait_for_signal): New function.
12132 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12134 (async_terminal_is_ours)
12135 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12136 (linux_nat_add_target): Don't override
12137 to_terminal_inferior/to_terminal_ours.
12139 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12141 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12143 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12145 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12146 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12147 dwarf2_per_objfile_free here.
12148 (dwarf2_per_objfile_free): Remove.
12149 (_initialize_dwarf2_read): Don't register
12150 dwarf2_per_objfile_free as a registry cleanup.
12152 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12154 Avoid compilation errors in MinGW native builds
12156 The error is triggered by including python-internal.h, and the
12159 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12160 from build-gnulib/import/math.h:27,
12161 from d:/usr/Python26/include/pyport.h:235,
12162 from d:/usr/Python26/include/Python.h:58,
12163 from python/python-internal.h:94,
12164 from python/py-arch.c:24:
12165 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12169 This happens because Python headers define 'hypot' to expand t
12170 '_hypot' in the Windows builds.
12171 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12172 'hypoth'. This avoids a compilation error.
12174 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12176 * MAINTAINERS (Write After Approval): Fix ordering.
12178 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12180 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12182 2018-01-26 Alan Modra <amodra@gmail.com>
12184 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12185 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12186 Remove nop. Make const. Comment.
12187 (powerpc32_plt_stub_so_2): New.
12188 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12189 Correct count. Update uses.
12190 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12191 Move common code reading PLT entry word. Correct
12192 powerpc32_plt_stub PLT address calculation.
12193 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12194 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12195 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12196 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12197 (ppc64_standard_linkage8): Likewise.
12198 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12199 Correct insns description.
12200 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12202 2018-01-24 Pedro Alves <palves@redhat.com>
12204 GCC PR libstdc++/83906
12205 * gdbtypes.c (operator==(const dynamic_prop &,
12206 const dynamic_prop &)): New.
12207 (operator==(const range_bounds &, const range_bounds &)): New.
12208 (check_types_equal): Use them instead of memcmp.
12209 * gdbtypes.h (operator==(const dynamic_prop &,
12210 const dynamic_prop &)): Declare.
12211 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12212 (operator==(const range_bounds &, const range_bounds &)): Declare.
12213 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12215 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12217 * s390-linux-tdep.c (s390_record_address_mask)
12218 (s390_record_calc_disp_common, s390_record_calc_disp)
12219 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12220 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12221 (s390_process_record): Move to s390-tdep.c.
12222 (s390_linux_init_abi_any): Adjust.
12223 * s390-tdep.c (s390_record_address_mask)
12224 (s390_record_calc_disp_common, s390_record_calc_disp)
12225 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12226 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12227 (s390_process_record): Moved from s390-linux-tdep.c
12228 (s390_gdbarch_init): Adjust.
12230 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12232 * s390-linux-nat.c (s390-tdep.h): New include.
12233 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12234 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12235 (ALLDEPFILES): Add s390-tdep.c.
12236 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12237 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12238 * s390-tdep.h: ...this. New file.
12239 * s390-linux-tdep.c (s390-tdep.h): New include.
12240 (_initialize_s390_tdep): Rename to...
12241 (_initialize_s390_linux_tdep): ...this and adjust.
12242 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12243 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12245 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12246 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12247 (s390_is_partial_instruction, s390_software_single_step)
12248 (is_non_branch_ril, s390_displaced_step_copy_insn)
12249 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12250 (s390_prologue_data, s390_addr, s390_store, s390_load)
12251 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12252 (s390_register_call_saved, s390_guess_tracepoint_registers)
12253 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12254 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12255 (s390_pseudo_register_name, s390_pseudo_register_type)
12256 (s390_pseudo_register_read, s390_pseudo_register_write)
12257 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12258 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12259 (s390_addr_bits_remove, s390_address_class_type_flags)
12260 (s390_address_class_type_flags_to_name)
12261 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12262 (s390_function_arg_float, s390_function_arg_vector)
12263 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12264 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12265 (s390_frame_align, s390_register_return_value, s390_return_value)
12266 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12267 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12268 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12269 (s390_trad_frame_prev_register, s390_unwind_cache)
12270 (s390_prologue_frame_unwind_cache)
12271 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12272 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12273 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12274 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12275 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12276 (s390_frame_base_address, s390_local_base_address)
12277 (s390_frame_base, s390_gcc_target_options)
12278 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12279 (s390_validate_reg_range, s390_tdesc_valid)
12280 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12281 * s390-tdep.c: ...this. New file.
12283 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12285 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12286 (s390_process_record, s390_gdbarch_tdep_alloc)
12287 (s390_linux_init_abi_any): Use/set new hook.
12289 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12291 * s390-linux-tdep.c (osabi.h): New include.
12292 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12293 (s390_linux_init_abi_any): New functions.
12294 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12296 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12298 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12299 tdesc_has_registers check
12301 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12303 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12304 (s390_validate_reg_range): New macro.
12305 (s390_gdbarch_init): Adjust.
12307 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12309 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12310 (s390_gdbarch_tdep_alloc): Adjust.
12311 (s390_gdbarch_init): Adjust.
12313 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12315 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12316 <have_tdb>: Change type to bool.
12317 (s390_gdbarch_tdep_alloc): Adjust.
12318 (s390_gdbarch_init): Adjust.
12320 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12322 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12323 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12324 (s390_gdbarch_tdep_alloc): New function.
12325 (s390_gdbarch_init): Allocate tdep at start and use its fields
12326 instead of separate variables.
12328 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12330 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12331 when looking for cached gdbarch and add comment for remaining.
12333 2018-01-22 Pedro Alves <palves@redhat.com>
12334 Sergio Durigan Junior <sergiodj@redhat.com>
12336 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12339 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12341 * MAINTAINERS: Update my company e-mail address.
12343 2018-01-22 Yao Qi <yao.qi@linaro.org>
12345 * regcache.c (cooked_write_test): New function.
12346 (_initialize_regcache): Register the test.
12348 2018-01-22 Yao Qi <yao.qi@linaro.org>
12350 * ia64-tdep.c (ia64_pseudo_register_read): Call
12351 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12352 * m32c-tdep.c (m32c_cat_read): Likewise.
12353 (m32c_r3r2r1r0_read): Likewise.
12354 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12355 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12357 2018-01-22 Yao Qi <yao.qi@linaro.org>
12359 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12360 method raw_read instead of regcache_raw_read.
12361 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12362 * arm-tdep.c (arm_neon_quad_read): Likewise.
12363 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12364 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12365 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12366 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12367 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12368 (i386_pseudo_register_read_into_value): Likewise.
12369 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12370 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12371 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12372 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12373 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12374 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12375 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12376 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12377 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12379 2018-01-22 Yao Qi <yao.qi@linaro.org>
12381 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12382 * configure.tgt: Remove target mt.
12383 * mt-tdep.c: Remove.
12384 * regcache.c (cooked_read_test): Remove the check for mt.
12386 2018-01-22 Yao Qi <yao.qi@linaro.org>
12388 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12389 instead of gdbarch_pseudo_register_read_value.
12391 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12393 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12396 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12398 * linespec.c (create_sals_line_offset): Remove code that preserved
12399 the symtab_and_line's line number.
12401 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12403 * varobj.c (varobj_create): Don't set valid_block when creating a
12406 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12408 * varobj.c (varobj_create): Remove out of date comment.
12410 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12413 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12414 updating innermost block.
12415 * parse.c (innermost_block_tracker::update): Take extra type
12416 parameter, and check types match before updating innermost block.
12417 (write_dollar_variable): Update innermost block for registers.
12418 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12419 (innermost_block_tracker::innermost_block_tracker): Initialise
12421 (innermost_block_tracker::reset): Take type parameter.
12422 (innermost_block_tracker::update): Take type parameter, and pass
12423 type through as needed.
12424 (innermost_block_tracker::m_types): New member.
12425 * varobj.c (varobj_create): Pass type when reseting innermost
12428 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12430 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12431 * ada-lang.c (resolve_subexp): Likewise.
12432 * breakpoint.c (set_breakpoint_condition) Likewise.
12433 (watch_command_1) Likewise.
12434 * c-exp.y (variable): Likewise.
12435 * d-exp.y (PrimaryExpression): Likewise.
12436 * f-exp.y (variable): Likewise.
12437 * go-exp.y (variable): Likewise.
12438 * m2-exp.y (variable): Likewise.
12439 * objfiles.c (objfile::~objfile): Likewise.
12440 * p-exp.y (variable): Likewise.
12441 * parse.c (innermost_block): Change type.
12442 * parser-defs.h (class innermost_block_tracker): New.
12443 (innermost_block): Change to innermost_block_tracker.
12444 * printcmd.c (display_command): Switch to innermost_block API.
12445 (do_one_display): Likewise.
12446 * rust-exp.y (do_one_display): Likewise.
12447 * symfile.c (clear_symtab_users): Likewise.
12448 * varobj.c (varobj_create): Switch to innermost_block API, replace
12449 use of innermost_block with block stored on varobj object.
12451 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12453 * expression.h (innermost_block): Remove declaration.
12454 * varobj.c: Add 'parser-defs.h' include.
12456 2018-01-19 Tom Tromey <tom@tromey.com>
12458 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12459 symbols in the static and global blocks.
12461 2018-01-19 James Clarke <jrtc27@jrtc27.com>
12463 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12464 gdb_ptrace.h, and move including gdb_wait.h ...
12465 * nat/linux-ptrace.h: ... to here.
12467 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12469 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12470 inf_ptrace_detach_success.
12471 (inf_ptrace_detach_success): Add inferior parameter, use it
12472 instead of inferior_ptid, pass it to detach_inferior.
12473 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12475 * inferior.c (detach_inferior): Add overload that takes an
12477 * inferior.h (detach_inferior): Likewise.
12478 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12479 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12480 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12482 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12484 * target.h (struct target_ops) <to_detach>: Add inferior
12486 (target_detach): Likewise.
12487 * target.c (dispose_inferior): Pass inferior down.
12488 (target_detach): Pass inferior down. Assert that it is equal to
12489 the current inferior.
12490 * aix-thread.c (aix_thread_detach): Pass inferior down.
12491 * corefile.c (core_file_command): Pass current_inferior() down.
12492 * corelow.c (core_detach): Add inferior parameter.
12493 * darwin-nat.c (darwin_detach): Likewise.
12494 * gnu-nat.c (gnu_detach): Likewise.
12495 * inf-ptrace.c (inf_ptrace_detach): Likewise.
12496 * infcmd.c (detach_command): Pass current_inferior() down to
12498 * infrun.c (follow_fork_inferior): Pass parent_inf to
12500 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12502 * linux-nat.c (linux_nat_detach): Add inferior parameter.
12503 * linux-thread-db.c (thread_db_detach): Likewise.
12504 * nto-procfs.c (procfs_detach): Likewise.
12505 * procfs.c (procfs_detach): Likewise.
12506 * record.c (record_detach): Likewise.
12507 * record.h (struct inferior): Forward-declare.
12508 (record_detach): Add inferior parameter.
12509 * remote-sim.c (gdbsim_detach): Likewise.
12510 * remote.c (remote_detach_1): Likewise.
12511 (remote_detach): Likewise.
12512 (extended_remote_detach): Likewise.
12513 * sol-thread.c (sol_thread_detach): Likewise.
12514 * target-debug.h (target_debug_print_inferior_p): New macro.
12515 * target-delegates.c: Re-generate.
12516 * top.c (kill_or_detach): Pass inferior down to target_detach.
12517 * windows-nat.c (windows_detach): Add inferior parameter.
12519 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12521 * target.h (struct target_ops) <to_detach>: Remove args
12523 (target_detach): Likewise.
12524 * target.c (dispose_inferior): Adjust.
12525 (target_detach): Remove args parameter, adjust.
12526 * aix-thread.c (aix_thread_detach): Adjust.
12527 * corefile.c (core_file_command): Adjust.
12528 * corelow.c (core_detach): Adjust.
12529 * darwin-nat.c (darwin_detach): Adjust.
12530 * gnu-nat.c (gnu_detach): Adjust.
12531 * inf-ptrace.c (inf_ptrace_detach): Adjust.
12532 * infcmd.c (detach_command): Adjust
12533 * infrun.c (follow_fork_inferior): Adjust.
12534 (handle_vfork_child_exec_or_exit): Adjust.
12535 * linux-fork.c (linux_fork_detach): Remove args parameter.
12536 * linux-fork.h (linux_fork_detach): Likewise.
12537 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12538 * linux-thread-db.c (thread_db_detach): Likewise.
12539 * nto-procfs.c (procfs_detach): Likewise.
12540 * procfs.c (procfs_detach): Likewise.
12541 (do_detach): Remove signo parameter.
12542 * record.c (record_detach): Remove args parameter.
12543 * record.h (record_detach): Likewise.
12544 * remote-sim.c (gdbsim_detach): Likewise.
12545 * remote.c (remote_detach_1): Likewise.
12546 (remote_detach): Likewise.
12547 (extended_remote_detach): Likewise.
12548 * sol-thread.c (sol_thread_detach): Likewise.
12549 * target-delegates.c: Re-generate.
12550 * top.c (struct qt_args) <args>: Remove field.
12551 (kill_or_detach): Don't pass args.
12552 (quit_force): Don't set args.
12553 * windows-nat.c (windows_detach): Remove args parameter.
12555 2018-01-19 Yao Qi <yao.qi@linaro.org>
12557 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12558 (arm_linux_init_abi): Install it.
12560 2018-01-19 Yao Qi <yao.qi@linaro.org>
12562 * osabi.c (gdb_osabi_names): Extend the regexp for
12563 arm-linux-gnueabihf.
12565 2018-01-18 Yao Qi <yao.qi@linaro.org>
12567 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12569 (abbrev_table::add_abbrev): Update.
12570 (abbrev_table::lookup_abbrev): Update.
12572 2018-01-18 Yao Qi <yao.qi@linaro.org>
12574 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12576 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
12578 * compile/compile.c (compile_to_object): Convert "triplet_rx"
12581 2018-01-17 Tom Tromey <tom@tromey.com>
12583 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
12585 2018-01-17 Tom Tromey <tom@tromey.com>
12587 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12588 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12589 (create_array_type_with_stride): Update.
12590 * dwarf2read.c (set_die_type): Update.
12592 2018-01-17 Tom Tromey <tom@tromey.com>
12594 * dwarf2read.c (delayed_method_info): Remove typedef.
12595 (dwarf2_cu::method_info): Now a std::vector.
12596 (add_to_method_list): Update.
12597 (free_delayed_list): Remove.
12598 (compute_delayed_physnames): Update.
12599 (process_full_comp_unit, process_full_type_unit): Clear the method
12600 list. Remove cleanups.
12601 (psymtab_include_file_name): Add name_holder parameter. Use
12602 unique_xmalloc_ptr.
12603 (dwarf_decode_lines): Update.
12605 2018-01-17 Tom Tromey <tom@tromey.com>
12606 Simon Marchi <simon.marchi@ericsson.com>
12608 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12609 (dwarf2_per_objfile::free_cached_comp_units)
12610 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12611 (init_cutu_and_read_dies_no_follow): Update.
12612 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12613 (dwarf2_cu::~dwarf2_cu): New.
12614 (free_heap_comp_unit, free_stack_comp_unit): Remove.
12615 (age_cached_comp_units, free_one_cached_comp_unit): Update.
12617 2018-01-17 Tom Tromey <tom@tromey.com>
12618 Simon Marchi <simon.marchi@ericsson.com>
12620 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12621 (struct die_reader_specs) <abbrev_table>: New member.
12622 (struct abbrev_table): Add constructor.
12623 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12624 <abbrev_obstack>: Now an auto_obstack.
12625 (abbrev_table_up): New typedef.
12626 (init_cu_die_reader): Add abbrev_table parameter.
12627 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12628 Add result_dwo_abbrev_table.
12629 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12630 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12632 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12634 (skip_children): Update.
12635 (abbrev_table::alloc_abbrev): Rename from
12636 abbrev_table_alloc_abbrev.
12637 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12638 (abbrev_table::lookup_abbrev): Rename from
12639 abbrev_table_lookup_abbrev.
12640 (abbrev_table_read_table): Return abbrev_table_up.
12641 (abbrev_table_free, abbrev_table_free_cleanup)
12642 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12643 (load_partial_dies): Update.
12645 2018-01-17 Tom Tromey <tom@tromey.com>
12647 * dwarf2read.c (dwarf2_compute_name): Update comment.
12648 (read_func_scope, read_variable): Update.
12649 (new_symbol): Remove.
12650 (new_symbol_full): Rename to new_symbol.
12652 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12655 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12656 a warning instead of throwing an error, set section size to 0 and return
12658 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12660 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12662 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12664 (linux_ptrace_attach_fail_reason_string): Likewise.
12665 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12667 (linux_ptrace_attach_fail_reason_string): Likewise.
12668 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12670 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12672 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12674 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12677 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12678 checking for fs_base/gs_base fields in struct user_regs_struct.
12679 * configure: Regenerate.
12681 2018-01-17 Yao Qi <yao.qi@linaro.org>
12683 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12685 (aarch64_linux_init_abi): Install it to gdbarch hook
12686 gcc_target_options.
12688 2018-01-15 Pedro Alves <palves@redhat.com>
12690 * common/signals-state-save-restore.c
12691 (save_original_signals_state): Fix typos.
12693 2017-01-12 Tom Tromey <tom@tromey.com>
12694 Sergio Durigan Junior <sergiodj@redhat.com>
12696 * Makefile.in (install-only): Install gdb-add-index.
12698 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12700 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12702 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12704 * infrun.c (keep_going_pass_signal): Clear step-over info when
12705 insert_breakpoints fails.
12707 2018-01-11 Pedro Alves <palves@redhat.com>
12710 * infrun.c (resume): Rename to ...
12711 (resume_1): ... this.
12712 (resume): Reimplement as wrapper around resume_1.
12714 2018-01-11 Pedro Alves <palves@redhat.com>
12717 * remote.c (remote_parse_stop_reply): Default to the last-set
12718 general thread instead of to 'magic_null_ptid'.
12720 2018-01-10 Pedro Alves <palves@redhat.com>
12722 * language.h (language_get_symbol_name_matcher): Rename ...
12723 (get_symbol_name_matcher): ... this.
12724 * language.c (language_get_symbol_name_matcher): Ditto.
12725 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12728 2018-01-10 Pedro Alves <palves@redhat.com>
12732 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12733 Adjust to use language_get_symbol_name_matcher instead of
12734 language_defn::la_get_symbol_name_matcher.
12735 * language.c (language_get_symbol_name_matcher): If in Ada mode
12736 and the lookup name is a verbatim match, return Ada's matcher.
12737 * language.h (language_get_symbol_name_matcher): Adjust comment.
12738 (ada_lookup_name_info::verbatim_p):: New method.
12740 2018-01-10 Pedro Alves <palves@redhat.com>
12743 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12744 minsym's language is language_auto or language_cplus, pass down
12745 language_ada instead.
12746 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12748 2018-01-10 Pedro Alves <palves@redhat.com>
12751 * minsyms.c (linkage_name_str): New function.
12752 (iterate_over_minimal_symbols): Use it.
12754 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12756 * NEWS: Document that 'info proc' now works on FreeBSD.
12758 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12760 * configure.ac: Check for kinfo_getfile in libutil.
12761 * configure: Regenerate.
12762 * config.in: Regenerate.
12763 * fbsd-nat.c: Include "fbsd-tdep.h".
12764 (fbsd_fetch_cmdline): New.
12765 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12766 rather than calling error.
12767 (fbsd_info_proc): New.
12768 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12769 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12770 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12772 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12774 * fbsd-nat.c (struct free_deleter): Remove.
12775 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12777 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12779 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12780 NULL for an empty pathname.
12782 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12784 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12785 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12786 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12787 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12788 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12789 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12790 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12791 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12792 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12793 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12794 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12795 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12796 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12797 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12798 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12800 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12802 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12803 (gnu_xfer_auxv): New function.
12804 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12805 TARGET_OBJECT_AUXV.
12807 2018-01-08 Yao Qi <yao.qi@linaro.org>
12808 Simon Marchi <simon.marchi@ericsson.com>
12810 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12812 (COMMON_OBS): Remove selftest.o.
12813 * configure.ac: Append selftest-arch.c and common/selftest.c to
12814 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12815 * configure: Re-generated.
12816 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12818 (maintenance_info_selftests): Likewise.
12820 2018-01-08 Xavier Roirand <roirand@adacore.com>
12822 * ada-valprint.c (val_print_packed_array_elements): Use
12823 proper number of elements when printing an array indexed
12824 by an enumeration type.
12826 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12828 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12829 (dw2_get_file_names_reader): Adjust.
12830 (lookup_dwo_signatured_type): Adjust.
12831 (lookup_dwp_signatured_type): Adjust.
12832 (lookup_signatured_type): Adjust.
12833 (create_type_unit_group): Adjust.
12834 (get_type_unit_group): Adjust.
12835 (process_psymtab_comp_unit_reader): Adjust.
12836 (build_type_psymtabs_reader): Adjust.
12837 (scan_partial_symbols): Adjust.
12838 (add_partial_symbol): Adjust.
12839 (add_partial_subprogram): Adjust.
12840 (peek_die_abbrev): Adjust.
12841 (fixup_go_packaging): Adjust.
12842 (process_imported_unit_die): Adjust.
12843 (dwarf2_compute_name): Adjust.
12844 (dwarf2_physname): Adjust.
12845 (read_import_statement): Adjust.
12846 (handle_DW_AT_stmt_list): Adjust.
12847 (read_file_scope): Adjust.
12848 (read_func_scope): Adjust.
12849 (read_lexical_block_scope): Adjust.
12850 (read_call_site_scope): Adjust.
12851 (read_variable): Adjust.
12852 (dwarf2_rnglists_process): Adjust.
12853 (dwarf2_ranges_process): Adjust.
12854 (dwarf2_ranges_read): Adjust.
12855 (dwarf2_get_pc_bounds): Adjust.
12856 (dwarf2_record_block_ranges): Adjust.
12857 (dwarf2_add_field): Adjust.
12858 (dwarf2_add_member_fn): Adjust.
12859 (read_structure_type): Adjust.
12860 (process_structure_scope): Adjust.
12861 (read_enumeration_type): Adjust.
12862 (read_array_type): Adjust.
12863 (mark_common_block_symbol_computed): Adjust.
12864 (read_common_block): Adjust.
12865 (read_namespace_type): Adjust.
12866 (read_namespace): Adjust.
12867 (read_module_type): Adjust.
12868 (read_tag_pointer_type): Adjust.
12869 (read_tag_ptr_to_member_type): Adjust.
12870 (read_tag_string_type): Adjust.
12871 (read_subroutine_type): Adjust.
12872 (read_typedef): Adjust.
12873 (read_base_type): Adjust.
12874 (attr_to_dynamic_prop): Adjust.
12875 (read_subrange_type): Adjust.
12876 (read_unspecified_type): Adjust.
12877 (dwarf2_read_abbrevs): Adjust.
12878 (load_partial_dies): Adjust.
12879 (read_partial_die): Adjust.
12880 (find_partial_die): Adjust.
12881 (guess_partial_die_structure_name): Adjust.
12882 (fixup_partial_die): Adjust.
12883 (read_attribute_value): Adjust.
12884 (read_addr_index): Adjust.
12885 (read_addr_index_from_leb128): Adjust.
12886 (read_str_index): Adjust.
12887 (dwarf2_string_attr): Adjust.
12888 (get_debug_line_section): Adjust.
12889 (dwarf_decode_line_header): Adjust.
12890 (lnp_state_machine::check_line_address): Adjust.
12891 (dwarf_decode_lines_1): Adjust.
12892 (dwarf_decode_lines): Adjust.
12893 (dwarf2_start_symtab): Adjust.
12894 (var_decode_location): Adjust.
12895 (new_symbol_full): Adjust.
12896 (dwarf2_const_value_data): Adjust.
12897 (dwarf2_const_value_attr): Adjust.
12898 (dwarf2_const_value): Adjust.
12899 (die_type): Adjust.
12900 (die_containing_type): Adjust.
12901 (build_error_marker_type): Adjust.
12902 (lookup_die_type): Adjust.
12903 (guess_full_die_structure_name): Adjust.
12904 (anonymous_struct_prefix): Adjust.
12905 (determine_prefix): Adjust.
12906 (dwarf2_name): Adjust.
12907 (follow_die_ref_or_sig): Adjust.
12908 (follow_die_offset): Adjust.
12909 (follow_die_ref): Adjust.
12910 (follow_die_sig_1): Adjust.
12911 (follow_die_sig): Adjust.
12912 (get_signatured_type): Adjust.
12913 (get_DW_AT_signature_type): Adjust.
12914 (decode_locdesc): Adjust.
12915 (dwarf_decode_macros): Adjust.
12916 (cu_debug_loc_section): Adjust.
12917 (fill_in_loclist_baton): Adjust.
12918 (dwarf2_symbol_mark_computed): Adjust.
12919 (init_one_comp_unit): Don't assign
12920 dwarf2_cu::dwarf2_per_objfile.
12921 (set_die_type): Adjust.
12923 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12925 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12926 <dwarf2_per_objfile>: New field.
12927 (dwarf2_per_objfile): Remove global.
12928 (get_dwarf2_per_objfile): New function.
12929 (set_dwarf2_per_objfile): New function.
12930 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12931 dwarf2_per_objfile.
12932 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12933 (read_abbrev_offset): Likewise.
12934 (read_indirect_string): Likewise.
12935 (read_indirect_line_string): Likewise.
12936 (read_indirect_string_at_offset): Likewise.
12937 (read_indirect_string_from_dwz): Likewise.
12938 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12939 dwarf2_per_objfile.
12940 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12941 (create_all_comp_units): Change objfile parameter to
12942 dwarf2_per_objfile.
12943 (create_all_type_units): Likewise.
12944 (process_queue): Add dwarf2_per_objfile parameter.
12945 (read_and_check_comp_unit_head): Likewise.
12946 (lookup_dwo_unit_in_dwp): Likewise.
12947 (get_dwp_file): Likewise.
12948 (process_cu_includes): Likewise.
12949 (struct free_dwo_file_cleanup_data): New struct.
12950 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12951 set_dwarf2_per_objfile.
12952 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12953 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12954 context, adjust calls.
12955 (dw2_instantiate_symtab): Likewise.
12956 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12957 (dw2_get_cu): Likewise.
12958 (create_cu_from_index_list): Change objfile parameter to
12959 dwarf2_per_objfile.
12960 (create_cus_from_index_list): Get dwarf2_per_objfile from
12961 context, adjust calls.
12962 (create_cus_from_index): Likewise.
12963 (create_signatured_type_table_from_index): Change objfile
12964 parameter to dwarf2_per_objfile.
12965 (create_signatured_type_table_from_debug_names): Change objfile
12966 parameter to dwarf2_per_objfile.
12967 (create_addrmap_from_index): Likewise.
12968 (create_addrmap_from_aranges): Likewise.
12969 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12970 (dw2_setup): Remove.
12971 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12973 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12974 get_dwarf2_per_objfile.
12975 (dw2_forget_cached_source_info): Likewise.
12976 (dw2_map_symtabs_matching_filename): Likewise.
12977 (struct dw2_symtab_iterator) <index>: Remove.
12978 <dwarf2_per_objfile>: New field.
12979 (dw2_symtab_iter_init): Replace index parameter with
12980 dwarf2_per_objfile.
12981 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12982 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12983 (dw2_print_stats): Likewise.
12984 (dw2_dump): Likewise.
12985 (dw2_expand_symtabs_for_function): Likewise.
12986 (dw2_expand_all_symtabs): Likewise.
12987 (dw2_expand_symtabs_with_fullname): Likewise.
12988 (dw2_expand_marked_cus): Replace index and objfile parameters
12989 with dwarf2_per_objfile.
12990 (dw_expand_symtabs_matching_file_matcher): Add
12991 dwarf2_per_objfile parameter and adjust calls.
12992 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12994 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12995 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12997 (create_cus_from_debug_names_list): Replace objfile parameter
12998 with dwarf2_per_objfile and adjust calls.
12999 (create_cus_from_debug_names): Likewise.
13000 (dwarf2_read_debug_names): Likewise.
13001 (mapped_debug_names::namei_to_name): Adjust call.
13002 (dw2_debug_names_iterator::next): Likewise.
13003 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13004 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13005 (dw2_debug_names_dump): Likewise.
13006 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13007 (dw2_debug_names_expand_symtabs_matching): Likewise.
13008 (dwarf2_initialize_objfile): Likewise.
13009 (dwarf2_build_psymtabs): Likewise.
13010 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13012 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13013 (read_and_check_comp_unit_head): Likewise.
13014 (read_abbrev_offset): Likewise.
13015 (create_debug_type_hash_table): Likewise.
13016 (create_debug_types_hash_table): Likewise.
13017 (create_all_type_units): Replace objfile parameter with
13018 dwarf2_per_objfile.
13019 (add_type_unit): Add dwarf2_per_objfile parameter.
13020 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13021 with dwarf2_per_objfile.
13022 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13023 (lookup_dwp_signatured_type): Likewise.
13024 (lookup_signatured_type): Likewise.
13025 (read_cutu_die_from_dwo): Likewise.
13026 (init_tu_and_read_dwo_dies): Likewise.
13027 (init_cutu_and_read_dies): Likewise.
13028 (init_cutu_and_read_dies_no_follow): Likewise.
13029 (allocate_type_unit_groups_table): Add objfile parameter.
13030 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13031 (get_type_unit_group): Likewise.
13032 (process_psymtab_comp_unit): Update call.
13033 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13034 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13035 (print_tu_stats): Likewise.
13036 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13037 in void* parameter.
13038 (build_type_psymtabs): Change objfile parameter to
13039 dwarf2_per_objfile.
13040 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13041 passed in void* parameter.
13042 (process_skeletonless_type_units): Change objfile parameter to
13043 dwarf2_per_objfile.
13044 (set_partial_user): Likewise.
13045 (dwarf2_build_psymtabs_hard): Likewise.
13046 (read_comp_units_from_section): Likewise.
13047 (create_all_comp_units): Likewise.
13048 (scan_partial_symbols): Update calls.
13049 (add_partial_symbol): Likewise.
13050 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13051 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13052 (process_queue): Add dwarf2_per_objfile parameter.
13053 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13054 (compute_compunit_symtab_includes): Likewise.
13055 (process_cu_includes): Add dwarf2_per_objfile parameter.
13056 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13057 (process_full_type_unit): Likewise.
13058 (process_imported_unit_die): Update call.
13059 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13060 (read_file_scope): Likewise.
13061 (allocate_dwo_file_hash_table): Add objfile parameter.
13062 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13063 (create_cus_hash_table): Likewise.
13064 (create_dwp_hash_table): Likewise.
13065 (create_dwo_unit_in_dwp_v1): Likewise.
13066 (create_dwp_v2_section): Likewise.
13067 (create_dwo_unit_in_dwp_v2): Likewise.
13068 (lookup_dwo_unit_in_dwp): Likewise.
13069 (try_open_dwop_file): Likewise.
13070 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13071 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13072 cleanup to include a reference to dwarf2_per_objfile.
13073 (open_dwp_file): Add dwarf2_per_objfile parameter.
13074 (open_and_init_dwp_file): Likewise.
13075 (get_dwp_file): Likewise.
13076 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13077 (queue_and_load_all_dwo_tus): Update call.
13078 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13080 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13081 (dwarf2_ranges_process): Likewise.
13082 (dwarf2_get_pc_bounds): Likewise.
13083 (mark_common_block_symbol_computed): Likewise.
13084 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13085 (dwarf2_read_abbrevs): Update call.
13086 (read_partial_die): Use dwarf2_per_objfile from cu.
13087 (find_partial_die): Likewise.
13088 (fixup_partial_die): Likewise.
13089 (read_attribute_value): Likewise.
13090 (read_indirect_string_at_offset_from): Add objfile parameter.
13091 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13093 (read_indirect_string_from_dwz): Add objfile parameter.
13094 (read_indirect_string): Add objfile parameter.
13095 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13096 (read_addr_index): Use dwarf2_per_objfile from cu.
13097 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13099 (read_str_index): Use dwarf2_per_objfile from cu.
13100 (get_debug_line_section): Likewise.
13101 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13102 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13103 (new_symbol_full): Use dwarf2_per_objfile from cu.
13104 (build_error_marker_type): Likewise.
13105 (lookup_die_type): Likewise.
13106 (determine_prefix): Likewise.
13107 (follow_die_offset): Likewise.
13108 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13109 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13110 (dwarf2_fetch_die_type_sect_off): Likewise.
13111 (dwarf2_get_die_type): Likewise.
13112 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13113 (get_signatured_type): Likewise.
13114 (get_DW_AT_signature_type): Likewise.
13115 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13116 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13117 (cu_debug_loc_section): Likewise.
13118 (fill_in_loclist_baton): Likewise.
13119 (dwarf2_symbol_mark_computed): Likewise.
13120 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13121 dwarf2_per_objfile.
13122 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13124 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13125 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13126 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13127 (set_die_type): Use dwarf2_free_objfile from cu.
13128 (get_die_type_at_offset): Likewise.
13129 (dwarf2_per_objfile_free): Don't assign global variable.
13130 (debug_names) <constructor>: Add dwarf2_per_objfile
13131 parameter, update m_debugstrlookup construction.
13132 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13134 <m_dwarf2_per_objfile>: New field.
13135 <lookup>: Use m_dwarf2_per_objfile.
13136 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13137 (psyms_seen_size): Likewise.
13138 (write_gdbindex): Replace objfile parameter with
13139 dwarf2_per_objfile.
13140 (write_debug_names): Likewise.
13141 (write_psymtabs_to_index): Likewise.
13142 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13145 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13147 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13148 <dwarf2_per_objfile>: New field.
13149 (struct dwarf2_per_cu_data) <objfile>: Remove.
13150 <dwarf2_per_objfile>: New field.
13151 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13153 (create_signatured_type_table_from_index): Likewise.
13154 (create_debug_type_hash_table): Likewise.
13155 (fill_in_sig_entry_from_dwo_entry): Likewise.
13156 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13157 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13159 (create_partial_symtab): Access objfile through
13160 dwarf2_per_objfile.
13161 (process_psymtab_comp_unit_reader): Likewise.
13162 (read_comp_units_from_section): Likewise.
13163 (scan_partial_symbols): Likewise.
13164 (add_partial_symbol): Likewise.
13165 (add_partial_subprogram): Likewise.
13166 (peek_die_abbrev): Likewise.
13167 (fixup_go_packaging): Likewise.
13168 (process_full_comp_unit): Likewise.
13169 (process_full_type_unit): Likewise.
13170 (process_imported_unit_die): Likewise.
13171 (dwarf2_compute_name): Likewise.
13172 (dwarf2_physname): Likewise.
13173 (read_import_statement): Likewise.
13174 (create_cus_hash_table): Assign dwarf2_physname instead of
13176 (read_func_scope): Access objfile through dwarf2_per_objfile.
13177 (read_lexical_block_scope): Likewise.
13178 (read_call_site_scope): Likewise.
13179 (read_variable): Likewise.
13180 (dwarf2_rnglists_process): Likewise.
13181 (dwarf2_ranges_process): Likewise.
13182 (dwarf2_ranges_read): Likewise.
13183 (dwarf2_record_block_ranges): Likewise.
13184 (dwarf2_add_field): Likewise.
13185 (dwarf2_add_member_fn): Likewise.
13186 (read_structure_type): Likewise.
13187 (process_structure_scope): Likewise.
13188 (read_enumeration_type): Likewise.
13189 (read_array_type): Likewise.
13190 (read_common_block): Likewise.
13191 (read_namespace_type): Likewise.
13192 (read_namespace): Likewise.
13193 (read_module_type): Likewise.
13194 (read_tag_pointer_type): Likewise.
13195 (read_tag_ptr_to_member_type): Likewise.
13196 (read_tag_string_type): Likewise.
13197 (read_subroutine_type): Likewise.
13198 (read_typedef): Likewise.
13199 (read_base_type): Likewise.
13200 (attr_to_dynamic_prop): Likewise.
13201 (read_subrange_type): Likewise.
13202 (read_unspecified_type): Likewise.
13203 (load_partial_dies): Likewise.
13204 (read_partial_die): Likewise.
13205 (find_partial_die): Likewise.
13206 (guess_partial_die_structure_name): Likewise.
13207 (fixup_partial_die): Likewise.
13208 (read_attribute_value): Likewise.
13209 (read_addr_index_from_leb128): Likewise.
13210 (dwarf2_read_addr_index): Likewise.
13211 (dwarf2_string_attr): Likewise.
13212 (lnp_state_machine::check_line_address): Likewise.
13213 (dwarf_decode_lines_1): Likewise.
13214 (dwarf_decode_lines): Likewise.
13215 (dwarf2_start_symtab): Likewise.
13216 (var_decode_location): Likewise.
13217 (new_symbol_full): Likewise.
13218 (dwarf2_const_value_data): Likewise.
13219 (dwarf2_const_value_attr): Likewise.
13220 (dwarf2_const_value): Likewise.
13221 (die_type): Likewise.
13222 (die_containing_type): Likewise.
13223 (lookup_die_type): Likewise.
13224 (guess_full_die_structure_name): Likewise.
13225 (anonymous_struct_prefix): Likewise.
13226 (dwarf2_name): Likewise.
13227 (follow_die_ref_or_sig): Likewise.
13228 (follow_die_offset): Likewise.
13229 (follow_die_ref): Likewise.
13230 (dwarf2_fetch_die_loc_sect_off): Likewise.
13231 (dwarf2_fetch_constant_bytes): Likewise.
13232 (dwarf2_fetch_die_type_sect_off): Likewise.
13233 (dwarf2_get_die_type): Likewise.
13234 (follow_die_sig): Likewise.
13235 (decode_locdesc): Likewise.
13236 (dwarf2_per_cu_objfile): Likewise.
13237 (dwarf2_per_cu_text_offset): Likewise.
13238 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13240 (set_die_type): Access objfile through
13241 dwarf2_per_objfile.
13243 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13245 * valprint.c (converted_character_d): Remove typedef.
13246 (DEF_VEC_O (converted_character_d)): Remove.
13247 (count_next_character): Use std::vector.
13248 (print_converted_chars_to_obstack): Likewise.
13249 (generic_printstr): Likewise.
13251 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13253 * xml-support.h (struct gdb_xml_value): Add constructor.
13254 <value>: Change type to unique_xmalloc_ptr.
13255 (gdb_xml_value_s): Remove typedef.
13256 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13257 (gdb_xml_element_start_handler): Change parameter type to
13259 (xml_find_attribute): Likewise.
13260 * xml-support.c (xml_find_attribute): Change parameter type to
13261 std::vector and adjust.
13262 (gdb_xml_values_cleanup): Remove.
13263 (gdb_xml_parser::start_element): Adjust to std::vector.
13264 (xinclude_start_include): Change paraeter type to std::vector
13266 * btrace.c (check_xml_btrace_version): Likewise.
13267 (parse_xml_btrace_block): Likewise.
13268 (parse_xml_btrace_pt_config_cpu): Likewise.
13269 (parse_xml_btrace_pt): Likewise.
13270 (parse_xml_btrace_conf_bts): Likewise.
13271 (parse_xml_btrace_conf_pt): Likewise.
13272 * memory-map.c (memory_map_start_memory): Likewise.
13273 (memory_map_start_property): Likewise.
13274 * osdata.c (osdata_start_osdata): Likewise.
13275 (osdata_start_item): Likewise.
13276 (osdata_start_column): Likewise.
13277 * remote.c (start_thread): Likewise.
13278 * solib-aix.c (library_list_start_library): Likewise.
13279 (library_list_start_list): Likewise.
13280 * solib-svr4.c (library_list_start_library): Likewise.
13281 (svr4_library_list_start_list): Likewise.
13282 * solib-target.c (library_list_start_segment): Likewise.
13283 (library_list_start_section): Likewise.
13284 (library_list_start_library): Likewise.
13285 (library_list_start_list): Likewise.
13286 * tracepoint.c (traceframe_info_start_memory): Likewise.
13287 (traceframe_info_start_tvar): Likewise.
13288 * xml-syscall.c (syscall_start_syscall): Likewise.
13289 * xml-tdesc.c (tdesc_start_target): Likewise.
13290 (tdesc_start_feature): Likewise.
13291 (tdesc_start_reg): Likewise.
13292 (tdesc_start_union): Likewise.
13293 (tdesc_start_struct): Likewise.
13294 (tdesc_start_flags): Likewise.
13295 (tdesc_start_enum): Likewise.
13296 (tdesc_start_field): Likewise.
13297 (tdesc_start_enum_value): Likewise.
13298 (tdesc_start_vector): Likewise.
13300 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13302 * extension.h (struct xmethod_worker) <clone>: Remove.
13303 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13305 (python_xmethod_worker::clone): Remove.
13306 * valops.c (find_overload_match): Use std::move instead of
13309 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13311 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13312 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13313 <free_xmethod_worker_data>: Remove.
13314 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13315 <get_xmethod_arg_types>: Remove.
13316 <get_xmethod_result_type>: Remove.
13317 <invoke_xmethod>: Remove.
13318 * extension.c (new_xmethod_worker): Remove.
13319 (clone_xmethod_worker): Remove.
13320 (get_matching_xmethod_workers): Return void, pass std::vector by
13322 (get_xmethod_arg_types): Rename to...
13323 (xmethod_worker::get_arg_types): ... this, and adjust.
13324 (get_xmethod_result_type): Rename to...
13325 (xmethod_worker::get_result_type): ... this, and adjust.
13326 (invoke_xmethod): Remove.
13327 (free_xmethod_worker): Remove.
13328 (free_xmethod_worker_vec): Remove.
13329 * extension.h (enum ext_lang_rc): Move here from
13331 (struct xmethod_worker): Add constructor and destructor.
13334 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13335 virtual pure methods.
13336 <get_arg_types, get_result_type>: New methods.
13337 (xmethod_worker_ptr): Remove typedef.
13338 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13339 (xmethod_worker_vec): Remove typedef.
13340 (xmethod_worker_up): New typedef.
13341 (invoke_xmethod): Remove.
13342 (clone_xmethod_worker): Remove.
13343 (free_xmethod_worker): Remove.
13344 (free_xmethod_worker_vec): Remove.
13345 (get_xmethod_arg_types): Remove.
13346 (get_xmethod_result_type): Remove.
13347 * valops.c (find_method_list): Use std::vector, don't use
13348 intermediate vector.
13349 (value_find_oload_method_list): Use std::vector.
13350 (find_overload_match): Use std::vector.
13351 (find_oload_champ): Use std::vector.
13352 * value.c (value_free): Use operator delete.
13353 (value_of_xmethod): Rename to...
13354 (value_from_xmethod): ... this. Don't assign
13355 xmethod_worker::value, take rvalue-reference.
13356 (result_type_of_xmethod): Adjust.
13357 (call_xmethod): Adjust.
13358 * value.h: Include extension.h.
13359 (struct xmethod_worker): Don't forward-declare.
13360 (value_of_xmethod): Rename to...
13361 (value_from_xmethod): ... this, take rvalue-reference.
13362 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13363 (struct python_xmethod_worker): ... this, add constructor and
13365 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13366 (gdbpy_free_xmethod_worker_data): Rename to...
13367 (python_xmethod_worker::~python_xmethod_worker): ... this and
13369 (gdbpy_clone_xmethod_worker_data): Rename to...
13370 (python_xmethod_worker::clone): ... this and adjust.
13371 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13373 (gdbpy_get_xmethod_arg_types): Rename to...
13374 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13375 (gdbpy_get_xmethod_result_type): Rename to...
13376 (python_xmethod_worker::do_get_result_type): ... this and
13378 (gdbpy_invoke_xmethod): Rename to...
13379 (python_xmethod_worker::invoke): ... this and adjust.
13380 (new_python_xmethod_worker): Rename to...
13381 (python_xmethod_worker::python_xmethod_worker): ... this and
13383 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13385 (gdbpy_free_xmethod_worker_data): Remove.
13386 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13387 (gdbpy_get_xmethod_arg_types): Remove.
13388 (gdbpy_get_xmethod_result_type): Remove.
13389 (gdbpy_invoke_xmethod): Remove.
13390 * python/python.c (python_extension_ops): Remove obsolete
13393 2018-01-05 Pedro Alves <palves@redhat.com>
13396 * common/signals-state-save-restore.c
13397 (save_original_signals_state): New parameter 'quiet'. Warn if we
13398 find a custom handler preinstalled, instead of internal erroring.
13399 But only warn if !quiet.
13400 * common/signals-state-save-restore.h
13401 (save_original_signals_state): New parameter 'quiet'.
13402 * main.c (captured_main_1): Move save_original_signals_state call
13403 after option handling, and pass QUIET.
13405 2018-01-05 Pedro Alves <palves@redhat.com>
13407 * spu-tdep.c (spu_catch_start): Pass
13408 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13410 2018-01-05 Pedro Alves <palves@redhat.com>
13413 * ada-lang.c (literal_symbol_name_matcher): New function.
13414 (ada_get_symbol_name_matcher): Use it for
13415 symbol_name_match_type::SEARCH_NAME.
13416 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13417 it down instead of assuming symbol_name_match_type::FULL.
13418 * block.h (block_lookup_symbol): New parameter 'match_type'.
13419 * c-valprint.c (print_unpacked_pointer): Use
13420 lookup_symbol_search_name instead of lookup_symbol.
13421 * compile/compile-object-load.c (get_out_value_type): Pass down
13422 symbol_name_match_type::SEARCH_NAME.
13423 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13424 symbol_name_match_type::FULL.
13425 * cp-support.c (cp_get_symbol_name_matcher): Handle
13426 symbol_name_match_type::SEARCH_NAME.
13427 * infrun.c (insert_exception_resume_breakpoint): Use
13428 lookup_symbol_search_name.
13429 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13430 * psymtab.c (maintenance_check_psymtabs): Use
13431 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13432 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13433 SYMBOL_SEARCH_NAME.
13434 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13435 if symbol_name_match_type::SEARCH_NAME.
13436 (lookup_symbol_in_language): Pass down
13437 symbol_name_match_type::FULL.
13438 (lookup_symbol_search_name): New.
13439 (lookup_language_this): Pass down
13440 symbol_name_match_type::SEARCH_NAME.
13441 (lookup_symbol_aux, lookup_local_symbol): New parameter
13442 'match_type'. Pass it down.
13443 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13444 (lookup_symbol_search_name): New declaration.
13445 (lookup_symbol_in_block): New 'match_type' parameter.
13447 2018-01-05 Pedro Alves <palves@redhat.com>
13450 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13452 (ada_lookup_symbol): Reimplement in terms of
13453 ada_lookup_symbol_list, bits factored out from
13454 ada_lookup_encoded_symbol.
13456 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13458 * ada-exp.y (write_object_renaming): When subscripting an array
13459 using a symbol as the index, pass the block in call to
13460 ada_lookup_encoded_symbol when looking that symbol up.
13462 2018-01-05 Jerome Guitton <guitton@adacore.com>
13464 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13467 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13469 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13470 the case where VALUE_LVAL (val0) is not lval_memory.
13472 2018-01-05 Xavier Roirand <roirand@adacore.com>
13474 * ada-valprint.c (print_optional_low_bound): Handle
13475 character-indexed array printing like boolean-indexed array
13478 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13480 * NEWS: Create a new section for the next release branch.
13481 Rename the section of the current branch, now that it has
13484 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13486 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13487 * version.in: Bump version to 8.1.50.DATE-git.
13489 2018-01-03 Xavier Roirand <roirand@adacore.com>
13491 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13493 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13495 (default_exception_support_info) <catch_handlers_sym>: Add field.
13496 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13497 (ada_exception_name_addr_1): Add "catch handlers" handling.
13498 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13499 Update all callers.
13500 (create_excep_cond_exprs) <ex>: Add parameter.
13501 (re_set_exception): Update create_excep_cond_exprs call.
13502 (print_it_exception, print_one_exception, print_mention_exception)
13503 (print_recreate_exception): Add "catch handler" handling.
13504 (allocate_location_catch_handlers, re_set_catch_handlers)
13505 (check_status_catch_handlers, print_it_catch_handlers)
13506 (print_one_catch_handlers, print_mention_catch_handlers)
13507 (print_recreate_catch_handlers): New function.
13508 (catch_handlers_breakpoint_ops): New variable.
13509 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13510 Add parameter. Add "catch handler" handling.
13511 (ada_exception_sym_name, ada_exception_breakpoint_ops):
13512 Add "catch handler" handling.
13513 (ada_exception_catchpoint_cond_string): Add "catch handler"
13515 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13517 (catch_ada_handlers_command): New function.
13518 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13519 operations structure.
13520 (_initialize_ada_language): Add "catch handlers" command entry.
13521 * NEWS: Document "catch handlers" feature.
13523 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13525 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13526 account when creating the array type of the slice.
13527 (ada_value_slice): Likewise.
13529 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13531 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13533 (create_array_type_with_stride): Add byte_stride_prop parameter.
13534 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13535 New parameter. Update all callers in this file.
13536 (array_type_has_dynamic_stride): New function.
13537 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13538 of arrays with dynamic byte strides.
13539 * dwarf2read.c (read_array_type): Add support for dynamic
13540 DW_AT_byte_stride attributes.
13542 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13544 * dwarf2read.c (read_unspecified_type): Treat
13545 DW_TAG_enumeration_type DIEs from Ada units as stubs.
13547 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13549 Update copyright year range in all GDB files.
13551 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13553 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13554 and gdb/testsuite/gdb.base/step-line.c.
13556 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13558 * copyright.py (main): Dump the contents of
13559 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13560 even if BY_HAND is empty.
13562 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13564 * top.c (print_gdb_version): Update Copyright year in version
13567 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13569 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13571 For older changes see ChangeLog-2017.
13577 version-control: never