1 2018-09-17 Tom Tromey <tom@tromey.com>
3 * infrun.c (struct infcall_suspend_state) <registers>: Now a
5 <siginfo_data>: Now a unique_xmalloc_ptr.
6 (save_infcall_suspend_state, restore_infcall_suspend_state)
7 (discard_infcall_suspend_state)
8 (get_infcall_suspend_state_regcache): Update.
10 2018-09-17 Tom Tromey <tom@tromey.com>
12 * gdbthread.h (struct thread_suspend_state): Add initializers.
13 (class thread_info) <suspend>: Remove initializer.
14 * infrun.c (struct infcall_suspend_state): Add initializers.
15 (save_infcall_suspend_state): Use new.
16 (discard_infcall_suspend_state): Use delete.
18 2018-09-16 Tom Tromey <tom@tromey.com>
20 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
22 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
23 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
24 (py_varobj_iter_new): Likewise.
25 (py_varobj_get_iterator): Use gdbpy_ref.
27 2018-09-16 Tom Tromey <tom@tromey.com>
29 * python/py-threadevent.c (py_get_event_thread): Simplify.
30 * python/py-inferior.c (infpy_thread_from_thread_handle):
31 Return immediately after calling thread_to_thread_object. Use
33 (thread_to_thread_object): Set the exception on a NULL return.
35 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
37 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
39 2018-09-16 Tom Tromey <tom@tromey.com>
41 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
44 2018-09-16 Tom Tromey <tom@tromey.com>
46 * python/python-internal.h (thread_to_thread_object): Change
48 * python/py-inferior.c (thread_to_thread_object): Return a new
50 (infpy_thread_from_thread_handle): Update.
51 * python/py-infthread.c (gdbpy_selected_thread): Update.
52 * python/py-stopevent.c (create_stop_event_object): Update.
53 * python/py-threadevent.c (py_get_event_thread): Return a new
55 (py_get_event_thread): Update.
56 * python/py-event.h (py_get_event_thread): Change return type.
57 * python/py-continueevent.c (create_continue_event_object):
60 2018-09-16 Tom Tromey <tom@tromey.com>
62 * python/py-progspace.c (pspy_get_objfiles): Update.
63 * python/python-internal.h (objfile_to_objfile_object): Change
65 * python/py-newobjfileevent.c (create_new_objfile_event_object):
67 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
69 * python/python.c (gdbpy_get_current_objfile): Update.
70 (gdbpy_objfiles): Update.
71 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
73 (objfile_to_objfile_object): Return a new reference.
74 * python/py-symtab.c (stpy_get_objfile): Update.
75 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
78 2018-09-16 Tom Tromey <tom@tromey.com>
80 * python/py-inferior.c (infpy_get_progspace): Update.
81 * python/python-internal.h (pspace_to_pspace_object): Change
83 * python/py-newobjfileevent.c
84 (create_clear_objfiles_event_object): Update.
85 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
87 * python/python.c (gdbpy_get_current_progspace): Update.
88 (gdbpy_progspaces): Update.
89 * python/py-progspace.c (pspace_to_pspace_object): Return a new
91 * python/py-objfile.c (objfpy_get_progspace): Update.
92 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
95 2018-09-16 Tom Tromey <tom@tromey.com>
97 * python/lib/gdb/__init__.py (current_progspace, objfiles)
98 (solib_name, block_for_pc, find_pc_line): New functions.
99 (execute_unwinders): Update.
100 * python/py-block.c (gdbpy_block_for_pc): Remove.
101 * python/py-inferior.c (infpy_get_progspace): New function.
102 (inferior_object_getset) <progspace>: Add.
103 * python/py-progspace.c (pspy_objfiles): Rewrite.
104 (pspy_solib_name, pspy_block_for_pc)
105 (pspy_find_pc_line, pspy_is_valid): New functions.
106 (progspace_object_methods): Add entries for solib_name,
107 block_for_pc, find_pc_line, is_valid.
108 * python/python-internal.h (gdbpy_block_for_pc)
109 (build_objfiles_list): Don't declare.
110 * python/python.c: Don't include solib.h.
111 (gdbpy_solib_name, gdbpy_find_pc_line)
112 (gdbpy_get_current_progspace, build_objfiles_list)
113 (gdbpy_objfiles): Remove.
114 (GdbMethods) <current_progspace, objfiles, block_for_pc,
115 solib_name, find_pc_line>: Remove entries.
117 2018-09-16 Tom Tromey <tom@tromey.com>
119 * top.c (new_ui_command): Use GNU style for metasyntactic
121 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
123 * maint.c (maintenance_translate_address): Remove "<>" around
125 * interps.c (interpreter_exec_cmd): Use GNU style for
126 metasyntactic variables.
127 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
128 metasyntactic variables.
129 * tracepoint.c (tfind_range_command): Use GNU style for
130 metasyntactic variables.
131 (tfind_outside_command): Likewise.
132 (_initialize_tracepoint): Likewise.
133 * remote.c (extended_remote_target::create_inferior): Use GNU
134 style for metasyntactic variables.
135 * sparc64-tdep.c (adi_examine_command): Use GNU style for
136 metasyntactic variables.
137 (adi_assign_command): Likewise.
139 2018-09-16 Tom Tromey <tom@tromey.com>
141 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
142 metasyntactic variables. Print message if no disassembler options
145 2018-09-15 Tom Tromey <tom@tromey.com>
147 * infcmd.c (get_inferior_args): Return const char *.
148 * inferior.h (get_inferior_args): Return type now const.
149 * linux-tdep.c (linux_fill_prpsinfo): Update.
150 * procfs.c (procfs_target::make_corefile_notes): Update.
152 2018-09-07 Tom Tromey <tom@tromey.com>
154 * python/python.c (execute_gdb_command): Call bpstat_do_actions
157 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
159 * nios2-tdep.c (nios2_type_align): New.
160 (nios2_gdb_arch_init): Install type_align hook.
162 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
164 * eval.c (fake_method::fake_method): Call xzalloc directly for a
165 type that is neither object file owned, nor gdbarch owned.
166 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
168 (alloc_type_instance): Allocate non-objfile owned types on the
170 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
171 using TYPE_ALLOC to ensure memory is allocated on the correct
173 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
174 obstack, or the gdbarch obstack.
175 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
177 2018-09-14 Tom Tromey <tom@tromey.com>
179 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
182 2018-09-14 Tom Tromey <tom@tromey.com>
184 * nat/fork-inferior.c (get_startup_shell): Remove "static".
186 2018-09-13 Tom Tromey <tom@tromey.com>
188 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
191 2018-09-13 Tom Tromey <tom@tromey.com>
193 * exec.c (try_open_exec_file): Use std::string.
195 2018-09-13 Tom Tromey <tom@tromey.com>
197 * utils.h (gdb_bfd_errmsg): Return std::string.
198 * exec.c (exec_file_attach): Update.
199 * compile/compile-object-load.c (compile_object_load): Update.
200 * utils.c (gdb_bfd_errmsg): Return std::string.
202 2018-09-13 Tom Tromey <tom@tromey.com>
204 * procfs.c (struct procinfo_deleter): New.
205 (procinfo_up): New typedef.
206 (do_destroy_procinfo_cleanup): Remove.
207 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
209 2018-09-13 Tom Tromey <tom@tromey.com>
211 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
213 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
214 2018-09-13 Tom Tromey <tom@tromey.com>
216 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
217 (pspy_get_objfiles): New function.
218 (progspace_object_methods): New.
219 (pspace_object_type): Add tp_methods callback.
220 * python/python-internal.h (build_objfiles_list): New
222 * python/python.c (build_objfiles_list): New function.
223 (gdbpy_objfiles): Implement using build_objfiles_list.
224 * NEWS: Mention the Progspace.objfiles method.
226 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
228 * python/py-inferior.c (infpy_get_progspace): New function.
229 (inferior_object_getset): Add progspace property.
230 * NEWS: Mention the new property.
232 2018-09-13 Tom Tromey <tom@tromey.com>
235 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
237 2018-09-13 Tom Tromey <tom@tromey.com>
240 * rust-lang.c (rust_enum_variant): Now static.
241 (rust_empty_enum_p): New function.
242 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
245 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
247 * python/py-inferior.c (infpy_repr): New.
248 (inferior_object_type): Register infpy_repr.
249 * python/py-objfile.c (objfpy_repr): New.
250 (objfile_object_type): Register objfpy_repr.
252 2018-09-12 John Baldwin <jhb@FreeBSD.org>
254 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
256 2018-09-12 John Baldwin <jhb@FreeBSD.org>
258 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
261 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
263 * common/common-utils.c: Don't include '<sys/stat.h>'.
264 (is_regular_file): Move to...
265 * common/filestuff.c (is_regular_file): ... here.
266 * common/common-utils.h (is_regular_file): Move to...
267 * common/filestuff.h (is_regular_file): ... here.
269 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
271 * skip.c (debug_skip): New variable.
272 (skiplist_entry::do_skip_file_p): Add debug output.
273 (skiplist_entry::do_skip_gfile_p): Likewise.
274 (skiplist_entry::skip_function_p): Likewise.
275 (_initialize_step_skip): Create debug command.
276 * NEWS: Mention set/show debug skip.
278 2018-09-11 Xavier Roirand <roirand@adacore.com>
280 * darwin-nat.c (should_disable_startup_with_shell):
282 (darwin_nat_target::create_inferior): Add call.
284 2018-09-11 Xavier Roirand <roirand@adacore.com>
286 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
287 inf_port, msg_state>: Initialize.
288 (struct darwin_thread_info) <signaled, single_step>: Change
290 (struct darwin_thread_info) <event>: Initialize.
292 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
296 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
299 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
302 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
306 * gnulib/aclocal.m4: Regenerate.
307 * gnulib/config.in: Regenerate.
308 * gnulib/configure: Regenerate.
309 * gnulib/import/Makefile.am: Update.
310 * gnulib/import/Makefile.in: Update.
311 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
312 * gnulib/import/_Noreturn.h: ... this.
313 * gnulib/import/alloca.in.h: Update.
314 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
315 * gnulib/import/arg-nonnull.h: ... this.
316 * gnulib/import/assure.h: Update.
317 * gnulib/import/at-func.c: Update.
318 * gnulib/import/basename-lgpl.c: Update.
319 * gnulib/import/extra/snippet/c++defs.h: Rename to...
320 * gnulib/import/c++defs.h: ... this.
321 * gnulib/import/canonicalize-lgpl.c: Update.
322 * gnulib/import/cdefs.h: Update.
323 * gnulib/import/chdir-long.c: Update.
324 * gnulib/import/chdir-long.h: Update.
325 * gnulib/import/cloexec.c: Update.
326 * gnulib/import/cloexec.h: Update.
327 * gnulib/import/close.c: Update.
328 * gnulib/import/closedir.c: Update.
329 * gnulib/import/config.charset: Update.
330 * gnulib/import/dirent-private.h: Update.
331 * gnulib/import/dirent.in.h: Update.
332 * gnulib/import/dirfd.c: Update.
333 * gnulib/import/dirname-lgpl.c: Update.
334 * gnulib/import/dirname.h: Update.
335 * gnulib/import/dosname.h: Update.
336 * gnulib/import/dup-safer-flag.c: Update.
337 * gnulib/import/dup-safer.c: Update.
338 * gnulib/import/dup.c: Update.
339 * gnulib/import/dup2.c: Update.
340 * gnulib/import/errno.in.h: Update.
341 * gnulib/import/error.c: Update.
342 * gnulib/import/error.h: Update.
343 * gnulib/import/exitfail.c: Update.
344 * gnulib/import/exitfail.h: Update.
345 * gnulib/import/extra/update-copyright: Update.
346 * gnulib/import/fchdir.c: Update.
347 * gnulib/import/fcntl.c: Update.
348 * gnulib/import/fcntl.in.h: Update.
349 * gnulib/import/fd-hook.c: Update.
350 * gnulib/import/fd-hook.h: Update.
351 * gnulib/import/fd-safer-flag.c: Update.
352 * gnulib/import/fd-safer.c: Update.
353 * gnulib/import/fdopendir.c: Update.
354 * gnulib/import/filename.h: Update.
355 * gnulib/import/filenamecat-lgpl.c: Update.
356 * gnulib/import/filenamecat.h: Update.
357 * gnulib/import/flexmember.h: Update.
358 * gnulib/import/float+.h: Update.
359 * gnulib/import/float.c: Update.
360 * gnulib/import/float.in.h: Update.
361 * gnulib/import/fnmatch.c: Update.
362 * gnulib/import/fnmatch.in.h: Update.
363 * gnulib/import/fnmatch_loop.c: Update.
364 * gnulib/import/fpucw.h: Update.
365 * gnulib/import/frexp.c: Update.
366 * gnulib/import/frexpl.c: Update.
367 * gnulib/import/fstat.c: Update.
368 * gnulib/import/fstatat.c: Update.
369 * gnulib/import/getcwd-lgpl.c: Update.
370 * gnulib/import/getcwd.c: Update.
371 * gnulib/import/getdtablesize.c: Update.
372 * gnulib/import/getlogin_r.c: Update.
373 * gnulib/import/getprogname.c: Update.
374 * gnulib/import/getprogname.h: Update.
375 * gnulib/import/gettext.h: Update.
376 * gnulib/import/gettimeofday.c: Update.
377 * gnulib/import/glob-libc.h: Update.
378 * gnulib/import/glob.c: Update.
379 * gnulib/import/glob.in.h: Update.
380 * gnulib/import/glob_internal.h: Update.
381 * gnulib/import/glob_pattern_p.c: Update.
382 * gnulib/import/globfree.c: Update.
383 * gnulib/import/hard-locale.c: Update.
384 * gnulib/import/hard-locale.h: Update.
385 * gnulib/import/intprops.h: Update.
386 * gnulib/import/inttypes.in.h: Update.
387 * gnulib/import/isnan.c: Update.
388 * gnulib/import/isnand-nolibm.h: Update.
389 * gnulib/import/isnand.c: Update.
390 * gnulib/import/isnanl-nolibm.h: Update.
391 * gnulib/import/isnanl.c: Update.
392 * gnulib/import/itold.c: Update.
393 * gnulib/import/libc-config.h: Update.
394 * gnulib/import/limits.in.h: Update.
395 * gnulib/import/localcharset.c: Update.
396 * gnulib/import/localcharset.h: Update.
397 * gnulib/import/localtime-buffer.c: Update.
398 * gnulib/import/localtime-buffer.h: Update.
399 * gnulib/import/lstat.c: Update.
400 * gnulib/import/m4/00gnulib.m4: Update.
401 * gnulib/import/m4/__inline.m4: Update.
402 * gnulib/import/m4/absolute-header.m4: Update.
403 * gnulib/import/m4/alloca.m4: Update.
404 * gnulib/import/m4/builtin-expect.m4: Update.
405 * gnulib/import/m4/canonicalize.m4: Update.
406 * gnulib/import/m4/chdir-long.m4: Update.
407 * gnulib/import/m4/close.m4: Update.
408 * gnulib/import/m4/closedir.m4: Update.
409 * gnulib/import/m4/configmake.m4: Update.
410 * gnulib/import/m4/d-ino.m4: Update.
411 * gnulib/import/m4/d-type.m4: Update.
412 * gnulib/import/m4/dirent_h.m4: Update.
413 * gnulib/import/m4/dirfd.m4: Update.
414 * gnulib/import/m4/dirname.m4: Update.
415 * gnulib/import/m4/double-slash-root.m4: Update.
416 * gnulib/import/m4/dup.m4: Update.
417 * gnulib/import/m4/dup2.m4: Update.
418 * gnulib/import/m4/eealloc.m4: Update.
419 * gnulib/import/m4/environ.m4: Update.
420 * gnulib/import/m4/errno_h.m4: Update.
421 * gnulib/import/m4/error.m4: Update.
422 * gnulib/import/m4/exponentd.m4: Update.
423 * gnulib/import/m4/exponentl.m4: Update.
424 * gnulib/import/m4/extensions.m4: Update.
425 * gnulib/import/m4/extern-inline.m4: Update.
426 * gnulib/import/m4/fchdir.m4: Update.
427 * gnulib/import/m4/fcntl-o.m4: Update.
428 * gnulib/import/m4/fcntl.m4: Update.
429 * gnulib/import/m4/fcntl_h.m4: Update.
430 * gnulib/import/m4/fdopendir.m4: Update.
431 * gnulib/import/m4/filenamecat.m4: Update.
432 * gnulib/import/m4/flexmember.m4: Update.
433 * gnulib/import/m4/float_h.m4: Update.
434 * gnulib/import/m4/fnmatch.m4: Update.
435 * gnulib/import/m4/fnmatch_h.m4: Update.
436 * gnulib/import/m4/fpieee.m4: Update.
437 * gnulib/import/m4/frexp.m4: Update.
438 * gnulib/import/m4/frexpl.m4: Update.
439 * gnulib/import/m4/fstat.m4: Update.
440 * gnulib/import/m4/fstatat.m4: Update.
441 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
442 * gnulib/import/m4/getcwd-path-max.m4: Update.
443 * gnulib/import/m4/getcwd.m4: Update.
444 * gnulib/import/m4/getdtablesize.m4: Update.
445 * gnulib/import/m4/getlogin.m4: Update.
446 * gnulib/import/m4/getlogin_r.m4: Update.
447 * gnulib/import/m4/getpagesize.m4: Update.
448 * gnulib/import/m4/getprogname.m4: Update.
449 * gnulib/import/m4/gettimeofday.m4: Update.
450 * gnulib/import/m4/glibc21.m4: Update.
451 * gnulib/import/m4/glob.m4: Update.
452 * gnulib/import/m4/glob_h.m4: Update.
453 * gnulib/import/m4/gnulib-cache.m4: Update.
454 * gnulib/import/m4/gnulib-common.m4: Update.
455 * gnulib/import/m4/gnulib-comp.m4: Update.
456 * gnulib/import/m4/gnulib-tool.m4: Update.
457 * gnulib/import/m4/hard-locale.m4: Update.
458 * gnulib/import/m4/include_next.m4: Update.
459 * gnulib/import/m4/inttypes-pri.m4: Update.
460 * gnulib/import/m4/inttypes.m4: Update.
461 * gnulib/import/m4/isnand.m4: Update.
462 * gnulib/import/m4/isnanl.m4: Update.
463 * gnulib/import/m4/largefile.m4: Update.
464 * gnulib/import/m4/limits-h.m4: Update.
465 * gnulib/import/m4/localcharset.m4: Update.
466 * gnulib/import/m4/locale-fr.m4: Update.
467 * gnulib/import/m4/locale-ja.m4: Update.
468 * gnulib/import/m4/locale-zh.m4: Update.
469 * gnulib/import/m4/localtime-buffer.m4: Update.
470 * gnulib/import/m4/longlong.m4: Update.
471 * gnulib/import/m4/lstat.m4: Update.
472 * gnulib/import/m4/malloc.m4: Update.
473 * gnulib/import/m4/malloca.m4: Update.
474 * gnulib/import/m4/math_h.m4: Update.
475 * gnulib/import/m4/mbrtowc.m4: Update.
476 * gnulib/import/m4/mbsinit.m4: Update.
477 * gnulib/import/m4/mbsrtowcs.m4: Update.
478 * gnulib/import/m4/mbstate_t.m4: Update.
479 * gnulib/import/m4/memchr.m4: Update.
480 * gnulib/import/m4/memmem.m4: Update.
481 * gnulib/import/m4/mempcpy.m4: Update.
482 * gnulib/import/m4/memrchr.m4: Update.
483 * gnulib/import/m4/mkdir.m4: Update.
484 * gnulib/import/m4/mkstemp.m4: Update.
485 * gnulib/import/m4/mmap-anon.m4: Update.
486 * gnulib/import/m4/mode_t.m4: Update.
487 * gnulib/import/m4/msvc-inval.m4: Update.
488 * gnulib/import/m4/msvc-nothrow.m4: Update.
489 * gnulib/import/m4/multiarch.m4: Update.
490 * gnulib/import/m4/nocrash.m4: Update.
491 * gnulib/import/m4/off_t.m4: Update.
492 * gnulib/import/m4/onceonly.m4: Update.
493 * gnulib/import/m4/open-cloexec.m4: Update.
494 * gnulib/import/m4/open.m4: Update.
495 * gnulib/import/m4/openat.m4: Update.
496 * gnulib/import/m4/opendir.m4: Update.
497 * gnulib/import/m4/pathmax.m4: Update.
498 * gnulib/import/m4/rawmemchr.m4: Update.
499 * gnulib/import/m4/readdir.m4: Update.
500 * gnulib/import/m4/readlink.m4: Update.
501 * gnulib/import/m4/realloc.m4: Update.
502 * gnulib/import/m4/rename.m4: Update.
503 * gnulib/import/m4/rewinddir.m4: Update.
504 * gnulib/import/m4/rmdir.m4: Update.
505 * gnulib/import/m4/save-cwd.m4: Update.
506 * gnulib/import/m4/secure_getenv.m4: Update.
507 * gnulib/import/m4/setenv.m4: Update.
508 * gnulib/import/m4/signal_h.m4: Update.
509 * gnulib/import/m4/ssize_t.m4: Update.
510 * gnulib/import/m4/stat-time.m4: Update.
511 * gnulib/import/m4/stat.m4: Update.
512 * gnulib/import/m4/std-gnu11.m4: Update.
513 * gnulib/import/m4/stdbool.m4: Update.
514 * gnulib/import/m4/stddef_h.m4: Update.
515 * gnulib/import/m4/stdint.m4: Update.
516 * gnulib/import/m4/stdio_h.m4: Update.
517 * gnulib/import/m4/stdlib_h.m4: Update.
518 * gnulib/import/m4/strchrnul.m4: Update.
519 * gnulib/import/m4/strdup.m4: Update.
520 * gnulib/import/m4/strerror.m4: Update.
521 * gnulib/import/m4/string_h.m4: Update.
522 * gnulib/import/m4/strstr.m4: Update.
523 * gnulib/import/m4/strtok_r.m4: Update.
524 * gnulib/import/m4/sys_socket_h.m4: Update.
525 * gnulib/import/m4/sys_stat_h.m4: Update.
526 * gnulib/import/m4/sys_time_h.m4: Update.
527 * gnulib/import/m4/sys_types_h.m4: Update.
528 * gnulib/import/m4/tempname.m4: Update.
529 * gnulib/import/m4/time_h.m4: Update.
530 * gnulib/import/m4/unistd-safer.m4: Update.
531 * gnulib/import/m4/unistd_h.m4: Update.
532 * gnulib/import/m4/warn-on-use.m4: Update.
533 * gnulib/import/m4/wchar_h.m4: Update.
534 * gnulib/import/m4/wchar_t.m4: Update.
535 * gnulib/import/m4/wctype_h.m4: Update.
536 * gnulib/import/m4/wint_t.m4: Update.
537 * gnulib/import/malloc.c: Update.
538 * gnulib/import/malloc/scratch_buffer.h: Update.
539 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
540 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
541 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
542 * gnulib/import/malloca.c: Update.
543 * gnulib/import/malloca.h: Update.
544 * gnulib/import/malloca.valgrind: Update.
545 * gnulib/import/math.in.h: Update.
546 * gnulib/import/mbrtowc.c: Update.
547 * gnulib/import/mbsinit.c: Update.
548 * gnulib/import/mbsrtowcs-impl.h: Update.
549 * gnulib/import/mbsrtowcs-state.c: Update.
550 * gnulib/import/mbsrtowcs.c: Update.
551 * gnulib/import/memchr.c: Update.
552 * gnulib/import/memmem.c: Update.
553 * gnulib/import/mempcpy.c: Update.
554 * gnulib/import/memrchr.c: Update.
555 * gnulib/import/mkdir.c: Update.
556 * gnulib/import/mkstemp.c: Update.
557 * gnulib/import/msvc-inval.c: Update.
558 * gnulib/import/msvc-inval.h: Update.
559 * gnulib/import/msvc-nothrow.c: Update.
560 * gnulib/import/msvc-nothrow.h: Update.
561 * gnulib/import/open.c: Update.
562 * gnulib/import/openat-die.c: Update.
563 * gnulib/import/openat-priv.h: Update.
564 * gnulib/import/openat-proc.c: Update.
565 * gnulib/import/openat.c: Update.
566 * gnulib/import/openat.h: Update.
567 * gnulib/import/opendir.c: Update.
568 * gnulib/import/pathmax.h: Update.
569 * gnulib/import/pipe-safer.c: Update.
570 * gnulib/import/rawmemchr.c: Update.
571 * gnulib/import/readdir.c: Update.
572 * gnulib/import/readlink.c: Update.
573 * gnulib/import/realloc.c: Update.
574 * gnulib/import/ref-add.sin: Update.
575 * gnulib/import/ref-del.sin: Update.
576 * gnulib/import/rename.c: Update.
577 * gnulib/import/rewinddir.c: Update.
578 * gnulib/import/rmdir.c: Update.
579 * gnulib/import/same-inode.h: Update.
580 * gnulib/import/save-cwd.c: Update.
581 * gnulib/import/save-cwd.h: Update.
582 * gnulib/import/scratch_buffer.h: Update.
583 * gnulib/import/secure_getenv.c: Update.
584 * gnulib/import/setenv.c: Update.
585 * gnulib/import/signal.in.h: Update.
586 * gnulib/import/stat-time.c: Update.
587 * gnulib/import/stat-time.h: Update.
588 * gnulib/import/stat-w32.c: Update.
589 * gnulib/import/stat-w32.h: Update.
590 * gnulib/import/stat.c: Update.
591 * gnulib/import/stdbool.in.h: Update.
592 * gnulib/import/stddef.in.h: Update.
593 * gnulib/import/stdint.in.h: Update.
594 * gnulib/import/stdio.in.h: Update.
595 * gnulib/import/stdlib.in.h: Update.
596 * gnulib/import/str-two-way.h: Update.
597 * gnulib/import/strchrnul.c: Update.
598 * gnulib/import/strdup.c: Update.
599 * gnulib/import/streq.h: Update.
600 * gnulib/import/strerror-override.c: Update.
601 * gnulib/import/strerror-override.h: Update.
602 * gnulib/import/strerror.c: Update.
603 * gnulib/import/string.in.h: Update.
604 * gnulib/import/stripslash.c: Update.
605 * gnulib/import/strnlen1.c: Update.
606 * gnulib/import/strnlen1.h: Update.
607 * gnulib/import/strstr.c: Update.
608 * gnulib/import/strtok_r.c: Update.
609 * gnulib/import/sys_stat.in.h: Update.
610 * gnulib/import/sys_time.in.h: Update.
611 * gnulib/import/sys_types.in.h: Update.
612 * gnulib/import/tempname.c: Update.
613 * gnulib/import/tempname.h: Update.
614 * gnulib/import/time.in.h: Update.
615 * gnulib/import/unistd--.h: Update.
616 * gnulib/import/unistd-safer.h: Update.
617 * gnulib/import/unistd.in.h: Update.
618 * gnulib/import/unsetenv.c: Update.
619 * gnulib/import/verify.h: Update.
620 * gnulib/import/extra/snippet/warn-on-use.h: Update.
621 * gnulib/import/wchar.in.h: Update.
622 * gnulib/import/wctype.in.h: Update.
623 * gnulib/import/xalloc-oversized.h: Update.
624 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
625 "53e2c179f26a890fa6685af4b6c1397ee370433b".
627 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
629 * record-btrace.c (get_thread_current_frame): Remove
632 2018-09-10 Jerome Guitton <guitton@adacore.com>
634 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
635 with check_tag to 1 if and only if the type is tagged and the
636 component being searched cannot been found in the current
637 view. Otherwise, always call ada_to_fixed_type with
640 2018-09-10 Xavier Roirand <roirand@adacore.com>
642 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
644 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
645 * ada-varobj.c (ada_varobj_get_number_of_children,
646 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
648 2018-09-10 Xavier Roirand <roirand@adacore.com>
650 * ada-valprint.c (ada_value_print): Use type instead of
653 2018-09-10 Xavier Roirand <roirand@adacore.com>
655 * ada-lang.c (ada_value_subscript): Handle case when parameter is
656 an array of access to unconstrained array.
658 2018-09-10 Xavier Roirand <roirand@adacore.com>
660 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
661 (ada_check_typedef): Use it.
663 2018-09-10 Xavier Roirand <roirand@adacore.com>
665 * ada-varobj.c (ada_varobj_describe_struct_child)
666 (ada_varobj_describe_child): Handle union case like struct one.
668 2018-09-10 Tom Tromey <tom@tromey.com>
671 * python/python.c (_initialize_python): Make example in "python"
672 help work in Python 3.
674 2018-09-10 Eli Zaretskii <eliz@gnu.org>
676 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
677 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
678 $(EXEEXT) to the script, as it is not a program.
680 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
682 * python/py-prettyprint.c (pretty_print_one_value): Return
684 (print_string_repr): Adjust.
685 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
686 * python/python-internal.h (apply_varobj_pretty_printer): Return
688 * varobj.c (varobj_value_get_print_value): Adjust.
690 2018-09-08 Tom Tromey <tom@tromey.com>
693 * python/py-prettyprint.c (pretty_print_one_value): Check for
696 2018-09-08 Joel Brobecker <brobecker@adacore.com>
698 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
699 replace_operator_with_call.
701 2018-09-08 Joel Brobecker <brobecker@adacore.com>
703 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
705 2018-09-08 Joel Brobecker <brobecker@adacore.com>
707 * ada-typeprint.c (print_range): Print the bounds using TYPE
708 rather than its TYPE_TARGET_TYPE.
710 2018-09-08 Joel Brobecker <brobecker@adacore.com>
712 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
713 call to ada_to_fixed_value_create.
715 2018-09-08 Jerome Guitton <guitton@adacore.com>
717 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
719 2018-09-08 Joel Brobecker <brobecker@adacore.com>
721 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
724 2018-09-08 Joel Brobecker <brobecker@adacore.com>
726 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
727 Move update of loop variable "fi".
729 2018-09-08 Joel Brobecker <brobecker@adacore.com>
731 * ada-lang.c (value_assign_to_component): In the case of
732 big-endian targets, extract the bits of the given VAL
733 using an src_offset of zero if container is not a scalar.
735 2018-09-06 Simon Ser <contact@emersion.fr>
738 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
739 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
740 * fbsd-tdep.c (fbsd_make_note_desc): New.
741 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
742 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
743 * target.h (enum target_object) Add FreeBSD-specific
744 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
746 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
748 * compile/compile-c.h (generate_c_for_variable_locations):
749 Change reference to pointer.
750 * compile/compile-c-support.c (compile_program) <compute>:
752 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
753 (generate_c_for_for_one_variable): Likewise
754 (generate_c_for_variable_locations): Likewise
755 * compile/compile-c-types.c (compile_c_instance::convert_type):
757 * compile/compile-cplus-symbols.c (convert_one_symbol):
758 std::move the scope passed to enter_scope.
759 * compile/compile-cplus-types.c
760 (compile_cplus_instance::enter_scope): Make parameter
762 (compile_cplus_instance::new_scope): Change reference to
764 (compile_cplus_instance::convert_type): Likewise
765 (compile_cplus_convert_typedef): std::move the scope passed to
767 (compile_cplus_convert_struct_or_union): Likewise.
768 (compile_cplus_convert_enum): Likewise.
769 (compile_cplus_convert_namespace): Likewise.
770 * compile/compile-cplus.h (compile_cplus_instance)
771 <enter_scope>: Make parameter rvalue-reference.
772 * compile/compile-internal.h (compile_instance)
773 <get_cached_type>: Likewise
774 * compile/compile-loc2c.c (push): Likewise
778 (print_label): Likewise
779 (pushf_register_address): Likewise
780 (pushf_register): Likewise
781 (do_compile_dwarf_expr_to_c): Likewise
782 (compile_dwarf_expr_to_c): Likewise
783 (compile_dwarf_bounds_to_c): Likewise
784 * compile/compile.c (compile_instance::get_cached_type):
786 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
787 (compile_dwarf_bounds_to_c): Likewise
788 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
789 (dwarf2_compile_property_to_c): Likewise
790 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
791 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
794 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
796 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
797 * tui/tui-data.c (init_content_element): Don't initialize it.
799 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
801 * tui/tui-data.h (struct tui_win_info)
802 <detail::opaque>: Remove.
803 * tui/tui-data.c (init_win_info): Remove assignment.
805 2018-09-05 Tom Tromey <tom@tromey.com>
807 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
809 * target-float.c (host_float_ops<T>::to_string)
810 (host_float_ops<T>::from_string): Use
811 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
812 * configure: Rebuild.
814 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
816 * printcmd.c (printf_c_string): Use
817 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
818 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
820 2018-09-05 Tom Tromey <tom@tromey.com>
822 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
824 2018-09-05 Tom de Vries <tdevries@suse.de>
826 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
827 with resolve_abstract_p == true.
828 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
829 defaulting to false. Propagate resolve_abstract_p to
830 dwarf2_fetch_die_loc_sect_off.
831 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
832 parameter, defaulting to false.
833 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
834 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
836 * dwarf2read.h (struct die_info): Forward-declare.
837 (die_info_ptr): New typedef.
838 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
840 2018-09-05 Joel Brobecker <brobecker@adacore.com>
844 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
845 Pedro Alves <palves@redhat.com>
847 * gnulib/Makefile.in (aclocal_m4_deps): Move to
848 "aclocal-m4-deps.mk". Include file here.
849 $(srcdir)/aclocal.m4: Add "configure.ac".
850 * gnulib/aclocal-m4-deps.mk: New file.
851 * gnulib/update-gnulib.sh: Automatically update
852 "aclocal-m4-deps.mk".
854 2018-09-04 Tom Tromey <tom@tromey.com>
856 * configure: Rebuild.
857 * configure.ac: Remove multi-ice code.
859 2018-09-04 Tom Tromey <tom@tromey.com>
861 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
864 2018-09-04 Tom Tromey <tom@tromey.com>
866 * Makefile.in (printcmd.o, target-float.o): Remove.
867 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
869 2018-09-04 Tom Tromey <tom@tromey.com>
871 * gnulib/Makefile.in: Remove obsolete comment.
872 * Makefile.in: Remove obsolete comment.
874 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
876 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
879 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
881 * riscv-tdep.c: Add 'prologue-value.h' include.
882 (struct riscv_unwind_cache): New struct.
883 (riscv_debug_unwinder): New global.
884 (riscv_scan_prologue): Update arguments, capture register details
886 (riscv_skip_prologue): Reformat arguments line, move end of
887 prologue calculation into riscv_scan_prologue.
888 (riscv_frame_cache): Update return type, create
889 riscv_unwind_cache, scan the prologue, and fill in remaining cache
891 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
892 (riscv_frame_prev_register): Use the trad_frame within the
894 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
897 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
899 * trad-frame.h (trad_frame_set_realreg): Declare.
900 (trad_frame_set_addr): Declare.
901 * trad-frame.c (trad_frame_set_realreg): Define new function.
902 (trad_frame_set_addr): Define new function.
903 (trad_frame_set_reg_realreg): Use new function.
904 (trad_frame_set_reg_addr): Use new function.
906 2018-09-01 Keith Seitz <keiths@redhat.com>
908 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
909 pulongest instead of "%lld".
910 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
913 2018-08-31 Tom Tromey <tom@tromey.com>
915 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
918 2018-08-31 Pedro Alves <palves@redhat.com>
920 * gdbarch.h: Regenerate.
922 2018-08-31 Pedro Alves <palves@redhat.com>
924 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
925 * target.h (Hardware watchpoint interfaces): Describe
926 continuable/steppable/non-steppable watchpoints.
927 * gdbarch.h, gdbarch.c: Regenerate.
929 2018-08-31 Pedro Alves <palves@redhat.com>
931 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
934 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
935 * target.h (target_ops::have_continuable_watchpoint): Delete.
936 (target_have_continuable_watchpoint): Delete.
937 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
938 * target-delegates.c: Regenerate.
940 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
942 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
943 the files present in "gnulib/import/m4/".
945 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
947 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
948 c.sw, c.swsp, and c.sdsp.
950 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
952 * riscv-tdep.c (struct riscv_inferior_data): Delete.
953 (riscv_read_misa_reg): Don't cache value read into inferior data.
954 (riscv_new_inferior_data): Delete.
955 (riscv_inferior_data_cleanup): Delete.
956 (riscv_inferior_data): Delete.
957 (riscv_invalidate_inferior_data): Delete.
958 (_initialize_riscv_tdep): Remove initialisation of inferior data.
960 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
962 * compile/compile-cplus-types.c
963 (compile_cplus_instance::leave_scope): Take the address of scope
965 (compile_cplus_instance::convert_qualified_base): Compare quals
968 2018-08-30 Keith Seitz <keiths@redhat.com>
970 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
971 Use "%s" and host_address_to_string instead of "%p" in printf.
973 2018-08-29 Keith Seitz <keiths@redhat.com>
975 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
976 and compile-cplus-types.c.
977 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
978 * c-lang.c (cplus_language_defn): Set C++ compile functions.
979 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
981 * compile/compile-c-support.c: Include compile-cplus.h.
982 (load_libcompile): Templatize.
983 (get_compile_context): "New" function.
984 (c_get_compile_context): Use get_compile_context.
985 (cplus_get_compile_context): New function.
986 (cplus_push_user_expression, cplus_pop_user_expression)
987 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
988 (cplus_compute_program): Define new structs/functions.
989 * compile/compile-cplus-symmbols.c: New file.
990 * compile/compile-cplus-types.c: New file.
991 * compile/compile-cplus.h: New file.
992 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
994 * compile/compile-object-load.c (get_out_value_type): Use
995 strncmp_iw when comparing symbol names.
996 (compile_object_load): Add mst_bss and mst_data.
997 * compile/compile.c (_initialize_compile): Remove
998 -Wno-implicit-function-declaration from `compile_args'.
999 * compile/gcc-cp-plugin.h: New file.
1000 * NEWS: Mention C++ compile support and new debug options.
1002 2018-08-29 Keith Seitz <keiths@redhat.com>
1004 * linespec.c (collect_info::add_symbol): Make virtual.
1005 (struct symbol_searcher_collect_info): New struct.
1006 (symbol_searcher::find_all_symbols): New method.
1007 * symtab.h (class symbol_searcher): New class.
1009 2018-08-29 Keith Seitz <keiths@redhat.com>
1011 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1012 Change to vector of block_symbol. Update all users.
1013 (struct collect_info) <symbols>: Likewise.
1014 (collect_info::add_symbol): Take block_symbol as argument.
1016 (decode_compound_collector) <m_symbols>: Change type to vector
1017 of block_symbol. Update all users.
1018 (decode_compound_collector::operator ()): Change parameter type
1020 (find_method, find_function_symbols, find_linespec_symbols)
1021 (find_label_symbols_in_block, find_label_symbols): Change symbol
1022 vectors to block_symbol vectors.
1023 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1026 2018-08-29 Keith Seitz <keiths@redhat.com>
1028 * linespec.c (symbolp): Remove typedef and VEC definitions.
1029 (bound_minimal_symbol_d): Likewise.
1031 2018-08-29 Keith Seitz <keiths@redhat.com>
1033 * linespec.c (decode_compound_collector::decode_compound_collector):
1034 Remove initialization for `m_symtabs'.
1035 (decode_compound_collector::release_symbols): Change return type
1036 to std::vector. Update all callers.
1037 (class decode_compound_collector) <m_symbols>: Change type to
1039 (lookup_prefix_sym): Change return type to std::vector. Update all
1041 (compare_symbols): Remove.
1042 (std_compare_symbols): Rename to `compare_symbols'.
1043 (find_method): Change `sym_classes' parameter to std::vector.
1044 Update all callers. Use std::sort to sort sym_classes.
1045 (find_linespec_symbols): Remove cleanup.
1047 2018-08-29 Keith Seitz <keiths@redhat.com>
1049 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1050 std::vector. Update all users.
1051 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1052 (struct collect_info) <minimal_symbols>: Likewise.
1053 (compare_msymbols): Return bool. Change parameters to const
1054 bound_minimal_symbol references.
1055 (find_method, find_function_symbols, find_linespec_symbols): Change
1056 `minsyms' parameter to std::vector. Update all callers.
1058 2018-08-29 Keith Seitz <keiths@redhat.com>
1060 * linespec.c (struct linespec) <label_symbols>: Change type to
1061 std::vector. Update all users.
1062 (find_label_symbols_in_block): Change `result' parameter to
1063 std::vector. Update all callers.
1064 (find_label_symbols): Return std::vector. Update all callers.
1066 2018-08-29 Keith Seitz <keiths@redhat.com>
1068 * linespec.c (struct linespec) <function_symbols>: Change type to
1069 std::vector. Update all users.
1070 (struct collect_info) <function_symbols>: Likewise.
1071 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1072 (std_compare_symbols): New function.
1073 (find_method, find_function_symbols, find_linespec_symbols)
1074 (find_label_symbols_in_block): Change `symbols' parameter to
1075 std::vector. Update all callers.
1076 (find_label_symbols): Likewise for `function_symbols' and
1079 2018-08-29 Keith Seitz <keiths@redhat.com>
1081 * linespec.c (symtab_vector_up): Define.
1082 (struct linespec) <file_symtabs>: Change type to std::vector *.
1084 (struct collect_info) <file_symtabs>: Likewise.
1085 (collect_symtabs_from_filename): Return symtab_vector_up.
1087 (decode_objc): Remove cleanup.
1088 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1089 (symtab_collector::release_symtabs): Return symtab_vector_up.
1091 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1093 (collect_symtabs_from_filename, symtabs_from_filename): Return
1094 symtab_vector_up. Update all callers.
1096 2018-08-29 Tom Tromey <tom@tromey.com>
1098 * csky-tdep.c (csky_analyze_prologue): Use
1099 core_addr_to_string_nz.
1101 2018-08-29 Tom Tromey <tom@tromey.com>
1103 * windows-nat.c (struct xlate_exception) <them>: Change type to
1105 (xlate): Fix formatting. Remove last entry.
1106 (struct xlate_exception, xlate): Comment out.
1107 (windows_nat_target::resume): Use ranged for.
1109 2018-08-29 Jim Wilson <jimw@sifive.com>
1111 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1112 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1114 (riscv_linux_nat_target::store_registers): Likewise.
1116 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1120 * gnulib/aclocal.m4: Regenerate.
1121 * gnulib/config.in: Regenerate.
1122 * gnulib/configure: Regenerate.
1123 * gnulib/import/Makefile.am: Update.
1124 * gnulib/import/Makefile.in: Update.
1125 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1126 * gnulib/import/_Noreturn.h: ... this.
1127 * gnulib/import/alloca.in.h: Update.
1128 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1129 * gnulib/import/arg-nonnull.h: ... this.
1130 * gnulib/import/assure.h: Update.
1131 * gnulib/import/at-func.c: Update.
1132 * gnulib/import/basename-lgpl.c: Update.
1133 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1134 * gnulib/import/c++defs.h: ... this.
1135 * gnulib/import/canonicalize-lgpl.c: Update.
1136 * gnulib/import/cdefs.h: Update.
1137 * gnulib/import/chdir-long.c: Update.
1138 * gnulib/import/chdir-long.h: Update.
1139 * gnulib/import/cloexec.c: Update.
1140 * gnulib/import/cloexec.h: Update.
1141 * gnulib/import/close.c: Update.
1142 * gnulib/import/closedir.c: Update.
1143 * gnulib/import/config.charset: Update.
1144 * gnulib/import/dirent-private.h: Update.
1145 * gnulib/import/dirent.in.h: Update.
1146 * gnulib/import/dirfd.c: Update.
1147 * gnulib/import/dirname-lgpl.c: Update.
1148 * gnulib/import/dirname.h: Update.
1149 * gnulib/import/dosname.h: Update.
1150 * gnulib/import/dup-safer-flag.c: Update.
1151 * gnulib/import/dup-safer.c: Update.
1152 * gnulib/import/dup.c: Update.
1153 * gnulib/import/dup2.c: Update.
1154 * gnulib/import/errno.in.h: Update.
1155 * gnulib/import/error.c: Update.
1156 * gnulib/import/error.h: Update.
1157 * gnulib/import/exitfail.c: Update.
1158 * gnulib/import/exitfail.h: Update.
1159 * gnulib/import/extra/update-copyright: Update.
1160 * gnulib/import/fchdir.c: Update.
1161 * gnulib/import/fcntl.c: Update.
1162 * gnulib/import/fcntl.in.h: Update.
1163 * gnulib/import/fd-hook.c: Update.
1164 * gnulib/import/fd-hook.h: Update.
1165 * gnulib/import/fd-safer-flag.c: Update.
1166 * gnulib/import/fd-safer.c: Update.
1167 * gnulib/import/fdopendir.c: Update.
1168 * gnulib/import/filename.h: Update.
1169 * gnulib/import/filenamecat-lgpl.c: Update.
1170 * gnulib/import/filenamecat.h: Update.
1171 * gnulib/import/flexmember.h: Update.
1172 * gnulib/import/float+.h: Update.
1173 * gnulib/import/float.c: Update.
1174 * gnulib/import/float.in.h: Update.
1175 * gnulib/import/fnmatch.c: Update.
1176 * gnulib/import/fnmatch.in.h: Update.
1177 * gnulib/import/fnmatch_loop.c: Update.
1178 * gnulib/import/fpucw.h: Update.
1179 * gnulib/import/frexp.c: Update.
1180 * gnulib/import/frexpl.c: Update.
1181 * gnulib/import/fstat.c: Update.
1182 * gnulib/import/fstatat.c: Update.
1183 * gnulib/import/getcwd-lgpl.c: Update.
1184 * gnulib/import/getcwd.c: Update.
1185 * gnulib/import/getdtablesize.c: Update.
1186 * gnulib/import/getlogin_r.c: Update.
1187 * gnulib/import/getprogname.c: Update.
1188 * gnulib/import/getprogname.h: Update.
1189 * gnulib/import/gettext.h: Update.
1190 * gnulib/import/gettimeofday.c: Update.
1191 * gnulib/import/glob-libc.h: Update.
1192 * gnulib/import/glob.c: Update.
1193 * gnulib/import/glob.in.h: Update.
1194 * gnulib/import/glob_internal.h: Update.
1195 * gnulib/import/glob_pattern_p.c: Update.
1196 * gnulib/import/globfree.c: Update.
1197 * gnulib/import/hard-locale.c: Update.
1198 * gnulib/import/hard-locale.h: Update.
1199 * gnulib/import/intprops.h: Update.
1200 * gnulib/import/inttypes.in.h: Update.
1201 * gnulib/import/isnan.c: Update.
1202 * gnulib/import/isnand-nolibm.h: Update.
1203 * gnulib/import/isnand.c: Update.
1204 * gnulib/import/isnanl-nolibm.h: Update.
1205 * gnulib/import/isnanl.c: Update.
1206 * gnulib/import/itold.c: Update.
1207 * gnulib/import/libc-config.h: Update.
1208 * gnulib/import/limits.in.h: Update.
1209 * gnulib/import/localcharset.c: Update.
1210 * gnulib/import/localcharset.h: Update.
1211 * gnulib/import/localtime-buffer.c: Update.
1212 * gnulib/import/localtime-buffer.h: Update.
1213 * gnulib/import/lstat.c: Update.
1214 * gnulib/import/m4/00gnulib.m4: Update.
1215 * gnulib/import/m4/__inline.m4: Update.
1216 * gnulib/import/m4/absolute-header.m4: Update.
1217 * gnulib/import/m4/alloca.m4: Update.
1218 * gnulib/import/m4/builtin-expect.m4: Update.
1219 * gnulib/import/m4/canonicalize.m4: Update.
1220 * gnulib/import/m4/chdir-long.m4: Update.
1221 * gnulib/import/m4/close.m4: Update.
1222 * gnulib/import/m4/closedir.m4: Update.
1223 * gnulib/import/m4/configmake.m4: Update.
1224 * gnulib/import/m4/d-ino.m4: Update.
1225 * gnulib/import/m4/d-type.m4: Update.
1226 * gnulib/import/m4/dirent_h.m4: Update.
1227 * gnulib/import/m4/dirfd.m4: Update.
1228 * gnulib/import/m4/dirname.m4: Update.
1229 * gnulib/import/m4/double-slash-root.m4: Update.
1230 * gnulib/import/m4/dup.m4: Update.
1231 * gnulib/import/m4/dup2.m4: Update.
1232 * gnulib/import/m4/eealloc.m4: Update.
1233 * gnulib/import/m4/environ.m4: Update.
1234 * gnulib/import/m4/errno_h.m4: Update.
1235 * gnulib/import/m4/error.m4: Update.
1236 * gnulib/import/m4/exponentd.m4: Update.
1237 * gnulib/import/m4/exponentl.m4: Update.
1238 * gnulib/import/m4/extensions.m4: Update.
1239 * gnulib/import/m4/extern-inline.m4: Update.
1240 * gnulib/import/m4/fchdir.m4: Update.
1241 * gnulib/import/m4/fcntl-o.m4: Update.
1242 * gnulib/import/m4/fcntl.m4: Update.
1243 * gnulib/import/m4/fcntl_h.m4: Update.
1244 * gnulib/import/m4/fdopendir.m4: Update.
1245 * gnulib/import/m4/filenamecat.m4: Update.
1246 * gnulib/import/m4/flexmember.m4: Update.
1247 * gnulib/import/m4/float_h.m4: Update.
1248 * gnulib/import/m4/fnmatch.m4: Update.
1249 * gnulib/import/m4/fnmatch_h.m4: Update.
1250 * gnulib/import/m4/fpieee.m4: Update.
1251 * gnulib/import/m4/frexp.m4: Update.
1252 * gnulib/import/m4/frexpl.m4: Update.
1253 * gnulib/import/m4/fstat.m4: Update.
1254 * gnulib/import/m4/fstatat.m4: Update.
1255 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1256 * gnulib/import/m4/getcwd-path-max.m4: Update.
1257 * gnulib/import/m4/getcwd.m4: Update.
1258 * gnulib/import/m4/getdtablesize.m4: Update.
1259 * gnulib/import/m4/getlogin.m4: Update.
1260 * gnulib/import/m4/getlogin_r.m4: Update.
1261 * gnulib/import/m4/getpagesize.m4: Update.
1262 * gnulib/import/m4/getprogname.m4: Update.
1263 * gnulib/import/m4/gettimeofday.m4: Update.
1264 * gnulib/import/m4/glibc21.m4: Update.
1265 * gnulib/import/m4/glob.m4: Update.
1266 * gnulib/import/m4/glob_h.m4: Update.
1267 * gnulib/import/m4/gnulib-cache.m4: Update.
1268 * gnulib/import/m4/gnulib-common.m4: Update.
1269 * gnulib/import/m4/gnulib-comp.m4: Update.
1270 * gnulib/import/m4/gnulib-tool.m4: Update.
1271 * gnulib/import/m4/hard-locale.m4: Update.
1272 * gnulib/import/m4/include_next.m4: Update.
1273 * gnulib/import/m4/inttypes-pri.m4: Update.
1274 * gnulib/import/m4/inttypes.m4: Update.
1275 * gnulib/import/m4/isnand.m4: Update.
1276 * gnulib/import/m4/isnanl.m4: Update.
1277 * gnulib/import/m4/largefile.m4: Update.
1278 * gnulib/import/m4/limits-h.m4: Update.
1279 * gnulib/import/m4/localcharset.m4: Update.
1280 * gnulib/import/m4/locale-fr.m4: Update.
1281 * gnulib/import/m4/locale-ja.m4: Update.
1282 * gnulib/import/m4/locale-zh.m4: Update.
1283 * gnulib/import/m4/localtime-buffer.m4: Update.
1284 * gnulib/import/m4/longlong.m4: Update.
1285 * gnulib/import/m4/lstat.m4: Update.
1286 * gnulib/import/m4/malloc.m4: Update.
1287 * gnulib/import/m4/malloca.m4: Update.
1288 * gnulib/import/m4/math_h.m4: Update.
1289 * gnulib/import/m4/mbrtowc.m4: Update.
1290 * gnulib/import/m4/mbsinit.m4: Update.
1291 * gnulib/import/m4/mbsrtowcs.m4: Update.
1292 * gnulib/import/m4/mbstate_t.m4: Update.
1293 * gnulib/import/m4/memchr.m4: Update.
1294 * gnulib/import/m4/memmem.m4: Update.
1295 * gnulib/import/m4/mempcpy.m4: Update.
1296 * gnulib/import/m4/memrchr.m4: Update.
1297 * gnulib/import/m4/mkdir.m4: Update.
1298 * gnulib/import/m4/mkstemp.m4: Update.
1299 * gnulib/import/m4/mmap-anon.m4: Update.
1300 * gnulib/import/m4/mode_t.m4: Update.
1301 * gnulib/import/m4/msvc-inval.m4: Update.
1302 * gnulib/import/m4/msvc-nothrow.m4: Update.
1303 * gnulib/import/m4/multiarch.m4: Update.
1304 * gnulib/import/m4/nocrash.m4: Update.
1305 * gnulib/import/m4/off_t.m4: Update.
1306 * gnulib/import/m4/onceonly.m4: Update.
1307 * gnulib/import/m4/open-cloexec.m4: Update.
1308 * gnulib/import/m4/open.m4: Update.
1309 * gnulib/import/m4/openat.m4: Update.
1310 * gnulib/import/m4/opendir.m4: Update.
1311 * gnulib/import/m4/pathmax.m4: Update.
1312 * gnulib/import/m4/rawmemchr.m4: Update.
1313 * gnulib/import/m4/readdir.m4: Update.
1314 * gnulib/import/m4/readlink.m4: Update.
1315 * gnulib/import/m4/realloc.m4: Update.
1316 * gnulib/import/m4/rename.m4: Update.
1317 * gnulib/import/m4/rewinddir.m4: Update.
1318 * gnulib/import/m4/rmdir.m4: Update.
1319 * gnulib/import/m4/save-cwd.m4: Update.
1320 * gnulib/import/m4/secure_getenv.m4: Update.
1321 * gnulib/import/m4/setenv.m4: Update.
1322 * gnulib/import/m4/signal_h.m4: Update.
1323 * gnulib/import/m4/ssize_t.m4: Update.
1324 * gnulib/import/m4/stat-time.m4: Update.
1325 * gnulib/import/m4/stat.m4: Update.
1326 * gnulib/import/m4/std-gnu11.m4: Update.
1327 * gnulib/import/m4/stdbool.m4: Update.
1328 * gnulib/import/m4/stddef_h.m4: Update.
1329 * gnulib/import/m4/stdint.m4: Update.
1330 * gnulib/import/m4/stdio_h.m4: Update.
1331 * gnulib/import/m4/stdlib_h.m4: Update.
1332 * gnulib/import/m4/strchrnul.m4: Update.
1333 * gnulib/import/m4/strdup.m4: Update.
1334 * gnulib/import/m4/strerror.m4: Update.
1335 * gnulib/import/m4/string_h.m4: Update.
1336 * gnulib/import/m4/strstr.m4: Update.
1337 * gnulib/import/m4/strtok_r.m4: Update.
1338 * gnulib/import/m4/sys_socket_h.m4: Update.
1339 * gnulib/import/m4/sys_stat_h.m4: Update.
1340 * gnulib/import/m4/sys_time_h.m4: Update.
1341 * gnulib/import/m4/sys_types_h.m4: Update.
1342 * gnulib/import/m4/tempname.m4: Update.
1343 * gnulib/import/m4/time_h.m4: Update.
1344 * gnulib/import/m4/unistd-safer.m4: Update.
1345 * gnulib/import/m4/unistd_h.m4: Update.
1346 * gnulib/import/m4/warn-on-use.m4: Update.
1347 * gnulib/import/m4/wchar_h.m4: Update.
1348 * gnulib/import/m4/wchar_t.m4: Update.
1349 * gnulib/import/m4/wctype_h.m4: Update.
1350 * gnulib/import/m4/wint_t.m4: Update.
1351 * gnulib/import/malloc.c: Update.
1352 * gnulib/import/malloc/scratch_buffer.h: Update.
1353 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1354 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1355 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1356 * gnulib/import/malloca.c: Update.
1357 * gnulib/import/malloca.h: Update.
1358 * gnulib/import/malloca.valgrind: Update.
1359 * gnulib/import/math.in.h: Update.
1360 * gnulib/import/mbrtowc.c: Update.
1361 * gnulib/import/mbsinit.c: Update.
1362 * gnulib/import/mbsrtowcs-impl.h: Update.
1363 * gnulib/import/mbsrtowcs-state.c: Update.
1364 * gnulib/import/mbsrtowcs.c: Update.
1365 * gnulib/import/memchr.c: Update.
1366 * gnulib/import/memmem.c: Update.
1367 * gnulib/import/mempcpy.c: Update.
1368 * gnulib/import/memrchr.c: Update.
1369 * gnulib/import/mkdir.c: Update.
1370 * gnulib/import/mkstemp.c: Update.
1371 * gnulib/import/msvc-inval.c: Update.
1372 * gnulib/import/msvc-inval.h: Update.
1373 * gnulib/import/msvc-nothrow.c: Update.
1374 * gnulib/import/msvc-nothrow.h: Update.
1375 * gnulib/import/open.c: Update.
1376 * gnulib/import/openat-die.c: Update.
1377 * gnulib/import/openat-priv.h: Update.
1378 * gnulib/import/openat-proc.c: Update.
1379 * gnulib/import/openat.c: Update.
1380 * gnulib/import/openat.h: Update.
1381 * gnulib/import/opendir.c: Update.
1382 * gnulib/import/pathmax.h: Update.
1383 * gnulib/import/pipe-safer.c: Update.
1384 * gnulib/import/rawmemchr.c: Update.
1385 * gnulib/import/readdir.c: Update.
1386 * gnulib/import/readlink.c: Update.
1387 * gnulib/import/realloc.c: Update.
1388 * gnulib/import/ref-add.sin: Update.
1389 * gnulib/import/ref-del.sin: Update.
1390 * gnulib/import/rename.c: Update.
1391 * gnulib/import/rewinddir.c: Update.
1392 * gnulib/import/rmdir.c: Update.
1393 * gnulib/import/same-inode.h: Update.
1394 * gnulib/import/save-cwd.c: Update.
1395 * gnulib/import/save-cwd.h: Update.
1396 * gnulib/import/scratch_buffer.h: Update.
1397 * gnulib/import/secure_getenv.c: Update.
1398 * gnulib/import/setenv.c: Update.
1399 * gnulib/import/signal.in.h: Update.
1400 * gnulib/import/stat-time.c: Update.
1401 * gnulib/import/stat-time.h: Update.
1402 * gnulib/import/stat-w32.c: Update.
1403 * gnulib/import/stat-w32.h: Update.
1404 * gnulib/import/stat.c: Update.
1405 * gnulib/import/stdbool.in.h: Update.
1406 * gnulib/import/stddef.in.h: Update.
1407 * gnulib/import/stdint.in.h: Update.
1408 * gnulib/import/stdio.in.h: Update.
1409 * gnulib/import/stdlib.in.h: Update.
1410 * gnulib/import/str-two-way.h: Update.
1411 * gnulib/import/strchrnul.c: Update.
1412 * gnulib/import/strdup.c: Update.
1413 * gnulib/import/streq.h: Update.
1414 * gnulib/import/strerror-override.c: Update.
1415 * gnulib/import/strerror-override.h: Update.
1416 * gnulib/import/strerror.c: Update.
1417 * gnulib/import/string.in.h: Update.
1418 * gnulib/import/stripslash.c: Update.
1419 * gnulib/import/strnlen1.c: Update.
1420 * gnulib/import/strnlen1.h: Update.
1421 * gnulib/import/strstr.c: Update.
1422 * gnulib/import/strtok_r.c: Update.
1423 * gnulib/import/sys_stat.in.h: Update.
1424 * gnulib/import/sys_time.in.h: Update.
1425 * gnulib/import/sys_types.in.h: Update.
1426 * gnulib/import/tempname.c: Update.
1427 * gnulib/import/tempname.h: Update.
1428 * gnulib/import/time.in.h: Update.
1429 * gnulib/import/unistd--.h: Update.
1430 * gnulib/import/unistd-safer.h: Update.
1431 * gnulib/import/unistd.in.h: Update.
1432 * gnulib/import/unsetenv.c: Update.
1433 * gnulib/import/verify.h: Update.
1434 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1435 * gnulib/import/wchar.in.h: Update.
1436 * gnulib/import/wctype.in.h: Update.
1437 * gnulib/import/xalloc-oversized.h: Update.
1438 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1439 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1441 2018-08-16 Gary Benson <gbenson@redhat.com>
1444 * gdb/main.c (captured_main_1): Exit with nonzero status
1445 in batch mode if the last command to be executed failed.
1446 * NEWS: Mention the above.
1448 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1450 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1451 end of warning message.
1453 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1456 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1457 (aarch64_extract_return_value): Use
1458 aapcs_is_vfp_call_or_return_candidate.
1459 (aarch64_return_in_memory): Likewise.
1460 (aarch64_store_return_value): Likewise.
1462 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1465 (aapcs_is_vfp_call_or_return_candidate): Make static
1466 (pass_in_v_or_stack): Remove function.
1467 (pass_in_v_vfp_candidate): New function.
1468 (aarch64_push_dummy_call): Check for float register candidates.
1470 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1472 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1473 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1474 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1476 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1479 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1480 (struct ipa_sym_addresses): Rename to...
1481 (struct ipa_sym_addresses_common): ... this.
1482 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1484 2018-08-28 Tom Tromey <tom@tromey.com>
1486 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1487 (token_fifo): Now a std::vector.
1488 (yylex, c_parse): Update.
1489 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1490 (token_fifo): Now a std::vector.
1491 (yylex, d_parse): Update.
1492 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1493 (token_fifo): Now a std::vector.
1494 (yylex, go_parse): Update.
1496 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
1498 * parser-defs.h (struct type_stack) <elements>: Change type to
1499 std::vector<union type_stack_elt>.
1500 <depth, size>: Remove.
1501 * parse.c (parse_exp_in_context_1): Adjust.
1502 (type_stack_reserve): Remove.
1503 (check_type_stack_depth): Remove.
1504 (insert_into_type_stack): Adjust to std::vector.
1505 (insert_type): Likewise.
1506 (push_type): Likewise.
1507 (push_type_int): Likewise.
1508 (insert_type_address_space): Likewise.
1509 (pop_type): Likewise.
1510 (pop_type_int): Likewise.
1511 (pop_typelist): Likewise.
1512 (pop_type_stack): Likewise.
1513 (append_type_stack): Likewise.
1514 (push_type_stack): Likewise.
1515 (get_type_stack): Likewise.
1516 (type_stack_cleanup): Likewise.
1517 (push_typelist): Likewise.
1518 (follow_types): Likewise.
1519 (_initialize_parse): Likewise.
1521 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
1523 * NEWS: Mention csky target.
1525 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
1526 Hafiz Abid Qadeer <abidh@codesourcery.com>
1527 Don Breazeal <donb@codesourcery.com>
1529 * csky-linux-tdep.c: New file.
1530 * csky-tdep.c: Likewise.
1531 * csky-tdep.h: Likewise.
1532 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1534 (HFILES_NO_SRCDIR): Add csky-tdep.h.
1535 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1536 * configure.tgt: Add csky support.
1538 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
1540 * python/py-framefilter.c (py_print_frame): Print frame architecture
1541 when printing on an MI output.
1543 2018-08-27 Tom Tromey <tom@tromey.com>
1546 * configure: Rebuild.
1547 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1549 2018-08-27 Tom Tromey <tom@tromey.com>
1551 * aarch64-linux-tdep.c
1552 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1555 2018-08-27 Tom Tromey <tom@tromey.com>
1557 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1559 (ppc64_standard_linkage1, ppc64_standard_linkage2)
1560 (ppc64_standard_linkage3, ppc64_standard_linkage4)
1561 (ppc64_standard_linkage5, ppc64_standard_linkage6)
1562 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1565 2018-08-27 Tom Tromey <tom@tromey.com>
1567 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1568 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1570 2018-08-27 Tom Tromey <tom@tromey.com>
1572 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1573 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1575 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1577 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1579 * sparc-linux-tdep.c (sparc32_linux_sigframe)
1580 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1581 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1583 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1584 (ppc64_linux_sigaction_tramp_frame)
1585 (ppc32_linux_sighandler_tramp_frame)
1586 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1587 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1588 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1589 * mn10300-linux-tdep.c (am33_linux_sigframe)
1590 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1591 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1592 * mips-linux-tdep.c (mips_linux_o32_sigframe)
1593 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1594 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1595 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1596 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1597 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1598 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1599 * microblaze-linux-tdep.c
1600 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1601 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1602 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1603 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1604 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1605 * common/common-types.h (ULONGEST_MAX): New define.
1606 (CORE_ADDR_MAX): Fix formatting.
1607 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1608 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1609 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1610 (arm_linux_rt_sigreturn_tramp_frame)
1611 (arm_eabi_linux_sigreturn_tramp_frame)
1612 (arm_eabi_linux_rt_sigreturn_tramp_frame)
1613 (thumb2_eabi_linux_sigreturn_tramp_frame)
1614 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1615 (arm_linux_restart_syscall_tramp_frame)
1616 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1617 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1618 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1620 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1622 2018-08-27 Tom Tromey <tom@tromey.com>
1624 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1626 * mips-tdep.c (mips_deal_with_atomic_sequence)
1627 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1628 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1629 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1630 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1632 * aarch64-tdep.c (aarch64_software_single_step): Use
1635 2018-08-27 Tom Tromey <tom@tromey.com>
1637 * linespec.c (complete_linespec_component): Add cast to "char".
1638 * completer.c (completion_tracker::build_completion_result): Add
1641 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1643 * solist.h (struct solist, struct target_so_ops): Fix
1646 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1648 * ada-tasks.c (ada_task_info_s): Remove typedef.
1649 (DEF_VEC_O(ada_task_info_s)): Remove.
1650 (struct ada_tasks_inferior_data): Initialize fields.
1651 <task_list>: Make an std::vector.
1652 (get_ada_tasks_inferior_data): Allocate with new.
1653 (ada_get_task_number): Adjust.
1654 (get_task_number_from_id): Likewise.
1655 (valid_task_id): Likewise.
1656 (ada_get_task_info_from_ptid): Likewise.
1657 (iterate_over_live_ada_tasks): Likewise.
1658 (add_ada_task): Likewise.
1659 (read_known_tasks): Likewise.
1660 (ada_build_task_list): Likewise.
1661 (print_ada_task_info): Likewise.
1662 (info_task): Likewise.
1663 (task_command_1): Likewise.
1665 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1667 * ada-lang.c (add_angle_brackets): Return std::string.
1669 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1671 * python/py-threadevent.c (py_get_event_thread): Initialize
1674 2018-08-24 Pedro Alves <palves@redhat.com>
1676 * python/py-bpevent.c (create_breakpoint_event_object): Use
1677 copy-initialization.
1678 * python/py-continueevent.c (emit_continue_event): Use
1679 copy-initialization.
1680 * python/py-exitedevent.c (create_exited_event_object): Return a
1682 (emit_exited_event): Use copy-initialization.
1683 * python/py-inferior.c (python_new_inferior)
1684 (python_inferior_deleted, add_thread_object): Use
1685 copy-initialization.
1686 * python/py-infevents.c (create_inferior_call_event_object)
1687 (create_register_changed_event_object)
1688 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1689 (emit_inferior_call_event, emit_memory_changed_event)
1690 (emit_register_changed_event): Use copy-initialization.
1691 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1692 Return a gdbpy_ref<>.
1693 (emit_new_objfile_event): Use copy-initialization.
1694 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1695 (emit_clear_objfiles_event): Use copy-initialization.
1696 * python/py-signalevent.c (create_signal_event_object): Use
1697 copy-initialization.
1698 * python/py-threadevent.c (create_thread_event_object): Use
1699 copy-initialization.
1701 2018-08-24 Pedro Alves <palves@redhat.com>
1702 Simon Marchi <simon.marchi@ericsson.com>
1705 * python/py-continueevent.c: Include "gdbthread.h".
1706 (create_continue_event_object): Add intro comment. Add 'ptid'
1707 parameter. Use it to find thread to pass to
1708 create_thread_event_object.
1709 (emit_continue_event): Pass PTID down to
1710 create_continue_event_object.
1711 * python/py-event.h (py_get_event_thread): Declare.
1712 (create_thread_event_object): Remove default from 'thread'
1714 * python/py-stopevent.c (create_stop_event_object): Use
1715 py_get_event_thread.
1716 * python/py-threadevent.c (get_event_thread): Rename to ...
1717 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1718 and use it to find the thread.
1719 (create_thread_event_object): Assert that THREAD isn't null.
1720 Don't find the event thread here.
1722 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1724 * block.h (blockrange, blockranges): New struct declarations.
1725 (struct block): Add new field named `ranges'.
1726 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1727 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1728 macros for accessing ranges in struct block.
1729 (make_blockranges): New declaration.
1730 block.c (make_blockranges): New function.
1731 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1733 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1734 * blockframe.c (cache_pc_function_block): New static global.
1735 (clear_pc_function_cache): Clear cache_pc_function_block.
1736 (find_pc_partial_function): Move comment to symtab.h. Add
1737 support for non-contiguous blocks.
1738 * cli/cli-cmds.c (block.h): Include.
1739 (print_disassembly): Handle printing of non-contiguous blocks.
1740 (disassemble_current_function): Likewise.
1741 (disassemble_command): Likewise.
1743 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1745 * blockframe.c (get_pc_function_start): Likewise.
1746 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1747 (gcc_symbol_address): Likewise.
1748 * compile/compile-object-run.c (compile_object_run): Likewise.
1749 * compile/compile.c (get_expr_block_and_pc): Likewise.
1750 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1751 (func_addr_to_tail_call_list): Likewise.
1752 * findvar.c (default_read_var_value): Likewise.
1753 * inline-frame.c (inline_frame_this_id): Likewise.
1754 (skip-inline_frames): Likewise.
1755 * infcmd.c (until_next_command): Likewise.
1756 * linespec.c (convert_linespec_to_sals): Likewise.
1757 * parse.c (parse_exp_in_context_1): Likewise.
1758 * printcmd.c (build_address_symbolic): likewise.
1759 (info_address_command): Likewise.
1760 symtab.c (find_function_start_sal): Likewise.
1761 (skip_prologue_sal): Likewise.
1762 (find_function_alias_target): Likewise.
1763 (find_gnu_ifunc): Likewise.
1764 * stack.c (find_frame_funname): Likewise.
1765 * symtab.c (fixup_symbol_section): Likewise.
1766 (find_function_start_sal): Likewise.
1767 (skip_prologue_sal): Likewsie.
1768 (find_function_alias_target): Likewise.
1769 (find_gnu_ifunc): Likewise.
1770 * tracepoint.c (info_scope_command): Likewise.
1771 * value.c (value_fn_field): Likewise.
1773 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1774 in place of find_pc_partial_function.
1775 * blockframe.c (find_function_entry_range_from_pc): New function.
1776 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1777 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1778 for each range in a block.
1781 2018-08-23 Xavier Roirand <roirand@adacore.com>
1783 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1786 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1788 * solib-svr4.c (read_program_headers_from_bfd): Return
1789 gdb::optional<gdb::byte_vector>.
1790 (svr4_exec_displacement): Adjust.
1792 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1794 * solib-svr4.c (read_program_header): Return
1795 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1796 (find_program_interpreter): Return
1797 gdb::optional<gdb::byte_vector>.
1798 (scan_dyntag_auxv): Adjust.
1799 (enable_break): Adjust.
1800 (svr4_exec_displacement): Adjust.
1802 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1804 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1805 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1807 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1809 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1811 * guile/scm-utils.c (gdbscm_printf): Likewise.
1812 * serial.c (serial_printf): Likewise.
1813 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1815 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1817 * stack.c (print_frame): Print frame architecture when printing on
1819 * NEWS: Mention new "arch" attribute in frame output.
1821 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1823 * arch/aarch64.h (aarch64_regnum): Update comment.
1825 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1827 * NEWS: Add SVE to 8.2 section.
1829 2018-08-21 Pedro Alves <palves@redhat.com>
1831 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1832 out from gdbscm_parse_function_args.
1833 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1834 gdbscm_parse_function_args_1.
1836 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1839 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1842 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1844 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1846 2018-08-19 Michael Spang <spang@google.com>
1849 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1850 for PT_TLS segments.
1852 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1854 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1855 dwarf_variable_value.
1856 * dwarf2-frame.c (class dwarf_expr_executor):
1857 Add override for dwarf_variable_value.
1858 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1859 (class symbol_needs_eval_context): Likewise.
1860 (indirect_synthetic_pointer): Add forward declaration.
1861 (sect_variable_value): New function.
1862 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1863 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1864 for DW_OP_GNU_variable_value.
1866 2018-08-16 Tom Tromey <tom@tromey.com>
1868 * top.c (read_command_file): Update.
1869 (command_line_input): Remove "repeat" argument.
1870 * ada-lang.c (get_selections): Update.
1871 * linespec.c (decode_line_2): Update.
1872 * defs.h (command_line_input): Remove argument.
1873 * cli/cli-script.c (read_next_line): Update.
1874 * python/py-gdb-readline.c: Update.
1876 2018-08-17 Tom Tromey <tom@tromey.com>
1878 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1881 2018-08-15 Tom Tromey <tom@tromey.com>
1883 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1885 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1887 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1888 If used, use find_pc_partial_function to find address range
1890 * mi/mi-main.c (mi_cmd_list_features): Report
1891 "data-disassemble-a-option" feature.
1892 * NEWS: Mention new -data-disassemble option -a.
1894 2018-08-13 Tom Tromey <tom@tromey.com>
1896 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1898 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1900 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1901 (aarch64_linux_collect_sve_regset): Likewise.
1902 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1903 * regcache.h (regcache_map_entry_size): New function.
1905 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1907 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1908 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1909 (SVE_HEADER_VL_LENGTH): Likewise.
1910 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1911 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1912 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1913 (SVE_HEADER_SIZE_OFFSET): Likewise.
1914 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1915 (SVE_HEADER_VL_OFFSET): Likewise.
1916 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1917 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1918 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1919 (SVE_HEADER_SIZE): Likewise.
1920 (aarch64_linux_core_read_vq): Add function.
1921 (aarch64_linux_core_read_description): Check for SVE section.
1923 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1925 * aarch64-fbsd-tdep.c
1926 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1928 * aarch64-linux-tdep.c
1929 (aarch64_linux_iterate_over_regset_sections): Likewise.
1930 * alpha-linux-tdep.c
1931 (alpha_linux_iterate_over_regset_sections):
1933 (alphanbsd_iterate_over_regset_sections): Likewise.
1935 (amd64fbsd_iterate_over_regset_sections): Likewise.
1936 * amd64-linux-tdep.c
1937 (amd64_linux_iterate_over_regset_sections): Likewise.
1939 (armbsd_iterate_over_regset_sections): Likewise.
1941 (arm_fbsd_iterate_over_regset_sections): Likewise.
1943 (arm_linux_iterate_over_regset_sections): Likewise.
1944 * corelow.c (get_core_registers_cb): Likewise.
1945 (core_target::fetch_registers): Likewise.
1946 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1947 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1948 * gdbarch.h (void): Regenerate.
1949 * gdbarch.sh: Add supply_size and collect_size.
1950 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1951 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1952 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1953 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1954 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1955 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1956 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1957 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1958 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1959 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1960 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1961 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1962 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1963 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1964 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1965 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1966 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1967 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1968 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1969 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1970 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1971 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1972 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1973 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1974 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1975 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1976 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1977 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1978 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1979 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1981 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1983 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1986 2018-08-10 Keith Seitz <keiths@redhat.com>
1988 * compile/compile-c-support.c (add_code_header, add_code_footer):
1989 Move into policy class.
1990 (c_push_user_expression, pop_user_expression_nop)
1991 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1992 (compile_program): New host class.
1993 (c_compile_program): New typedef.
1994 (c_compute_porgram): Use c_compile_program.
1996 2018-08-10 Keith Seitz <keiths@redhat.com>
1998 * compile/compile-internal.h (compile_instance::~compile_instance):
1999 Remove calls to htab_delete.
2000 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2001 * compile.c (compile_instance::compile_instance): Initialize
2002 htab unique pointers.
2003 (compile_instance::get_cached_type, compile_instance::insert_type)
2004 (compile_instance::error_symbol_once): Update for unique_ptr.
2006 2018-08-10 Keith Seitz <keiths@redhat.com>
2008 * compile/compile-c-symbols.c (struct symbol_error)
2009 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2010 (compile_instance::insert_symbol_error)
2011 (compile_instance::error_symbol_once): Move to ...
2012 * compile/compile.c: ... here.
2014 2018-08-10 Keith Seitz <keiths@redhat.com>
2016 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2017 instead of `new_compile_instance'.
2018 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2020 If the symbol error map is not initialized, create it.
2021 (generate_c_for_for_one_symbol): Do not check/initialize
2022 the symbol error map.
2023 * compile/compile-c-types.c (compile_c_instance): Make a class.
2025 (compile_instance::compile_instance): Initialize the type cache.
2026 (get_cached_type): New function.
2027 (insert_type): Update description.
2028 (compile_c_instance::m_default_cflags): Define.
2029 (convert_type): Update description. Use get_cached_type.
2030 (delete_instance): Moved to destructor.
2031 (new_compile_instance): Moved to constructor.
2032 * compile/compile-c.h (compile_c_instance): Make class inheriting
2033 from compile_instance.
2034 <base>: Remove field.
2035 <type_map, symbol_err_map>: Move to base class.
2036 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2037 * compile/compile-internal.h (compile_instance): Make class.
2038 <type_map_t, symbol_err_map_t>: Define.
2039 <fe>: Rename to `m_gcc_fe'.
2040 <scope, block, gcc_target_options>: Add `m_' prefix.
2041 <m_type_map, m_symbol_err_map>: New fields, moved from
2044 (convert_type, new_compile_instance): Remove.
2045 * compile/compile.c (cleanup_compile_instance): Remove.
2046 (compile_to_object): Use unique_ptr to eliminate cleanups.
2047 (compile_instance::set_print_callback, compile_instance::version)
2048 (compile_instance::set_verbose)
2049 (compile_instance::set_driver_filename)
2050 (compile_instance::set_triplet_regexp)
2051 (compile_instance::set_arguments)
2052 (compile_instance::set_source_file)
2053 (compile_instance::compile): Define.
2055 2018-08-10 Keith Seitz <keiths@redhat.com>
2057 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2058 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2059 gcc-c-fe.def to define C plugin.
2060 (delete_instance): Delete `c_plugin'.
2061 (new_compile_instance): Initialize `c_plugin'.
2062 * compile/compile-c.h: Include gcc_c_plugin.h.
2063 (struct compile_c_instance) <c_plugin>: New member.
2064 * gcc-c-plugin.h: New file.
2065 Update all callers with API change.
2067 2018-08-10 Keith Seitz <keiths@redhat.com>
2069 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2070 (HFILES_NO_SRCDIR): ... to here.
2071 Add compile-internal.h and compile-c.h.
2072 * compile/compile-c-support.c: Include compile-c.h.
2073 * compile/compile-c-symbols.c: Include compile-c.h.
2074 (generate_c_for_variable_locations): Update comment.
2075 * compile/compile-c-types.c: Include compile-c.h.
2076 * compile/compile-c.h: New file -- moved C language declarations
2077 from other files here.
2078 * compile/compile-internal.h: Do not include hashtab.h or
2079 common/enum-flags.h.
2080 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2081 (gcc_convert_symbol, gcc_symbol_address)
2082 (generate_c_for_variable_locations, c_get_mode_for_size)
2083 (c_get_range_decl_name): Definitions moved to compile-c.h.
2084 * compile/compile-loc2c.c: Include compile-c.h.
2086 2018-08-10 Keith Seitz <keiths@redhat.com>
2088 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2089 (c_symbol_substitution_name): ... this.
2092 2018-08-10 Keith Seitz <keiths@redhat.com>
2094 * compile/compile-c-support.c (c_compute_program): Use
2095 unique_xmalloc_ptr to eliminate cleanup.
2096 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2097 Return a unique_xmalloc_ptr and eliminate cleanup.
2098 * compile/compile-internal.h (generate_c_for_variable_locations):
2099 Return unique_xmalloc_ptr and update description.
2101 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2103 * corelow.c (core_target::get_core_register_section): Rename
2104 min_size to section_min_size.
2106 2018-08-09 Jim Wilson <jimw@sifive.com>
2108 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2109 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2110 * NEWS: Mention new GNU/Linux RISC-V target.
2111 * configure.host: Add riscv*-*-linux*.
2112 * configure.nat: Add riscv*.
2113 * configure.tgt: Add riscv*-*-linux*.
2114 * riscv-linux-nat.c: New file.
2115 * riscv-linux-tdep.c: New file.
2117 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2119 * infrun.c (resume): Make static, add forward declaration.
2120 (proceed): Update header comment.
2121 * infrun.h (resume): Delete declaration.
2123 2018-08-09 Tom Tromey <tom@tromey.com>
2125 * riscv-tdep.h: Minor formatting fixes.
2127 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2129 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2130 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2131 (test_mkdir_recursive): Likewise.
2132 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2134 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2136 * valarith.c (value_subscripted_rvalue): If an array is not in
2137 memory, and we don't know the upper bound, then we can't know that
2138 the requested element exists or not.
2140 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2142 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2143 (target_options_to_string): Add comment.
2145 2018-08-08 Tom Tromey <tom@tromey.com>
2147 * unittests/scoped_mmap-selftests.c: Check result of "write".
2149 2018-08-08 Jim Wilson <jimw@sifive.com>
2151 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2152 (decode_register_index_short): New.
2153 (decode_j_type_insn, decode_cj_type_insn): New.
2154 (decode_b_type_insn, decode_cb_type_insn): New.
2155 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2156 local xlen. Check xlen when decoding ambiguous compressed insns. In
2157 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2158 is_c_sw_insn instead of is_sw_insn.
2159 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2160 (riscv_software_single_step): New.
2161 * riscv-tdep.h (riscv_software_single_step): Declare.
2163 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2164 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2166 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2169 * target.c (dispose_inferior): Don't dispose of inferiors that are
2172 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2174 * remote.c (remote_target::download_tracepoint): Change char* to
2177 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2179 * target.h (target_options_to_string): Return an std::string.
2180 * target.c (str_comma_list_concat_elem): Return void, use
2182 (do_option): Likewise.
2183 (target_options_to_string): Return an std::string.
2184 * linux-nat.c (linux_nat_target::wait): Adjust.
2185 * target-debug.h (target_debug_print_options): Adjust.
2187 2018-08-07 Tom Tromey <tom@tromey.com>
2189 * Makefile.in (CPPFLAGS): New variable.
2190 (INTERNAL_CPPFLAGS): Use it.
2192 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2194 * NEWS: Mention the index cache.
2196 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2198 * common/pathstuff.h (get_standard_cache_dir): New.
2199 * common/pathstuff.c (get_standard_cache_dir): New.
2200 * build-id.h (build_id_to_string): New.
2201 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2202 DEBUG_STR_SUFFIX): Move to here.
2203 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2204 DEBUG_STR_SUFFIX): Move from there.
2205 (write_psymtabs_to_index): Make non-static, add basename
2206 parameter. Write to temporary files, rename when done.
2207 (save_gdb_index_command): Adjust call to
2208 write_psymtabs_to_index.
2209 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2211 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2212 (get_gdb_index_contents_from_cache): New.
2213 (get_gdb_index_contents_from_cache_dwz): New.
2214 (dwarf2_initialize_objfile): Read index from cache.
2215 (dwarf2_build_psymtabs): Save to index.
2216 * dwarf-index-cache.h: New file.
2217 * dwarf-index-cache.c: New file.
2218 * dwarf-index-write.h: New file.
2220 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2222 * gnulib/aclocal.m4: Re-generate.
2223 * gnulib/config.in: Re-generate.
2224 * gnulib/configure: Re-generate.
2225 * gnulib/import/Makefile.am: Re-generate.
2226 * gnulib/import/Makefile.in: Re-generate.
2227 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2228 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2229 * gnulib/import/m4/mkdir.m4: New file.
2230 * gnulib/import/mkdir.c: New file.
2231 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2234 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2236 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2237 * common/scoped_mmap.c: New file.
2238 * common/scoped_mmap.h (destroy): New method.
2239 (~scoped_mmap, reset): Use destroy.
2240 (scoped_mmap): New move constructor.
2241 (mmap_file): New declaration.
2242 * unittests/scoped_mmap-selftests.c (test_normal,
2243 test_invalid_filename, run_tests): New functions.
2244 (_initialize_scoped_mmap_selftests): Register selftest.
2246 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2248 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2249 (read_gdb_index_from_buffer): ... this. Remove section
2250 parameter, add buffer parameter.
2251 (get_gdb_index_contents_ftype,
2252 get_gdb_index_contents_dwz_ftype): New typedefs.
2253 (dwarf2_read_gdb_index): Add callback parameters to get the
2255 (get_gdb_index_contents_from_section): New.
2256 (dwarf2_initialize_objfile): Update call to
2257 dwarf2_read_gdb_index.
2259 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2261 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2262 (gdb_open_cloexec): Likewise.
2263 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2264 (commandline_from_pid): Likewise.
2265 (linux_xfer_osdata_threads): Likewise.
2266 (linux_xfer_osdata_fds): Likewise.
2267 * ada-lang.c (is_package_name): Likewise.
2268 * auxv.c (procfs_xfer_auxv): Likewise.
2269 * breakpoint.c (print_one_breakpoint_location): Use
2271 (print_one_catch_solib): Use string_printf.
2272 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2273 (add_pe_forwarded_sym): Likewise.
2274 * dwarf2read.c (create_type_unit_group): Likewise.
2275 (build_error_marker_type): Likewise.
2276 * infcall.c (get_function_name): Likewise.
2277 * valprint.c (print_converted_chars_to_obstack): Likewise.
2278 * xtensa-tdep.c (xtensa_register_type): Likewise.
2280 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2282 * remote.c (remote_target::download_tracepoint): Fix format
2285 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2287 * tracefile.c: Include common/byte-vector.h.
2288 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2289 with trace_regblock_size if needed. Update uses of buf.
2291 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2293 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2294 std::vector<unsigned char>.
2295 * tracepoint.c (collection_list::collection_list): Remove
2296 m_regs_mask initializer from initializer list. Resize
2297 m_regs_mask using the largest remote register number.
2298 (collection_list::add_remote_register): Remove size check on
2299 m_regs_mask. Use at to access element.
2300 (collection_list::stringify): Change type of temp_buf to
2301 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2302 stringify the register mask. Use pack_hex_byte for the register
2305 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2307 * tracepoint.h (class collection_list) <add_register>: Remove.
2308 <add_remote_register, add_ax_registers, add_local_register>:
2310 <add_memrange>: Add scope parameter.
2311 * tracepoint.c (encode_actions_1): Likewise.
2312 (collection_list::add_register): Rename to ...
2313 (collection_list::add_remote_register): ... this. Update
2315 (collection_list::add_ax_registers, add_local_register): New
2317 (collection_list::add_memrange): Add scope parameter. Call
2318 add_local_register instead of add_register.
2319 (finalize_tracepoint_aexpr): New function.
2320 (collection_list::collect_symbol): Update calls to add_memrange.
2321 Call add_local_register instead of add_register. Call
2322 add_ax_registers. Call finalize_tracepoint_aexpr.
2323 (encode_actions_1): Get remote regnos for $reg action. Call
2324 add_remote_register, add_ax_registers, and add_local_register.
2325 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2326 (validate_actionline): Call finalize_tracepoint_aexpr.
2328 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2330 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2331 Replace array buf with gdb::char_vector buf, of size
2332 get_remote_packet_size (). Replace references to buf and
2333 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2334 and xsnprintf with snprintf. Raise errors if the buffer is too
2337 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2339 * remote.c (remote_target::download_tracepoint): Fix the has_more
2340 predicate in the QTDP action list iteration.
2342 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2344 * remote.c (remote_target::download_tracepoint): Fix indentation
2347 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2349 * proc-api.c (_initialize_proc_api): Remove c, unused.
2350 * procfs.c (procfs_init_inferior): Remove signals, unused.
2351 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2354 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2355 Andrew Burgess <andrew.burgess@embecosm.com>
2357 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2358 'W_STOPCODE (0)' as this could be ambiguous.
2360 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2362 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2363 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2366 2018-08-02 Tom Tromey <tom@tromey.com>
2369 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2371 (process_structure_scope): Likewise.
2373 2018-08-02 Xavier Roirand <roirand@adacore.com>
2376 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2379 2018-08-02 Tom Tromey <tom@tromey.com>
2381 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2382 (darwin_suspend_inferior, darwin_resume_inferior)
2383 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2384 (darwin_check_new_threads): Check result of get_darwin_inferior.
2386 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2390 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2392 * varobj.c (varobj_get_path_expr_parent): Report an error if
2393 parent is a dynamic varobj.
2395 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2397 * gnulib/aclocal.m4: Re-generate.
2398 * gnulib/config.in: Re-generate.
2399 * gnulib/configure: Re-generate.
2400 * gnulib/import/Makefile.in: Re-generate.
2401 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2402 * gnulib/import/m4/onceonly.m4: Re-generate.
2404 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2406 * target-descriptions.c (struct xml_test_tdesc): New.
2407 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2408 (record_xml_tdesc): Update.
2409 (maintenance_check_xml_descriptions): Update.
2410 * target-descriptions.h (record_xml_tdesc): Update comment.
2412 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2414 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2415 checking array bounds are defined.
2417 2018-07-30 Tom Tromey <tom@tromey.com>
2419 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2420 irreflexivity violation.
2422 2018-07-30 Tom Tromey <tom@tromey.com>
2424 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2425 * value.c (unpack_long): Remove lint code.
2426 * valops.c (value_ind): Remove lint code.
2427 * valarith.c (value_x_binop, value_x_unop, value_equal)
2428 (value_pos): Remove lint code.
2430 2018-07-28 Tom de Vries <tdevries@suse.de>
2432 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2433 with undefined upper bound as <optimized out>.
2435 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2437 * gcore.in: Rename variable "name" to "prefix". Expand
2440 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2442 * windows-nat.c (windows_nat_target::create_inferior): Update to
2443 call close() in global namespace.
2445 2018-07-26 Tom Tromey <tom@tromey.com>
2447 * dwarf-index-write.c (add_address_entry): Don't add objfile
2449 * dbxread.c (find_stab_function): Rename from
2450 find_stab_function_addr. Return a bound_minimal_symbol.
2451 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2452 Don't add objfile offsets.
2453 (end_psymtab): Use raw_text_low, raw_text_high,
2454 MSYMBOL_VALUE_RAW_ADDRESS.
2455 (read_ofile_symtab): Update.
2456 (process_one_symbol): Update.
2457 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2459 (dw2_relocate): Remove.
2460 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2462 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2464 (process_psymtab_comp_unit_reader, add_partial_symbol)
2465 (add_partial_subprogram, dwarf2_ranges_read): Update.
2466 (load_partial_dies): Update.
2467 (add_address_entry): Don't add objfile offsets.
2468 (dwarf2_build_include_psymtabs): Update.
2469 (create_addrmap_from_aranges): Don't add objfile offsets.
2470 (dw2_find_pc_sect_compunit_symtab): Update.
2471 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2472 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2474 (parse_partial_symbols): Don't add objfile offsets. Use
2475 raw_text_low, raw_text_high. Update.
2476 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2477 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2478 or call 'relocate' quick function. Clear psymbol_map.
2479 * psympriv.h (struct partial_symbol) <address>: Add section
2481 <set_unrelocated_address>: Rename from set_address.
2482 <raw_text_low, raw_text_high>: New methods.
2483 <text_low, text_high>: Add objfile parameter.
2484 (add_psymbol_to_bcache): Add 'section' parameter. Call
2485 set_unrelocated_address.
2486 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2487 (find_pc_psymbol): Update.
2488 (fixup_psymbol_section, relocate_psymtabs): Remove.
2489 (dump_psymtab, psym_functions): Update.
2490 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2492 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2493 (start_psymtab_common): Update.
2494 * symfile-debug.c (debug_qf_relocate): Remove.
2495 (debug_sym_quick_functions): Update.
2496 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2497 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2500 2018-07-26 Tom Tromey <tromey@redhat.com>
2502 * dbxread.c (end_psymtab): Use text_high_valid and
2504 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2505 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2506 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2508 <text_low_valid, text_high_valid>: New fields.
2509 <set_text_low, set_text_high>: Update.
2510 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2512 2018-07-26 Tom Tromey <tom@tromey.com>
2514 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2516 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2517 textlow and texthigh fields.
2518 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2520 * mdebugread.c (parse_lines, parse_partial_symbols)
2521 (psymtab_to_symtab_1): Update.
2522 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2523 Rename fields. Update comment. Now private.
2524 <text_low, text_high, set_text_low, set_text_high>: New methods.
2525 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2526 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2527 (start_psymtab_common, maintenance_info_psymtabs)
2528 (maintenance_check_psymtabs): Update.
2529 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2531 (scan_xcoff_symtab): Update.
2533 2018-07-26 Tom Tromey <tromey@redhat.com>
2535 * psympriv.h (struct partial_symbol) <unrelocated_address,
2536 address, set_address>: New methods.
2537 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2538 (fixup_psymbol_section, relocate_psymtabs): Update.
2539 (print_partial_symbols): Add 'objfile' parameter. Update.
2540 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2543 2018-07-26 Tom Tromey <tom@tromey.com>
2545 * dwarf-index-write.c (write_psymbols, debug_names::insert)
2546 (debug_names::write_psymbols): Update.
2547 * psympriv.h (struct partial_symbol): Derive from
2548 general_symbol_info.
2549 <obj_section>: New method.
2550 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2551 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2552 (find_pc_sect_psymbol, fixup_psymbol_section)
2553 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2554 (print_partial_symbols, recursively_search_psymtabs)
2555 (compare_psymbols, psymbol_hash, psymbol_compare)
2556 (add_psymbol_to_bcache, maintenance_check_psymtabs)
2557 (psymbol_name_matches, psym_fill_psymbol_map): Update.
2559 2018-07-26 Tom Tromey <tromey@redhat.com>
2561 * dbxread.c (end_psymtab): Remove dead code.
2563 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
2565 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2566 DWARF unwinders are disabled.
2567 * dwarf2-frame.c: Add dwarf2read.h include.
2568 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2570 (dwarf2_frame_unwinders_enabled_p): Define.
2571 (show_dwarf_unwinders_enabled_p): New function.
2572 (_initialize_dwarf2_frame): Register switch to control DWARF
2574 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2575 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2576 (show_dwarf_cmdlist): Remove static keyword.
2577 * dwarf2read.h (set_dwarf_cmdlist): Declare.
2578 (show_dwarf_cmdlist): Declare.
2579 * NEWS: Document new feature.
2581 2018-07-26 Tom de Vries <tdevries@suse.de>
2583 PR breakpoints/23366
2584 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2586 2018-07-26 Tom de Vries <tdevries@suse.de>
2588 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2589 DW_AT_count can't be translated to a dynamic prop.
2591 2018-07-25 Tom de Vries <tdevries@suse.de>
2593 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2596 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
2598 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2600 2018-07-25 Joel Brobecker <brobecker@adacore.com>
2602 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2604 2018-07-24 Keith Seitz <keiths@redhat.comt
2607 * dwarf2read.c (dw2_add_symbol_to_list): New function.
2608 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2609 instead of add_symbol_to_list.
2610 (read_file_scope): Call prepare_one_comp_unit before reading
2613 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
2615 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2617 2018-07-24 Tom Tromey <tom@tromey.com>
2619 * utils.c (malloc, realloc, free): Don't declare.
2620 * configure, config.in: Rebuild.
2621 * configure.ac: Don't check for declarations of free, malloc, or
2624 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2626 * aarch64-linux-nat.c
2627 (aarch64_linux_nat_target::stopped_data_address): Remove unused
2629 * arm-linux-nat.c (fetch_regs): Likewise.
2630 (store_regs): Likewise.
2631 (fetch_vfp_regs): Likewise.
2632 (store_vfp_regs): Likewise.
2633 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2634 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2635 (arm_linux_nat_target::insert_watchpoint): Likewise.
2636 (arm_linux_nat_target::remove_watchpoint): Likewise.
2637 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2639 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2641 * ppc-linux-nat.c (fetch_register): Likewise.
2642 (fetch_all_gp_regs): Likewise.
2643 (fetch_ppc_registers): Likewise.
2644 (store_all_gp_regs): Likewise.
2645 (store_ppc_registers): Likewise.
2646 (hwdebug_insert_point): Likewise.
2647 (can_use_watchpoint_cond_accel): Likewise.
2648 * remote-sim.c (gdb_os_write_stdout): Likewise.
2650 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2651 Tom Tromey <tom@tromey.com>
2653 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2655 * configure: Rebuild.
2657 2018-07-22 Tom Tromey <tom@tromey.com>
2659 * regformats/regdat.sh: Define xmltarget_${name} inside
2660 #ifndef IN_PROCESS_AGENT.
2662 2018-07-22 Tom Tromey <tom@tromey.com>
2664 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2666 2018-07-22 Tom Tromey <tom@tromey.com>
2668 * symfile.c (reread_symbols): Notify iter, not objfile.
2670 2018-07-22 Tom Tromey <tom@tromey.com>
2672 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2674 (ravenscar_thread_target::prepare_to_store): Likewise.
2676 2018-07-22 Tom Tromey <tom@tromey.com>
2678 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2679 unused variable. Call value_fetch_lazy when needed.
2680 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2681 Remove unused variable. Call value_fetch_lazy when needed.
2683 2018-07-22 Tom Tromey <tom@tromey.com>
2685 * m32c-tdep.c (mark_dma): Return void.
2686 (make_regs): Remove unused declarations.
2688 2018-07-22 Tom Tromey <tom@tromey.com>
2690 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2691 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2692 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2693 bkscm_get_valid_block_smob_arg_unsafe for effect.
2695 2018-07-22 Tom Tromey <tom@tromey.com>
2697 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2700 2018-07-22 Tom Tromey <tom@tromey.com>
2702 * windows-nat.c (saved_context): Conditionally define.
2703 * remote.c (remote_target::remote_btrace_maybe_reopen):
2704 Conditionally declare "warned".
2705 * inflow.c (sigquit_ours): Conditionally define.
2706 (new_tty): Move "tty" declaration inside #if.
2707 * guile/guile.c (guile_datadir): Conditionally define.
2708 * charset.c (set_be_le_names): Move some declarations inside #if.
2709 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2711 (parse_xml_btrace_conf): Likewise.
2713 2018-07-22 Tom Tromey <tom@tromey.com>
2715 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2717 2018-07-22 Tom Tromey <tom@tromey.com>
2719 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2720 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2721 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2722 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2723 * stack.c (frame_apply_level_command): Remove unused variable.
2724 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2725 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2726 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2728 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2729 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2730 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2732 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2733 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2735 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2736 Remove unused variable.
2737 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2739 * common/tdesc.c (print_xml_feature::visit): Remove unused
2741 * compile/compile-object-load.c (store_regs): Remove unused
2743 * complaints.c (clear_complaints): Remove unused variable.
2744 * corelow.c (core_target_open): Remove unused variable.
2745 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2747 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2749 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2751 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2753 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2755 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2757 * ia64-tdep.c (examine_prologue): Remove unused variable.
2758 * infcall.c (run_inferior_call): Remove unused variable.
2759 * inferior.c (exit_inferior): Remove unused variable.
2760 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2761 * linespec.c (decode_line_2): Remove unused variable.
2762 * linux-nat.c (super_close): Remove.
2763 * linux-tdep.c (linux_info_proc): Remove unused variable.
2764 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2765 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2766 Remove unused variable.
2767 * parse.c (find_minsym_type_and_address): Remove unused variable.
2768 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2770 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2772 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2774 * record-btrace.c (record_btrace_target::store_registers): Remove
2776 (cmd_show_record_btrace_cpu): Remove unused variable.
2777 * riscv-tdep.c (riscv_register_reggroup_p)
2778 (riscv_push_dummy_call, riscv_return_value): Remove unused
2780 * rust-exp.y (literal): Remove unused variable.
2781 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2783 <STRUCTOP_ANONYMOUS>: Likewise.
2784 * s390-linux-tdep.c (s390_linux_init_abi_31)
2785 (s390_linux_init_abi_64): Remove unused variable.
2786 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2787 (file_select_thread, net_windows_open, _initialize_ser_windows):
2788 Remove unused variables.
2789 * symtab.c (find_pc_sect_line): Remove unused variable.
2790 * target-memory.c (compute_garbled_blocks): Remove unused
2792 (target_write_memory_blocks): Remove unused variable.
2793 * target.c (target_stack::unpush): Remove unused variables.
2794 * tracepoint.c (start_tracing, all_tracepoint_actions)
2795 (merge_uploaded_trace_state_variables)
2796 (print_one_static_tracepoint_marker): Remove unused variable.
2797 * unittests/basic_string_view/element_access/char/1.cc (test01):
2798 Remove unused variable.
2799 * windows-nat.c (windows_continue, windows_add_all_dlls)
2800 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2801 Remove unused variables.
2803 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2805 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2806 attr_profile in HAVE_ELF.
2807 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2810 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2812 * frame.c (frame_register_unwind): Change parameter name.
2813 (frame_unwind_register): Likewise.
2814 (frame_unwind_register_value): Likewise.
2815 (frame_unwind_register_signed): Likewise.
2816 (frame_unwind_register_unsigned): Likewise.
2817 * frame.h (frame_register_unwind): Likewise.
2818 (frame_unwind_register): Likewise.
2819 (frame_unwind_register_value): Likewise.
2820 (frame_unwind_register_signed): Likewise.
2821 (frame_unwind_register_unsigned): Likewise.
2822 (frame_unwind_arch): Likewise.
2824 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2826 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2829 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2831 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2832 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2835 2018-07-20 Keith Seitz <keiths@redhat.com>
2837 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2838 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2839 m_compunit_symtab, m_language>: Add "m_" prefix.
2841 * buildsym.c: Update all uses.
2843 2018-07-20 Tom Tromey <tom@tromey.com>
2845 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2846 * buildsym.h (record_line_ftype): Remove typedef.
2848 2018-07-20 Tom Tromey <tom@tromey.com>
2850 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2851 (end_expandable_symtab): Likewise.
2852 (end_symtab_get_static_block): Likewise.
2853 (end_symtab_from_static_block): Likewise.
2854 * buildsym-legacy.c (augment_type_symtab): Remove.
2855 (end_expandable_symtab): Remove.
2856 (end_symtab_get_static_block): Remove.
2857 (end_symtab_from_static_block): Remove.
2859 2018-07-20 Tom Tromey <tom@tromey.com>
2861 * dwarf2read.c: Include buildsym.h.
2862 (struct dwarf2_cu) <builder>: New method.
2863 (fixup_go_packaging): Update.
2864 (process_full_comp_unit, process_full_type_unit): Update. Don't
2865 use scoped_free_pendings.
2866 (using_directives): Add "cu" parameter, remove "language".
2867 (read_import_statement, setup_type_unit_groups, )
2868 (read_func_scope, read_lexical_block_scope)
2869 (dwarf2_record_block_ranges, read_namespace): Update.
2870 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2871 (lnp_state_machine::handle_end_sequence): Update.
2872 (class lnp_state_machine) <m_cu>: New member.
2873 <m_record_line_callback>: Remove.
2874 <m_currently_recording_lines>: New member.
2875 (lnp_state_machine::handle_set_file): Update.
2876 (noop_record_line): Remove.
2877 (dwarf_record_line_p): Add cu parameter.
2878 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2879 (lnp_state_machine::record_line)
2880 (lnp_state_machine::lnp_state_machine)
2881 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2882 (dwarf_decode_lines): Update.
2883 (dwarf2_start_subfile): Add cu parameter.
2884 (dwarf2_start_symtab, new_symbol): Update.
2885 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2886 Remove dwarf2_per_objfile parameter.
2887 (dwarf_decode_macros): Update.
2889 2018-07-20 Tom Tromey <tom@tromey.com>
2891 * stabsread.c (define_symbol): Update.
2892 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2893 * dwarf2read.c (new_symbol): Update.
2894 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2895 * cp-namespace.c: Include buildsym.h.
2896 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2897 * buildsym-legacy.c (get_buildsym_compunit): New function.
2899 2018-07-20 Tom Tromey <tom@tromey.com>
2901 * xcoffread.c: Include buildsym-legacy.h.
2902 * windows-nat.c: Include buildsym-legacy.h.
2903 * stabsread.c: Include buildsym-legacy.h.
2904 * mdebugread.c: Include buildsym-legacy.h.
2905 * buildsym-legacy.h: New file.
2906 * buildsym-legacy.c: New file, from buildsym.c.
2907 * go32-nat.c: Include buildsym-legacy.h.
2908 * dwarf2read.c: Include buildsym-legacy.h.
2909 * dbxread.c: Include buildsym-legacy.h.
2910 * cp-namespace.c: Include buildsym-legacy.h.
2911 * coffread.c: Include buildsym-legacy.h.
2912 * buildsym.h: Move some contents to buildsym-legacy.h.
2913 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2915 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2917 2018-07-20 Tom Tromey <tom@tromey.com>
2919 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2920 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2921 (buildsym_compunit::buildsym_compunit)
2922 (buildsym_compunit::~buildsym_compunit)
2923 (buildsym_compunit::get_macro_table): Define.
2925 2018-07-20 Tom Tromey <tom@tromey.com>
2927 * buildsym.c (reset_symtab_globals): Remove.
2928 (buildsym_compunit::end_symtab_from_static_block): Update.
2929 (buildsym_compunit::augment_type_symtab): Update.
2930 (end_symtab_from_static_block): Call free_buildsym_compunit.
2931 (augment_type_symtab, end_symtab, end_expandable_symtab):
2934 2018-07-20 Tom Tromey <tom@tromey.com>
2936 * arch-utils.c: Do not include buildsym.h.
2937 * mipsread.c: Do not include buildsym.h.
2938 * machoread.c: Do not include buildsym.h.
2939 * elfread.c: Do not include buildsym.h.
2941 2018-07-20 Tom Tromey <tom@tromey.com>
2943 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2945 (buildsym_compunit): Add new constructor.
2946 (struct buildsym_compunit) <get_last_source_file, finish_block,
2947 record_block_range, start_subfile, patch_subfile_names,
2948 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2949 set_last_source_start_addr, get_last_source_start_addr,
2950 get_local_using_directives, set_local_using_directives,
2951 get_global_using_directives, outermost_context_p,
2952 get_current_context_stack, get_context_stack_depth,
2953 get_current_subfile, get_local_symbols, get_file_symbols,
2954 get_global_symbols, record_debugformat, record_producer,
2955 push_context, pop_context, end_symtab_get_static_block,
2956 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2958 <record_pending_block, finish_block_internal, make_blockvector,
2959 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2963 2018-05-22 Tom Tromey <tom@tromey.com>
2965 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2967 (finish_block_internal): Update.
2969 2018-07-20 Tom Tromey <tom@tromey.com>
2971 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2973 (finish_block_internal): Update.
2975 2018-07-20 Tom Tromey <tom@tromey.com>
2977 * buildsym.h (EXTERN): Don't define or undef.
2978 * buildsym.c (EXTERN): Don't define.
2980 2018-07-20 Tom Tromey <tom@tromey.com>
2982 * buildsym.c: Remove TODO comment.
2984 2018-07-20 Tom Tromey <tom@tromey.com>
2986 * coffread.c (coff_symtab_read): Update.
2987 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2988 (xcoff_new_init): Update.
2989 * mipsread.c (mipscoff_new_init): Update.
2990 * mdebugread.c (mdebug_build_psymtabs): Update.
2991 * elfread.c (elf_new_init): Update.
2992 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2994 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2995 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2996 (stabsect_build_psymtabs): Update.
2997 * buildsym.h (buildsym_init): Don't declare.
2998 * buildsym.c: Update comment.
2999 (prepare_for_building): Remove.
3000 (start_symtab, restart_symtab): Update.
3001 (reset_symtab_globals): Update comment.
3002 (buildsym_init): Remove.
3004 2018-07-20 Tom Tromey <tom@tromey.com>
3006 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3007 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3008 (read_enum_type, common_block_start, common_block_end)
3009 (cleanup_undefined_types_1, finish_global_stabs): Update.
3010 * mdebugread.c (psymtab_to_symtab_1): Update.
3011 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3012 (read_lexical_block_scope, new_symbol): Update.
3013 * dbxread.c (process_one_symbol): Update.
3014 * coffread.c (coff_symtab_read, process_coff_symbol)
3015 (coff_read_enum_type): Update.
3016 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3018 (get_local_symbols, get_file_symbols, get_global_symbols): New
3020 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3022 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3023 (~scoped_free_pendings): Update.
3024 (finish_block, prepare_for_building, reset_symtab_globals)
3025 (end_symtab_get_static_block, end_symtab_with_blockvector)
3026 (augment_type_symtab, push_context): Update.
3027 (get_local_symbols, get_file_symbols, get_global_symbols): New
3029 (buildsym_init): Update.
3031 2018-07-20 Tom Tromey <tom@tromey.com>
3033 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3034 (process_full_type_unit): Likewise.
3035 (dwarf2_start_symtab): Set list_in_scope.
3037 2018-07-20 Tom Tromey <tom@tromey.com>
3039 * dwarf2read.c (process_psymtab_comp_unit_reader)
3040 (build_type_psymtabs_reader): Do not set list_in_scope.
3042 2018-07-20 Tom Tromey <tom@tromey.com>
3044 * buildsym.c (free_pendings): Remove.
3045 (add_symbol_to_list, scoped_free_pendings)
3046 (finish_block_internal, buildsym_init): Update.
3048 2018-07-20 Tom Tromey <tom@tromey.com>
3050 * xcoffread.c (read_xcoff_symtab): Update.
3051 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3053 * dbxread.c (process_one_symbol): Update.
3054 * coffread.c (coff_symtab_read): Update.
3055 * buildsym.h (finish_block): Update.
3056 * buildsym.c (finish_block): Remove "listhead" argument.
3057 (end_symtab_get_static_block): Update.
3059 2018-07-20 Tom Tromey <tom@tromey.com>
3061 * buildsym.h (class scoped_free_pendings): Remove constructor.
3062 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3064 <m_pending_block_obstack, m_pending_blocks>: New members.
3065 (pending_block_obstack, pending_blocks): Remove.
3066 (scoped_free_pendings::scoped_free_pendings): Default.
3067 (~scoped_free_pendings): Update.
3068 (free_pending_blocks): Remove.
3069 (finish_block_internal, record_pending_block, make_blockvector)
3070 (end_symtab_get_static_block, augment_type_symtab, push_context)
3071 (buildsym_init): Update.
3073 2018-07-20 Tom Tromey <tom@tromey.com>
3075 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3076 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3078 (pending_addrmap, pending_addrmap_obstack)
3079 (pending_addrmap_interesting): Remove.
3080 (scoped_free_pendings, record_block_range, make_blockvector)
3081 (prepare_for_building, reset_symtab_globals, buildsym_init):
3084 2018-07-20 Tom Tromey <tom@tromey.com>
3086 * xcoffread.c (process_linenos): Update.
3087 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3088 * mdebugread.c (psymtab_to_symtab_1): Update.
3089 * dwarf2read.c (setup_type_unit_groups)
3090 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3091 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3092 * dbxread.c (process_one_symbol): Update.
3093 * coffread.c (coff_symtab_read, enter_linenos)
3094 (process_coff_symbol): Update.
3095 * buildsym.h (current_subfile): Don't declare.
3096 (get_current_subfile): Declare.
3097 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3099 (start_subfile, free_buildsym_compunit, push_subfile)
3100 (prepare_for_building, start_symtab): Update.
3101 (get_current_subfile): New function.
3103 2018-07-20 Tom Tromey <tom@tromey.com>
3105 * coffread.c (coff_symtab_read): Update.
3106 * xcoffread.c (read_xcoff_symtab): Update.
3107 * dwarf2read.c (new_symbol): Update.
3108 (read_func_scope, read_lexical_block_scope): Update.
3109 * dbxread.c (process_one_symbol): Update.
3110 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3111 (outermost_context_p): Remove macro.
3112 (outermost_context_p, get_current_context_stack)
3113 (get_context_stack_depth): Declare.
3114 (pop_context): Return struct context_stack.
3115 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3117 (context_stack_size): Remove.
3118 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3119 (prepare_for_building, end_symtab_get_static_block)
3120 (augment_type_symtab, push_context): Update.
3121 (pop_context): Return struct context_stack.
3122 (outermost_context_p, get_current_context_stack)
3123 (get_context_stack_depth): New functions.
3124 (buildsym_init): Update.
3126 2018-07-20 Tom Tromey <tom@tromey.com>
3128 * rust-exp.y: Now a pure parser. Update all rules.
3129 (%union): Move earlier.
3130 (current_parser, work_obstack): Remove globals.
3131 (rust_parser, ~rust_parser): Update.
3132 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3133 lex_character, lex_number, lex_string, lex_identifier,
3134 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3135 convert_name, convert_params_to_expression,
3136 convert_ast_to_expression, ast_basic_type, ast_operation,
3137 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3138 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3139 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3140 ast_array_type, ast_slice_type, ast_reference_type,
3141 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3142 (rust_parse): Update.
3143 (rustyyerror, rustyylex): Add parser parameter.
3144 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3145 (rust_lex_stringish_test, rust_lex_test_sequence)
3146 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3147 (rust_lex_test_push_back, rust_lex_tests): Update.
3149 2018-07-19 Pedro Alves <palves@redhat.com>
3151 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3152 gdb::unique_xmalloc_ptr.
3153 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3154 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3155 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3156 copy-initialization.
3157 * guile/scm-pretty-print.c (ppscm_print_children): Use
3158 gdb::unique_xmalloc_ptr instead of cleanups.
3159 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3160 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3161 gdb::unique_xmalloc_ptr.
3162 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3163 Adjust to use gdb::unique_xmalloc_ptr.
3164 * guile/scm-utils.c (extract_arg): Adjust.
3165 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3166 gdb::unique_xmalloc_ptr instead of a cleanup.
3168 2018-07-19 Tom Tromey <tom@tromey.com>
3170 * utils.c (do_value_free_to_mark)
3171 (make_cleanup_value_free_to_mark): Remove.
3172 * utils.h (make_cleanup_value_free_to_mark): Remove.
3174 2018-07-19 Pedro Alves <palves@redhat.com>
3176 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3177 forwarding reference.
3179 2018-07-18 Pedro Alves <palves@redhat.com>
3181 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3182 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3185 2018-07-18 Pedro Alves <palves@redhat.com>
3187 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3189 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3191 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3192 directly instead of a cleanup.
3193 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3194 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3195 (vlscm_binop_gdbthrow): New, factored out from ...
3196 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3197 (vlscm_rich_compare): Use gdbscm_wrap.
3198 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3199 instead of a cleanup.
3200 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3202 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3203 Use xfree directly instead of a cleanup.
3204 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3205 Adjust to use gdbscm_wrap and scoped_value_mark.
3206 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3207 (gdbscm_value_address, gdbscm_value_dereference)
3208 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3210 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3211 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3213 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3214 gdbscm_wrap and scoped_value_mark.
3215 (gdbscm_value_to_string): Use xfree directly instead of a
3216 cleanup. Move 'buffer' unique_ptr to TRY scope.
3217 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3218 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3220 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3221 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3223 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3226 2018-07-18 Tom de Vries <tdevries@suse.de>
3228 * findvar.c (default_read_var_value): Also resolve dynamic type for
3229 LOC_OPTIMIZED_OUT vars.
3231 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3233 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3236 2018-07-17 Tom Tromey <tom@tromey.com>
3238 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3239 (compute_enum_list, pascm_set_param_value_x)
3240 (gdbscm_parameter_value): Update.
3241 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3242 (gdbscm_scm_to_host_string): Update.
3243 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3245 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3246 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3247 * guile/scm-string.c (gdbscm_scm_to_string): Return
3249 (gdbscm_scm_to_host_string): Likewise.
3251 2018-07-17 Tom Tromey <tom@tromey.com>
3253 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3254 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3255 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3256 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3259 2018-07-17 Tom Tromey <tom@tromey.com>
3261 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3262 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3264 * guile/scm-cmd.c (cmdscm_function): Update.
3265 * guile/scm-pretty-print.c
3266 (ppscm_print_exception_unless_memory_error): Update.
3267 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3268 Return unique_xmalloc_ptr.
3270 2018-07-17 Tom Tromey <tom@tromey.com>
3272 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3275 2018-07-17 Jim Wilson <jimw@sifive.com>
3277 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3278 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3279 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3280 unecessary braces after EF_RISCV_RVC test. Delete call to
3281 set_gdbarch_decr_pc_after_break.
3283 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3284 RISCV_LAST_FP_REGNUM + 1.
3285 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3287 2018-07-17 Tom Tromey <tom@tromey.com>
3289 * configure.ac: Remove --disable-gdbcli.
3290 * configure: Rebuild.
3291 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3292 (SUBDIR_CLI_CFLAGS): Remove.
3293 (SFILES): Use SUBDIR_CLI_SRCS.
3294 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3296 2018-07-17 Tom Tromey <tom@tromey.com>
3299 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3301 2018-07-16 Jim Wilson <jimw@sifive.com>
3303 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3305 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3307 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3309 (libunwind_frame_sniffer): Likewise.
3310 (libunwind_frame_prev_register): Likewise.
3311 (libunwind_sigtramp_frame_sniffer): Likewise.
3312 * ia64-tdep.c (ia64_access_reg): Likewise.
3313 (ia64_access_rse_reg): Likewise.
3314 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3315 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3317 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3319 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3321 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3323 * remote-sim.c (gdbsim_target::close,
3324 gdbsim_target::mourn_inferior): Remove unused variables.
3326 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3328 * ia64-tdep.c (ktab_buf): New global.
3329 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3330 (get_kernel_table): Adjust.
3332 2018-07-16 Tom Tromey <tom@tromey.com>
3334 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3335 * dwarf2read.c (using_directives, new_symbol): Use
3336 outermost_context_p.
3337 * dbxread.c (process_one_symbol): Use outermost_context_p.
3338 * coffread.c (coff_symtab_read): Use outermost_context_p.
3340 2018-07-16 Tom Tromey <tom@tromey.com>
3342 * dwarf2read.c (using_directives, read_func_scope)
3343 (read_lexical_block_scope): Update.
3344 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3345 * buildsym.h (local_using_directives, global_using_directives):
3347 (get_local_using_directives, set_local_using_directives)
3348 (get_global_using_directives): Declare.
3349 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3350 m_global_using_directives>: New members.
3351 (finish_block_internal, prepare_for_building)
3352 (reset_symtab_globals, end_symtab_get_static_block)
3353 (push_context): Update.
3354 (get_local_using_directives, set_local_using_directives)
3355 (get_global_using_directives): New functions.
3356 (buildsym_init): Update.
3358 2018-07-16 Tom Tromey <tom@tromey.com>
3360 * xcoffread.c (xcoff_initial_scan): Don't call
3361 free_pending_blocks.
3362 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3363 * buildsym.h (class scoped_free_pendings): Add constructor.
3364 (free_pending_blocks): Don't declare.
3365 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3366 (free_pending_blocks): Now static.
3368 2018-07-16 Tom Tromey <tom@tromey.com>
3370 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3371 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3373 (struct subfile_stack): Remove.
3374 (subfile_stack): Remove.
3375 (push_subfile, pop_subfile, buildsym_init): Update.
3377 2018-07-16 Tom Tromey <tom@tromey.com>
3379 * buildsym.c (push_subfile): Use gdb_assert.
3380 (pop_subfile): Use gdb_assert.
3382 2018-07-16 Tom Tromey <tom@tromey.com>
3384 * buildsym.h (merge_symbol_lists): Remove.
3385 * buildsym.c (merge_symbol_lists): Remove.
3387 2018-07-16 Tom Tromey <tom@tromey.com>
3389 * stabsread.c (scan_file_globals): Update comment.
3390 * stabsread.h (scan_file_globals): Move from buildsym.h.
3391 * buildsym.h (scan_file_globals): Move to stabsread.h.
3393 2018-07-16 Tom Tromey <tom@tromey.com>
3395 * xcoffread.c (xcoff_new_init): Update.
3396 * mipsread.c (mipscoff_new_init): Update.
3397 * mdebugread.c (mdebug_build_psymtabs): Update.
3398 * elfread.c (elf_new_init): Update.
3399 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3400 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3401 * buildsym.h (buildsym_new_init): Don't declare.
3402 * buildsym.c (buildsym_new_init): Remove.
3404 2018-07-16 Tom Tromey <tom@tromey.com>
3406 * stabsread.h (within_function): Move from buildsym.h.
3407 * stabsread.c (start_stabs): Clear within_function.
3408 * coffread.c (coff_start_symtab): Clear within_function.
3409 * buildsym.h (within_function): Move to stabsread.h.
3410 * buildsym.c (prepare_for_building): Update.
3412 2018-07-16 Tom Tromey <tom@tromey.com>
3414 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3415 * dwarf2read.c (dwarf2_start_symtab): Don't set
3416 processing_gcc_compilation.
3417 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3419 2018-07-16 Tom Tromey <tom@tromey.com>
3421 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3422 (next_symbol_text_func): Move from buildsym.h.
3423 * stabsread.c (hashname): Move from buildsym.c.
3424 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3425 (next_symbol_text_func, hashname): Move to stabsread.h.
3426 * buildsym.c: Don't include bcache.h
3427 (hashname): Move to stasbread.c.
3429 2018-07-16 Tom Tromey <tom@tromey.com>
3431 * buildsym.h (context_stack_size): Don't declare.
3432 * buildsym.c (context_stack_size): New global.
3434 2018-07-16 Tom Tromey <tom@tromey.com>
3436 * dbxread.c (processing_acc_compilation): New global.
3437 * buildsym.h (processing_acc_compilation): Don't declare.
3439 2018-07-16 Tom Tromey <tom@tromey.com>
3441 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3442 * dbxread.c (read_ofile_symtab): Update.
3443 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3444 * buildsym.h (last_source_start_addr): Remove.
3445 (set_last_source_start_addr, get_last_source_start_addr):
3447 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3449 (struct buildsym_compunit) <m_last_source_start_addr>: New
3451 (prepare_for_building): Remove start_addr parameter.
3452 (start_symtab, restart_symtab, end_symtab_get_static_block)
3453 (end_symtab_with_blockvector): Update.
3454 (set_last_source_start_addr, get_last_source_start_addr): New
3457 2018-07-16 Tom Tromey <tom@tromey.com>
3459 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3461 (have_line_numbers): Remove.
3462 (record_line, prepare_for_building, end_symtab_get_static_block)
3463 (augment_type_symtab): Update.
3465 2018-07-16 Tom Tromey <tom@tromey.com>
3467 * buildsym.c (~buildsym_compunit): Free the macro table.
3468 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3470 <m_pending_macros>: New member.
3471 (pending_macros): Remove.
3472 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3473 (reset_symtab_globals, end_symtab_get_static_block)
3474 (end_symtab_with_blockvector, augment_type_symtab)
3475 (buildsym_init): Update.
3477 2018-07-16 Tom Tromey <tom@tromey.com>
3479 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3481 (buildsym_compunit::set_last_source_file): New method.
3482 <m_last_source_file>: New member.
3483 (prepare_for_building): Remove "name" parameter.
3484 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3485 (last_source_file): Remove.
3486 (set_last_source_file, get_last_source_file): Update.
3488 2018-07-16 Tom Tromey <tom@tromey.com>
3490 * buildsym.c (prepare_for_building): Add assert.
3492 2018-07-16 Tom Tromey <tom@tromey.com>
3494 * buildsym.c (~buildsym_compunit): Update.
3495 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3496 (start_subfile, patch_subfile_names)
3497 (end_symtab_with_blockvector): Update.
3499 2018-07-16 Tom Tromey <tom@tromey.com>
3501 * buildsym.c (struct buildsym_compunit): Add constructor,
3502 destructor, initializers.
3503 (start_buildsym_compunit): Remove.
3504 (free_buildsym_compunit): Use "delete".
3505 (start_symtab, restart_symtab): Use "new".
3507 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
3509 * symfile.c (set_objfile_default_section_offset): Remove struct
3512 2018-07-14 Stafford Horne <shorne@gmail.com>
3514 * (Responsible Maintainers): Add myself as or1k maintainer.
3516 2018-07-13 Tom Tromey <tom@tromey.com>
3518 * symfile.c (set_objfile_default_section_offset): Use extra braces
3521 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3523 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3526 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3528 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3529 unittests/cli-utils-selftests.c
3530 * unittests/cli-utils-selftests.c: New file.
3532 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3534 * NEWS: Mention new commands. Mention change to 'thread apply'.
3536 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3538 * thread.c (thr_try_catch_cmd): New function.
3539 (thread_apply_all_command): Handle qcs flags.
3540 (thread_apply_command): Handle qcs flags.
3541 (taas_command): New function.
3542 (tfaas_command): New function.
3543 (_initialize_thread): Update to setup the new commands 'taas
3544 and 'tfaas'. Change doc string for 'thread apply'.
3546 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3548 * stack.c: (trailing_outermost_frame): New function, mostly
3549 extracted from backtrace_command_1.
3550 (leading_innermost_frame): New function.
3551 (backtrace_command_1): Update to call trailing_outermost_frame.
3552 (frame_apply_command_count): New function.
3553 (frame_apply_level_command): New function.
3554 (frame_apply_all_command): New function.
3555 (frame_apply_command): New function.
3556 (faas_command): New function.
3557 (frame_cmd_list): New variable.
3558 (_initialize_stack): Update to setup the new commands 'frame apply'
3561 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3563 * cli-utils.c (number_or_range_parser::get_number): Only handle
3564 numbers or convenience var as numbers.
3565 (parse_flags): New function.
3566 (parse_flags_qcs): New function.
3567 (number_or_range_parser::finished): Ensure parsing end is detected
3568 before end of string.
3569 * cli-utils.h (parse_flags): New function.
3570 (parse_flags_qcs): New function.
3571 (number_or_range_parser): Remove m_finished bool.
3572 (number_or_range_parser::skip_range): Set m_in_range to false.
3574 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
3576 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3579 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3580 Jan Kratochvil <jan.kratochvil@redhat.com>
3581 Paul Fertser <fercerpav@gmail.com>
3582 Tsutomu Seki <sekiriki@gmail.com>
3583 Pedro Alves <palves@redhat.com>
3585 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3586 'unittests/parse-connection-spec-selftests.c'.
3587 (COMMON_SFILES): Add 'common/netstuff.c'.
3588 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3589 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3590 * common/netstuff.c: New file.
3591 * common/netstuff.h: New file.
3592 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3593 (wait_for_connect): Update comment. New parameter
3594 'gdb::optional<int> sock' instead of 'struct serial *scb'.
3595 Use 'sock' directly instead of 'scb->fd'.
3596 (try_connect): New function, with code from 'net_open'.
3597 (net_open): Rewrite main loop to deal with multiple
3598 sockets/addresses. Handle IPv6-style hostnames; implement
3599 support for IPv6 connections.
3600 * unittests/parse-connection-spec-selftests.c: New file.
3602 2018-07-11 Pedro Alves <palves@redhat.com>
3605 * remote.c (remote_target::remote_detach_pid): Call
3606 set_current_process.
3608 2018-07-11 Pedro Alves <palves@redhat.com>
3610 * h8300-tdep.c (h8300_gdbarch_init): Remove
3611 set_gdbarch_ecoff_reg_to_regnum calls.
3613 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3616 * c-typeprint.c (c_type_print_base_struct_union): Don't print
3617 offsets/sizes for static members of a class/struct.
3619 2018-07-11 Alan Hayward <alan.hayward@arm.com>
3621 * target-descriptions.c (tdesc_register_bitsize): Rename.
3622 * target-descriptions.h (tdesc_register_bitsize): Likewise.
3623 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3624 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3626 2018-07-10 Tom Tromey <tom@tromey.com>
3628 * breakpoint.c (moribund_locations): Now static and a
3630 (breakpoint_init_inferior, moribund_breakpoint_here_p)
3631 (build_bpstat_chain, update_global_location_list)
3632 (breakpoint_retire_moribund): Update.
3633 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
3636 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3638 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3639 (riscv_register_reggroup_p): Use new function, remove unneeded
3641 (riscv_push_dummy_call): Extend assert to compare against xlen or
3642 flen based on register type.
3644 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3646 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3648 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
3650 * remote.c (show_hardware_watchpoint_limit): New function.
3651 (show_hardware_watchpoint_length_limit): New function.
3652 (show_hardware_breakpoint_limit): New function.
3653 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3654 where appropriate, update help text.
3656 2018-07-09 Tom Tromey <tom@tromey.com>
3658 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3659 (CLIBS): Don't mention NAT_CLIBS.
3661 2018-07-09 Tom Tromey <tom@tromey.com>
3663 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3664 (LIBGDB_OBS, clean mostlyclean): Update.
3665 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3667 2018-07-09 Tom Tromey <tom@tromey.com>
3669 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3670 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3671 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3673 2018-07-09 Tom Tromey <tom@tromey.com>
3675 * Makefile.in (ALLDEPFILES): Remove exec.c.
3676 (COMMON_OBS): Remove exec.o.
3677 (COMMON_SFILES): Add exec.c.
3679 2018-07-09 Tom Tromey <tom@tromey.com>
3681 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3683 2018-07-09 Tom Tromey <tom@tromey.com>
3685 * Makefile.in (clean mostlyclean): Remove stamp-version.
3686 (version.c): Depend on stamp-version.
3687 (stamp-version): New rule, from version.c rule.
3689 2018-07-09 Tom Tromey <tom@tromey.com>
3691 * Makefile.in (init.c): Depend on stamp-init.
3692 (stamp-init): New rule, from init.c rule.
3693 (clean mostlyclean): Remove stamp-init.
3695 2018-07-09 Tom Tromey <tom@tromey.com>
3697 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3698 SUBDIR_GCC_COMPILE_SRCS.
3700 2018-07-09 Tom Tromey <tom@tromey.com>
3702 * Makefile.in (init.c): Remove some unused sed rules.
3704 2018-07-09 Tom Tromey <tom@tromey.com>
3706 * Makefile.in (TSOBS): Remove.
3707 (INIT_FILES): Update.
3708 (LIBGDB_OBS): Update.
3709 (COMMON_SFILES): Add inflow.c.
3710 (SFILES): Remove inflow.c.
3712 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3714 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3716 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3718 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3719 get_saveloc_name, is_signal_frame_name, step_name,
3720 init_remote_name, create_addr_space_name,
3721 destroy_addr_space_name, search_unwind_table_name,
3722 find_dyn_list_name): Constify.
3724 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3726 * darwin-nat.c (darwin_pthread_kill): New function.
3727 (darwin_resume_thread): Use darwin_pthread_kill.
3729 2018-07-05 Tom de Vries <tdevries@suse.de>
3731 * macroexp.c (macro_buffer) <operator=>: New member function.
3733 2018-07-04 Tom Tromey <tom@tromey.com>
3735 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3737 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3739 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3740 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3741 * maint.c: Likewise.
3744 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3746 * NEWS: Create a new section for the next release branch.
3747 Rename the section of the current branch, now that it has
3750 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3752 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3753 * version.in: Bump version to 8.2.50.DATE-git.
3755 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3756 Pedro Alves <palves@redhat.com>
3758 * linux-nat.c (linux_init_ptrace): Rename to ...
3759 (linux_init_ptrace_procfs): ... this. Call
3760 linux_proc_init_warnings.
3761 (linux_nat_target::post_attach)
3762 (linux_nat_target::post_startup_inferior): Adjust.
3763 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3764 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3766 2018-07-04 Tom de Vries <tdevries@suse.de>
3768 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3770 (read_comp_unit_head): ... here.
3772 2018-07-03 Tom Tromey <tom@tromey.com>
3774 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3775 (stop_tracing, tstatus_command)
3776 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3777 (print_one_static_tracepoint_marker): Update.
3778 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3780 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3782 (all_tracepoints, static_tracepoints_here): Return std::vector.
3784 2018-07-03 Tom Tromey <tom@tromey.com>
3786 * common/ptid.c (ptid_equal): Remove.
3787 * common/ptid.h (ptid_equal): Don't declare.
3788 * ada-tasks.c: Update.
3789 * breakpoint.c: Update.
3790 * common/agent.c: Update.
3791 * corelow.c: Update.
3792 * darwin-nat-info.c: Update.
3793 * darwin-nat.c: Update.
3795 * dtrace-probe.c: Update.
3796 * dummy-frame.c: Update.
3797 * fbsd-nat.c: Update.
3799 * gdbthread.h: Update.
3800 * gnu-nat.c: Update.
3801 * go32-nat.c: Update.
3802 * inf-loop.c: Update.
3803 * inf-ptrace.c: Update.
3804 * infcall.c: Update.
3808 * linux-fork.c: Update.
3809 * linux-nat.c: Update.
3810 * linux-thread-db.c: Update.
3811 * mi/mi-cmd-var.c: Update.
3812 * mi/mi-interp.c: Update.
3813 * mi/mi-main.c: Update.
3814 * nto-procfs.c: Update.
3815 * ppc-linux-tdep.c: Update.
3817 * python/py-inferior.c: Update.
3818 * python/py-record-btrace.c: Update.
3819 * python/py-record.c: Update.
3820 * ravenscar-thread.c: Update.
3821 * regcache.c: Update.
3822 * remote-sim.c: Update.
3824 * sol-thread.c: Update.
3827 * tui/tui-stack.c: Update.
3829 * windows-nat.c: Update.
3830 * windows-tdep.c: Update.
3832 2018-07-03 Tom Tromey <tom@tromey.com>
3834 * common/ptid.c (ptid_match): Remove.
3835 * common/ptid.h (ptid_match): Don't declare.
3836 * fbsd-nat.c: Update.
3839 * linux-nat.c: Update.
3840 * record-btrace.c: Update.
3841 * regcache.c: Update.
3844 2018-07-03 Tom Tromey <tom@tromey.com>
3846 * common/ptid.c (ptid_tid_p): Remove.
3847 * common/ptid.h (ptid_tid_p): Don't declare.
3848 * sol-thread.c: Update.
3850 2018-07-03 Tom Tromey <tom@tromey.com>
3852 * common/ptid.c (ptid_lwp_p): Remove.
3853 * common/ptid.h (ptid_lwp_p): Don't declare.
3854 * fbsd-nat.c: Update.
3855 * linux-nat.c: Update.
3856 * nat/linux-procfs.c: Update.
3857 * nat/x86-linux-dregs.c: Update.
3858 * sol-thread.c: Update.
3860 2018-07-03 Tom Tromey <tom@tromey.com>
3862 * common/ptid.c (ptid_is_pid): Remove.
3863 * common/ptid.h (ptid_is_pid): Don't declare.
3865 * linux-nat.c: Update.
3866 * mi/mi-interp.c: Update.
3870 2018-07-03 Tom Tromey <tom@tromey.com>
3872 * common/ptid.c (ptid_get_tid): Remove.
3873 * common/ptid.h (ptid_get_tid): Don't declare.
3874 * ada-tasks.c: Update.
3875 * aix-thread.c: Update.
3876 * bsd-uthread.c: Update.
3877 * darwin-nat.c: Update.
3878 * fbsd-nat.c: Update.
3879 * i386-darwin-nat.c: Update.
3881 * linux-tdep.c: Update.
3882 * nto-procfs.c: Update.
3883 * ppc-ravenscar-thread.c: Update.
3884 * python/py-infthread.c: Update.
3885 * ravenscar-thread.c: Update.
3886 * sol-thread.c: Update.
3887 * sparc-ravenscar-thread.c: Update.
3888 * windows-nat.c: Update.
3890 2018-07-03 Tom Tromey <tom@tromey.com>
3892 * common/ptid.c (ptid_get_lwp): Remove.
3893 * common/ptid.h (ptid_get_lwp): Don't declare.
3894 * aarch64-linux-nat.c: Update.
3895 * ada-tasks.c: Update.
3896 * aix-thread.c: Update.
3897 * amd64-linux-nat.c: Update.
3898 * arm-linux-nat.c: Update.
3899 * corelow.c: Update.
3900 * fbsd-nat.c: Update.
3901 * fbsd-tdep.c: Update.
3902 * gnu-nat.c: Update.
3903 * i386-cygwin-tdep.c: Update.
3904 * i386-gnu-nat.c: Update.
3905 * i386-linux-nat.c: Update.
3906 * ia64-linux-nat.c: Update.
3907 * inf-ptrace.c: Update.
3909 * linux-fork.c: Update.
3910 * linux-nat.c: Update.
3911 * linux-tdep.c: Update.
3912 * linux-thread-db.c: Update.
3913 * mips-linux-nat.c: Update.
3914 * nat/aarch64-linux-hw-point.c: Update.
3915 * nat/aarch64-linux.c: Update.
3916 * nat/linux-btrace.c: Update.
3917 * nat/linux-osdata.c: Update.
3918 * nat/linux-procfs.c: Update.
3919 * nat/x86-linux-dregs.c: Update.
3920 * obsd-nat.c: Update.
3921 * ppc-fbsd-nat.c: Update.
3922 * ppc-linux-nat.c: Update.
3924 * python/py-infthread.c: Update.
3925 * ravenscar-thread.c: Update.
3927 * s390-linux-nat.c: Update.
3928 * sol-thread.c: Update.
3929 * sol2-tdep.c: Update.
3930 * spu-linux-nat.c: Update.
3931 * x86-linux-nat.c: Update.
3932 * xtensa-linux-nat.c: Update.
3934 2018-07-03 Tom Tromey <tom@tromey.com>
3936 * common/ptid.c (ptid_get_pid): Remove.
3937 * common/ptid.h (ptid_get_pid): Don't declare.
3938 * aarch64-linux-nat.c: Update.
3939 * ada-lang.c: Update.
3940 * aix-thread.c: Update.
3941 * alpha-bsd-nat.c: Update.
3942 * amd64-fbsd-nat.c: Update.
3943 * amd64-linux-nat.c: Update.
3944 * arm-linux-nat.c: Update.
3945 * arm-nbsd-nat.c: Update.
3947 * break-catch-syscall.c: Update.
3948 * breakpoint.c: Update.
3949 * bsd-uthread.c: Update.
3950 * corelow.c: Update.
3952 * darwin-nat.c: Update.
3953 * fbsd-nat.c: Update.
3954 * fbsd-tdep.c: Update.
3956 * gnu-nat.c: Update.
3957 * hppa-nbsd-nat.c: Update.
3958 * hppa-obsd-nat.c: Update.
3959 * i386-fbsd-nat.c: Update.
3960 * ia64-linux-nat.c: Update.
3961 * inf-ptrace.c: Update.
3963 * inferior.c: Update.
3964 * inferior.h: Update.
3967 * linux-fork.c: Update.
3968 * linux-nat.c: Update.
3969 * linux-tdep.c: Update.
3970 * linux-thread-db.c: Update.
3971 * m68k-bsd-nat.c: Update.
3972 * mi/mi-interp.c: Update.
3973 * mi/mi-main.c: Update.
3974 * mips-linux-nat.c: Update.
3975 * mips-nbsd-nat.c: Update.
3976 * mips64-obsd-nat.c: Update.
3977 * nat/aarch64-linux-hw-point.c: Update.
3978 * nat/aarch64-linux.c: Update.
3979 * nat/linux-btrace.c: Update.
3980 * nat/linux-osdata.c: Update.
3981 * nat/linux-procfs.c: Update.
3982 * nat/x86-linux-dregs.c: Update.
3983 * nto-procfs.c: Update.
3984 * obsd-nat.c: Update.
3985 * ppc-linux-nat.c: Update.
3986 * ppc-nbsd-nat.c: Update.
3987 * ppc-obsd-nat.c: Update.
3988 * proc-service.c: Update.
3990 * python/py-inferior.c: Update.
3991 * python/py-infthread.c: Update.
3992 * ravenscar-thread.c: Update.
3994 * remote-sim.c: Update.
3996 * rs6000-nat.c: Update.
3997 * s390-linux-nat.c: Update.
3998 * sh-nbsd-nat.c: Update.
3999 * sol-thread.c: Update.
4000 * sparc-nat.c: Update.
4001 * sparc64-tdep.c: Update.
4002 * spu-linux-nat.c: Update.
4003 * spu-tdep.c: Update.
4004 * target-debug.h: Update.
4007 * tid-parse.c: Update.
4008 * tracefile-tfile.c: Update.
4009 * vax-bsd-nat.c: Update.
4010 * windows-nat.c: Update.
4011 * x86-linux-nat.c: Update.
4012 * x86-nat.c: Update.
4014 2018-07-03 Tom Tromey <tom@tromey.com>
4016 * common/ptid.c (pid_to_ptid): Remove.
4017 * common/ptid.h (pid_to_ptid): Don't declare.
4018 * aix-thread.c: Update.
4019 * arm-linux-nat.c: Update.
4020 * common/ptid.c: Update.
4021 * common/ptid.h: Update.
4022 * corelow.c: Update.
4024 * darwin-nat.c: Update.
4025 * fbsd-nat.c: Update.
4026 * fork-child.c: Update.
4027 * gnu-nat.c: Update.
4028 * go32-nat.c: Update.
4029 * inf-ptrace.c: Update.
4031 * inferior.c: Update.
4033 * linux-fork.c: Update.
4034 * linux-nat.c: Update.
4035 * nat/aarch64-linux-hw-point.c: Update.
4036 * nat/fork-inferior.c: Update.
4037 * nat/x86-linux-dregs.c: Update.
4038 * nto-procfs.c: Update.
4039 * obsd-nat.c: Update.
4041 * progspace.c: Update.
4043 * rs6000-nat.c: Update.
4044 * s390-linux-nat.c: Update.
4045 * sol-thread.c: Update.
4046 * spu-linux-nat.c: Update.
4049 * tracefile-tfile.c: Update.
4050 * windows-nat.c: Update.
4052 2018-07-03 Tom Tromey <tom@tromey.com>
4054 * common/ptid.h (ptid_build): Don't declare.
4055 * common/ptid.c (ptid_build): Remove.
4056 * aix-thread.c: Update.
4057 * bsd-kvm.c: Update.
4058 * bsd-uthread.c: Update.
4059 * common/agent.c: Update.
4060 * common/ptid.c: Update.
4061 * common/ptid.h: Update.
4062 * corelow.c: Update.
4063 * darwin-nat.c: Update.
4064 * fbsd-nat.c: Update.
4065 * gnu-nat.c: Update.
4066 * linux-fork.c: Update.
4067 * linux-nat.c: Update.
4068 * linux-thread-db.c: Update.
4069 * nat/linux-osdata.c: Update.
4070 * nat/linux-procfs.c: Update.
4071 * nto-procfs.c: Update.
4072 * obsd-nat.c: Update.
4073 * proc-service.c: Update.
4075 * ravenscar-thread.c: Update.
4076 * remote-sim.c: Update.
4078 * sol-thread.c: Update.
4080 * windows-nat.c: Update.
4082 2018-07-03 Tom Tromey <tom@tromey.com>
4084 * infrun.c (follow_exec): Use exit_inferior_silent.
4085 * inferior.c (exit_inferior_num_silent): Remove.
4086 * inferior.h (exit_inferior_num_silent): Don't declare.
4088 2018-07-03 Tom Tromey <tom@tromey.com>
4091 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4092 inferior_ptid on error.
4094 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4095 Simon Marchi <simon.marchi@polymtl.ca>
4098 * disasm.h (gdb_disassembler): Add
4099 `m_disassembler_options_holder'. member
4100 * disasm.c (get_all_disassembler_options): New function.
4101 (gdb_disassembler::gdb_disassembler): Use it.
4102 (gdb_buffered_insn_length_init_dis): Likewise.
4103 (gdb_buffered_insn_length): Adjust accordingly.
4104 (set_disassembler_options): Handle options with arguments.
4105 (show_disassembler_options_sfunc): Likewise. Add a leading new
4106 line if showing options with descriptions.
4107 (disassembler_options_completer): Adapt to using the
4108 `disasm_options_and_args_t' structure.
4109 * mips-tdep.c (mips_disassembler_options): New variable.
4110 (mips_disassembler_options_o32): Likewise.
4111 (mips_disassembler_options_n32): Likewise.
4112 (mips_disassembler_options_n64): Likewise.
4113 (gdb_print_insn_mips): Don't set `disassembler_options'.
4114 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4116 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4117 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4118 `gdbarch_disassembler_options_implicit' and
4119 `gdbarch_valid_disassembler_options'.
4120 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4121 `disasm_options_and_args_t' structure.
4122 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4124 (valid_disassembler_options): Switch from `disasm_options_t' to
4125 the `disasm_options_and_args_t' structure.
4126 * NEWS: Document `set disassembler-options' support for the MIPS
4128 * gdbarch.h: Regenerate.
4129 * gdbarch.c: Regenerate.
4131 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4133 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4135 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4137 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4138 parameter in call to amd64_target_description.
4139 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4140 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4141 (amd64fbsd_init_abi): Likewise.
4142 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4143 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4144 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4145 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4147 2018-06-29 Pedro Alves <palves@redhat.com>
4149 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4150 "segments" parameter.
4151 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4152 (_initialize_amd64_tdep): Update call to
4153 amd64_create_target_description.
4154 (amd64_target_description): Add "segments" parameter. Adjust
4155 the implementation to use it.
4156 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4157 call to amd64_create_target_description.
4158 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4159 * gdb/arch/amd64.h (amd64_create_target_description): Add
4160 "segments" register.
4161 * gdb/arch/amd64.c (amd64_create_target_description): Add
4162 "segments" parameter. Call create_feature_i386_64bit_segments
4163 only if SEGMENTS is true.
4164 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4165 call to amd64_create_target_description.
4167 2018-06-29 Pedro Alves <palves@redhat.com>
4169 * thread.c (thread_target_id_str): New, factored out from ...
4170 (print_thread_info_1): ... here. Use it to compute the max
4171 "Target Id" column width.
4173 2018-06-29 Pedro Alves <palves@redhat.com>
4175 * remote.c (remote_target::extra_thread_info): Delete
4176 'display_buf' and 'n' locals. from the cache, regardless of
4177 packet mechanims is in use. Use cache for qThreadExtra and qP
4180 2018-06-29 Pedro Alves <palves@redhat.com>
4182 * blockframe.c (find_pc_sect_containing_function): New function.
4183 * breakpoint.c (print_breakpoint_location): Don't call
4184 find_pc_sect_function.
4185 * linespec.c (create_sals_line_offset): Record the location's
4187 * linespec.c (convert_address_location_to_sals): Fill in sal's
4188 symbol with find_pc_sect_containing_function.
4189 * symtab.c (find_function_start_sal): Rename to ...
4190 (find_function_start_sal_1): ... this.
4191 (find_function_start_sal): Reimplement as wrapper around
4192 find_function_start_sal_1, and use
4193 find_pc_sect_containing_function to fill in the sal's symbol.
4194 (find_function_start_sal(symbol*, bool)): Adjust.
4195 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4197 (find_pc_sect_containing_function): Declare.
4199 2018-06-29 Pedro Alves <palves@redhat.com>
4201 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4202 true if the the location has no symbol.
4204 2018-06-28 Tom Tromey <tom@tromey.com>
4206 * NEWS: Mention --enable-codesign.
4207 * silent-rules.mk (ECHO_SIGN): New variable.
4208 * configure.ac: Add --enable-codesign.
4209 * configure: Rebuild.
4210 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4211 (gdb$(EXEEXT)): Optionally invoke codesign.
4213 2018-06-28 Pedro Alves <palves@redhat.com>
4215 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4217 (switch_to_thread_no_regs): Adjust comment.
4218 * infcmd.c (stop_pc): Delete.
4219 (post_create_inferior, info_program_command): Replace references
4220 to stop_pc with references to thread_info->suspend.stop_pc.
4221 * inferior.h (stop_pc): Delete declaration.
4222 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4223 (handle_inferior_event_1, handle_signal_stop)
4224 (process_event_stop_test, keep_going_stepped_thread)
4225 (handle_step_into_function, handle_step_into_function_backward)
4226 (print_stop_location): Replace references to stop_pc with
4227 references to thread_info->suspend.stop_pc.
4228 (struct infcall_suspend_state) <stop_pc>: Delete field.
4229 (save_infcall_suspend_state, restore_infcall_suspend_state):
4230 Remove references to inf_stat->stop_pc.
4231 * linux-fork.c (fork_load_infrun_state): Likewise.
4232 * record-btrace.c (record_btrace_set_replay): Likewise.
4233 * record-full.c (record_full_goto_entry): Likewise.
4234 * remote.c (print_one_stopped_thread): Likewise.
4235 * target.c (target_resume): Extend comment.
4236 * thread.c (set_executing_thread): New.
4237 (set_executing): Use it.
4238 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4239 Remove references to stop_pc.
4241 2018-06-28 Pedro Alves <palves@redhat.com>
4243 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4244 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4246 2018-06-28 Tom Tromey <tom@tromey.com>
4248 * coffread.c (coff_symfile_finish): Update.
4249 * xcoffread.c (xcoff_symfile_finish): Update.
4250 * elfread.c (elf_symfile_finish): Update.
4251 * symfile.h (dwarf2_free_objfile): Don't declare.
4252 * dwarf2read.c (_initialize_dwarf2_read): Use
4253 register_objfile_data_with_cleanup.
4254 (dwarf2_free_objfile): Now static. Change signature.
4256 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4258 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4259 option "-o" to add-symbol-file-load to add an offset to each
4260 section's load address.
4261 * symfile.c (set_objfile_default_section_offset): New function.
4263 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4265 * symfile.c (add_symbol_file_command): Make sure that sections
4266 with the same name are sorted in the same order.
4268 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4270 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4271 require the second argument. If omitted, load sections at the
4272 addresses specified in the file.
4274 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4276 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4277 (_initialize_symfile): Add option "-o" to symbol-file to add an
4278 offset to each section of the symbol file.
4280 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4282 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4284 2018-06-27 Tom Tromey <tom@tromey.com>
4286 * stack.c (_initialize_stack): Update "func" help text.
4288 2018-06-27 Tom Tromey <tom@tromey.com>
4290 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4292 (unwind_infopy_str, pyuw_create_unwind_info)
4293 (unwind_infopy_add_saved_register, pyuw_sniffer)
4294 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4296 (struct saved_reg): Add constructor.
4297 <value>: Now a gdbpy_ref<>.
4299 2018-06-27 Tom Tromey <tom@tromey.com>
4301 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4303 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4305 * gdb-gdb.py.in: Format using autopep8.
4307 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4309 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4310 (type_lookup_function): Recognize CORE_ADDR values.
4312 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4314 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4317 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4319 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4322 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4324 * gdb-gdb.py: Move to...
4325 * gdb-gdb.py.in: ... here.
4326 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4327 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4329 (distclean): Remove gdb-gdb.py when cleaning.
4330 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4331 * configure: Re-generate.
4333 2018-06-27 Pedro Alves <palves@redhat.com>
4335 * proc-service.c (get_ps_regcache): New.
4336 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4337 (ps_lsetfpregs): Use it.
4339 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4342 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4343 (dwarf_decode_lines_1): Adjust.
4345 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4347 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4349 <info_proc>: Likewise.
4351 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4353 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4354 to windows_fetch_one_register, and only handle the case of
4355 fetching one register. Move the code that reloads the context
4356 and iterates over all registers if R is negative to...
4357 (windows_nat_target::fetch_registers): ... here.
4358 (do_windows_store_inferior_registers): Rename to
4359 windows_store_one_register, and only handle the case of storing
4360 one register. Move the code that handles the case where r is
4362 (windows_nat_target::store_registers) ... here.
4364 2018-06-26 Tom Tromey <tom@tromey.com>
4367 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4368 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4370 (rust_internal_print_type): Add podata parameter.
4371 (rust_print_type): Update.
4373 2018-06-26 Tom Tromey <tom@tromey.com>
4375 * typeprint.h (struct print_offset_data) <update, finish,
4376 maybe_print_hole>: New methods.
4377 <indentation>: New constant.
4378 * typeprint.c (print_offset_data::indentation): Define.
4379 (print_offset_data::maybe_print_hole, print_offset_data::update)
4380 (print_offset_data::finish): Move from c-typeprint.c and rename.
4381 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4382 (print_spaces_filtered_with_print_options): Update.
4383 (c_print_type_union_field_offset, maybe_print_hole)
4384 (c_print_type_struct_field_offset): Move to typeprint.c and
4386 (c_type_print_base_struct_union): Update.
4388 2018-06-25 Pedro Alves <palves@redhat.com>
4390 * gdbthread.h (thread_info_ref, delete_thread)
4391 (delete_thread_silent, first_thread_of_inferior)
4392 (any_thread_of_inferior, switch_to_thread)
4393 (enable_thread_stack_temporaries)
4394 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4395 (get_last_thread_stack_temporary)
4396 (value_in_thread_stack_temporaries, can_access_registers_thread):
4397 Spell out "struct thread_info" instead of just "thread_info".
4398 * inferior.h (notice_new_inferior): Likewise.
4400 2018-06-25 Pedro Alves <palves@redhat.com>
4402 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4403 pass thread_info pointer to delete_thread.
4404 (windows_nat_target::detach): Pass inferior pointer to
4406 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4408 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4409 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4410 and pass a thread_info pointer to delete_thread.
4411 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4412 pass thread_info pointer to delete_thread.
4413 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4414 delete_thread_silent call.
4415 * procfs.c (procfs_target::detach): Pass inferior pointer to
4417 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4418 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4419 delete_thread_silent call.
4420 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4421 pass thread_info pointer to delete_thread.
4422 (windows_nat_target::detach): Pass inferior pointer to
4425 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4427 * regcache.c (readable_regcache::read_part): Fix asserts.
4428 (reg_buffer::raw_collect_part): New function.
4429 (regcache::write_part): Fix asserts.
4430 (reg_buffer::raw_supply_part): New function.
4431 (regcache::transfer_regset_register): New helper function.
4432 (regcache::transfer_regset): Call new functions.
4433 (regcache_supply_regset): Use gdb_byte*.
4434 (regcache::supply_regset): Likewise.
4435 (regcache_collect_regset): Likewise.
4436 (regcache::collect_regset): Likewise.
4437 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4438 (reg_buffer::raw_supply_part): Likewise.
4439 (regcache::transfer_regset_register): Likewise.
4440 (regcache::transfer_regset): Use gdb_byte*.
4442 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4444 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4446 2018-06-21 Pedro Alves <palves@redhat.com>
4448 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4449 instead of a ptid_t. All callers adjusted.
4450 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4452 (print_ada_task_info, display_current_task_id, task_command_1):
4454 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4456 (breakpoint_kind): Adjust.
4457 (remove_breakpoints_pid): Rename to ...
4458 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4459 pointer. All callers adjusted.
4460 (bpstat_clear_actions): Use inferior_thread.
4461 (get_bpstat_thread): New.
4462 (bpstat_do_actions): Use it.
4463 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4464 to take a thread_info pointer. All callers adjusted.
4465 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4466 (breakpoint_re_set_thread): Use inferior_thread.
4467 * breakpoint.h (struct inferior): Forward declare.
4468 (bpstat_stop_status): Update.
4469 (remove_breakpoints_pid): Delete.
4470 (remove_breakpoints_inf): New.
4471 * bsd-uthread.c (bsd_uthread_target::wait)
4472 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4473 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4474 (maint_btrace_packet_history_cmd)
4475 (maint_btrace_clear_packet_history_cmd): Adjust.
4476 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4478 * cli/cli-interp.c: Include "inferior.h".
4479 * common/refcounted-object.h (struct
4480 refcounted_object_ref_policy): New.
4481 * compile/compile-object-load.c: Include gdbthread.h.
4482 (store_regs): Use inferior_thread.
4483 * corelow.c (core_target::close): Use current_inferior.
4484 (core_target_open): Adjust to use first_thread_of_inferior and use
4485 the current inferior.
4486 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4487 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4488 <thread>: ... this new field. All references adjusted.
4489 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4490 Take a thread_info pointer instead of a ptid_t.
4491 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4492 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4493 thread_info pointer instead of a ptid_t.
4494 * elfread.c: Include "inferior.h".
4495 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4496 Use inferior_thread.
4497 * eval.c (evaluate_subexp): Likewise.
4498 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4500 * gdb_proc_service.h (struct thread_info): Forward declare.
4501 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4502 <thread>: ... this new field. All references adjusted.
4503 * gdbarch.h, gdbarch.c: Regenerate.
4504 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4505 'thread' parameter. All implementations and callers adjusted.
4506 * gdbthread.h (thread_info) <set_running>: New method.
4507 (delete_thread, delete_thread_silent): Take a thread_info pointer
4509 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4510 (first_thread_of_process): Delete, replaced by ...
4511 (first_thread_of_inferior): ... this new function. All callers
4513 (any_live_thread_of_process): Delete, replaced by ...
4514 (any_live_thread_of_inferior): ... this new function. All callers
4516 (switch_to_thread, switch_to_no_thread): Declare.
4517 (is_executing): Delete.
4518 (enable_thread_stack_temporaries): Update comment.
4519 <enable_thread_stack_temporaries>: Take a thread_info pointer
4520 instead of a ptid_t. Incref the thread.
4521 <~enable_thread_stack_temporaries>: Decref the thread.
4524 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4525 (get_last_thread_stack_temporary)
4526 (value_in_thread_stack_temporaries, can_access_registers_thread):
4527 Take a thread_info pointer instead of a ptid_t. All callers
4529 * infcall.c (get_call_return_value): Use inferior_thread.
4530 (run_inferior_call): Work with thread pointers instead of ptid_t.
4531 (call_function_by_hand_dummy): Work with thread pointers instead
4532 of ptid_t. Use thread_info_ref.
4533 * infcmd.c (proceed_thread_callback): Access thread's state
4535 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4536 access thread's state directly.
4537 (continue_command): Use inferior_thread.
4538 (info_program_command): Use find_thread_ptid and access thread
4540 (proceed_after_attach_callback): Use thread state directly.
4541 (notice_new_inferior): Take a thread_info pointer instead of a
4542 ptid_t. All callers adjusted.
4543 (exit_inferior): Take an inferior pointer instead of a pid. All
4545 (exit_inferior_silent): New.
4546 (detach_inferior): Delete.
4547 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4548 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4549 (detach_inferior_command, kill_inferior_command): Use
4550 find_inferior_id instead of valid_gdb_inferior_id and
4551 gdb_inferior_id_to_pid.
4552 (inferior_command): Use inferior and thread pointers.
4553 * inferior.h (struct thread_info): Forward declare.
4554 (notice_new_inferior): Take a thread_info pointer instead of a
4555 ptid_t. All callers adjusted.
4556 (detach_inferior): Delete declaration.
4557 (exit_inferior, exit_inferior_silent): Take an inferior pointer
4558 instead of a pid. All callers adjusted.
4559 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4560 (valid_gdb_inferior_id): Delete.
4561 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4562 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4563 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4565 <inf>: ... this new field.
4566 <step_ptid>: Delete, replaced by ...
4567 <step_thread>: ... this new field.
4568 (get_displaced_stepping_state): Take an inferior pointer instead
4569 of a pid. All callers adjusted.
4570 (displaced_step_in_progress_any_inferior): Adjust.
4571 (displaced_step_in_progress_thread): Take a thread pointer instead
4572 of a ptid_t. All callers adjusted.
4573 (displaced_step_in_progress, add_displaced_stepping_state): Take
4574 an inferior pointer instead of a pid. All callers adjusted.
4575 (get_displaced_step_closure_by_addr): Adjust.
4576 (remove_displaced_stepping_state): Take an inferior pointer
4577 instead of a pid. All callers adjusted.
4578 (displaced_step_prepare_throw, displaced_step_prepare)
4579 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4580 All callers adjusted.
4581 (start_step_over): Adjust.
4582 (infrun_thread_ptid_changed): Remove bit updating ptids in the
4583 displaced step queue.
4584 (do_target_resume): Adjust.
4585 (fetch_inferior_event): Use inferior_thread.
4586 (context_switch, get_inferior_stop_soon): Take an
4587 execution_control_state pointer instead of a ptid_t. All callers
4589 (switch_to_thread_cleanup): Delete.
4590 (stop_all_threads): Use scoped_restore_current_thread.
4591 * inline-frame.c: Include "gdbthread.h".
4592 (inline_state) <inline_state>: Take a thread pointer instead of a
4593 ptid_t. All callers adjusted.
4594 <ptid>: Delete, replaced by ...
4595 <thread>: ... this new field.
4596 (find_inline_frame_state): Take a thread pointer instead of a
4597 ptid_t. All callers adjusted.
4598 (skip_inline_frames, step_into_inline_frame)
4599 (inline_skipped_frames, inline_skipped_symbol): Take a thread
4600 pointer instead of a ptid_t. All callers adjusted.
4601 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4602 (inline_skipped_frames, inline_skipped_symbol): Likewise.
4603 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4605 * linux-nat.c (get_detach_signal): Likewise.
4606 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4607 (thread_db_notice_clone): Adjust.
4608 (thread_db_find_new_threads_silently)
4609 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4610 a thread pointer instead of a ptid_t. All callers adjusted.
4611 * mi/mi-cmd-var.c: Include "inferior.h".
4612 (mi_cmd_var_update_iter): Update to use thread pointers.
4613 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4615 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4617 (mi_output_running): ... this new function.
4618 (mi_on_resume_1): Adjust to use it.
4619 (mi_user_selected_context_changed): Adjust to use inferior_thread.
4620 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4622 (interrupt_thread_callback): : Adjust to use thread and inferior
4624 * proc-service.c: Include "gdbthread.h".
4625 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4626 * progspace-and-thread.c: Include "inferior.h".
4627 * progspace.c: Include "inferior.h".
4628 * python/py-exitedevent.c (create_exited_event_object): Adjust to
4629 hold a reference to an inferior_object.
4630 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4632 * python/py-inferior.c (struct inferior_object): Give the type a
4633 tag name instead of a typedef.
4634 (python_on_normal_stop): No need to check if the current thread is
4636 (inferior_to_inferior_object): Change return type to
4637 inferior_object. All callers adjusted.
4638 (find_thread_object): Delete, bits factored out to ...
4639 (thread_to_thread_object): ... this new function.
4640 * python/py-infthread.c (create_thread_object): Use
4641 inferior_to_inferior_object.
4642 (thpy_is_stopped): Use thread pointer directly.
4643 (gdbpy_selected_thread): Use inferior_thread.
4644 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4645 field, replaced with ...
4646 <thread>: ... this new field. All users adjusted.
4647 (btpy_insn_or_gap_new): Drop const.
4648 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
4650 * python/py-record.c: Include "gdbthread.h".
4651 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4652 a ptid_t. All callers adjusted.
4653 (gdbpy_current_recording): Use inferior_thread.
4654 * python/py-record.h (recpy_record_object) <ptid>: Delete
4655 field, replaced with ...
4656 <thread>: ... this new field. All users adjusted.
4657 (recpy_element_object) <ptid>: Delete
4658 field, replaced with ...
4659 <thread>: ... this new field. All users adjusted.
4660 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4661 a ptid_t. All callers adjusted.
4662 * python/py-threadevent.c: Include "gdbthread.h".
4663 (get_event_thread): Use thread_to_thread_object.
4664 * python/python-internal.h (struct inferior_object): Forward
4666 (find_thread_object, find_inferior_object): Delete declarations.
4667 (thread_to_thread_object, inferior_to_inferior_object): New
4669 * record-btrace.c: Include "inferior.h".
4670 (require_btrace_thread): Use inferior_thread.
4671 (record_btrace_frame_sniffer)
4672 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4673 (get_thread_current_frame): Use scoped_restore_current_thread and
4675 (get_thread_current_frame): Use thread pointer directly.
4676 (record_btrace_replay_at_breakpoint): Use thread's inferior
4678 * record-full.c: Include "inferior.h".
4679 * regcache.c: Include "gdbthread.h".
4680 (get_thread_arch_regcache): Use the inferior's address space
4682 (get_thread_regcache, registers_changed_thread): New.
4683 * regcache.h (get_thread_regcache(thread_info *thread)): New
4685 (registers_changed_thread): New.
4686 (remote_target) <remote_detach_1>: Swap order of parameters.
4687 (remote_add_thread): <remote_add_thread>: Return the new thread.
4688 (get_remote_thread_info(ptid_t)): New overload.
4689 (remote_target::remote_notice_new_inferior): Use thread pointers
4691 (remote_target::process_initial_stop_replies): Use
4692 thread_info::set_running.
4693 (remote_target::remote_detach_1, remote_target::detach)
4694 (extended_remote_target::detach): Adjust.
4695 * stack.c (frame_show_address): Use inferior_thread.
4696 * target-debug.h (target_debug_print_thread_info_pp): New.
4697 * target-delegates.c: Regenerate.
4698 * target.c (default_thread_address_space): Delete.
4699 (memory_xfer_partial_1): Use current_inferior.
4700 (target_detach): Use current_inferior.
4701 (target_thread_address_space): Delete.
4702 (generic_mourn_inferior): Use current_inferior.
4703 * target.h (struct target_ops) <thread_address_space>: Delete.
4704 (target_thread_address_space): Delete.
4705 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4707 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4708 thread pointer instead of a ptid_t. Adjust all callers.
4709 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4710 (first_thread_of_process): Delete, replaced by ...
4711 (first_thread_of_inferior): ... this new function. All callers
4713 (any_thread_of_process): Rename to ...
4714 (any_thread_of_inferior): ... this, and take an inferior pointer.
4715 (any_live_thread_of_process): Rename to ...
4716 (any_live_thread_of_inferior): ... this, and take an inferior
4718 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4719 (value_in_thread_stack_temporaries)
4720 (get_last_thread_stack_temporary): Take a thread pointer instead
4721 of a ptid_t. Adjust all callers.
4722 (thread_info::set_running): New.
4723 (validate_registers_access): Use inferior_thread.
4724 (can_access_registers_ptid): Rename to ...
4725 (can_access_registers_thread): ... this, and take a thread
4727 (print_thread_info_1): Adjust to compare thread pointers instead
4729 (switch_to_no_thread, switch_to_thread): Make extern.
4730 (scoped_restore_current_thread::~scoped_restore_current_thread):
4731 Use m_thread pointer directly.
4732 (scoped_restore_current_thread::scoped_restore_current_thread):
4733 Use inferior_thread.
4734 (thread_command): Use thread pointer directly.
4735 (thread_num_make_value_helper): Use inferior_thread.
4736 * top.c (execute_command): Use inferior_thread.
4737 * tui/tui-interp.c: Include "inferior.h".
4738 * varobj.c (varobj_create): Use inferior_thread.
4739 (value_of_root_1): Use find_thread_global_id instead of
4740 global_thread_id_to_ptid.
4742 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4744 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4746 (regcache::write_part): Likewise.
4747 (readable_regcache::cooked_read_part): Update comment.
4748 (readable_regcache::cooked_write_part): Likewise.
4749 * regcache.h: (readable_regcache::read_part): Likewise.
4750 (regcache::write_part): Likewise.
4752 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4753 Dirk Schubert <dirk.schubert@arm.com>
4755 * aarch64-linux-nat.c (post_attach): New.
4756 (aarch64_linux_nat_target::post_attach): Override post_attach to
4757 record the number of hardware debug registers.
4759 2018-06-20 Tom Tromey <tom@tromey.com>
4761 * python/py-param.c (add_setshow_generic): Make parameters const.
4762 (parmpy_init): Update.
4764 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4766 * regcache.h (regcache_cooked_read_ftype): Rename to...
4767 (register_read_ftype): ...this, change type to function_view.
4768 (class reg_buffer) <save>: Remove src parameter.
4769 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4770 parameter non-const in first overload. Remove src parameter in
4772 * regcache.c (do_cooked_read): Remove.
4773 (readonly_detached_regcache::readonly_detached_regcache): Make
4774 parameter non-const, adjust call to other constructor.
4775 (reg_buffer::save): Remove src parameter.
4776 * frame.c (do_frame_register_read): Remove.
4777 (frame_save_as_regcache): Use lambda function.
4778 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4779 parameter to ppu2spu_data *.
4780 (ppu2spu_sniffer): Use lambda function.
4782 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4784 * record-full.c (record_full_target::insert_breakpoint): Remove
4785 "struct" keyword, add const.
4787 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4789 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4790 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4791 * configure.ac: Remove AC_PREREQ, add missing quoting.
4792 * gnulib/configure.ac: Modernize usage of
4793 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4794 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4795 (AUTOMAKE_VERSION): Bump to 1.15.1.
4796 * configure: Re-generate.
4797 * config.in: Re-generate.
4798 * aclocal.m4: Re-generate.
4799 * gnulib/aclocal.m4: Re-generate.
4800 * gnulib/config.in: Re-generate.
4801 * gnulib/configure: Re-generate.
4802 * gnulib/import/Makefile.in: Re-generate.
4804 2018-06-19 Pedro Alves <palves@redhat.com>
4806 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4807 (lookup_minimal_symbol_by_pc_section): ... here with
4808 gdb_assert_not_reached added.
4810 2018-06-19 Pedro Alves <palves@redhat.com>
4812 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4813 parameter with a block parameter. Compare location's block symbol
4814 with the frame's block instead of addresses.
4815 (skip_inline_frames): Pass the current block instead of the
4816 frame's address. Break out as soon as we determine the frame
4817 should not be skipped.
4819 2018-06-18 Tom Tromey <tom@tromey.com>
4821 * solib-aix.c (solib_aix_get_section_offsets): Return
4823 (solib_aix_solib_create_inferior_hook): Update.
4825 2018-06-18 Tom Tromey <tom@tromey.com>
4827 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4829 2018-06-18 Tom Tromey <tom@tromey.com>
4831 * solib-frv.c (frv_relocate_main_executable): Use
4833 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4836 2018-06-18 Tom Tromey <tom@tromey.com>
4838 * objfiles.h (inhibit_section_map_updates): Update.
4839 (resume_section_map_updates, resume_section_map_updates_cleanup):
4841 * solib-svr4.c (svr4_handle_solib_event): Update.
4842 * objfiles.c (inhibit_section_map_updates): Return
4843 scoped_restore_tmpl<int>.
4844 (resume_section_map_updates, resume_section_map_updates_cleanup):
4847 2018-06-18 Tom Tromey <tom@tromey.com>
4849 * valprint.h (read_string): Update.
4850 * valprint.c (read_string): Change type of "buffer".
4851 (val_print_string): Update.
4852 * python/py-value.c (valpy_string): Update.
4853 * language.h (struct language_defn) <la_get_string>: Change
4855 (default_get_string, c_get_string): Update.
4856 * language.c (default_get_string): Change type of "buffer".
4857 * guile/scm-value.c (gdbscm_value_to_string): Update.
4858 * c-lang.c (c_get_string): Change type of "buffer".
4860 2018-06-18 Tom Tromey <tom@tromey.com>
4862 * ser-mingw.c (struct pipe_state_destroyer): New.
4863 (pipe_state_up): New typedef.
4864 (cleanup_pipe_state): Remove.
4865 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4867 2018-06-18 Tom Tromey <tom@tromey.com>
4869 * rust-lang.h (rust_yyerror): Don't declare.
4870 * rust-lang.c (rust_language_defn): Update.
4871 * rust-exp.y (yyerror): Now static.
4872 * parse.c (parse_exp_in_context_1): Update.
4873 * p-lang.h (p_yyerror): Don't declare.
4874 * p-lang.c (p_language_defn): Update.
4875 * p-exp.y (yyerror): Now static.
4876 * opencl-lang.c (opencl_language_defn): Update.
4877 * objc-lang.c (objc_language_defn): Update.
4878 * m2-lang.h (m2_yyerror): Don't declare.
4879 * m2-lang.c (m2_language_defn): Update.
4880 * m2-exp.y (yyerror): Now static.
4881 * language.h (struct language_defn) <la_error>: Remove.
4882 * language.c (unk_lang_error): Remove.
4883 (unknown_language_defn, auto_language_defn): Remove.
4884 * go-lang.h (go_yyerror): Don't declare.
4885 * go-lang.c (go_language_defn): Update.
4886 * go-exp.y (yyerror): Now static.
4887 * f-lang.h (f_yyerror): Don't declare.
4888 * f-lang.c (f_language_defn): Update.
4889 * f-exp.y (yyerror): Now static.
4890 * d-lang.h (d_yyerror): Don't declare.
4891 * d-lang.c (d_language_defn): Update.
4892 * d-exp.y (yyerror): Now static.
4893 * c-lang.h (c_yyerror): Don't declare.
4894 * c-lang.c (c_language_defn, cplus_language_defn)
4895 (asm_language_defn, minimal_language_defn): Update.
4896 * c-exp.y (yyerror): Now static.
4897 * ada-lang.h (ada_yyerror): Don't declare.
4898 * ada-lang.c (ada_language_defn): Update.
4899 * ada-exp.y (yyerror): Now static.
4901 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4903 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4904 (store_sveregs_to_thread): Likewise.
4905 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4906 (aarch64_linux_store_inferior_registers): Likewise.
4907 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4909 (aarch64_sve_regs_copy_to_regcache): Likewise.
4910 (aarch64_sve_regs_copy_from_regcache): Likewise.
4911 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4913 (aarch64_sve_regs_copy_to_regcache): Likewise.
4914 (aarch64_sve_regs_copy_from_regcache): Likewise.
4915 (sve_context): Structure from Linux headers.
4916 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4917 (SVE_SIG_ZREG_SIZE): Likewise.
4918 (SVE_SIG_PREG_SIZE): Likewise.
4919 (SVE_SIG_FFR_SIZE): Likewise.
4920 (SVE_SIG_REGS_OFFSET): Likewise.
4921 (SVE_SIG_ZREGS_OFFSET): Likewise.
4922 (SVE_SIG_ZREG_OFFSET): Likewise.
4923 (SVE_SIG_ZREGS_SIZE): Likewise.
4924 (SVE_SIG_PREGS_OFFSET): Likewise.
4925 (SVE_SIG_PREG_OFFSET): Likewise.
4926 (SVE_SIG_PREGS_SIZE): Likewise.
4927 (SVE_SIG_FFR_OFFSET): Likewise.
4928 (SVE_SIG_REGS_SIZE): Likewise.
4929 (SVE_SIG_CONTEXT_SIZE): Likewise.
4930 (SVE_PT_REGS_MASK): Likewise.
4931 (SVE_PT_REGS_FPSIMD): Likewise.
4932 (SVE_PT_REGS_SVE): Likewise.
4933 (SVE_PT_VL_INHERIT): Likewise.
4934 (SVE_PT_VL_ONEXEC): Likewise.
4935 (SVE_PT_REGS_OFFSET): Likewise.
4936 (SVE_PT_FPSIMD_OFFSET): Likewise.
4937 (SVE_PT_FPSIMD_SIZE): Likewise.
4938 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4939 (SVE_PT_SVE_PREG_SIZE): Likewise.
4940 (SVE_PT_SVE_FFR_SIZE): Likewise.
4941 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4942 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4943 (__SVE_SIG_TO_PT): Likewise.
4944 (SVE_PT_SVE_OFFSET): Likewise.
4945 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4946 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4947 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4948 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4949 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4950 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4951 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4952 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4953 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4954 (SVE_PT_SVE_SIZE): Likewise.
4955 (SVE_PT_SIZE): Likewise.
4956 (HAS_SVE_STATE): New define.
4958 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4960 * nat/aarch64-sve-linux-sigcontext.h: New file.
4961 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4963 (SVE_VQ_MIN): Likewise.
4964 (SVE_VQ_MAX): Likewise.
4965 (SVE_VL_MIN): Likewise.
4966 (SVE_VL_MAX): Likewise.
4967 (SVE_NUM_ZREGS): Likewise.
4968 (SVE_NUM_PREGS): Likewise.
4969 (sve_vl_valid): Likewise.
4970 (struct user_sve_header): Likewise.
4972 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4973 Richard Bunt <Richard.Bunt@arm.com>
4975 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4976 was requested by GDB.
4978 2018-06-15 Tom de Vries <tdevries@suse.de>
4980 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4982 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4984 * gnulib/update-gnulib.sh: Print expected versions of
4987 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4989 * arch-utils.c (default_type_align): Use type_length_units.
4990 * gdbtypes.c (type_align): Use type_length_units.
4992 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4994 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4995 of 'define' command.
4997 2018-06-14 Tom de Vries <tdevries@suse.de>
5000 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5001 get_no_prettyformat_print_options.
5003 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5005 * sparc-nat.h: Include target.h.
5006 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5007 <fetch_registers>: Remove this argument in function call.
5008 <store_registers>: Remove this argument in function call, remove
5010 <low_forget_process>: Call sparc64_forget_process instead of
5011 sparc_forget_process.
5013 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5015 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5016 (procfs_target::make_corefile_notes): Adjust to new
5017 target_read_alloc return type.
5019 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5020 Stephen Roberts <stephen.roberts@arm.com>
5023 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5024 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5025 Move should_notify_stop local into more inner scope.
5027 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5028 Stephen Roberts <stephen.roberts@arm.com>
5031 * infrun.c (resume_1): Add call to mark_async_event_handler.
5033 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5035 * infrun.c (do_target_wait): Change old version of $pc printed.
5037 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5039 * dwarf2read.c (read_index_from_section): Rename to...
5040 (read_gdb_index_from_section): ... this, update all callers.
5041 (dwarf2_read_index): Rename to...
5042 (dwarf2_read_gdb_index): ... this, update all callers.
5044 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5046 * gdb/hppa-linux-nat.c
5047 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5048 hppa_linux_nat_target::fetch_registers.
5050 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5052 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5053 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5054 (AARCH64_DWARF_SVE_FFR): Likewise.
5055 (AARCH64_DWARF_SVE_P0): Likewise.
5056 (AARCH64_DWARF_SVE_Z0): Likewise.
5058 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5060 * common/common-regcache.h (raw_compare): New function.
5061 * regcache.c (regcache::raw_compare): Likewise.
5062 * regcache.h (regcache::raw_compare): New declaration.
5064 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5066 * common/common-regcache.h (reg_buffer_common): New structure.
5067 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5068 (reg_buffer::raw_supply): Likewise.
5069 (reg_buffer::raw_supply_integer): Likewise.
5070 (reg_buffer::raw_supply_zeroed): Likewise.
5071 (reg_buffer::raw_collect): Likewise.
5072 (reg_buffer::raw_collect_integer): Likewise.
5073 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5074 (reg_buffer::raw_supply): Likewise.
5075 (reg_buffer::raw_supply_integer): Likewise.
5076 (reg_buffer::raw_supply_zeroed): Likewise.
5077 (reg_buffer::raw_collect): Likewise.
5078 (reg_buffer::raw_collect_integer): Likewise.
5080 2018-06-10 Tom Tromey <tom@tromey.com>
5082 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5083 (class remote_state) <stop_reply_queue>: Now std::vector.
5084 (remote_state::~remote_state)
5085 (remote_target::stop_reply_queue_length): Update.
5086 (struct queue_iter_param, remove_child_of_pending_fork)
5087 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5088 (check_pending_event_prevents_wildcard_vcont_callback)
5089 (remove_stop_reply_for_inferior)
5090 (remove_stop_reply_of_remote_state)
5091 (remote_notif_remove_once_on_match)
5092 (stop_reply_match_ptid_and_ws)
5093 (remote_kill_child_of_pending_fork): Remove.
5094 (remote_target::remove_new_fork_children)
5095 (remote_target::check_pending_events_prevent_wildcard_vcont)
5096 (remote_target::discard_pending_stop_replies)
5097 (remote_target::discard_pending_stop_replies_in_queue)
5098 (remote_target::remote_notif_remove_queued_reply)
5099 (remote_target::queued_stop_reply)
5100 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5101 (remote_target::wait, remote_target::kill_new_fork_children)
5102 (remote_target::async): Update.
5104 2018-06-10 Tom Tromey <tom@tromey.com>
5106 * record-full.c (record_full_arch_list_cleanups): Remove.
5107 (record_full_message): Use try/catch.
5108 (record_full_wait_cleanups): Remove.
5109 (record_full_wait_1): Use try/catch.
5110 (record_full_restore): Likewise.
5112 2018-06-10 Tom Tromey <tom@tromey.com>
5114 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5115 declare VEC. Add constructor.
5116 <in_target_beneath>: Now bool.
5117 (record_full_breakpoints): Now a std::vector, static.
5118 (record_full_sync_record_breakpoints)
5119 (record_full_init_record_breakpoints)
5120 (record_full_target::insert_breakpoint)
5121 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5123 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5125 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5126 * serial.c (serial_interface_lookup): Remove struct keyword.
5128 2018-06-10 Tom Tromey <tom@tromey.com>
5130 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5132 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5134 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5136 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5137 "beneath" as a method.
5138 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5139 Use "beneath" as a method.
5141 2018-06-10 Tom Tromey <tom@tromey.com>
5143 * tracefile.c (struct trace_file_writer_deleter): New.
5144 <operator()>: Rename from trace_file_writer_xfree.
5145 (trace_file_writer_up): New typedef.
5146 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5148 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5150 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5151 <m_registers, m_register_status>: Change type to
5153 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5156 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5158 * common/common-regcache.h (enum register_status): Add
5159 underlying type "signed char".
5160 * regcache.h (reg_buffer) <m_register_status>: Change type to
5162 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5163 register_status instead of signed char.
5164 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5165 (reg_buffer::get_register_status): Remove cast.
5166 (readable_regcache::raw_read): Remove cast.
5167 (readable_regcache::cooked_read): Remove cast.
5169 2018-06-09 Tom Tromey <tom@tromey.com>
5171 * source.c (reverse_search_command, forward_search_command): Use
5174 2018-06-09 Tom Tromey <tom@tromey.com>
5176 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5177 (serial_ops_list): Now static, std::vector.
5178 (serial_interface_lookup, serial_add_interface): Update.
5180 2018-06-09 Tom Tromey <tom@tromey.com>
5182 * dwarf2read.c (process_cu_includes): Update.
5183 (process_full_comp_unit): Update.
5184 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5187 2018-06-08 Paul Koning <paul_koning@dell.com>
5191 * python/python.c (do_start_initialization):
5192 Avoid call to internal Python API.
5193 (init__gdb_module): New function.
5195 2018-06-08 Gary Benson <gbenson@redhat.com>
5197 * linux-thread-db.c (valprint.h): New include.
5198 (struct check_thread_db_info): New structure.
5199 (check_thread_db_on_load, tdb_testinfo): New static globals.
5200 (check_thread_db, check_thread_db_callback): New functions.
5201 (try_thread_db_load_1): Run integrity checks if requested.
5202 (maintenance_check_libthread_db): New function.
5203 (_initialize_thread_db): Register "maint check libthread-db"
5204 and "maint set/show check-libthread-db".
5205 * NEWS: Mention the above new commands.
5207 2018-06-08 Tom Tromey <tom@tromey.com>
5209 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5212 2018-06-08 Tom Tromey <tom@tromey.com>
5214 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5216 2018-06-08 Tom Tromey <tom@tromey.com>
5218 * common/btrace-common.h (struct btrace_data): Add constructor,
5219 destructor, move assignment operator.
5220 <empty, clear, fini>: New methods.
5221 <format>: Initialize.
5222 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5223 (btrace_data_empty): Don't declare.
5224 * common/btrace-common.c (btrace_data_init): Remove.
5225 (btrace_data::fini): Rename from btrace_data_fini.
5226 (btrace_data::empty): Rename from btrace_data_empty.
5227 (btrace_data::clear): Rename from btrace_data_clear. Return
5229 * btrace.h (make_cleanup_btrace_data): Don't declare.
5230 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5231 (parse_xml_btrace): Update.
5232 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5233 (maint_btrace_clear_packet_history_cmd): Update.
5235 2018-06-07 Pedro Alves <palves@redhat.com>
5237 * target.h (target_ops) <beneath>: Now a method. All references
5239 (class target_stack): New.
5240 * target.c (g_target_stack): New.
5241 (g_current_top_target): Delete.
5242 (current_top_target): Get the top target out of g_target_stack.
5243 (target_stack::push, target_stack::unpush): New.
5244 (push_target, unpush_target): Reimplement.
5245 (target_is_pushed): Reimplement in terms of g_target_stack.
5246 (target_ops::beneath, target_stack::find_beneath): New.
5248 2018-06-07 Pedro Alves <palves@redhat.com>
5250 * target.h (find_target_beneath): Delete declaration.
5251 * target.c (find_target_beneath): Delete definition.
5252 * aix-thread.c: All callers of find_target_beneath adjusted to
5253 call target_ops::beneath instead.
5254 * bsd-uthread.c: Likewise.
5255 * linux-thread-db.c: Likewise.
5256 * ravenscar-thread.c: Likewise.
5257 * sol-thread.c: Likewise.
5258 * spu-multiarch.c: Likewise.
5260 2018-06-07 Pedro Alves <palves@redhat.com>
5262 * target.h (target_ops) <beneath>: Now a method. All references
5264 (target_ops) <m_beneath>: New.
5265 * target.c (target_ops::beneath): New.
5266 * corelow.c: Adjust all references to target_ops::beneath.
5267 * linux-thread-db.c: Likewise.
5268 * make-target-delegates: Likewise.
5269 * record-btrace.c: Likewise.
5270 * record-full.c: Likewise.
5271 * remote.c: Likewise.
5272 * target.c: Likewise.
5273 * target-delegates.c: Regenerate.
5275 2018-06-07 Pedro Alves <palves@redhat.com>
5277 * target.h (target_stack): Delete.
5278 (current_top_target): Declare function.
5279 * target.c (target_stack): Delete.
5280 (g_current_top_target): New.
5281 (current_top_target): New function.
5282 * auxv.c: Use current_top_target instead of target_stack
5284 * avr-tdep.c: Likewise.
5285 * breakpoint.c: Likewise.
5286 * corefile.c: Likewise.
5287 * elfread.c: Likewise.
5289 * exceptions.c: Likewise.
5290 * frame.c: Likewise.
5291 * gdbarch-selftests.c: Likewise.
5292 * gnu-v3-abi.c: Likewise.
5293 * ia64-tdep.c: Likewise.
5294 * ia64-vms-tdep.c: Likewise.
5295 * infcall.c: Likewise.
5296 * infcmd.c: Likewise.
5297 * infrun.c: Likewise.
5298 * linespec.c: Likewise.
5299 * linux-tdep.c: Likewise.
5300 * minsyms.c: Likewise.
5301 * ppc-linux-nat.c: Likewise.
5302 * ppc-linux-tdep.c: Likewise.
5303 * procfs.c: Likewise.
5304 * regcache.c: Likewise.
5305 * remote.c: Likewise.
5306 * rs6000-tdep.c: Likewise.
5307 * s390-linux-nat.c: Likewise.
5308 * s390-tdep.c: Likewise.
5309 * solib-aix.c: Likewise.
5310 * solib-darwin.c: Likewise.
5311 * solib-dsbt.c: Likewise.
5312 * solib-spu.c: Likewise.
5313 * solib-svr4.c: Likewise.
5314 * solib-target.c: Likewise.
5315 * sparc-tdep.c: Likewise.
5316 * sparc64-tdep.c: Likewise.
5317 * spu-tdep.c: Likewise.
5318 * symfile.c: Likewise.
5319 * symtab.c: Likewise.
5320 * target-descriptions.c: Likewise.
5321 * target-memory.c: Likewise.
5322 * target.c: Likewise.
5323 * target.h: Likewise.
5324 * tracefile-tfile.c: Likewise.
5325 * tracepoint.c: Likewise.
5326 * valops.c: Likewise.
5327 * valprint.c: Likewise.
5328 * value.c: Likewise.
5329 * windows-tdep.c: Likewise.
5330 * mi/mi-main.c: Likewise.
5332 2018-06-07 Tom Tromey <tom@tromey.com>
5334 * valprint.h (build_address_symbolic): Declare.
5335 * printcmd.c (print_address_symbolic): Update.
5336 (build_address_symbolic): Change "name" and "filename" to
5338 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5340 * defs.h (build_address_symbolic): Remove declaration.
5342 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5344 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5345 (aarch64_vnv_type): Add function.
5346 (aarch64_pseudo_register_name): Add V regs for SVE.
5347 (aarch64_pseudo_register_type): Likewise.
5348 (aarch64_pseudo_register_reggroup_p): Likewise.
5349 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5350 (aarch64_pseudo_read_value): Add V regs for SVE.
5351 (aarch64_pseudo_write_2): Use V0 offset for SVE
5352 (aarch64_pseudo_write): Add V regs for SVE.
5353 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5355 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5357 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5358 (sve_vl_from_vq): Likewise.
5360 2018-06-05 Tom Tromey <tom@tromey.com>
5362 * cli/cli-cmds.c (show_version): Update.
5363 * top.c (print_gdb_version): Add "interactive" parameter.
5365 * main.c (captured_main_1): Update.
5366 * top.h (print_gdb_version): Add "interactive" parameter and a
5369 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5371 * common/enum-flags.h: Add trailing semicolon to example in
5374 2018-06-05 Tom Tromey <tom@tromey.com>
5377 * NEWS: Add entry about pager.
5378 * utils.c (pagination_disabled_for_command): New global.
5379 (prompt_for_continue): Allow "c" response to prompt.
5380 (reinitialize_more_filter): Clear
5381 pagination_disabled_for_command.
5382 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5384 2018-06-04 Tom Tromey <tom@tromey.com>
5386 * ada-lang.h (ada_lookup_symbol_list): Update.
5387 * ada-lang.c (resolve_subexp): Update.
5388 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5390 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5391 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5392 results parameter to std::vector.
5393 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5395 * ada-exp.y (block_lookup): Update.
5396 (select_possible_type_sym): Change type of syms. Remove nsyms
5398 (write_var_or_type, write_name_assoc): Update.
5400 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5402 * windows-nat.c (windows_nat_target::xfer_partial): Return
5403 TARGET_XFER_E_IO if we need to delegate to the target beneath
5404 but BENEATH is NULL.
5406 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5408 * Makefile.in (config.status): Add configure.nat as a
5411 2018-06-04 Tom Tromey <tom@tromey.com>
5413 * cp-name-parser.y (cpname_state): Add method declarations.
5414 (HANDLE_QUAL): Update.
5415 (cpname_state::d_grab, cpname_state::fill_comp)
5416 (cpname_state::make_operator, cpname_state::make_dtor)
5417 (cpname_state::make_builtin_type, cpname_state::make_name)
5418 (cpname_state::d_qualify, cpname_state::d_int_type)
5419 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5420 (%union): Move earlier.
5422 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5424 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5426 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5428 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5429 (aarch64_pseudo_write_1): Likewise.
5430 (aarch64_pseudo_read_value): Use helper.
5431 (aarch64_pseudo_write): Likewise.
5433 2018-06-04 Pedro Alves <palves@redhat.com>
5435 * darwin-nat.c (darwin_ops): Delete.
5436 (darwin_attach_pid): Use get_native_target.
5438 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5440 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5441 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5443 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5445 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5446 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5447 (aarch64_gdbarch_init): Check for SVE.
5448 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5450 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5452 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5453 * aarch64-tdep.h (aarch64_read_description): Likewise.
5454 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5455 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5456 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5457 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5458 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5460 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
5462 * value.c (value_fetch_lazy_bitfield): New.
5463 (value_fetch_lazy_memory): New.
5464 (value_fetch_lazy_register): New.
5465 (value_fetch_lazy): Factor out to smaller functions.
5467 2018-06-01 Tom Tromey <tom@tromey.com>
5469 * cp-name-parser.y (backslashable, represented): Now const.
5471 2018-06-01 Tom Tromey <tom@tromey.com>
5473 * cp-name-parser.y: Include parser-defs.h.
5474 (parser_fprintf): Remove declaration.
5476 2018-06-01 Tom Tromey <tom@tromey.com>
5478 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5480 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5481 (global_result): Remove globals.
5482 (struct cpname_state): New.
5483 (yyparse): Don't declare.
5484 (yylex, yyerror): Move declarations after %union.
5485 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5486 (make_name): Add state parameter.
5488 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5490 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5492 (yylex): Add lvalp, state parameters.
5493 (yyerror): Add state parameter.
5494 (cp_demangled_name_to_comp): Update.
5496 2018-06-01 Tom Tromey <tom@tromey.com>
5498 * cp-name-parser.y (parser_fprintf): Declare.
5499 (GDB_YY_REMAP_PREFIX): Define.
5500 Include yy-remap.h. Don't redefine yy* identifiers.
5502 2018-06-01 Tom Tromey <tom@tromey.com>
5504 * python/py-type.c (typy_legacy_template_argument): Update.
5505 * cp-support.h (cp_demangled_name_to_comp): Update.
5506 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5507 parameter to be a "std::string *".
5510 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
5512 * ada-lex.l: Include "diagnostics.h" instead of
5513 "common/diagnostics.h".
5514 * unittests/environ-selftests.c: Likewise.
5515 * common/diagnostics.h: Moved to ../include.
5517 2018-06-01 Joel Brobecker <brobecker@adacore.com>
5519 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5520 to language_mode_manual while calling breakpoint_re_set_one.
5522 2018-06-01 Tom Tromey <tom@tromey.com>
5524 * valops.c (value_cast_structs, destructor_name_p): Update.
5525 * symtab.c (gdb_mangle_name): Update.
5526 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5528 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5529 (pascal_object_print_value_fields, pascal_object_print_value):
5531 * p-typeprint.c (pascal_type_print_derivation_info): Update.
5532 * linespec.c (find_methods): Update.
5533 * gdbtypes.h (type_name_no_tag): Remove.
5534 (type_name_or_error): Rename from type_name_no_tag_or_error.
5535 * gdbtypes.c (type_name_no_tag): Remove.
5536 (type_name_or_error): Rename from type_name_no_tag_or_error.
5537 (lookup_struct_elt_type, check_typedef): Update.
5538 * expprint.c (print_subexp_standard): Update.
5539 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5540 * d-namespace.c (d_lookup_nested_symbol): Update.
5541 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5542 (cp_print_class_member): Update.
5543 * cp-namespace.c (cp_lookup_nested_symbol): Update.
5544 * completer.c (add_struct_fields): Update.
5545 * c-typeprint.c (cp_type_print_derivation_info)
5546 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5548 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5549 (ada_prefer_type, ada_is_exception_sym): Update.
5551 2018-06-01 Tom Tromey <tom@tromey.com>
5553 * valops.c (enum_constant_from_type, value_namespace_elt)
5554 (value_maybe_namespace_elt): Update.
5555 * valarith.c (find_size_for_pointer_math): Update.
5556 * target-descriptions.c (make_gdb_type): Update.
5557 * symmisc.c (print_symbol): Update.
5558 * stabsread.c (define_symbol, read_type)
5559 (complain_about_struct_wipeout, add_undefined_type)
5560 (cleanup_undefined_types_1): Update.
5561 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5562 (rust_range_type_p, val_print_struct, rust_print_struct_def)
5563 (rust_internal_print_type, rust_composite_type)
5564 (rust_evaluate_funcall, rust_evaluate_subexp)
5565 (rust_inclusive_range_type_p): Update.
5566 * python/py-type.c (typy_get_tag): Update.
5567 * p-typeprint.c (pascal_type_print_base): Update.
5568 * mdebugread.c (parse_symbol, parse_type): Update.
5569 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5571 * guile/scm-type.c (gdbscm_type_tag): Update.
5572 * go-lang.c (sixg_string_p): Update.
5573 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5575 * gdbtypes.h (struct main_type) <tag_name>: Remove.
5576 (TYPE_TAG_NAME): Remove.
5577 * gdbtypes.c (type_name_no_tag): Simplify.
5578 (check_typedef, check_types_equal, recursive_dump_type)
5579 (copy_type_recursive, arch_composite_type): Update.
5580 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
5581 in summary mode when needed.
5582 * eval.c (evaluate_funcall): Update.
5583 * dwarf2read.c (fixup_go_packaging, read_structure_type)
5584 (process_structure_scope, read_enumeration_type)
5585 (read_namespace_type, read_module_type, determine_prefix): Update.
5586 * cp-support.c (inspect_type): Update.
5587 * coffread.c (process_coff_symbol, decode_base_type): Update.
5588 * c-varobj.c (c_is_path_expr_parent): Update.
5589 * c-typeprint.c (c_type_print_base_struct_union): Update.
5590 (c_type_print_base_1): Update. Print struct/class/union/enum in
5591 summary when using C language.
5592 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5593 (gen_maybe_namespace_elt): Update.
5594 * ada-lang.c (ada_type_name): Simplify.
5595 (empty_record, ada_template_to_fixed_record_type_1)
5596 (template_to_static_fixed_type)
5597 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5599 2018-06-01 Tom Tromey <tom@tromey.com>
5601 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5603 * c-typeprint.c (c_print_type_1): Add "language" parameter.
5604 (c_print_type): Update.
5605 (c_print_type): New overload.
5606 (c_type_print_varspec_prefix, c_type_print_args)
5607 (c_type_print_varspec_suffix, c_print_type_no_offsets)
5608 (c_type_print_base_struct_union, c_type_print_base_1)
5609 (cp_type_print_method_args): Add "language" parameter.
5610 (c_type_print_base): Update.
5611 * c-lang.h (c_print_type): Add new overload.
5613 2018-06-01 Tom Tromey <tom@tromey.com>
5615 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5616 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5618 2018-06-01 Alan Hayward <alan.hayward@arm.com>
5620 * aarch64-tdep.c (aarch64_sve_register_names): New const
5622 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5623 (AARCH64_SVE_Z_REGS_NUM): New define.
5624 (AARCH64_SVE_P_REGS_NUM): Likewise.
5625 (AARCH64_SVE_NUM_REGS): Likewise.
5627 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5629 * nat/linux-ptrace.h [__alpha__]
5630 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5633 2018-05-31 Maciej W. Rozycki <macro@mips.com>
5635 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5636 the endianness selected.
5637 * NEWS: Document `set endian auto' mode operation update.
5639 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5641 * Makefile.in: Add new header.
5642 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5643 (sve_vl_from_vg): Likewise.
5644 (sve_vq_from_vl): Likewise.
5645 (sve_vl_from_vq): Likewise.
5646 (sve_vq_from_vg): Likewise.
5647 (sve_vg_from_vq): Likewise.
5648 * configure.nat: Add new c file.
5649 * nat/aarch64-sve-linux-ptrace.c: New file.
5650 * nat/aarch64-sve-linux-ptrace.h: New file.
5652 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5654 * aarch64-linux-nat.c (aarch64_linux_read_description):
5656 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5658 * aarch64-tdep.c (tdesc_aarch64_list): Add.
5659 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5660 (aarch64_gdbarch_init): Add parmeter zero.
5661 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5662 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5663 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5665 * doc/gdb.texinfo: Describe SVE feature
5666 * features/aarch64-sve.c: New file.
5668 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5671 * gdbarch.sh (significant_addr_bit): Default to zero when
5672 not set by target architecture.
5673 * gdbarch.c: Re-generated.
5674 * utils.c (address_significant): Update.
5676 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5678 * stack.c (func_command): Remove trailing newline in call to error.
5680 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5682 * regcache.h (regcache_raw_collect): Remove, update callers to
5683 use regcache::raw_collect.
5684 * regcache.c (regcache_raw_collect): Remove.
5686 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5688 * regcache.h (regcache_raw_supply): Remove, update callers to
5689 use detached_regcache::raw_supply.
5690 * regcache.c (regcache_raw_supply): Remove.
5692 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5694 * regcache.h (regcache_cooked_write_part): Remove, update
5695 callers to use regcache::cooked_write_part.
5696 * regcache.c (regcache_cooked_write_part): Remove.
5698 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5700 * regcache.h (regcache_cooked_read_part): Remove, update callers
5701 to use readable_regcache::cooked_read_part.
5702 * regcache.c (regcache_cooked_read_part): Remove.
5704 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5706 * regcache.h (regcache_cooked_read_value): Remove, update
5707 callers to use readable_regcache::cooked_read_value.
5708 * regcache.c (regcache_cooked_read_value): Remove.
5710 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5712 * regcache.h (regcache_cooked_write): Remove, update callers to
5713 use regcache::cooked_write.
5714 * regcache.c (regcache_cooked_write): Remove.
5716 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5718 * regcache.h (regcache_invalidate): Remove, update callers to
5719 use detached_regcache::invalidate instead.
5720 * regcache.c (regcache_invalidate): Remove.
5722 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5724 * regcache.h (regcache_raw_write_part): Remove, update callers
5725 to use regcache::raw_write_part instead.
5726 * regcache.c (regcache_raw_write_part): Remove.
5728 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5730 * regcache.h (regcache_raw_read_part): Remove, update callers to
5731 use readable_regcache::raw_read_part instead.
5732 * regcache.c (regcache_raw_read_part): Remove.
5734 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5736 * regcache.h (regcache_cooked_read): Remove, update callers to
5737 use readable_regcache::cooked_read instead.
5738 * regcache.c (regcache_cooked_read): Remove.
5740 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5742 * regcache.h (regcache_raw_write): Remove, update callers to use
5743 regcache::raw_write instead.
5744 * regcache.c (regcache_raw_write): Remove.
5746 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5748 * regcache.h (regcache_raw_read): Remove, update callers to use
5749 readable_regcache::raw_read instead.
5750 * regcache.c (regcache_raw_read): Remove.
5752 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5754 * regcache.h (regcache_raw_update): Remove, update callers to
5755 use readable_regcache::raw_update instead.
5756 * regcache.c (regcache_raw_update): Remove.
5758 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5760 * regcache.h (regcache_register_status): Remove, update callers
5761 to use reg_buffer::get_register_status directly instead.
5762 * regcache.c (regcache_register_status): Remove.
5764 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5766 * regcache.h (regcache_get_ptid): Remove, update all callers to
5767 call regcache::ptid instead.
5768 * regcache.c (regcache_get_ptid): Remove.
5770 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5772 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5774 2018-05-30 Pedro Alves <palves@redhat.com>
5776 * common/common-exceptions.h (exception_rethrow): Use
5779 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5781 * breakpoint.c (print_solib_event, check_status_catch_solib):
5782 Remove struct keyword in range-based for loops.
5783 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5784 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5786 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5788 * symfile.c (addr_info_make_relative): Likewise.
5789 * thread.c (value_in_thread_stack_temporaries): Likewise.
5791 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5794 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5795 aggregate type to get its real type before accessing it.
5797 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5799 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5800 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5801 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5802 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5803 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5804 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5805 * printcmd.c (info_address_command): Likewise.
5807 2018-05-29 Tom Tromey <tom@tromey.com>
5809 * windows-nat.c (handle_exception): Update fall-through comment.
5811 2018-05-29 Tom Tromey <tom@tromey.com>
5813 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5814 (struct program_space) <added_solibs>: Now a std::vector.
5815 * breakpoint.c (print_solib_event): Update.
5816 (check_status_catch_solib): Update.
5817 * progspace.c (clear_program_space_solib_cache): Update.
5818 * solib.c (update_solib_list): Update.
5820 2018-05-29 Tom Tromey <tom@tromey.com>
5822 * python/py-type.c (typy_richcompare): Update.
5823 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5824 * gdbtypes.h (types_deeply_equal): Return bool.
5825 (types_equal): Likewise.
5826 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5828 (check_types_equal): Change worklist to std::vector. Return
5830 (struct type_equality_entry): Add constructor.
5831 (compare_maybe_null_strings): Return bool.
5832 (check_types_worklist): Return bool. Change worklist to
5834 (types_deeply_equal): Use std::vector.
5835 (types_equal): Return bool.
5836 (compare_maybe_null_strings): Simplify.
5838 2018-05-29 Tom Tromey <tom@tromey.com>
5840 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5842 2018-05-29 Tom Tromey <tom@tromey.com>
5844 * objc-lang.h: Don't include cp-support.h.
5845 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5848 2018-05-27 Tom Tromey <tom@tromey.com>
5850 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5852 2018-05-25 Tom Tromey <tom@tromey.com>
5854 * value.c (value::location): Initialize.
5856 2018-05-25 Tom Tromey <tom@tromey.com>
5858 * dbxread.c (init_bincl_list): Remove.
5859 (bincl_list): Now a std::vector.
5860 (bincls_allocated, next_bincl): Remove.
5861 (free_bincl_list, do_free_bincl_list_cleanup)
5862 (make_cleanup_free_bincl_list): Remove.
5863 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5865 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5866 (struct header_file_location): Add constructor.
5867 (add_bincl_to_list): Remove.
5869 2018-05-25 Tom Tromey <tom@tromey.com>
5871 * tui/tui.c (tui_enable): Update.
5872 * mi/mi-interp.c (mi_interp::init): Update.
5873 * interps.h (class interp) <name>: New method.
5874 <m_name>: Rename from name.
5875 (~scoped_restore_interp): Update.
5876 * interps.c (interp::interp): Update.
5877 (interp_add, interp_set, interp_lookup_existing)
5878 (current_interp_named_p): Update.
5880 2018-05-25 Tom Tromey <tom@tromey.com>
5882 * interps.c (interp_name): Remove.
5883 * mi/mi-interp.c (mi_interp::init): Update.
5884 * interps.h (interp_name): Remove.
5885 (~scoped_restore_interp): Update.
5886 * tui/tui.c (tui_enable): Update.
5888 2018-05-25 Tom Tromey <tom@tromey.com>
5890 * utils.c (fputs_maybe_filtered): Update.
5891 * linespec.c (decode_line_full): Update.
5892 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5893 (mi_print_breakpoint_for_event, mi_solib_loaded)
5894 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5895 (mi_user_selected_context_changed): Update.
5896 * mi/mi-main.c (mi_execute_command): Update.
5897 * cli/cli-script.c (execute_control_command): Update.
5898 * python/python.c (execute_gdb_command): Update.
5899 * solib.c (info_sharedlibrary_command): Update.
5900 * interps.c (interp_ui_out): Remove.
5901 * interps.h (interp_ui_out): Remove.
5903 2018-05-25 Tom Tromey <tom@tromey.com>
5905 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5906 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5907 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5909 2018-05-25 Tom Tromey <tom@tromey.com>
5911 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5912 * interps.c (interp_exec): Use scoped_restore.
5914 2018-05-25 Tom Tromey <tom@tromey.com>
5916 * remote.c (remote_target::remote_file_get): Use
5918 (remote_target::remote_file_put): Likewise.
5920 2018-05-25 Tom Tromey <tom@tromey.com>
5922 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5924 (get_pe_section_index, add_pe_exported_sym): Update.
5925 (read_pe_exported_syms): Use gdb::def_vector.
5927 2018-05-25 Tom Tromey <tom@tromey.com>
5929 * frame.c (remove_prev_frame): Remove.
5930 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5932 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5934 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5936 * mips-linux-nat.c (supply_fpregset): Always call
5937 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5938 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5939 `mips_fill_fpregset'.
5940 * mips-linux-tdep.c (mips_supply_fpregset)
5941 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5942 (mips_fill_fpregset_wrapper): Remove functions.
5943 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5944 (mips_linux_fpregset): Remove variable.
5945 (mips_linux_iterate_over_regset_sections): Use
5946 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5947 (mips_linux_o32_sigframe_init): Remove comment.
5949 2018-05-25 Pedro Alves <palves@redhat.com>
5951 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5952 (struct readahead_cache, struct packet_reg, struct
5953 remote_arch_state, class remote_state): Move higher up in the
5955 (remote_target::m_remote_state): Now an object instead of a pointer.
5956 (remote_target::get_remote_state): Adjust.
5958 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5960 * stack.c (select_and_print_frame): Delete.
5961 (struct function_bounds): Move struct within function.
5962 (func_command): Most content moved into new function
5963 find_frame_for_function, use new function, print result, add
5965 (find_frame_for_function): New function, now returns a result.
5967 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5969 * stack.c (iterate_over_block_arg_vars): Fix comment.
5970 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5972 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5976 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5978 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5980 * frame.h (class scoped_restore_selected_frame): New class.
5981 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5982 of any exception, use scoped_restore_selected_frame to restore the
5985 2018-05-24 Pedro Alves <palves@redhat.com>
5987 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5990 2018-05-23 Tom Tromey <tom@tromey.com>
5992 * complaints.c (struct complaints): Remove.
5993 (symfile_complaint_book): Remove.
5994 (series): New global.
5995 (complaint_internal): Update.
5996 (clear_complaints): Update.
5998 2018-05-23 Tom Tromey <tom@tromey.com>
6000 * complaints.c (counters): New global.
6001 (struct complain): Remove.
6002 (struct complaints) <root>: Remove.
6003 (complaint_sentinel): Remove.
6004 (symfile_complaint_book): Update.
6005 (find_complaint) Remove.
6006 (complaint_internal, clear_complaints): Update.
6008 2018-05-23 Tom Tromey <tom@tromey.com>
6010 * complaints.c (struct complain) <file, line>: Remove.
6011 (find_complaint): Remove file, line parameters.
6012 (complaint_internal): Update.
6014 2018-05-23 Tom Tromey <tom@tromey.com>
6016 * complaints.c (vcomplaint): Remove.
6017 (complaint_internal) Merge in contents of vcomplaint.
6019 2018-05-23 Tom Tromey <tom@tromey.com>
6021 * complaints.c (struct complaints) <explanation>: Remove.
6022 (symfile_explanations): Remove.
6023 (symfile_complaint_book): Update.
6024 (vcomplaint): Update.
6025 (struct explanation): Remove.
6027 2018-05-23 Tom Tromey <tom@tromey.com>
6029 * complaints.c (symfile_complaints): Remove.
6030 (complaint_internal): Remove "complaints" parameter.
6031 (clear_complaints, vcomplaint): Remove "c" parameter.
6032 (get_complaints): Remove.
6033 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6034 (dwarf2_debug_line_missing_file_complaint)
6035 (dwarf2_debug_line_missing_end_sequence_complaint)
6036 (dwarf2_complex_location_expr_complaint)
6037 (dwarf2_const_value_length_mismatch_complaint)
6038 (dwarf2_section_buffer_overflow_complaint)
6039 (dwarf2_macro_malformed_definition_complaint)
6040 (dwarf2_invalid_attrib_class_complaint)
6041 (create_addrmap_from_index, dw2_symtab_iter_next)
6042 (dw2_expand_marked_cus)
6043 (dw2_debug_names_iterator::find_vec_in_debug_names)
6044 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6045 (create_debug_type_hash_table, init_cutu_and_read_dies)
6046 (partial_die_parent_scope, add_partial_enumeration)
6047 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6048 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6049 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6050 (create_cus_hash_table, create_dwp_hash_table)
6051 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6052 (dwarf2_rnglists_process, dwarf2_ranges_process)
6053 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6054 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6055 (handle_struct_member_die, process_structure_scope)
6056 (read_array_type, read_common_block, read_module_type)
6057 (read_tag_pointer_type, read_typedef, read_base_type)
6058 (read_subrange_type, load_partial_dies, partial_die_info::read)
6059 (partial_die_info::read, partial_die_info::read)
6060 (partial_die_info::read, read_checked_initial_length_and_offset)
6061 (dwarf2_string_attr, read_formatted_entries)
6062 (dwarf_decode_line_header)
6063 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6064 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6065 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6066 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6067 (get_signatured_type, get_DW_AT_signature_type)
6068 (decode_locdesc, file_file_name, consume_improper_spaces)
6069 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6070 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6071 (dwarf2_symbol_mark_computed, set_die_type)
6072 (read_attribute_value): Update.
6073 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6075 * dbxread.c (unknown_symtype_complaint)
6076 (lbrac_mismatch_complaint, repeated_header_complaint)
6077 (set_namestring, function_outside_compilation_unit_complaint)
6078 (read_dbx_symtab, process_one_symbol): Update.
6079 * gdbtypes.c (stub_noname_complaint): Update.
6080 * windows-nat.c (handle_unload_dll): Update.
6081 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6082 (decode_base_type): Update.
6083 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6084 (eb_complaint, record_include_begin, record_include_end)
6085 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6086 (process_xcoff_symbol, read_symbol)
6087 (function_outside_compilation_unit_complaint)
6088 (scan_xcoff_symtab): Update.
6089 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6090 * buildsym.c (finish_block_internal, make_blockvector)
6091 (end_symtab_get_static_block, augment_type_symtab): Update.
6092 * dtrace-probe.c (dtrace_process_dof)
6093 (dtrace_static_probe_ops::get_probes): Update.
6094 * complaints.h (struct complaint): Don't declare.
6095 (symfile_complaints): Remove.
6096 (complaint_internal): Remove "complaints" parameter.
6097 (complaint): Likewise.
6098 (clear_complaints): Likewise.
6099 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6100 (reread_symbols): Update.
6101 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6102 (dwarf2_frame_cache, decode_frame_entry): Update.
6103 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6104 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6105 (info_selectors_command): Update.
6106 * macrotab.c (macro_include, check_for_redefinition)
6107 (macro_undef): Update.
6108 * objfiles.c (filter_overlapping_sections): Update.
6109 * stabsread.c (invalid_cpp_abbrev_complaint)
6110 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6111 (define_symbol, error_type, read_type, rs6000_builtin_type)
6112 (stabs_method_name_from_physname, read_member_functions)
6113 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6114 (attach_fields_to_type, complain_about_struct_wipeout)
6115 (read_range_type, read_args, common_block_start)
6116 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6118 * mdebugread.c (index_complaint, unknown_ext_complaint)
6119 (basic_type_complaint, bad_tag_guess_complaint)
6120 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6121 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6122 (parse_procedure, parse_lines)
6123 (function_outside_compilation_unit_complaint)
6124 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6125 (bad_tag_guess_complaint, reg_value_complaint): Update.
6126 * cp-support.c (demangled_name_complaint): Update.
6127 * macroscope.c (sal_macro_scope): Update.
6128 * dwarf-index-write.c (class debug_names): Update.
6130 2018-05-23 Tom Tromey <tom@tromey.com>
6132 * complaints.c (clear_complaints): Remove "noisy" parameter.
6133 * complaints.h (clear_complaints): Update.
6134 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6135 (reread_symbols): Update.
6137 2018-05-23 Tom Tromey <tom@tromey.com>
6139 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6141 (vcomplaint, clear_complaints): Update.
6142 (symfile_explanations): Remove some messages.
6144 2018-05-23 Tom Tromey <tom@tromey.com>
6146 * complaints.c (internal_complaint): Remove.
6147 * complaints.h (internal_complaint): Remove.
6149 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6151 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6153 2018-05-22 Pedro Alves <palves@redhat.com>
6155 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6156 (remote_fileio_badfd, remote_fileio_return_errno)
6157 (remote_fileio_return_success, remote_fileio_func_open)
6158 (remote_fileio_func_open, remote_fileio_func_close)
6159 (remote_fileio_func_read, remote_fileio_func_write)
6160 (remote_fileio_func_lseek, remote_fileio_func_rename)
6161 (remote_fileio_func_unlink, remote_fileio_func_stat)
6162 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6163 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6164 remote_target parameter.
6165 (remote_fio_func_map) <func>: Add remote_target parameter.
6166 (do_remote_fileio_request, remote_fileio_request):
6167 * remote-fileio.h (remote_fileio_request):
6168 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6169 remote_target parameter.
6170 (remote_notif_process, handle_notification): Adjust to pass down
6172 (remote_notif_state_allocate): Add remote_target parameter. Save
6174 * remote-notif.h (struct remote_target): Forward declare.
6175 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6176 remote_target parameter.
6177 (struct remote_notif_state) <remote>: New field.
6178 (remote_notif_ack, remote_notif_parse): Add remote_target
6180 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6181 remote_target parameter.
6182 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6183 (threads_listing_context, rmt_thread_action, protocol_feature)
6184 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6185 (packet_result, struct threads_listing_context, remote_state):
6186 Move definitions and declarations higher up.
6187 (remote_target) <~remote_target>: Declare.
6188 (remote_download_command_source, remote_file_put, remote_file_get)
6189 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6190 (remote_hostio_pread_vFile, remote_hostio_send_command)
6191 (remote_hostio_set_filesystem, remote_hostio_open)
6192 (remote_hostio_close, remote_hostio_unlink, remote_state)
6193 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6194 (get_memory_write_packet_size, get_memory_read_packet_size)
6195 (append_pending_thread_resumptions, remote_detach_1)
6196 (append_resumption, remote_resume_with_vcont)
6197 (add_current_inferior_and_thread, wait_ns, wait_as)
6198 (process_stop_reply, remote_notice_new_inferior)
6199 (process_initial_stop_replies, remote_add_thread)
6200 (btrace_sync_conf, remote_btrace_maybe_reopen)
6201 (remove_new_fork_children, kill_new_fork_children)
6202 (discard_pending_stop_replies, stop_reply_queue_length)
6203 (check_pending_events_prevent_wildcard_vcont)
6204 (discard_pending_stop_replies_in_queue, stop_reply)
6205 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6206 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6207 (remote_interrupt_as, remote_interrupt_ns)
6208 (remote_get_noisy_reply, remote_query_attached)
6209 (remote_add_inferior, remote_current_thread, get_current_thread)
6210 (set_thread, set_general_thread, set_continue_thread)
6211 (set_general_process, write_ptid)
6212 (remote_unpack_thread_info_response, remote_get_threadinfo)
6213 (parse_threadlist_response, remote_get_threadlist)
6214 (remote_threadlist_iterator, remote_get_threads_with_ql)
6215 (remote_get_threads_with_qxfer)
6216 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6217 (get_offsets, remote_check_symbols, remote_supported_packet)
6218 (remote_query_supported, remote_packet_size)
6219 (remote_serial_quit_handler, remote_detach_pid)
6220 (remote_vcont_probe, remote_resume_with_hc)
6221 (send_interrupt_sequence, interrupt_query)
6222 (remote_notif_get_pending_events, fetch_register_using_p)
6223 (send_g_packet, process_g_packet, fetch_registers_using_g)
6224 (store_register_using_P, store_registers_using_G)
6225 (set_remote_traceframe, check_binary_download)
6226 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6227 (remote_xfer_live_readonly_partial, remote_read_bytes)
6228 (remote_send_printf, remote_flash_write, readchar)
6229 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6230 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6231 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6232 (extended_remote_disable_randomization, extended_remote_run)
6233 (send_environment_packet, extended_remote_environment_support)
6234 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6235 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6236 (packet_command): Now methods of ...
6237 (remote_target): ... this class.
6238 (m_remote_state) <remote_target>: New field.
6239 (struct remote_state) <stop_reply_queue,
6240 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6242 (remote_state::remote_state): Allocate stop_reply_queue.
6243 (remote_state): Delete global.
6244 (get_remote_state_raw): Delete.
6245 (remote_target::get_remote_state): Allocate m_remote_state on
6247 (get_current_remote_target): New.
6248 (remote_ops, extended_remote_ops): Delete.
6249 (wait_forever_enabled_p, remote_async_inferior_event_token):
6250 Delete, moved to struct remote_state.
6251 (remote_target::close): Delete self. Destruction bits split to
6253 (remote_target::~remote_target): ... this.
6254 (show_memory_packet_size): Adjust to use
6255 get_current_remote_target.
6256 (struct protocol_feature) <func>: Add remote_target parameter.
6257 All callers adjusted.
6258 (curr_quit_handler_target): New.
6259 (remote_serial_quit_handler): Reimplement.
6260 (remote_target::open_1): Adjust to use get_current_remote_target.
6261 Heap-allocate remote_target/extended_remote_target instances.
6262 (vcont_builder::vcont_builder): Add remote_target parameter, and
6263 save it in m_remote. All callers adjusted.
6264 (vcont_builder::m_remote): New field.
6265 (vcont_builder::restart, vcont_builder::flush)
6266 (vcont_builder::push_action): Use it.
6267 (remote_target::commit_resume): Use it.
6268 (struct queue_iter_param) <remote>: New field.
6269 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6270 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6271 (check_pending_event_prevents_wildcard_vcont_callback)
6272 (remote_target::check_pending_events_prevent_wildcard_vcont)
6273 (remote_target::discard_pending_stop_replies)
6274 (remote_target::discard_pending_stop_replies_in_queue)
6275 (remote_target::remote_notif_remove_queued_reply): Fill in
6277 (remote_notif_get_pending_events): New.
6278 (remote_target::readchar, remote_target::remote_serial_write):
6279 Save/restore curr_quit_handler_target.
6281 (kill_new_fork_children): Fill in 'remote' field.
6282 (packet_command): Use get_current_remote_target, defer to
6283 remote_target method of same name.
6284 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6285 parameter, and save it in m_remote. All callers adjusted.
6286 (scoped_remote_fd::release): Use m_remote.
6287 (scoped_remote_fd::m_remote): New field.
6288 (remote_file_put, remote_file_get, remote_file_delete): Use
6289 get_current_remote_target, defer to remote_target method of same
6291 (remote_btrace_reset): Add remote_state paremeter. Update all
6293 (remote_async_inferior_event_handler). Pass down 'data'.
6294 (remote_new_objfile): Use get_current_remote_target.
6295 (remote_target::vcont_r_supported): New.
6296 (set_range_stepping): Use get_current_remote_target and
6297 remote_target::vcont_r_supported.
6298 (_initialize_remote): Don't allocate 'remote_state' and
6299 'stop_reply_queue' globals.
6300 * remote.h (struct remote_target): Forward declare.
6301 (getpkt, putpkt, remote_notif_get_pending_events): Add
6302 'remote_target' parameter.
6304 2018-05-22 Pedro Alves <palves@redhat.com>
6306 * remote.c (vcont_builder): Now a class. Make all data members
6308 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6310 (vcont_builder_restart): Rename to ...
6311 (vcont_builder::restart): ... this.
6312 (vcont_builder_flush): Rename to ...
6313 (vcont_builder::flush): ... this.
6314 (vcont_builder_push_action): Rename to ...
6315 (vcont_builder::push_action): ... this.
6316 (remote_target::commit_resume): Adjust.
6318 2018-05-22 Pedro Alves <palves@redhat.com>
6320 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6321 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6322 (get_fixed_memory_packet_size): New.
6323 (get_memory_packet_size): Use it.
6324 (set_memory_packet_size): Don't override the config size with
6325 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6326 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6327 Don't refer to get_memory_packet_size if not connected to a remote
6328 target. Show "(default)" if configured size is 0.
6330 2018-05-22 Pedro Alves <palves@redhat.com>
6332 * remote.c (remote_target::mourn_inferior): Move
6333 discard_pending_stop_replies call here from ...
6334 (_initialize_remote): ... here.
6336 2018-05-22 Pedro Alves <palves@redhat.com>
6338 * remote.c (compare_section_command): Remove set_general_process
6341 2018-05-22 Pedro Alves <palves@redhat.com>
6343 * remote.c (struct packet_reg, struct remote_arch_state):
6344 Move higher up in the file.
6345 (remote_state) <m_arch_states>: Store remote_arch_state values
6346 instead of remote_arch_state pointers.
6347 (remote_state::get_remote_arch_state): Adjust.
6349 2018-05-22 Pedro Alves <palves@redhat.com>
6351 * remote.c: Include <unordered_map>.
6352 (remote_state): Now a class.
6353 (remote_state) <get_remote_arch_state>: Declare method.
6354 <get_remote_arch_state>: New field.
6355 (remote_arch_state) <remote_arch_state>: Declare ctor.
6356 <regs>: Now a unique_ptr.
6357 (remote_gdbarch_data_handle): Delete.
6358 (get_remote_arch_state): Delete.
6359 (remote_state::get_remote_arch_state): New.
6360 (get_remote_state): Adjust to call remote_state's
6361 get_remote_arch_state method.
6362 (init_remote_state): Delete, bits factored out to ...
6363 (remote_arch_state::remote_arch_state): ... this new method.
6364 (get_remote_packet_size, get_memory_packet_size)
6365 (process_g_packet, remote_target::fetch_registers)
6366 (remote_target::prepare_to_store, store_registers_using_G)
6367 (remote_target::store_registers, remote_target::get_trace_status):
6368 Adjust to call remote_state's method.
6369 (_initialize_remote): Remove reference to
6370 remote_gdbarch_data_handle.
6372 2018-05-22 Pedro Alves <palves@redhat.com>
6374 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6375 pread>: New method declarations.
6376 (remote_target::open_1): Adjust.
6377 (readahead_cache_invalidate): Rename to ...
6378 (readahead_cache::invalidate): ... this, and adjust to be a class
6380 (readahead_cache_invalidate_fd): Rename to ...
6381 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6383 (remote_hostio_pwrite): Adjust.
6384 (remote_hostio_pread_from_cache): Rename to ...
6385 (readahead_cache::pread): ... this, and adjust to be a class
6387 (remote_hostio_close): Adjust.
6389 2018-05-22 Pedro Alves <palves@redhat.com>
6391 * remote.c (remote_hostio_close_cleanup): Delete.
6392 (class scoped_remote_fd): New.
6393 (remote_file_put, remote_file_get): Use it.
6395 2018-05-22 Pedro Alves <palves@redhat.com>
6397 (struct vCont_action_support): Use bool and initialize all fields.
6398 (struct readahead_cache): Initialize all fields.
6399 (remote_state): Use bool and initialize all fields.
6400 (remote_state::remote_state, remote_state::~remote_state): New.
6401 (new_remote_state): Delete.
6402 (_initialize_remote): Use new to allocate remote_state.
6404 2018-05-22 Pedro Alves <palves@redhat.com>
6408 * c-exp.y: Include "c-support.h".
6409 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6410 of tolower. Use c_ident_is_alpha to scan names.
6411 * c-lang.c: Include "c-support.h".
6412 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6413 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6414 * c-support.h: New file, with bits factored out from ...
6415 * cp-name-parser.y: ... this file.
6416 Include "c-support.h".
6417 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6418 c-support.h and renamed.
6419 (symbol_end, yylex): Adjust.
6421 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6423 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6424 parameter type to CORE_ADDR.
6425 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6426 parameter type in declaration to CORE_ADDR.
6427 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6428 target_auxv_search to get AT_HWCAP and use the result to get the
6430 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6431 to CORE_ADDR. Remove the cast of the return value to unsigned
6432 long. Fix error predicate of target_auxv_search.
6433 (ppc_linux_nat_target::read_description): Change the type of the
6434 hwcap variable to CORE_ADDR.
6436 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6438 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6439 if the size of fpscr is larger than 32 bits.
6441 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6443 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6444 (ppc32_linux_vsxregmap): New global.
6445 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6446 regcache_supply_regset, and regcache_collect_regset.
6447 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6448 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6449 (fetch_vsx_register, store_vsx_register): Remove.
6450 (fetch_vsx_registers): Add regno parameter. Get regset using
6451 ppc_linux_vsxregset. Use regset to supply registers.
6452 (store_vsx_registers): Add regno parameter. Get regset using
6453 ppc_linux_vsxregset. Use regset to collect registers.
6454 (fetch_register): Call fetch_vsx_registers instead of
6456 (store_register): Call store_vsx_registers instead of
6458 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6459 new regno parameter.
6460 (store_ppc_registers): Call store_vsx_registers with -1 for the
6461 new regno parameter.
6462 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6463 (ppc_collect_vsxregset): Remove.
6465 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6467 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6469 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6470 for vector register offset fields.
6471 (ppc64_fbsd_reg_offsets): Likewise.
6472 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6473 to vector register offset fields.
6474 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6475 to vector register offset fields.
6476 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6477 vector register offset fields.
6478 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6479 initializers for vector register offset fields.
6480 (rs6000_aix64_reg_offsets): Likewise.
6481 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6482 (ppc_supply_vrregset): Remove.
6483 (ppc_collect_vrregset): Remove.
6484 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6485 (ppc_linux_vrregset) : New function.
6486 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6487 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6488 (ppc32_linux_vrregset): Remove.
6489 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6490 and use result instead of ppc32_linux_vrregset.
6491 (ppc32_linux_reg_offsets): Remove initializers for vector register
6493 (ppc64_linux_reg_offsets): Likewise.
6494 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6495 * ppc-linux-nat.c: Include regset.h.
6496 (gdb_vrregset_t): Adjust comment to account for little-endian
6498 (supply_vrregset, fill_vrregset): Remove.
6499 (fetch_altivec_register, store_altivec_register): Remove.
6500 (fetch_altivec_registers): Add regno parameter. Get regset using
6501 ppc_linux_vrregset. Use regset to supply registers.
6502 (store_altivec_registers): Add regno parameter. Get regset using
6503 ppc_linux_vrregset. Use regset to collect registers.
6504 (fetch_register): Call fetch_altivec_registers instead of
6505 fetch_altivec_register.
6506 (store_register): Call store_altivec_registers instead of
6507 store_altivec_register.
6508 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6509 the new regno parameter.
6510 (store_ppc_registers): Call store_altivec_registers with -1 for
6511 the new regno parameter.
6513 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6515 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6516 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6517 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6518 (gdb_vrregset_t): Change array type size to
6519 PPC_LINUX_SIZEOF_VRREGSET.
6520 (gdb_vsxregset_t): Change array type size to
6521 PPC_LINUX_SIZEOF_VSXREGSET.
6522 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6523 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6524 PPC_LINUX_SIZEOF_VSXREGSET.
6526 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6528 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6529 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6531 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6532 ppc_linux_target_wordsize with tid.
6533 (ppc_linux_nat_target::read_description): Call ppc_linux_target
6535 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6536 (ppc64_64bit_inferior_p): Add static and inline specifiers.
6537 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6538 tid parameter. Remove static specifier.
6539 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6540 (ppc_linux_target_wordsize): New declaration.
6542 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6544 * arch/ppc-linux-common.c: New file.
6545 * arch/ppc-linux-common.h: New file.
6546 * arch/ppc-linux-tdesc.h: New file.
6547 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6548 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6549 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6550 arch/ppc-linux-tdesc.h.
6551 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6552 arch/ppc-linux-tdesc.h.
6553 (ppc_linux_nat_target::read_description): Remove target
6554 description matching code. Fill a ppc_linux_features struct and
6555 call ppc_linux_match_description with it. Move comment about ISA
6556 2.05 to ppc-linux-common.c.
6557 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6558 arch/ppc-linux-tdesc.h.
6559 (ppc_linux_core_read_description): Remove target description
6560 matching code. Fill a ppc_linux_features struct and call
6561 ppc_linux_match_description with it.
6562 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6563 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6564 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6565 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6566 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6567 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6568 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6569 (tdesc_powerpc_e500l): Remove.
6571 2018-05-22 Joel Brobecker <brobecker@adacore.com>
6573 * ada-lang.c (catch_assert_command): Pass empty string instead
6574 of NULL for excep_string argument.
6576 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6578 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6579 the width of the requested register exceeds the width of the
6582 2018-05-21 Tom Tromey <tom@tromey.com>
6584 * printcmd.c (output_command): Remove.
6585 (output_command_const): Rename to output_command.
6586 * valprint.h (output_command): Rename from output_command_const.
6587 * tracepoint.c (trace_dump_actions): Call output_command.
6589 2018-05-21 Tom Tromey <tom@tromey.com>
6591 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6592 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6593 * ada-lang.h (create_ada_exception_catchpoint): Update.
6594 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6596 (create_excep_cond_exprs, ~ada_catchpoint)
6597 (should_stop_exception, print_one_exception)
6598 (print_mention_exception, print_recreate_exception): Update.
6599 (ada_get_next_arg): Remove.
6600 (catch_ada_exception_command_split): Use std::string. Change type
6601 of "excep_string", "cond_string".
6602 (catch_ada_exception_command): Update.
6603 (create_ada_exception_catchpoint): Change type of excep_string.
6604 (ada_exception_sal): Remove excep_string parameter.
6605 (~ada_catchpoint): Remove.
6607 2018-05-21 Tom Tromey <tom@tromey.com>
6609 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6612 2018-05-21 Tom Tromey <tom@tromey.com>
6614 * ada-lang.c (ada_exception_message_1, ada_exception_message):
6615 Return unique_xmalloc_ptr.
6616 (print_it_exception): Update.
6618 2018-05-21 Tom Tromey <tom@tromey.com>
6620 * tracepoint.c (trace_dump_actions): Use std::string.
6622 2018-05-21 Tom Tromey <tom@tromey.com>
6624 * symfile.c (reread_symbols): Use std::string for original_name.
6626 2018-05-21 Tom Tromey <tom@tromey.com>
6628 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6629 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
6632 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
6634 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6636 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6637 * objfiles.c (get_objfile_bfd_data): Allocate
6638 objfile_per_bfd_storage with obstack_new when allocating on
6641 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6643 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6645 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6646 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6647 * mdebugread.c (mdebug_build_psymtabs): Likewise.
6648 (add_pending): Likewise.
6649 (parse_symbol): Likewise.
6650 (parse_partial_symbols): Likewise.
6651 (psymtab_to_symtab_1): Likewise.
6652 (new_psymtab): Likewise.
6653 (elfmdebug_build_psymtabs): Likewise.
6654 * minsyms.c (terminate_minimal_symbol_table): Likewise.
6655 * objfiles.c (get_objfile_bfd_data): Likewise.
6656 (objfile_register_static_link): Likewise.
6657 * psymtab.c (allocate_psymtab): Likewise.
6658 * stabsread.c (read_member_functions): Likewise.
6659 * xcoffread.c (xcoff_end_psymtab): Likewise.
6661 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6663 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6664 compiler supports std::is_trivially_constructible.
6665 * common/poison.h: Include obstack.h.
6666 (IsMallocable): Define to is_trivially_constructible if the
6667 compiler supports it, define to true_type otherwise.
6671 (XOBNEWVEC): Redefine.
6672 * gdb_obstack.h (obstack_zalloc): New.
6673 (OBSTACK_ZALLOC): Redefine.
6674 (obstack_calloc): New.
6675 (OBSTACK_CALLOC): Redefine.
6677 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6678 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6680 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6681 obstack_calloc/obstack_zalloc.
6682 (gdbarch_obstack_zalloc): Remove.
6683 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6685 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6687 * stack.c (backtrace_command_1): Remove useless variable int i.
6689 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6691 * stack.c (print_frame_info): Fix comment.
6693 2018-05-18 Tom Tromey <tom@tromey.com>
6695 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6696 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6697 (~dwarf2_per_objfile): Update
6698 (dwarf2_get_dwz_file): Use new.
6699 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6702 2018-05-18 Tom Tromey <tom@tromey.com>
6704 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6706 * dwarf2read.c (struct dwp_file): Add constructor and
6708 (open_and_init_dwp_file): Return a unique_ptr.
6709 (dwarf2_per_objfile, create_dwp_hash_table)
6710 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6711 (lookup_dwo_unit_in_dwp): Update.
6712 (open_and_init_dwp_file, get_dwp_file): Update.
6714 2018-05-18 Tom Tromey <tom@tromey.com>
6716 * dwarf2read.c (dwarf2_per_objfile): Update.
6717 (struct mapped_index): Add initializers.
6718 (dwarf2_read_index): Use new.
6719 (dw2_symtab_iter_init): Update.
6720 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6723 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6725 * dwarf2read.c (mapped_index) <total_size>: Remove.
6727 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6729 * unittests/format_pieces-selftests.c (test_format_specifier):
6732 2018-05-18 Tom Tromey <tom@tromey.com>
6734 * c-typeprint.c (maybe_print_hole): New function.
6735 (c_print_type_struct_field_offset): Update.
6736 (c_type_print_base_struct_union): Call maybe_print_hole.
6738 2018-05-17 Keith Seitz <keiths@redhat.com>
6740 * breakpoint.c (build_bpstat_chain): New function, moved from
6742 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6743 If no stop chain is passed, call build_bpstat_chain to build it.
6744 * breakpoint.h (build_bpstat_chain): Declare.
6745 (bpstat_stop_status): Move documentation here from breakpoint.c.
6746 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6747 build the stop chain and pass it to skip_inline_frames.
6748 Pass this stop chain to bpstat_stop_status.
6749 * inline-frame.c: Include breakpoint.h.
6750 (stopped_by_user_bp_inline_frame): New function.
6751 (skip_inline_frames): Add parameter `stop_chain'.
6752 Move documention to inline-frame.h.
6753 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6754 whether the frame should be elided.
6755 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6756 Add moved documentation and update for new parameter.
6758 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6761 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6762 unittests/format_pieces-selftests.c.
6763 * common/format.h (format_piece) <operator==>: New.
6764 (format_pieces) <operator[]>: Remove.
6765 * common/format.c (format_pieces::format_pieces): Handle \e.
6766 * unittests/format_pieces-selftests.c: New.
6768 2018-05-17 Tom Tromey <tom@tromey.com>
6771 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6772 (dw2_instantiate_symtab): Add skip_partial parameter.
6773 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6774 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6775 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6776 (dw2_expand_symtabs_matching_one)
6777 (dw2_find_pc_sect_compunit_symtab)
6778 (dw2_debug_names_lookup_symbol)
6779 (dw2_debug_names_expand_symtabs_for_function): Update.
6780 (init_cutu_and_read_dies): Add skip_partial parameter.
6781 (process_psymtab_comp_unit, build_type_psymtabs_1)
6782 (process_skeletonless_type_unit, load_partial_comp_unit)
6783 (psymtab_to_symtab_1): Update.
6784 (load_full_comp_unit): Add skip_partial parameter.
6785 (process_imported_unit_die, dwarf2_read_addr_index)
6786 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6787 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6788 (read_signatured_type): Update.
6790 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6792 * value.c (release_value): Remove unused variable.
6793 (record_latest_value): Likewise.
6794 (access_value_history): Likewise.
6795 (preserve_values): Likewise.
6797 2018-05-17 Tom Tromey <tom@tromey.com>
6799 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6802 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6805 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6806 Also handle registers whose width is not a multiple of
6808 (linux_nat_trad_target::store_register): Likewise.
6810 2018-05-16 Tom Tromey <tom@tromey.com>
6812 * gdbcore.h (core_bfd): Redefine.
6813 * corelow.c (core_target::close): Update.
6814 (core_target_open): Update.
6815 * progspace.h (struct program_space) <cbfd>: Now a
6818 2018-05-16 Tom Tromey <tom@tromey.com>
6821 * symfile-add-flags.h (enum symfile_add_flags)
6822 <SYMFILE_NOT_FILENAME>: New constant.
6823 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6824 objfile name from BFD.
6825 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6826 * minidebug.c (find_separate_debug_file_in_section): Put
6827 ".gnu_debugdata" into BFD's file name.
6829 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6831 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6834 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6837 * aarch64-tdep.c (aarch64_analyze_prologue,
6838 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6839 Indicate not interested in errors.
6841 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6843 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6844 Supply the MIPS_ZERO_REGNUM register.
6846 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6848 * mips-tdep.c (mask_address_var): Make variable static.
6850 2018-05-14 Tom Tromey <tom@tromey.com>
6852 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6854 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6856 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6857 FXSAVE_ADDR for the mxcsr register.
6859 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6861 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6863 2018-05-11 Pedro Alves <palves@redhat.com>
6865 * corelow.c (core_target) <core_target>: No longer inline.
6866 Initialize m_core_gdbarch, m_core_vec and build the section table
6868 <~core_target>: New.
6869 <core_gdbarch, get_core_register_section>: New methods.
6870 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6871 factored out from ...
6872 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6874 (sniff_core_bfd): Add gdbarch parameter.
6875 (core_close): Delete, merged into ...
6876 (core_target::close): ... here. Delete self.
6877 (core_close_cleanup): Delete.
6878 (core_target_open): Allocate a core_target on the heap. Use a
6879 unique_ptr instead of a cleanup. Bits moved into the core_target
6880 ctor. Adjust to use core_target methods instead of globals.
6881 (get_core_register_section): Rename to ...
6882 (core_target::get_core_register_section): ... this and adjust.
6883 (struct get_core_registers_cb_data): New.
6884 (get_core_registers_cb): Use it. Use bool.
6885 (core_target::fetch_registers, core_target::files_info)
6886 (core_target::xfer_partial, core_target::read_description)
6887 (core_target::pid_to, core_target::thread_name): Adjust to
6888 reference class fields instead of globals.
6889 * target.h (struct target_ops_deleter, target_ops_up): New.
6891 2018-05-11 Pedro Alves <palves@redhat.com>
6893 * corefile.c (core_file_command): Move to corelow.c.
6894 * corelow.c (the_core_target): Delete.
6895 (core_file_command): Moved from corefile.c. Check exec_bfd
6896 instead of the_core_target. Use target_detach instead of calling
6897 into the_core_target directly.
6898 (maybe_say_no_core_file_now): New.
6899 (core_target::detach): Use it.
6900 (_initialize_corelow): Remove references to the_core_target.
6901 * gdbcore.h (the_core_target): Delete.
6903 2018-05-11 Tom Tromey <tromey@redhat.com>
6904 Pedro Alves <palves@redhat.com>
6906 * corefile.c (core_bfd): Remove.
6907 * gdbcore.h (core_bfd): Now a macro.
6908 * progspace.h (struct program_space) <cbfd>: New field.
6910 2018-05-11 Tom Tromey <tom@tromey.com>
6912 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6915 2018-05-10 Tom Tromey <tom@tromey.com>
6917 * configure: Rebuild.
6918 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6920 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6923 * regformats/regdat.sh: Adjust script, following the addition
6924 of the new expedite_regs parameter to init_target_desc.
6926 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6929 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6930 set_gdbarch_significant_addr_bit.
6931 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6932 set_gdbarch_significant_addr_bit.
6933 * utils.c (address_significant): Update to sign extend addr.
6935 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6937 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6938 (xtensa_linux_init_abi): Limit tdep->num_regs by
6939 tdep->num_nopriv_regs.
6940 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6941 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6944 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6946 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6948 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6950 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6951 (I387_MXCSR_INIT_VAL): New constant.
6952 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6953 buffer if it was supplied by the inferior.
6954 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6955 (i387_xsave_get_clear_bv): New function.
6956 (i387_supply_xsave): Only read x87 control registers from the
6957 xsave buffer if the feature is enabled, and the state will have
6958 been written, otherwise, provide a suitable default.
6959 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6960 including x87 control registers. Update control registers if they
6961 have changed from the default value, and mark features as enabled
6963 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6965 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6967 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6969 2018-05-07 Tom Tromey <tom@tromey.com>
6971 * configure: Rebuild.
6972 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6974 2018-05-07 Tom Tromey <tom@tromey.com>
6977 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6978 bit. Use correct value for VDIV.
6980 2018-05-04 Tom Tromey <tom@tromey.com>
6982 * configure: Rebuild.
6983 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6985 2018-05-04 Tom Tromey <tom@tromey.com>
6987 * linux-record.c (record_linux_system_call) <case
6988 RECORD_SYS_RECVFROM>: Add "break".
6990 2018-05-04 Tom Tromey <tom@tromey.com>
6992 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6993 Add missing "break".
6994 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6995 Add missing "break".
6997 2018-05-04 Tom Tromey <tom@tromey.com>
6999 * rs6000-tdep.c (ppc_process_record_op4)
7000 (ppc_process_record_op63): Add fall-through comment.
7002 2018-05-04 Tom Tromey <tom@tromey.com>
7004 * i386-tdep.c (i386_process_record): Add fall-through comment.
7006 2018-05-04 Tom Tromey <tom@tromey.com>
7008 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7011 2018-05-04 Tom Tromey <tom@tromey.com>
7013 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7014 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7015 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7017 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7019 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7022 2018-05-04 Tom Tromey <tom@tromey.com>
7024 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7026 2018-05-04 Tom Tromey <tom@tromey.com>
7028 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7029 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7030 * symfile.c (section_is_mapped): Fix fall-through comment.
7031 * stabsread.c (define_symbol, read_member_functions): Fix
7032 fall-through comment.
7033 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7035 * remote.c (remote_wait_as): Fix fall-through comment.
7036 * p-exp.y (yylex): Fix fall-through comment.
7037 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7039 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7040 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7041 * jv-exp.y (yylex): Fix fall-through comment.
7042 * go-exp.y (lex_one_token): Fix fall-through comment.
7043 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7044 fall-through comment.
7045 * f-exp.y (yylex): Fix fall-through comment.
7046 * dwarf2read.c (process_die): Fix fall-through comments.
7047 * dbxread.c (process_one_symbol): Fix fall-through comment.
7048 * d-exp.y (lex_one_token): Fix fall-through comment.
7049 * cp-name-parser.y (yylex): Fix fall-through comment.
7050 * coffread.c (coff_symtab_read): Fix fall-through comment.
7051 * c-exp.y (lex_one_token): Fix fall-through comment.
7052 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7054 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7057 2018-05-04 Tom Tromey <tom@tromey.com>
7060 * NEWS: Mention gdb.execute change.
7061 * gdbcmd.h (execute_control_command): Don't declare.
7062 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7063 execute_control_commands, execute_control_commands_to_string.
7064 * cli/cli-script.h (execute_control_commands)
7065 (execute_control_commands_to_string): Declare.
7066 (execute_control_command): Add from_tty parameter.
7067 * cli/cli-script.c (execute_control_commands)
7068 (execute_control_commands_to_string): New functions.
7069 (execute_user_command): Use execute_control_commands.
7070 (execute_control_command_1): Add "from_tty" parameter. Update.
7071 (execute_control_command): Likewise.
7073 2018-05-04 Tom Tromey <tom@tromey.com>
7076 * NEWS: Mention that breakpoint commands are writable.
7077 * python/py-breakpoint.c (bppy_set_commands): New function.
7078 (breakpoint_object_getset) <"commands">: Use it.
7080 2018-05-04 Tom Tromey <tom@tromey.com>
7082 * tracepoint.c (actions_command): Update.
7083 * mi/mi-cmd-break.c (mi_command_line_array)
7084 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7085 (mi_read_next_line): Remove.
7086 (mi_cmd_break_commands): Update.
7087 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7089 * cli/cli-script.c (get_command_line): Update.
7090 (process_next_line): Use function_view. Constify.
7091 (recurse_read_control_structure, read_command_lines)
7092 (read_command_lines_1): Change argument types to function_view.
7093 (do_define_command, document_command): Update.
7094 * breakpoint.h (check_tracepoint_command): Don't declare.
7095 * breakpoint.c (check_tracepoint_command): Remove.
7096 (commands_command_1, create_tracepoint_from_upload): Update.
7098 2018-05-04 Tom Tromey <tom@tromey.com>
7101 * cli/cli-script.h (enum command_control_type) <define_control>:
7103 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7104 (build_command_line, execute_control_command_1)
7105 (process_next_line): Likewise.
7106 (do_define_command): New function, extracted from define_command.
7107 (define_command): Use it.
7109 2018-05-04 Tom Tromey <tom@tromey.com>
7111 * tracepoint.c (actions_command): Update.
7112 * cli/cli-script.h (read_command_lines): Update.
7113 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7114 (MAX_TMPBUF): Remove define.
7115 (define_command): Use string_printf.
7116 (document_command): Likewise.
7117 * breakpoint.c (commands_command_1): Update.
7119 2018-05-04 Tom Tromey <tom@tromey.com>
7121 * top.c (execute_command): Update.
7122 * cli/cli-script.h (print_command_lines): Now varargs.
7123 * cli/cli-script.c (print_command_lines): Now varargs.
7124 (execute_control_command_1) <case while_control, case if_control>:
7127 2018-05-04 Tom Tromey <tom@tromey.com>
7129 * tracepoint.c (all_tracepoint_actions): Rename from
7130 all_tracepoint_actions_and_cleanup. Change return type.
7131 (actions_command, encode_actions_1, encode_actions)
7132 (trace_dump_actions, tdump_command): Update.
7133 * remote.c (remote_download_command_source): Update.
7134 * python/python.c (gdbpy_eval_from_control_command)
7135 (python_command, python_interactive_command): Update.
7136 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7137 * guile/guile.c (guile_command)
7138 (gdbscm_eval_from_control_command, guile_command): Update.
7139 * compile/compile.c (compile_code_command)
7140 (compile_print_command, compile_to_object): Update.
7141 * cli/cli-script.h (struct command_lines_deleter): New.
7142 (counted_command_line): New typedef.
7143 (struct command_line): Add constructor, destructor.
7144 <body_list>: Remove.
7145 <body_list_0, body_list_1>: New members.
7146 (command_line_up): Remove typedef.
7147 (read_command_lines, read_command_lines_1, get_command_line):
7149 (copy_command_lines): Don't declare.
7150 * cli/cli-script.c (build_command_line): Use "new".
7151 (get_command_line): Return counted_command_line.
7152 (print_command_lines, execute_user_command)
7153 (execute_control_command_1, while_command, if_command): Update.
7154 (realloc_body_list): Remove.
7155 (process_next_line, recurse_read_control_structure): Update.
7156 (read_command_lines, read_command_lines_1): Return counted_command_line.
7157 (free_command_lines): Use "delete".
7158 (copy_command_lines): Remove.
7159 (define_command, document_command, show_user_1): Update.
7160 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7161 a counted_command_line.
7162 * breakpoint.h (counted_command_line): Remove typedef.
7163 (breakpoint_set_commands): Update.
7164 * breakpoint.c (check_no_tracepoint_commands)
7165 (validate_commands_for_breakpoint): Update.
7166 (breakpoint_set_commands): Change commands to be a
7167 counted_command_line.
7168 (commands_command_1, update_dprintf_command_list)
7169 (create_tracepoint_from_upload): Update.
7171 2018-05-04 Tom Tromey <tom@tromey.com>
7173 * cli/cli-decode.h (cmd_list_element): New constructor.
7174 (~cmd_list_element): New destructor.
7175 (struct cmd_list_element): Add initializers.
7176 * cli/cli-decode.c (do_add_cmd): Use "new".
7177 (delete_cmd): Use "delete".
7179 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7180 Pedro Alves <palves@redhat.com>
7182 PR breakpoints/19806 and support for PR external/20207.
7183 * NEWS: Mention Aarch64 watchpoint improvements.
7184 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7185 watchpoints and PR external/20207 watchpoints.
7186 * nat/aarch64-linux-hw-point.c
7187 (kernel_supports_any_contiguous_range): New.
7188 (aarch64_watchpoint_offset): New.
7189 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7190 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7191 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7192 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7193 next_addr_orig_p. Support PR external/20207 watchpoints.
7194 (aarch64_downgrade_regs): New.
7195 (aarch64_dr_state_insert_one_point): New parameters offset and
7197 (aarch64_dr_state_remove_one_point): Likewise.
7198 (aarch64_handle_breakpoint): Update caller.
7199 (aarch64_handle_aligned_watchpoint): Likewise.
7200 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7202 (aarch64_linux_set_debug_regs): Remove const from state. Call
7203 aarch64_downgrade_regs.
7204 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7205 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7206 (DR_CONTROL_MASK): ... this.
7207 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7208 (unsigned int aarch64_watchpoint_offset): New prototype.
7209 (aarch64_linux_set_debug_regs): Remove const from state.
7210 * utils.c (align_up, align_down): Move to ...
7211 * common/common-utils.c (align_up, align_down): ... here.
7212 * utils.h (align_up, align_down): Move to ...
7213 * common/common-utils.h (align_up, align_down): ... here.
7215 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7217 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7218 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7219 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7220 Re-implement to match the ABI as summarized in GCC's
7221 gcc/config/sparc/sparc.c. All callers updated.
7222 (sparc32_store_arguments): Remove assertion.
7224 2018-05-04 Tom Tromey <tom@tromey.com>
7226 * printcmd.c: Don't include tui.h.
7227 (decode_format): Use skip_spaces.
7229 2018-05-04 Tom Tromey <tom@tromey.com>
7232 * printcmd.c (last_count): New global.
7233 (x_command): Use saved count when repeating.
7235 2018-05-04 Tom Tromey <tom@tromey.com>
7237 * nto-procfs.c (do_closedir_cleanup): Remove.
7238 (procfs_pidlist): Use gdb_dir_up.
7239 * procfs.c (do_closedir_cleanup): Remove.
7240 (proc_update_threads): Use gdb_dir_up.
7241 * common/filestuff.h (struct gdb_dir_deleter): New.
7242 (gdb_dir_up): New typedef.
7244 2018-05-04 Tom Tromey <tom@tromey.com>
7246 * ada-lang.c (print_mention_exception): Use std::string.
7248 2018-05-04 Tom Tromey <tom@tromey.com>
7250 * ada-lang.c (create_excep_cond_exprs): Update.
7251 (ada_exception_catchpoint_cond_string): Use std::string.
7253 2018-05-04 Tom Tromey <tom@tromey.com>
7255 * ada-lang.c (xget_renaming_scope): Return std::string.
7256 (old_renaming_is_invisible): Update.
7258 2018-05-04 Tom Tromey <tom@tromey.com>
7260 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7261 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7263 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7265 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7267 2018-05-04 Tom Tromey <tom@tromey.com>
7269 * remote.c (remote_query_supported_append): Change type.
7270 (remote_check_symbols): Update.
7272 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7275 * configure.ac: Prepend libpython.
7276 * python/python-config.py: Likewise.
7277 * configure: Regenerate.
7279 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7281 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7283 2018-05-03 Pedro Alves <palves@redhat.com>
7286 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7287 override. Write 'true' instead of '1'.
7288 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7291 2018-05-02 Pedro Alves <palves@redhat.com>
7293 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7294 add_inf_child_target.
7295 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7296 add_inf_child_target.
7297 * aix-thread.c (aix_thread_target_info): New.
7298 (aix_thread_target) <shortname, longname, doc>: Delete.
7300 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7301 add_inf_child_target.
7302 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7303 add_inf_child_target.
7304 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7305 add_inf_child_target.
7306 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7307 add_inf_child_target.
7308 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7309 add_inf_child_target.
7310 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7311 add_inf_child_target.
7312 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7313 add_inf_child_target.
7314 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7315 add_inf_child_target.
7316 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7317 add_inf_child_target.
7318 * bfd-target.c (target_bfd_target_info): New.
7319 (target_bfd) <shortname, longname, doc>: Delete.
7321 * bsd-kvm.c (bsd_kvm_target_info): New.
7322 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7324 (bsd_kvm_target::open): Rename to ...
7325 (bsd_kvm_target_open): ... this. Adjust.
7326 * bsd-uthread.c (bsd_uthread_target_info): New.
7327 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7329 * corefile.c (core_file_command): Adjust.
7330 * corelow.c (core_target_info): New.
7331 (core_target) <shortname, longname, doc>: Delete.
7333 (core_target::open): Rename to ...
7334 (core_target_open): ... this. Adjust.
7335 * ctf.c (ctf_target_info): New.
7336 (ctf_target) <shortname, longname, doc>: Delete.
7338 (ctf_target::open): Rename to ...
7339 (ctf_target_open): ... this.
7340 (_initialize_ctf): Adjust.
7341 * exec.c (exec_target_info): New.
7342 (exec_target) <shortname, longname, doc>: Delete.
7344 (exec_target::open): Rename to ...
7345 (exec_target_open): ... this.
7346 * gdbcore.h (core_target_open): Declare.
7347 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7348 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7349 add_inf_child_target.
7350 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7351 add_inf_child_target.
7352 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7353 add_inf_child_target.
7354 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7355 add_inf_child_target.
7356 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7357 add_inf_child_target.
7358 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7359 add_inf_child_target.
7360 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7361 add_inf_child_target.
7362 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7363 add_inf_child_target.
7364 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7365 add_inf_child_target.
7366 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7367 add_inf_child_target.
7368 * inf-child.c (inf_child_target_info): New.
7369 (inf_child_target::info): New.
7370 (inf_child_open_target): Remove 'target' parameter. Use
7371 get_native_target instead.
7372 (inf_child_target::open): Delete.
7373 (add_inf_child_target): New.
7374 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7377 (add_inf_child_target): Declare.
7378 (inf_child_open_target): Declare.
7379 * linux-thread-db.c (thread_db_target_info): New.
7380 (thread_db_target) <shortname, longname, doc>: Delete.
7382 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7383 add_inf_child_target.
7384 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7385 add_inf_child_target.
7386 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7387 add_inf_child_target.
7388 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7389 add_inf_child_target.
7390 * make-target-delegates (print_class): Adjust.
7391 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7392 add_inf_child_target.
7393 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7394 add_inf_child_target.
7395 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7396 add_inf_child_target.
7397 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7398 add_inf_child_target.
7399 * nto-procfs.c (nto_native_target_info): New.
7400 (nto_procfs_target_native) <shortname, longname, doc>:
7403 (nto_procfs_target_info): New.
7404 (nto_procfs_target_procfs) <shortname, longname, doc>:
7407 (init_procfs_targets): Adjust.
7408 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7409 add_inf_child_target.
7410 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7411 add_inf_child_target.
7412 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7413 add_inf_child_target.
7414 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7415 add_inf_child_target.
7416 * ravenscar-thread.c (ravenscar_target_info): New.
7417 (ravenscar_thread_target) <shortname, longname, doc>:
7420 * record-btrace.c (record_btrace_target_info):
7421 (record_btrace_target) <shortname, longname, doc>: Delete.
7423 (record_btrace_target::open): Rename to ...
7424 (record_btrace_target_open): ... this. Adjust.
7425 * record-full.c (record_longname, record_doc): New.
7426 (record_full_base_target) <shortname, longname, doc>: Delete.
7428 (record_full_target_info): New.
7429 (record_full_target): <shortname>: Delete.
7431 (record_full_core_open_1, record_full_open_1): Update comments.
7432 (record_full_base_target::open): Rename to ...
7433 (record_full_open): ... this.
7434 (cmd_record_full_restore): Update.
7435 (_initialize_record_full): Update.
7436 * remote-sim.c (remote_sim_target_info): New.
7437 (gdbsim_target) <shortname, longname, doc>: Delete.
7439 (gdbsim_target::open): Rename to ...
7440 (gdbsim_target_open): ... this.
7441 (_initialize_remote_sim): Adjust.
7442 * remote.c (remote_doc): New.
7443 (remote_target_info): New.
7444 (remote_target) <shortname, longname, doc>: Delete.
7446 (extended_remote_target_info): New.
7447 (extended_remote_target) <shortname, longname, doc>: Delete.
7449 (remote_target::open_1): Make static. Adjust.
7450 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7451 * s390-linux-nat.c (_initialize_s390_nat): Use
7452 add_inf_child_target.
7453 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7454 add_inf_child_target.
7455 * sol-thread.c (thread_db_target_info): New.
7456 (sol_thread_target) <shortname, longname, doc>: Delete.
7458 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7459 add_inf_child_target.
7460 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7461 add_inf_child_target.
7462 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7463 add_inf_child_target.
7464 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7465 add_inf_child_target.
7466 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7467 add_inf_child_target.
7468 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7469 add_inf_child_target.
7470 * spu-linux-nat.c (_initialize_spu_nat): Use
7471 add_inf_child_target.
7472 * spu-multiarch.c (spu_multiarch_target_info): New.
7473 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7475 * target-delegates.c: Regenerate.
7476 * target.c: Include <unordered_map>.
7477 (target_ops_p): Delete.
7478 (DEF_VEC_P(target_ops_p)): Delete.
7479 (target_factories): New.
7480 (test_target_info): New.
7481 (test_target_ops::info): New.
7482 (open_target): Adjust to use target_factories.
7483 (add_target_with_completer): Rename to ...
7484 (add_target): ... this. Change prototype. Register target_info
7485 and open callback in target_factories. Register target_info in
7486 command context instead of target_ops.
7487 (add_target): Delete old implementation.
7488 (add_deprecated_target_alias): Change prototype. Adjust.
7489 (the_native_target): New.
7490 (set_native_target, get_native_target): New.
7491 (find_default_run_target): Use the_native_target.
7492 (find_attach_target, find_run_target): Simplify.
7493 (target_ops::open): Delete.
7494 (dummy_target_info): New.
7495 (dummy_target::shortname, dummy_target::longname)
7496 (dummy_target::doc): Delete.
7497 (dummy_target::info): New.
7498 (debug_target::shortname, debug_target::longname)
7499 (debug_target::doc): Delete.
7500 (debug_target::info): New.
7501 * target.h (struct target_info): New.
7502 (target_ops::~target_ops): Add comment.
7503 (target_ops::info): New.
7504 (target_ops::shortname, target_ops::longname, target_ops::doc): No
7505 longer virtual. Implement in terms of target_info.
7506 (set_native_target, get_native_target): Declare.
7507 (target_open_ftype): New.
7508 (add_target, add_target_with_completer)
7509 (add_deprecated_target_alias): Change prototype.
7510 (test_target) <shortname, longname, doc>: Delete.
7512 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7513 add_inf_child_target.
7514 * tracefile-tfile.c (tfile_target_info): New.
7515 (tfile_target) <shortname, longname, doc>: Delete.
7517 (tfile_target::open): Rename to ...
7518 (tfile_target_open): ... this.
7519 (_initialize_tracefile_tfile): Adjust.
7520 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7521 add_inf_child_target.
7522 * windows-nat.c (_initialize_windows_nat): Use
7523 add_inf_child_target.
7524 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7525 add_inf_child_target.
7527 2018-05-02 Pedro Alves <palves@redhat.com>
7529 * linux-nat.h (linux_nat_target) <low_new_thread,
7530 low_delete_thread, low_new_fork, low_forget_process,
7531 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7532 New virtual methods.
7533 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7534 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7535 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7536 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7537 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7539 * linux-fork.c (delete_fork): Adjust to call low method.
7540 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7541 (linux_nat_new_fork, linux_nat_forget_process_hook)
7542 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7543 (linux_nat_status_is_event):
7544 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7545 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7547 (sigtrap_is_event): Rename to ...
7548 (linux_nat_target::low_status_is_event): ... this.
7549 (linux_nat_set_status_is_event): Delete.
7550 (save_stop_reason, linux_nat_wait_1)
7551 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7553 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7554 (linux_nat_set_new_fork, linux_nat_set_forget_process)
7555 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7556 (linux_nat_set_prepare_to_resume): Delete.
7557 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7558 low virtual methods.
7559 * amd64-linux-nat.c: Likewise.
7560 * arm-linux-nat.c: Likewise.
7561 * i386-linux-nat.c: Likewise.
7562 * ia64-linux-nat.c: Likewise.
7563 * mips-linux-nat.c: Likewise.
7564 * ppc-linux-nat.c: Likewise.
7565 * s390-linux-nat.c: Likewise.
7566 * sparc64-linux-nat.c: Likewise.
7567 * x86-linux-nat.c: Likewise.
7568 * x86-linux-nat.h: Include "nat/x86-linux.h".
7569 (x86_linux_nat_target) <low_new_fork, low_forget_process,
7570 low_prepare_to_resume, low_new_thread, low_delete_thread>:
7573 2018-05-02 Pedro Alves <palves@redhat.com>
7575 * target.h (target_ops)
7576 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7577 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7578 stopped_by_watchpoint, have_continuable_watchpoint,
7579 stopped_data_address, watchpoint_addr_within_range,
7580 can_accel_watchpoint_condition, can_run, thread_alive,
7581 has_all_memory, has_memory, has_stack, has_registers,
7582 has_execution, can_async_p, is_async_p, supports_non_stop,
7583 always_non_stop_p, can_execute_reverse, supports_multi_process,
7584 supports_enable_disable_tracepoint,
7585 supports_disable_randomization, supports_string_tracing,
7586 supports_evaluation_of_breakpoint_conditions,
7587 can_run_breakpoint_commands, filesystem_is_local,
7588 can_download_tracepoint, get_trace_state_variable_value,
7589 set_trace_notes, get_tib_address, use_agent, can_use_agent,
7590 record_is_replaying, record_will_replay,
7591 augmented_libraries_svr4_read>: Adjust to return bool.
7592 * aarch64-linux-nat.c: All implementations adjusted.
7593 * aix-thread.c: All implementations adjusted.
7594 * arm-linux-nat.c: All implementations adjusted.
7595 * breakpoint.c: All implementations adjusted.
7596 * bsd-kvm.c: All implementations adjusted.
7597 * bsd-uthread.c: All implementations adjusted.
7598 * corelow.c: All implementations adjusted.
7599 * ctf.c: All implementations adjusted.
7600 * darwin-nat.c: All implementations adjusted.
7601 * darwin-nat.h: All implementations adjusted.
7602 * exec.c: All implementations adjusted.
7603 * fbsd-nat.c: All implementations adjusted.
7604 * fbsd-nat.h: All implementations adjusted.
7605 * gnu-nat.c: All implementations adjusted.
7606 * gnu-nat.h: All implementations adjusted.
7607 * go32-nat.c: All implementations adjusted.
7608 * ia64-linux-nat.c: All implementations adjusted.
7609 * inf-child.c: All implementations adjusted.
7610 * inf-child.h: All implementations adjusted.
7611 * inf-ptrace.c: All implementations adjusted.
7612 * inf-ptrace.h: All implementations adjusted.
7613 * linux-nat.c: All implementations adjusted.
7614 * linux-nat.h: All implementations adjusted.
7615 * mips-linux-nat.c: All implementations adjusted.
7616 * nto-procfs.c: All implementations adjusted.
7617 * ppc-linux-nat.c: All implementations adjusted.
7618 * procfs.c: All implementations adjusted.
7619 * ravenscar-thread.c: All implementations adjusted.
7620 * record-btrace.c: All implementations adjusted.
7621 * record-full.c: All implementations adjusted.
7622 * remote-sim.c: All implementations adjusted.
7623 * remote.c: All implementations adjusted.
7624 * s390-linux-nat.c: All implementations adjusted.
7625 * sol-thread.c: All implementations adjusted.
7626 * spu-multiarch.c: All implementations adjusted.
7627 * target-delegates.c: All implementations adjusted.
7628 * target.c: All implementations adjusted.
7629 * target.h: All implementations adjusted.
7630 * tracefile-tfile.c: All implementations adjusted.
7631 * tracefile.c: All implementations adjusted.
7632 * tracefile.h: All implementations adjusted.
7633 * windows-nat.c: All implementations adjusted.
7634 * x86-linux-nat.h: All implementations adjusted.
7635 * x86-nat.h: All implementations adjusted.
7637 2018-05-02 Pedro Alves <palves@redhat.com>
7639 * make-target-delegates (scan_target_h): Don't trim lines here.
7640 Replace sequences of tabs and/or whitespace with a single
7642 (top level, parsing methods): Trim each line before processing it
7645 2018-05-02 Pedro Alves <palves@redhat.com>
7646 John Baldwin <jhb@freebsd.org>
7648 * target.h (enum strata) <debug_stratum>: New.
7649 (struct target_ops) <all delegation methods>: Replace by C++
7650 virtual methods, and drop "to_" prefix. All references updated
7652 <to_shortname, to_longname, to_doc, to_data,
7653 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7654 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7655 virtual methods. All references updated throughout.
7656 <can_attach, supports_terminal_ours, can_create_inferior,
7657 get_thread_control_capabilities, attach_no_wait>: New
7659 <insert_breakpoint, remove_breakpoint>: Now
7660 TARGET_DEFAULT_NORETURN methods.
7661 <info_proc>: Now returns bool.
7663 (OPS_MAGIC): Delete.
7664 (current_target): Delete. All references replaced by references
7666 (target_stack): ... this. New.
7667 (target_shortname, target_longname): Adjust.
7668 (target_can_run): Now a function declaration.
7669 (default_child_has_all_memory, default_child_has_memory)
7670 (default_child_has_stack, default_child_has_registers)
7671 (default_child_has_execution): Remove target_ops parameter.
7672 (complete_target_initialization): Delete.
7673 (memory_breakpoint_target): New template class.
7674 (test_target_ops): Refactor as a C++ class with virtual methods.
7675 * make-target-delegates (NAME_PART): Tighten.
7676 (POINTER_PART, CP_SYMBOL): New.
7677 (SIMPLE_RETURN_PART): Reimplement.
7678 (VEC_RETURN_PART): Expect less.
7679 (RETURN_PART, VIRTUAL_PART): New.
7680 (METHOD): Adjust to C++ virtual methods.
7681 (scan_target_h): Remove reference to C99.
7682 (dname): Output "target_ops::" prefix.
7683 (write_function_header): Adjust to output a C++ class method.
7684 (write_declaration): New.
7685 (write_delegator): Adjust to output a C++ class method.
7686 (tdname): Output "dummy_target::" prefix.
7687 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7689 (tdefault_names, debug_names): Delete.
7690 (return_types, tdefaults, styles, argtypes_array): New.
7691 (top level): All methods are delegators.
7693 (top level): Print dummy_target and debug_target classes.
7694 * target-delegates.c: Regenerate.
7695 * target-debug.h (target_debug_print_enum_info_proc_what)
7696 (target_debug_print_thread_control_capabilities)
7697 (target_debug_print_thread_info_p): New.
7698 * target.c (dummy_target): Delete.
7699 (the_dummy_target, the_debug_target): New.
7700 (target_stack): Now extern.
7701 (set_targetdebug): Push/unpush debug target.
7702 (default_child_has_all_memory, default_child_has_memory)
7703 (default_child_has_stack, default_child_has_registers)
7704 (default_child_has_execution): Remove target_ops parameter.
7705 (complete_target_initialization): Delete.
7706 (add_target_with_completer): No longer call
7707 complete_target_initialization.
7708 (target_supports_terminal_ours): Use regular delegation.
7709 (update_current_target): Delete.
7710 (push_target): No longer check magic number. Don't call
7711 update_current_target.
7712 (unpush_target): Don't call update_current_target.
7713 (target_is_pushed): No longer check magic number.
7714 (target_require_runnable): Skip for all stratums over
7716 (target_ops::info_proc): New.
7717 (target_info_proc): Use find_target_at and
7718 find_default_run_target.
7719 (target_supports_disable_randomization): Use regular delegation.
7720 (target_get_osdata): Use find_target_at.
7721 (target_ops::open, target_ops::close, target_ops::can_attach)
7722 (target_ops::attach, target_ops::can_create_inferior)
7723 (target_ops::create_inferior, target_ops::can_run)
7724 (target_can_run): New.
7725 (default_fileio_target): Use regular delegation.
7726 (target_ops::fileio_open, target_ops::fileio_pwrite)
7727 (target_ops::fileio_pread, target_ops::fileio_fstat)
7728 (target_ops::fileio_close, target_ops::fileio_unlink)
7729 (target_ops::fileio_readlink): New.
7730 (target_fileio_open_1, target_fileio_unlink)
7731 (target_fileio_readlink): Always call the target method. Handle
7733 (return_zero, return_zero_has_execution): Delete.
7734 (init_dummy_target): Delete.
7735 (dummy_target::dummy_target, dummy_target::shortname)
7736 (dummy_target::longname, dummy_target::doc)
7737 (debug_target::debug_target, debug_target::shortname)
7738 (debug_target::longname, debug_target::doc): New.
7739 (target_supports_delete_record): Use regular delegation.
7740 (setup_target_debug): Delete.
7741 (maintenance_print_target_stack): Skip debug_stratum.
7742 (initialize_targets): Instantiate the_dummy_target and
7744 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7746 (target_auxv_search, fprint_target_auxv): Adjust.
7747 (info_auxv_command): Adjust to use target_stack.
7748 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7749 * exceptions.c (print_flush): Handle a NULL target_stack.
7750 * regcache.c (target_ops_no_register): Refactor as class with
7753 * exec.c (exec_target): New class.
7754 (exec_ops): Now an exec_target.
7755 (exec_open, exec_close_1, exec_get_section_table)
7756 (exec_xfer_partial, exec_files_info, exec_has_memory)
7757 (exec_make_note_section): Refactor as exec_target methods.
7758 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7760 (exec_target::find_memory_regions): New.
7761 (_initialize_exec): Don't call init_exec_ops.
7762 * gdbcore.h (exec_file_clear): Delete.
7764 * corefile.c (core_target): Delete.
7765 (core_file_command): Adjust.
7766 * corelow.c (core_target): New class.
7767 (the_core_target): New.
7768 (core_close): Remove target_ops parameter.
7769 (core_close_cleanup): Adjust.
7770 (core_target::close): New.
7771 (core_open, core_detach, get_core_registers, core_files_info)
7772 (core_xfer_partial, core_thread_alive, core_read_description)
7773 (core_pid_to_str, core_thread_name, core_has_memory)
7774 (core_has_stack, core_has_registers, core_info_proc): Rework as
7775 core_target methods.
7776 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7777 (_initialize_corelow): Initialize the_core_target.
7778 * gdbcore.h (core_target): Delete.
7779 (the_core_target): New.
7781 * ctf.c: (ctf_target): New class.
7782 (ctf_ops): Now a ctf_target.
7783 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7784 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7785 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7787 (init_ctf_ops): Delete.
7788 (_initialize_ctf): Don't call it.
7789 * tracefile-tfile.c (tfile_target): New class.
7790 (tfile_ops): Now a tfile_target.
7791 (tfile_open, tfile_close, tfile_files_info)
7792 (tfile_get_tracepoint_status, tfile_trace_find)
7793 (tfile_fetch_registers, tfile_xfer_partial)
7794 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7795 Refactor as tfile_target methods.
7796 (tfile_xfer_partial_features): Remove target_ops parameter.
7797 (init_tfile_ops): Delete.
7798 (_initialize_tracefile_tfile): Don't call it.
7799 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7800 (tracefile_has_stack, tracefile_has_registers)
7801 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7802 tracefile_target methods.
7803 (init_tracefile_ops): Delete.
7804 (tracefile_target::tracefile_target): New.
7805 * tracefile.h: Include "target.h".
7806 (tracefile_target): New class.
7807 (init_tracefile_ops): Delete.
7809 * spu-multiarch.c (spu_multiarch_target): New class.
7810 (spu_ops): Now a spu_multiarch_target.
7811 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7812 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7813 (spu_search_memory, spu_mourn_inferior): Refactor as
7814 spu_multiarch_target methods.
7815 (init_spu_ops): Delete.
7816 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7817 complete_target_initialization.
7819 * ravenscar-thread.c (ravenscar_thread_target): New class.
7820 (ravenscar_ops): Now a ravenscar_thread_target.
7821 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7822 (ravenscar_thread_alive, ravenscar_pid_to_str)
7823 (ravenscar_fetch_registers, ravenscar_store_registers)
7824 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7825 (ravenscar_stopped_by_hw_breakpoint)
7826 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7827 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7828 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7830 (init_ravenscar_thread_ops): Delete.
7831 (_initialize_ravenscar): Remove references to
7832 init_ravenscar_thread_ops and complete_target_initialization.
7834 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7835 (bsd_uthread_target): New class.
7836 (bsd_uthread_ops): Now a bsd_uthread_target.
7837 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7838 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7839 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7840 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7841 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7842 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7843 (bsd_uthread_target): Delete function.
7844 (_initialize_bsd_uthread): Remove reference to
7845 complete_target_initialization.
7847 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7848 (target_bfd): ... this new class.
7849 (target_bfd_xfer_partial, target_bfd_get_section_table)
7850 (target_bfd_close): Refactor as target_bfd methods.
7851 (target_bfd::~target_bfd): New.
7852 (target_bfd_reopen): Adjust.
7853 (target_bfd::close): New.
7855 * record-btrace.c (record_btrace_target): New class.
7856 (record_btrace_ops): Now a record_btrace_target.
7857 (record_btrace_open, record_btrace_stop_recording)
7858 (record_btrace_disconnect, record_btrace_close)
7859 (record_btrace_async, record_btrace_info)
7860 (record_btrace_insn_history, record_btrace_insn_history_range)
7861 (record_btrace_insn_history_from, record_btrace_call_history)
7862 (record_btrace_call_history_range)
7863 (record_btrace_call_history_from, record_btrace_record_method)
7864 (record_btrace_is_replaying, record_btrace_will_replay)
7865 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7866 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7867 (record_btrace_store_registers, record_btrace_prepare_to_store)
7868 (record_btrace_to_get_unwinder)
7869 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7870 (record_btrace_commit_resume, record_btrace_wait)
7871 (record_btrace_stop, record_btrace_can_execute_reverse)
7872 (record_btrace_stopped_by_sw_breakpoint)
7873 (record_btrace_supports_stopped_by_sw_breakpoint)
7874 (record_btrace_stopped_by_hw_breakpoint)
7875 (record_btrace_supports_stopped_by_hw_breakpoint)
7876 (record_btrace_update_thread_list, record_btrace_thread_alive)
7877 (record_btrace_goto_begin, record_btrace_goto_end)
7878 (record_btrace_goto, record_btrace_stop_replaying_all)
7879 (record_btrace_execution_direction)
7880 (record_btrace_prepare_to_generate_core)
7881 (record_btrace_done_generating_core): Refactor as
7882 record_btrace_target methods.
7883 (init_record_btrace_ops): Delete.
7884 (_initialize_record_btrace): Remove reference to
7885 init_record_btrace_ops.
7886 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7887 the execution_direction global.
7888 (record_full_base_target, record_full_target)
7889 (record_full_core_target): New classes.
7890 (record_full_ops): Now a record_full_target.
7891 (record_full_core_ops): Now a record_full_core_target.
7892 (record_full_target::detach, record_full_target::disconnect)
7893 (record_full_core_target::disconnect)
7894 (record_full_target::mourn_inferior, record_full_target::kill):
7896 (record_full_open, record_full_close, record_full_async): Refactor
7897 as methods of the record_full_base_target class.
7898 (record_full_resume, record_full_commit_resume): Refactor
7899 as methods of the record_full_target class.
7900 (record_full_wait, record_full_stopped_by_watchpoint)
7901 (record_full_stopped_data_address)
7902 (record_full_stopped_by_sw_breakpoint)
7903 (record_full_supports_stopped_by_sw_breakpoint)
7904 (record_full_stopped_by_hw_breakpoint)
7905 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7906 methods of the record_full_base_target class.
7907 (record_full_store_registers, record_full_xfer_partial)
7908 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7909 Refactor as methods of the record_full_target class.
7910 (record_full_can_execute_reverse, record_full_get_bookmark)
7911 (record_full_goto_bookmark, record_full_execution_direction)
7912 (record_full_record_method, record_full_info, record_full_delete)
7913 (record_full_is_replaying, record_full_will_replay)
7914 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7915 (record_full_stop_replaying): Refactor as methods of the
7916 record_full_base_target class.
7917 (record_full_core_resume, record_full_core_kill)
7918 (record_full_core_fetch_registers)
7919 (record_full_core_prepare_to_store)
7920 (record_full_core_store_registers, record_full_core_xfer_partial)
7921 (record_full_core_insert_breakpoint)
7922 (record_full_core_remove_breakpoint)
7923 (record_full_core_has_execution): Refactor
7924 as methods of the record_full_core_target class.
7925 (record_full_base_target::supports_delete_record): New.
7926 (init_record_full_ops): Delete.
7927 (init_record_full_core_ops): Delete.
7928 (record_full_save): Refactor as method of the
7929 record_full_base_target class.
7930 (_initialize_record_full): Remove references to
7931 init_record_full_ops and init_record_full_core_ops.
7933 * remote.c (remote_target, extended_remote_target): New classes.
7934 (remote_ops): Now a remote_target.
7935 (extended_remote_ops): Now an extended_remote_target.
7936 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7937 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7938 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7939 (remote_pass_signals, remote_set_syscall_catchpoint)
7940 (remote_program_signals, )
7941 (remote_thread_always_alive): Remove target_ops parameter.
7942 (remote_thread_alive, remote_thread_name)
7943 (remote_update_thread_list, remote_threads_extra_info)
7944 (remote_static_tracepoint_marker_at)
7945 (remote_static_tracepoint_markers_by_strid)
7946 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7947 (remote_open): Refactor as methods of remote_target.
7948 (extended_remote_open, extended_remote_detach)
7949 (extended_remote_attach, extended_remote_post_attach):
7950 (extended_remote_supports_disable_randomization)
7951 (extended_remote_create_inferior): : Refactor as method of
7952 extended_remote_target.
7953 (remote_set_permissions, remote_open_1, remote_detach)
7954 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7955 (remote_resume, remote_commit_resume, remote_stop)
7956 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7957 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7958 (remote_prepare_to_store, remote_store_registers)
7959 (remote_flash_erase, remote_flash_done, remote_files_info)
7960 (remote_kill, remote_mourn, remote_insert_breakpoint)
7961 (remote_remove_breakpoint, remote_insert_watchpoint)
7962 (remote_watchpoint_addr_within_range)
7963 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7964 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7965 (remote_supports_stopped_by_sw_breakpoint)
7966 (remote_stopped_by_hw_breakpoint)
7967 (remote_supports_stopped_by_hw_breakpoint)
7968 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7969 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7970 (remote_verify_memory): Refactor as methods of remote_target.
7971 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7973 (remote_xfer_partial, remote_get_memory_xfer_limit)
7974 (remote_search_memory, remote_rcmd, remote_memory_map)
7975 (remote_pid_to_str, remote_get_thread_local_address)
7976 (remote_get_tib_address, remote_read_description): Refactor as
7977 methods of remote_target.
7978 (remote_target::fileio_open, remote_target::fileio_pwrite)
7979 (remote_target::fileio_pread, remote_target::fileio_close): New.
7980 (remote_hostio_readlink, remote_hostio_fstat)
7981 (remote_filesystem_is_local, remote_can_execute_reverse)
7982 (remote_supports_non_stop, remote_supports_disable_randomization)
7983 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7984 (remote_supports_enable_disable_tracepoint)
7985 (remote_supports_string_tracing)
7986 (remote_can_run_breakpoint_commands, remote_trace_init)
7987 (remote_download_tracepoint, remote_can_download_tracepoint)
7988 (remote_download_trace_state_variable, remote_enable_tracepoint)
7989 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7990 (remote_trace_start, remote_get_trace_status)
7991 (remote_get_tracepoint_status, remote_trace_stop)
7992 (remote_trace_find, remote_get_trace_state_variable_value)
7993 (remote_save_trace_data, remote_get_raw_trace_data)
7994 (remote_set_disconnected_tracing, remote_core_of_thread)
7995 (remote_set_circular_trace_buffer, remote_traceframe_info)
7996 (remote_get_min_fast_tracepoint_insn_len)
7997 (remote_set_trace_buffer_size, remote_set_trace_notes)
7998 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7999 (remote_disable_btrace, remote_teardown_btrace)
8000 (remote_read_btrace, remote_btrace_conf)
8001 (remote_augmented_libraries_svr4_read, remote_load)
8002 (remote_pid_to_exec_file, remote_can_do_single_step)
8003 (remote_execution_direction, remote_thread_handle_to_thread_info):
8004 Refactor as methods of remote_target.
8005 (init_remote_ops, init_extended_remote_ops): Delete.
8006 (remote_can_async_p, remote_is_async_p, remote_async)
8007 (remote_thread_events, remote_upload_tracepoints)
8008 (remote_upload_trace_state_variables): Refactor as methods of
8010 (_initialize_remote): Remove references to init_remote_ops and
8011 init_extended_remote_ops.
8013 * remote-sim.c (gdbsim_target): New class.
8014 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8015 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8016 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8017 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8018 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8019 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8020 Refactor as methods of gdbsim_target.
8021 (gdbsim_ops): Now a gdbsim_target.
8022 (init_gdbsim_ops): Delete.
8023 (gdbsim_cntrl_c): Adjust.
8024 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8026 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8027 (the_amd64_linux_nat_target): New.
8028 (amd64_linux_fetch_inferior_registers)
8029 (amd64_linux_store_inferior_registers): Refactor as methods of
8030 amd64_linux_nat_target.
8031 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8032 * i386-linux-nat.c: Don't include "linux-nat.h".
8033 (i386_linux_nat_target): New class.
8034 (the_i386_linux_nat_target): New.
8035 (i386_linux_fetch_inferior_registers)
8036 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8037 as methods of i386_linux_nat_target.
8038 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8039 * inf-child.c (inf_child_ops): Delete.
8040 (inf_child_fetch_inferior_registers)
8041 (inf_child_store_inferior_registers): Delete.
8042 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8043 methods of inf_child_target.
8044 (inf_child_target::supports_terminal_ours)
8045 (inf_child_target::terminal_init)
8046 (inf_child_target::terminal_inferior)
8047 (inf_child_target::terminal_ours_for_output)
8048 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8049 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8051 (inf_child_open, inf_child_disconnect, inf_child_close)
8052 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8053 (inf_child_post_startup_inferior, inf_child_can_run)
8054 (inf_child_pid_to_exec_file): Refactor as methods of
8056 (inf_child_follow_fork): Delete.
8057 (inf_child_target::can_create_inferior)
8058 (inf_child_target::can_attach): New.
8059 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8060 (inf_child_target::has_stack, inf_child_target::has_registers)
8061 (inf_child_target::has_execution): New.
8062 (inf_child_fileio_open, inf_child_fileio_pwrite)
8063 (inf_child_fileio_pread, inf_child_fileio_fstat)
8064 (inf_child_fileio_close, inf_child_fileio_unlink)
8065 (inf_child_fileio_readlink, inf_child_use_agent)
8066 (inf_child_can_use_agent): Refactor as methods of
8068 (return_zero, inf_child_target): Delete.
8069 (inf_child_target::inf_child_target): New.
8070 * inf-child.h: Include "target.h".
8071 (inf_child_target): Delete function prototype.
8072 (inf_child_target): New class.
8073 (inf_child_open_target, inf_child_mourn_inferior)
8074 (inf_child_maybe_unpush_target): Delete.
8075 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8076 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8077 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8078 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8079 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8080 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8081 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8082 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8083 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8084 methods of inf_ptrace_target.
8085 (inf_ptrace_target): Delete function.
8086 * inf-ptrace.h: Include "inf-child.h".
8087 (inf_ptrace_target): Delete function declaration.
8088 (inf_ptrace_target): New class.
8089 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8090 * linux-nat.c (linux_target): New.
8091 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8092 (linux_nat_target::~linux_nat_target): New.
8093 (linux_child_post_attach, linux_child_post_startup_inferior)
8094 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8095 (linux_child_remove_fork_catchpoint)
8096 (linux_child_insert_vfork_catchpoint)
8097 (linux_child_remove_vfork_catchpoint)
8098 (linux_child_insert_exec_catchpoint)
8099 (linux_child_remove_exec_catchpoint)
8100 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8101 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8102 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8103 (linux_nat_stopped_data_address)
8104 (linux_nat_stopped_by_sw_breakpoint)
8105 (linux_nat_supports_stopped_by_sw_breakpoint)
8106 (linux_nat_stopped_by_hw_breakpoint)
8107 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8108 (linux_nat_kill, linux_nat_mourn_inferior)
8109 (linux_nat_xfer_partial, linux_nat_thread_alive)
8110 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8111 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8112 (linux_child_static_tracepoint_markers_by_strid)
8113 (linux_nat_is_async_p, linux_nat_can_async_p)
8114 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8115 (linux_nat_supports_multi_process)
8116 (linux_nat_supports_disable_randomization, linux_nat_async)
8117 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8118 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8119 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8120 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8121 methods of linux_nat_target.
8122 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8123 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8125 (check_stopped_by_watchpoint): Adjust.
8126 (linux_xfer_partial): Delete.
8127 (linux_target_install_ops, linux_target, linux_nat_add_target):
8129 (linux_nat_target::linux_nat_target): New.
8130 * linux-nat.h: Include "inf-ptrace.h".
8131 (linux_nat_target): New.
8132 (linux_target, linux_target_install_ops, linux_nat_add_target):
8133 Delete function declarations.
8134 (linux_target): Declare global.
8135 * linux-thread-db.c (thread_db_target): New.
8136 (thread_db_target::thread_db_target): New.
8137 (thread_db_ops): Delete.
8138 (the_thread_db_target): New.
8139 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8140 (thread_db_update_thread_list, thread_db_pid_to_str)
8141 (thread_db_extra_thread_info)
8142 (thread_db_thread_handle_to_thread_info)
8143 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8144 (thread_db_resume): Refactor as methods of thread_db_target.
8145 (init_thread_db_ops): Delete.
8146 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8147 * x86-linux-nat.c: Don't include "linux-nat.h".
8148 (super_post_startup_inferior): Delete.
8149 (x86_linux_nat_target::~x86_linux_nat_target): New.
8150 (x86_linux_child_post_startup_inferior)
8151 (x86_linux_read_description, x86_linux_enable_btrace)
8152 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8153 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8154 methods of x86_linux_nat_target.
8155 (x86_linux_create_target): Delete. Bits folded ...
8156 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8158 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8159 (x86_linux_nat_target): New class.
8160 (x86_linux_create_target): Delete.
8161 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8162 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8163 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8164 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8165 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8166 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8168 (x86_use_watchpoints): Delete.
8169 * x86-nat.h: Include "breakpoint.h" and "target.h".
8170 (x86_use_watchpoints): Delete.
8171 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8172 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8173 (x86_insert_watchpoint, x86_remove_watchpoint)
8174 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8175 (x86_stopped_by_hw_breakpoint): New declarations.
8176 (x86_nat_target): New template class.
8178 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8179 (the_ppc_linux_nat_target): New.
8180 (ppc_linux_fetch_inferior_registers)
8181 (ppc_linux_can_use_hw_breakpoint)
8182 (ppc_linux_region_ok_for_hw_watchpoint)
8183 (ppc_linux_ranged_break_num_registers)
8184 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8185 (ppc_linux_insert_mask_watchpoint)
8186 (ppc_linux_remove_mask_watchpoint)
8187 (ppc_linux_can_accel_watchpoint_condition)
8188 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8189 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8190 (ppc_linux_watchpoint_addr_within_range)
8191 (ppc_linux_masked_watch_num_registers)
8192 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8193 (ppc_linux_read_description): Refactor as methods of
8194 ppc_linux_nat_target.
8195 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8197 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8198 (procfs_target): New class.
8199 (the_procfs_target): New.
8200 (procfs_target): Delete function.
8201 (procfs_auxv_parse, procfs_attach, procfs_detach)
8202 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8203 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8204 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8205 (procfs_create_inferior, procfs_update_thread_list)
8206 (procfs_thread_alive, procfs_pid_to_str)
8207 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8208 (procfs_stopped_data_address, procfs_insert_watchpoint)
8209 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8210 (proc_find_memory_regions, procfs_info_proc)
8211 (procfs_make_note_section): Refactor as methods of procfs_target.
8212 (_initialize_procfs): Adjust.
8213 * sol-thread.c (sol_thread_target): New class.
8214 (sol_thread_ops): Now a sol_thread_target.
8215 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8216 (sol_thread_fetch_registers, sol_thread_store_registers)
8217 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8218 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8219 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8220 (init_sol_thread_ops): Delete.
8221 (_initialize_sol_thread): Adjust. Remove references to
8222 init_sol_thread_ops and complete_target_initialization.
8224 * windows-nat.c (windows_nat_target): New class.
8225 (windows_fetch_inferior_registers)
8226 (windows_store_inferior_registers, windows_resume, windows_wait)
8227 (windows_attach, windows_detach, windows_pid_to_exec_file)
8228 (windows_files_info, windows_create_inferior)
8229 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8230 (windows_close, windows_pid_to_str, windows_xfer_partial)
8231 (windows_get_tib_address, windows_get_ada_task_ptid)
8232 (windows_thread_name, windows_thread_alive): Refactor as
8233 windows_nat_target methods.
8234 (do_initial_windows_stuff): Adjust.
8235 (windows_target): Delete function.
8236 (_initialize_windows_nat): Adjust.
8238 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8239 (darwin_mourn_inferior, darwin_kill_inferior)
8240 (darwin_create_inferior, darwin_attach, darwin_detach)
8241 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8242 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8243 (darwin_supports_multi_process): Refactor as darwin_nat_target
8245 (darwin_resume_to, darwin_files_info): Delete.
8246 (_initialize_darwin_inferior): Rename to ...
8247 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8248 * darwin-nat.h: Include "inf-child.h".
8249 (darwin_nat_target): New class.
8250 (darwin_complete_target): Delete.
8251 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8252 (darwin_target): New.
8253 (i386_darwin_fetch_inferior_registers)
8254 (i386_darwin_store_inferior_registers): Refactor as methods of
8256 (darwin_complete_target): Delete, with ...
8257 (_initialize_i386_darwin_nat): ... bits factored out here.
8259 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8260 (the_alpha_linux_nat_target): New.
8261 (alpha_linux_register_u_offset): Refactor as
8262 alpha_linux_nat_target method.
8263 (_initialize_alpha_linux_nat): Adjust.
8264 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8265 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8266 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8267 methods of linux_nat_trad_target.
8268 (linux_trad_target): Delete.
8269 * linux-nat-trad.h (linux_trad_target): Delete function.
8270 (linux_nat_trad_target): New class.
8271 * mips-linux-nat.c (mips_linux_nat_target): New class.
8272 (super_fetch_registers, super_store_registers, super_close):
8274 (the_mips_linux_nat_target): New.
8275 (mips64_linux_regsets_fetch_registers)
8276 (mips64_linux_regsets_store_registers)
8277 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8278 (mips_linux_register_u_offset, mips_linux_read_description)
8279 (mips_linux_can_use_hw_breakpoint)
8280 (mips_linux_stopped_by_watchpoint)
8281 (mips_linux_stopped_data_address)
8282 (mips_linux_region_ok_for_hw_watchpoint)
8283 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8284 (mips_linux_close): Refactor as methods of mips_linux_nat.
8285 (_initialize_mips_linux_nat): Adjust to C++ification.
8287 * aix-thread.c (aix_thread_target): New class.
8288 (aix_thread_ops): Now an aix_thread_target.
8289 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8290 (aix_thread_fetch_registers, aix_thread_store_registers)
8291 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8292 (aix_thread_thread_alive, aix_thread_pid_to_str)
8293 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8294 Refactor as methods of aix_thread_target.
8295 (init_aix_thread_ops): Delete.
8296 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8297 and complete_target_initialization.
8298 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8299 (rs6000_nat_target): New class.
8300 (the_rs6000_nat_target): New.
8301 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8302 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8303 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8304 (super_create_inferior): Delete.
8305 (_initialize_rs6000_nat): Adjust to C++ification.
8307 * arm-linux-nat.c (arm_linux_nat_target): New class.
8308 (the_arm_linux_nat_target): New.
8309 (arm_linux_fetch_inferior_registers)
8310 (arm_linux_store_inferior_registers, arm_linux_read_description)
8311 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8312 (arm_linux_remove_hw_breakpoint)
8313 (arm_linux_region_ok_for_hw_watchpoint)
8314 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8315 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8316 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8317 arm_linux_nat_target.
8318 (_initialize_arm_linux_nat): Adjust to C++ification.
8320 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8321 (the_aarch64_linux_nat_target): New.
8322 (aarch64_linux_fetch_inferior_registers)
8323 (aarch64_linux_store_inferior_registers)
8324 (aarch64_linux_child_post_startup_inferior)
8325 (aarch64_linux_read_description)
8326 (aarch64_linux_can_use_hw_breakpoint)
8327 (aarch64_linux_insert_hw_breakpoint)
8328 (aarch64_linux_remove_hw_breakpoint)
8329 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8330 (aarch64_linux_region_ok_for_hw_watchpoint)
8331 (aarch64_linux_stopped_data_address)
8332 (aarch64_linux_stopped_by_watchpoint)
8333 (aarch64_linux_watchpoint_addr_within_range)
8334 (aarch64_linux_can_do_single_step): Refactor as methods of
8335 aarch64_linux_nat_target.
8336 (super_post_startup_inferior): Delete.
8337 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8339 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8340 (the_hppa_linux_nat_target): New.
8341 (hppa_linux_fetch_inferior_registers)
8342 (hppa_linux_store_inferior_registers): Refactor as methods of
8343 hppa_linux_nat_target.
8344 (_initialize_hppa_linux_nat): Adjust to C++ification.
8346 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8347 (the_ia64_linux_nat_target): New.
8348 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8349 (ia64_linux_stopped_data_address)
8350 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8351 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8352 ia64_linux_nat_target methods.
8353 (super_xfer_partial): Delete.
8354 (_initialize_ia64_linux_nat): Adjust to C++ification.
8356 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8357 (the_m32r_linux_nat_target): New.
8358 (m32r_linux_fetch_inferior_registers)
8359 (m32r_linux_store_inferior_registers): Refactor as
8360 m32r_linux_nat_target methods.
8361 (_initialize_m32r_linux_nat): Adjust to C++ification.
8363 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8364 (the_m68k_linux_nat_target): New.
8365 (m68k_linux_fetch_inferior_registers)
8366 (m68k_linux_store_inferior_registers): Refactor as
8367 m68k_linux_nat_target methods.
8368 (_initialize_m68k_linux_nat): Adjust to C++ification.
8370 * s390-linux-nat.c (s390_linux_nat_target): New class.
8371 (the_s390_linux_nat_target): New.
8372 (s390_linux_fetch_inferior_registers)
8373 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8374 (s390_insert_watchpoint, s390_remove_watchpoint)
8375 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8376 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8377 (s390_auxv_parse, s390_read_description): Refactor as methods of
8378 s390_linux_nat_target.
8379 (_initialize_s390_nat): Adjust to C++ification.
8381 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8382 (the_sparc_linux_nat_target): New.
8383 (_initialize_sparc_linux_nat): Adjust to C++ification.
8384 * sparc-nat.c (sparc_fetch_inferior_registers)
8385 (sparc_store_inferior_registers): Remove target_ops parameter.
8386 * sparc-nat.h (sparc_fetch_inferior_registers)
8387 (sparc_store_inferior_registers): Remove target_ops parameter.
8388 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8389 (the_sparc64_linux_nat_target): New.
8390 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8392 * spu-linux-nat.c (spu_linux_nat_target): New class.
8393 (the_spu_linux_nat_target): New.
8394 (spu_child_post_startup_inferior, spu_child_post_attach)
8395 (spu_child_wait, spu_fetch_inferior_registers)
8396 (spu_store_inferior_registers, spu_xfer_partial)
8397 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8399 (_initialize_spu_nat): Adjust to C++ification.
8401 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8402 (the_tilegx_linux_nat_target): New.
8403 (fetch_inferior_registers, store_inferior_registers):
8404 Refactor as methods.
8405 (_initialize_tile_linux_nat): Adjust to C++ification.
8407 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8408 (the_xtensa_linux_nat_target): New.
8409 (xtensa_linux_fetch_inferior_registers)
8410 (xtensa_linux_store_inferior_registers): Refactor as
8411 xtensa_linux_nat_target methods.
8412 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8414 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8415 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8416 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8417 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8418 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8419 (fbsd_stopped_by_sw_breakpoint)
8420 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8421 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8422 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8423 (fbsd_post_startup_inferior, fbsd_post_attach)
8424 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8425 (fbsd_set_syscall_catchpoint)
8426 (super_xfer_partial, super_resume, super_wait)
8427 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8428 (fbsd_handle_debug_trap): Remove target_ops parameter.
8429 (fbsd_nat_add_target): Delete.
8430 * fbsd-nat.h: Include "inf-ptrace.h".
8431 (fbsd_nat_add_target): Delete.
8432 (USE_SIGTRAP_SIGINFO): Define.
8433 (fbsd_nat_target): New class.
8435 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8436 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8437 (amd64bsd_target): Delete.
8438 * amd64-bsd-nat.h: New file.
8439 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8441 (amd64_fbsd_nat_target): New class.
8442 (the_amd64_fbsd_nat_target): New.
8443 (amd64fbsd_read_description): Refactor as method of
8444 amd64_fbsd_nat_target.
8445 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8446 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8447 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8448 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8449 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8450 (i386bsd_target): Delete.
8451 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8452 (i386bsd_fetch_inferior_registers)
8453 (i386bsd_store_inferior_registers): Declare.
8454 (i386_bsd_nat_target): New class.
8455 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8456 (the_i386_fbsd_nat_target): New.
8457 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8458 i386_fbsd_nat_target methods.
8459 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8460 (_initialize_i386fbsd_nat): Adjust to C++ification.
8461 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8462 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8463 (_initialize_x86_bsd_nat): Adjust to C++ification.
8464 * x86-bsd-nat.h: Include "x86-nat.h".
8465 (x86bsd_target): Delete declaration.
8466 (x86bsd_nat_target): New class.
8468 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8469 (the_aarch64_fbsd_nat_target): New.
8470 (aarch64_fbsd_fetch_inferior_registers)
8471 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8472 aarch64_fbsd_nat_target.
8473 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8474 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8475 (the_alpha_bsd_nat_target): New.
8476 (alphabsd_fetch_inferior_registers)
8477 (alphabsd_store_inferior_registers): Refactor as
8478 alpha_bsd_nat_target methods.
8479 (_initialize_alphabsd_nat): Refactor as methods of
8480 alpha_bsd_nat_target.
8481 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8482 (the_amd64_nbsd_nat_target): New.
8483 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8484 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8485 (the_amd64_obsd_nat_target): New.
8486 (_initialize_amd64obsd_nat): Adjust to C++ification.
8487 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8488 (the_arm_fbsd_nat_target): New.
8489 (arm_fbsd_fetch_inferior_registers)
8490 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8491 (_initialize_arm_fbsd_nat): Refactor as methods of
8492 arm_fbsd_nat_target.
8493 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8494 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8495 (the_arm_netbsd_nat_target): New.
8496 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8497 arm_netbsd_nat_target.
8498 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8499 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8500 (the_hppa_nbsd_nat_target): New.
8501 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8502 hppa_nbsd_nat_target methods.
8503 (_initialize_hppanbsd_nat): Adjust to C++ification.
8504 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8505 (the_hppa_obsd_nat_target): New.
8506 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8507 methods of hppa_obsd_nat_target.
8508 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
8510 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8511 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
8513 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8514 (_initialize_i386obsd_nat): Use add_target.
8515 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8516 (the_m68k_bsd_nat_target): New.
8517 (m68kbsd_fetch_inferior_registers)
8518 (m68kbsd_store_inferior_registers): Refactor as methods of
8519 m68k_bsd_nat_target.
8520 (_initialize_m68kbsd_nat): Adjust to C++ification.
8521 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8522 (the_mips_fbsd_nat_target): New.
8523 (mips_fbsd_fetch_inferior_registers)
8524 (mips_fbsd_store_inferior_registers): Refactor as methods of
8525 mips_fbsd_nat_target.
8526 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
8528 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8529 (the_mips_nbsd_nat_target): New.
8530 (mipsnbsd_fetch_inferior_registers)
8531 (mipsnbsd_store_inferior_registers): Refactor as methods of
8532 mips_nbsd_nat_target.
8533 (_initialize_mipsnbsd_nat): Adjust to C++ification.
8534 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8535 (the_mips64_obsd_nat_target): New.
8536 (mips64obsd_fetch_inferior_registers)
8537 (mips64obsd_store_inferior_registers): Refactor as methods of
8538 mips64_obsd_nat_target.
8539 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
8541 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8543 * nbsd-nat.h: Include "inf-ptrace.h".
8544 (nbsd_nat_target): New class.
8545 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8546 (obsd_wait): Refactor as methods of obsd_nat_target.
8547 (obsd_add_target): Delete.
8548 * obsd-nat.h: Include "inf-ptrace.h".
8549 (obsd_nat_target): New class.
8550 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8551 (the_ppc_fbsd_nat_target): New.
8552 (ppcfbsd_fetch_inferior_registers)
8553 (ppcfbsd_store_inferior_registers): Refactor as methods of
8554 ppc_fbsd_nat_target.
8555 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
8557 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8558 (the_ppc_nbsd_nat_target): New.
8559 (ppcnbsd_fetch_inferior_registers)
8560 (ppcnbsd_store_inferior_registers): Refactor as methods of
8561 ppc_nbsd_nat_target.
8562 (_initialize_ppcnbsd_nat): Adjust to C++ification.
8563 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8564 (the_ppc_obsd_nat_target): New.
8565 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8566 methods of ppc_obsd_nat_target.
8567 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
8569 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8570 (the_sh_nbsd_nat_target): New.
8571 (shnbsd_fetch_inferior_registers)
8572 (shnbsd_store_inferior_registers): Refactor as methods of
8574 (_initialize_shnbsd_nat): Adjust to C++ification.
8575 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8576 (inf_ptrace_xfer_partial): Delete.
8577 (sparc_xfer_partial, sparc_target): Delete.
8578 * sparc-nat.h (sparc_fetch_inferior_registers)
8579 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8580 (sparc_target): Delete function declaration.
8581 (sparc_target): New template class.
8582 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8583 (_initialize_sparcnbsd_nat): Adjust to C++ification.
8584 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8585 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
8587 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8588 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8589 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8590 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
8592 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8593 (the_vax_bsd_nat_target): New.
8594 (vaxbsd_fetch_inferior_registers)
8595 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8597 (_initialize_vaxbsd_nat): Adjust to C++ification.
8599 * bsd-kvm.c (bsd_kvm_target): New class.
8600 (bsd_kvm_ops): Now a bsd_kvm_target.
8601 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8602 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8603 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8605 (bsd_kvm_return_one): Delete.
8606 (bsd_kvm_add_target): Adjust to C++ification.
8608 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8609 (nto_procfs_target_procfs): New classes.
8610 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8611 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8612 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8613 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8614 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8615 (procfs_remove_hw_breakpoint, procfs_resume)
8616 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8617 (procfs_kill_inferior, procfs_store_registers)
8618 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8619 as methods of nto_procfs_target.
8620 (nto_procfs_ops): Now an nto_procfs_target_procfs.
8621 (nto_native_ops): Delete.
8622 (procfs_open, procfs_native_open): Delete.
8623 (nto_native_ops): Now an nto_procfs_target_native.
8624 (init_procfs_targets): Adjust to C++ification.
8625 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8626 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8627 Refactor as methods of nto_procfs_target.
8629 * go32-nat.c (go32_nat_target): New class.
8630 (the_go32_nat_target): New.
8631 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8632 (go32_store_registers, go32_xfer_partial, go32_files_info)
8633 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8634 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8635 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8636 (go32_pid_to_str): Refactor as methods of go32_nat_target.
8637 (go32_target): Delete.
8638 (_initialize_go32_nat): Adjust to C++ification.
8640 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8641 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8642 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8643 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8645 (gnu_target): Delete.
8646 * gnu-nat.h (gnu_target): Delete.
8647 (gnu_nat_target): New class.
8648 * i386-gnu-nat.c (gnu_base_target): New.
8649 (i386_gnu_nat_target): New class.
8650 (the_i386_gnu_nat_target): New.
8651 (_initialize_i386gnu_nat): Adjust to C++ification.
8653 2018-05-02 Pedro Alves <palves@redhat.com>
8655 * bfd-target.c (target_bfd_xclose): Rename to ...
8656 (target_bfd_close): ... this.
8657 (target_bfd_reopen): Adjust.
8658 * target.c (target_close): Remove references to to_xclose.
8659 * target.h (target_ops::to_xclose): Delete.
8660 (target_ops::to_close): Update comments.
8662 2018-05-02 Pedro Alves <palves@redhat.com>
8664 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8666 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8667 * inf-ptrace.c (inf_ptrace_register_u_offset)
8668 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8669 (inf_ptrace_store_register, inf_ptrace_store_registers)
8670 (inf_ptrace_trad_target): Move to ...
8671 * linux-nat-trad.c: ... this new file.
8672 * linux-nat-trad.h: New file.
8673 * linux-nat.c (linux_target_install_ops): Make extern.
8674 (linux_trad_target): Delete.
8675 * linux-nat.h (linux_trad_target): Delete declaration.
8676 (linux_target_install_ops): Declare.
8677 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8680 2018-05-02 Pedro Alves <palves@redhat.com>
8682 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8683 procfs_target/add_target here.
8684 * procfs.c (procfs_target): Make static.
8685 (_initialize_procfs): Call add_target here.
8686 * procfs.h (struct target_ops): Remove forward declaration.
8687 (procfs_target): Remove declaration.
8688 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8690 2018-05-02 Pedro Alves <palves@redhat.com>
8692 * procfs.c (procfs_stopped_by_watchpoint)
8693 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8694 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8696 (procfs_use_watchpoints): Delete, move contents...
8697 (procfs_target): ... here.
8698 * procfs.h (procfs_use_watchpoints): Delete declaration.
8699 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8700 procfs_use_watchpoints.
8701 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8702 procfs_use_watchpoints.
8704 2018-05-02 Tom Tromey <tom@tromey.com>
8707 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8708 and var_zuinteger_unlimited.
8709 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8710 and PARAM_ZUINTEGER_UNLIMITED.
8711 (set_parameter_value): Handle var_zuinteger and
8712 var_zuinteger_unlimited.
8713 (add_setshow_generic): Likewise.
8714 (parmpy_init): Likewise.
8716 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8719 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8720 pointer is not null before dereferencing it.
8722 2018-04-30 Tom Tromey <tom@tromey.com>
8724 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8727 2018-04-30 Tom Tromey <tom@tromey.com>
8729 * breakpoint.c (mention): Remove use of is_mi_like_p.
8730 (print_mention_ranged_breakpoint): Likewise.
8731 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8734 2018-04-30 Tom Tromey <tom@tromey.com>
8736 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8738 2018-04-30 Tom Tromey <tom@tromey.com>
8740 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8741 (info_spu_event_command): Remove some uses of is_mi_like_p.
8743 2018-04-30 Tom Tromey <tom@tromey.com>
8745 * python/py-framefilter.c (py_print_single_arg)
8746 (enumerate_locals, py_print_args, py_print_frame): Remove some
8747 uses of is_mi_like_p.
8749 2018-04-30 Tom Tromey <tom@tromey.com>
8752 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8753 * ui-out.h (ui_out::is_mi_like_p): Now const.
8754 (ui_out::do_is_mi_like_p): Now const.
8755 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8757 2018-04-30 Tom Tromey <tom@tromey.com>
8759 * varobj.c (varobj_set_visualizer): Use new_reference.
8760 * python/python.c (gdbpy_decode_line): Use new_reference.
8761 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8764 2018-04-30 Tom Tromey <tom@tromey.com>
8766 * varobj.c (install_new_value): Use new_reference.
8767 * value.h (value_incref): Return void. Swap intro comment with
8769 * value.c (set_value_parent): Use new_reference.
8770 (value_incref): Return void. Update intro comment.
8771 (release_value): Use new_reference.
8772 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8774 2018-04-30 Tom Tromey <tom@tromey.com>
8776 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8777 * gdb_bfd.h (new_bfd_ref): Remove.
8778 (gdb_bfd_open): Update comment.
8779 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8780 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8781 (gdb_bfd_fdopenr): Use new_reference.
8782 * exec.c (exec_file_attach): Use new_reference.
8784 2018-04-30 Tom Tromey <tom@tromey.com>
8786 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8789 2018-04-30 Tom Tromey <tom@tromey.com>
8791 * jit.c (jit_read_code_entry): Use type_align.
8792 * i386-tdep.c (i386_gdbarch_init): Don't call
8793 set_gdbarch_long_long_align_bit.
8794 * gdbarch.sh: Remove long_long_align_bit.
8795 * gdbarch.c, gdbarch.h: Rebuild.
8796 * arc-tdep.c (arc_type_align): New function.
8797 (arc_gdbarch_init): Use arc_type_align. Don't call
8798 set_gdbarch_long_long_align_bit.
8800 2018-04-30 Tom Tromey <tom@tromey.com>
8802 * rust-lang.c (rust_type_alignment): Remove.
8803 (rust_composite_type): Use type_align.
8805 2018-04-30 Tom Tromey <tom@tromey.com>
8807 * NEWS: Mention Type.align.
8808 * python/py-type.c (typy_get_alignof): New function.
8809 (type_object_getset): Add "alignof".
8811 2018-04-30 Tom Tromey <tom@tromey.com>
8815 * std-operator.def (UNOP_ALIGNOF): New operator.
8816 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8818 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8819 * c-lang.c (c_op_print_tab): Add alignof.
8820 * c-exp.y (ALIGNOF): New token.
8821 (exp): Add "ALIGNOF" production.
8822 (ident_tokens): Add _Alignof and alignof.
8824 2018-04-30 Tom Tromey <tom@tromey.com>
8826 * i386-tdep.c (i386_type_align): New function.
8827 (i386_gdbarch_init): Update.
8828 * gdbarch.sh (type_align): New method.
8829 * gdbarch.c, gdbarch.h: Rebuild.
8830 * arch-utils.h (default_type_align): Declare.
8831 * arch-utils.c (default_type_align): New function.
8832 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8833 (struct type) <align_log2>: New field.
8834 <instance_flags>: Now a bitfield.
8835 (TYPE_RAW_ALIGN): New macro.
8836 (type_align, type_raw_align, set_type_align): Declare.
8837 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8839 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8840 (get_alignment, maybe_set_alignment): New functions.
8841 (read_structure_type, read_enumeration_type, read_array_type)
8842 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8843 (read_subrange_type, read_base_type): Set type alignment.
8845 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8847 * dwarf2read.c (read_index_from_section): Use bool.
8849 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8852 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8855 2018-04-29 John Reiser <jreiser@BitWagon.com>
8858 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8859 last step, and do it atomically.
8861 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8863 * compile/compile-c-types.c (convert_int, convert_float):
8866 2018-04-27 Tom Tromey <tom@tromey.com>
8869 * rust-lang.c (rust_inclusive_range_type_p): New function.
8870 (rust_range): Handle inclusive ranges.
8871 (rust_compute_range): Likewise.
8872 * rust-exp.y (struct rust_op) <inclusive>: New field.
8873 (DOTDOTEQ): New constant.
8874 (range_expr): Add "..=" productions.
8875 (operator_tokens): Add "..=" token.
8876 (ast_range): Add "inclusive" parameter.
8877 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8879 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8881 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8882 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8884 * expprint.c (print_subexp_standard): Handle new bounds values.
8885 (dump_subexp_body_standard): Likewise.
8887 2018-04-27 Tom Tromey <tom@tromey.com>
8889 * configure: Rebuild.
8890 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8891 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8893 (class symbol_needs_eval_context): Likewise.
8894 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8895 (mock_mapped_index::symbol_name_at): Use "override". Remove
8897 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8899 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8900 * aarch64-tdep.c (instruction_reader::read): Use "override".
8901 (instruction_reader_test::read): Likewise.
8902 * arm-tdep.c (instruction_reader::read): Use "override".
8903 (instruction_reader_thumb::read): Likewise.
8905 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8908 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8909 instead of remote_send.
8910 (remote_send): Remove.
8912 2018-04-26 Pedro Alves <palves@redhat.com>
8914 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8915 find_function_start_sal instead of find_pc_line.
8917 2018-04-26 Pedro Alves <palves@redhat.com>
8919 * breakpoint.c (set_breakpoint_location_function): Handle
8921 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8922 * elfread.c (elf_symtab_read): Give data symbols with
8923 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8924 (elf_rel_plt_read): Update comment.
8925 * linespec.c (convert_linespec_to_sals): Handle
8927 (minsym_found): Handle mst_data_gnu_ifunc.
8928 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8929 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8930 * parse.c (find_minsym_type_and_address): Handle
8932 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8933 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8934 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8936 <mst_data_gnu_ifunc>: New enumerator.
8938 2018-04-26 Pedro Alves <palves@redhat.com>
8940 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8941 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8942 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8944 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8945 (lookup_minimal_symbol_by_pc): Adjust.
8946 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8947 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8948 * minsyms.h (lookup_msym_prefer): New enum.
8949 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8950 parameter by a lookup_msym_prefer parameter.
8952 2018-04-26 Pedro Alves <palves@redhat.com>
8954 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8955 ends in "@plt" instead of looking at the symbol's section.
8957 2018-04-26 Pedro Alves <palves@redhat.com>
8959 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8961 (find_pc_partial_function_gnu_ifunc): Rename to ...
8962 (find_pc_partial_function): ... this, and remove references to
8964 (find_pc_partial_function): Delete old implementation.
8965 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8967 2018-04-26 Pedro Alves <palves@redhat.com>
8969 * linespec.c (struct bound_minimal_symbol_search_key): New.
8970 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8971 skip first line if we found a GNU ifunc minimal symbol by name.
8972 (compare_msymbols): Change parameters to work with a destructured
8974 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8977 2018-04-26 Pedro Alves <palves@redhat.com>
8979 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8980 ifunc targets here. Instead, if we have an ifunc minsym, use its
8982 (add_location_to_breakpoint): Store the minsym and the objfile in
8983 the breakpoint location.
8984 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8985 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8986 Record the minsym in the sal.
8987 * symtab.h (symtab_and_line) <msymbol>: New field.
8989 2018-04-26 Pedro Alves <palves@redhat.com>
8991 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8992 unless we actually resolved the ifunc.
8994 2018-04-26 Pedro Alves <palves@redhat.com>
8996 * c-exp.y (variable production): Prefer ifunc minsyms over
8997 regular function symbols.
8998 * symtab.c (find_gnu_ifunc): New function.
8999 * minsyms.h (lookup_msym_prefer): New enum.
9000 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9001 parameter by a lookup_msym_prefer parameter.
9002 * symtab.h (find_gnu_ifunc): New declaration.
9004 2018-04-26 Pedro Alves <palves@redhat.com>
9006 * blockframe.c (find_gnu_ifunc_target_type): New function.
9007 (find_function_type): New.
9008 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9009 return a value with a memory address.
9010 (eval_call): For calls to GNU ifunc functions, try to find the
9011 type of the target function from the type that the resolver
9013 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9015 * infcall.c (find_function_return_type): Delete.
9016 (find_function_addr): Add 'function_type' parameter. For calls to
9017 GNU ifunc functions, try to find the type of the target function
9018 from the type that the resolver returns, and return it via
9020 (call_function_by_hand_dummy): Adjust to use the function type
9021 returned by find_function_addr.
9022 (find_function_addr): Add 'function_type' parameter and move
9024 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9027 2018-04-26 Pedro Alves <palves@redhat.com>
9029 * c-exp.y (variable production): Skip finding an alias for ifunc
9032 2018-04-26 Pedro Alves <palves@redhat.com>
9034 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9036 2018-04-25 Pedro Alves <palves@redhat.com>
9038 * infcmd.c (kill_command): Print the pid as string, not the whole
9039 thread's ptid. Add comment. s/has been killed/killed/ in output
9041 * remote.c (remote_detach_1): Print the pid as string, not the
9042 whole thread's ptid.
9044 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9045 Sergio Durigan Junior <sergiodj@redhat.com>
9046 Pedro Alves <palves@redhat.com>
9048 * infcmd.c (kill_command): Print message when inferior has
9050 * inferior.c (print_inferior_events): Remove 'static'. Set as
9052 (add_inferior): Improve message printed when
9053 'print_inferior_events' is on.
9054 (exit_inferior): Remove message printed when
9055 'print_inferior_events' is on.
9056 (detach_inferior): Improve message printed when
9057 'print_inferior_events' is on.
9058 (initialize_inferiors): Use 'add_inferior_silent' to set
9059 'current_inferior_'.
9060 * inferior.h (print_inferior_events): Declare here as
9062 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9063 '[Detaching...]' messages when 'print_inferior_events' is on.
9064 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9065 as prefix/suffix for messages. Remove periods. Fix erroneous
9066 'Detaching after fork from child...', replace it by '... from
9068 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9069 prefix/suffix when printing 'Detaching...' messages. Print
9070 them when 'print_inferior_events' is on.
9071 * remote.c (remote_detach_1): Print message when detaching
9072 from inferior and '!is_fork_parent'.
9074 2018-04-24 Tom Tromey <tom@tromey.com>
9076 * cli-out.h: Reindent.
9078 2018-04-24 Tom Tromey <tom@tromey.com>
9080 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9081 (cli_ui_out::do_field_string): Use fputs_filtered.
9082 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9084 2018-04-23 Tom Tromey <tom@tromey.com>
9086 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9087 gdb::unique_xmalloc_ptr.
9089 2018-04-23 Tom Tromey <tom@tromey.com>
9091 * configure: Rebuild.
9093 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9096 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9097 prepare_for_testing. Set normal_bp to r_debug_state if target
9100 2018-04-21 Pedro Alves <palves@redhat.com>
9101 Rajendra SY <rajendra.sy@gmail.com>
9103 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9104 * remote.c (extended_remote_attach): In all-stop mode, mark the
9105 thread as executing.
9107 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9109 * thread.c (thread_apply_all_command): Fix comment.
9110 (thread_command): Fix comment.
9112 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9114 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9116 * features/aarch64-core.c (create_feature_aarch64_core):
9118 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9120 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9122 * features/i386/32bit-avx512.c
9123 (create_feature_i386_32bit_avx512): Likewise.
9124 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9126 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9128 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9130 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9132 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9134 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9136 * features/i386/64bit-avx512.c
9137 (create_feature_i386_64bit_avx512): Likewise.
9138 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9140 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9142 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9144 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9146 * features/i386/64bit-segments.c
9147 (create_feature_i386_64bit_segments): Likewise.
9148 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9150 * features/i386/x32-core.c
9151 (create_feature_i386_x32_core): Likewise.
9152 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9153 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9154 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9155 * target-descriptions.c: In generated code, don't pass xml
9158 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9160 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9161 (print_xml_feature::visit_post): Likewise.
9162 (print_xml_feature::visit): Likewise.
9163 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9164 (print_xml_feature): Add new class.
9165 * regformats/regdat.sh: Null xmltarget on feature targets.
9166 * target-descriptions.c (struct target_desc): Add xmltarget.
9167 (maintenance_check_tdesc_xml_convert): Add unittest function.
9168 (tdesc_get_features_xml): Add function to get xml.
9169 (maintenance_check_xml_descriptions): Test xml generation.
9170 * xml-tdesc.c (string_read_description_xml): Add function.
9171 * xml-tdesc.h (string_read_description_xml): Add declaration.
9173 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9175 * features/Makefile: Add feature marker to targets with new style
9176 target descriptions.
9177 * regformats/aarch64.dat: Regenerate.
9178 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9179 * regformats/i386/amd64-avx-linux.dat: Likewise.
9180 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9181 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9182 * regformats/i386/amd64-linux.dat: Likewise.
9183 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9184 * regformats/i386/amd64.dat: Likewise.
9185 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9186 * regformats/i386/i386-avx-linux.dat: Likewise.
9187 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9188 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9189 * regformats/i386/i386-linux.dat: Likewise.
9190 * regformats/i386/i386-mmx-linux.dat: Likewise.
9191 * regformats/i386/i386-mpx-linux.dat: Likewise.
9192 * regformats/i386/i386.dat: Likewise.
9193 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9194 * regformats/i386/x32-avx-linux.dat: Likewise.
9195 * regformats/i386/x32-linux.dat: Likewise.
9196 * regformats/tic6x-c62x-linux.dat: Likewise.
9197 * regformats/tic6x-c64x-linux.dat: Likewise.
9198 * regformats/tic6x-c64xp-linux.dat: Likewise.
9199 * regformats/regdat.sh: Parse feature marker.
9201 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9203 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9204 (tdesc_osabi_name): Likewise.
9205 * target-descriptions.c (tdesc_architecture_name): Add new
9207 (tdesc_osabi_name): Likewise.
9209 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9211 * common/tdesc.c (tdesc_predefined_type): Move to here.
9212 (tdesc_named_type): Likewise.
9213 (tdesc_create_vector): Likewise.
9214 (tdesc_create_struct): Likewise.
9215 (tdesc_set_struct_size): Likewise.
9216 (tdesc_create_union): Likewise.
9217 (tdesc_create_flags): Likewise.
9218 (tdesc_create_enum): Likewise.
9219 (tdesc_add_field): Likewise.
9220 (tdesc_add_typed_bitfield): Likewise.
9221 (tdesc_add_bitfield): Likewise.
9222 (tdesc_add_flag): Likewise.
9223 (tdesc_add_enum_value): Likewise.
9224 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9225 (struct tdesc_type_vector): Likewise.
9226 (struct tdesc_type_field): Likewise.
9227 (struct tdesc_type_with_fields): Likewise.
9228 (tdesc_create_enum): Add declaration.
9229 (tdesc_add_typed_bitfield): Likewise.
9230 (tdesc_add_enum_value): Likewise.
9231 * target-descriptions.c (tdesc_type_field): Move from here.
9232 (tdesc_type_builtin): Likewise.
9233 (tdesc_type_vector): Likewise.
9234 (tdesc_type_with_fields): Likewise.
9235 (tdesc_predefined_types): Likewise.
9236 (tdesc_named_type): Likewise.
9237 (tdesc_create_vector): Likewise.
9238 (tdesc_create_struct): Likewise.
9239 (tdesc_set_struct_size): Likewise.
9240 (tdesc_create_union): Likewise.
9241 (tdesc_create_flags): Likewise.
9242 (tdesc_create_enum): Likewise.
9243 (tdesc_add_field): Likewise.
9244 (tdesc_add_typed_bitfield): Likewise.
9245 (tdesc_add_bitfield): Likewise.
9246 (tdesc_add_flag): Likewise.
9247 (tdesc_add_enum_value): Likewise.
9248 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9249 (tdesc_add_typed_bitfield): Likewise.
9250 (tdesc_add_enum_value): Likewise.
9252 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9254 * common/tdesc.c (tdesc_feature::accept): Move to here.
9255 (tdesc_feature::operator==): Likewise.
9256 (tdesc_create_reg): Likewise.
9257 * common/tdesc.h (tdesc_type_kind): Likewise.
9258 (struct tdesc_type): Likewise.
9259 (struct tdesc_feature): Likewise.
9260 * regformats/regdat.sh: Create a feature.
9261 * target-descriptions.c (tdesc_type_kind): Move from here.
9262 (tdesc_type): Likewise.
9263 (tdesc_type_up): Likewise.
9264 (tdesc_feature): Likewise.
9265 (tdesc_create_reg): Likewise.
9267 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9269 * Makefile.in: Add arch/tdesc.c
9270 * common/tdesc.c: New file.
9271 * common/tdesc.h (tdesc_element_visitor): Move to here.
9272 (tdesc_element): Likewise.
9273 (tdesc_reg): Likewise.
9274 (tdesc_reg_up): Likewise.
9275 * regformats/regdef.h (reg): Add offset to constructors.
9276 * target-descriptions.c (tdesc_element_visitor): Move from here.
9277 (tdesc_element): Likewise.
9278 (tdesc_reg): Likewise.
9279 (tdesc_reg_up): Likewise.
9281 2018-04-17 Tom Tromey <tom@tromey.com>
9283 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9286 2018-04-17 Tom Tromey <tom@tromey.com>
9288 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9290 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9292 * symtab.c (print_symbol_info): Skip printing filename and line
9293 number when `last' is NULL.
9294 (symtab_symbol_info): Use empty string instead of NULL for first
9295 invocation of print_symbol_info.
9296 (rbreak_command): Pass NULL to `last' parameter of
9299 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9301 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9304 2018-04-16 Pedro Alves <palves@redhat.com>
9306 * MAINTAINERS (sh): Remove.
9307 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9308 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9309 (ALLDEPFILES): Remove sh64-tdep.c.
9310 * NEWS: Mentions that support for SH-5/SH64 is removed.
9311 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9312 (sh*-*-openbsd*): Ditto.
9313 (sh64-*-elf*): Remove.
9315 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9316 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9317 * sh-tdep.c: No longer include "sh64-tdep.h".
9318 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9319 * sh64-tdep.c, sh64-tdep.h: Remove files.
9321 2018-04-16 Pedro Alves <palves@redhat.com>
9323 * MAINTAINERS: Remove m88k.
9324 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9325 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9326 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9327 * NEWS: Mention that support for m88k was removed.
9328 * configure.host (m88*-*-*): Remove support.
9329 * configure.nat (m88k-*-*): Remove support.
9330 * configure.tgt (m88*-*-openbsd*): Remove.
9331 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9333 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9335 * configure.tgt (x86_tobjs): New variable.
9336 (amd64_tobjs, i386_tobjs): Use it.
9338 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9340 * symtab.c (print_symbol_info): Precede the symbol definition by
9341 the line number when available.
9342 * NEWS: Advertise this enhancement.
9344 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9346 * NEWS (New options): announce set/show record btrace cpu.
9347 * btrace.c: Include record-btrace.h.
9348 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9349 the vendor is unknown.
9350 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9351 Maybe overwrite the btrace configuration's cpu.
9352 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9353 (btrace_fetch): Add cpu parameter. Update callers.
9354 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9355 Maybe overwrite the btrace configuration's cpu. Skip enabling
9356 errata workarounds if the vendor is unknown.
9357 * python/py-record-btrace.c: Include record-btrace.h.
9358 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9359 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9360 * record-btrace.c (record_btrace_cpu_state_kind): New.
9361 (record_btrace_cpu): New.
9362 (set_record_btrace_cpu_cmdlist): New.
9363 (record_btrace_get_cpu): New.
9364 (require_btrace_thread, record_btrace_info)
9365 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9366 (cmd_set_record_btrace_cpu_none): New.
9367 (cmd_set_record_btrace_cpu_auto): New.
9368 (cmd_set_record_btrace_cpu): New.
9369 (cmd_show_record_btrace_cpu): New.
9370 (_initialize_record_btrace): Initialize set/show record btrace cpu
9372 * record-btrace.h (record_btrace_get_cpu): New.
9374 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9376 * record.c (set_record_command): Fix typo in message.
9378 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9380 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9382 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9384 * infrun.c (process_event_stop_test): Call
9385 gdbarch_in_indirect_branch_thunk.
9386 * gdbarch.sh (in_indirect_branch_thunk): New.
9387 * gdbarch.c: Regenerated.
9388 * gdbarch.h: Regenerated.
9391 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9392 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9393 (ALLDEPFILES): Add x86-tdep.c.
9394 * arch-utils.h (default_in_indirect_branch_thunk): New.
9395 * arch-utils.c (default_in_indirect_branch_thunk): New.
9396 * i386-tdep: Include x86-tdep.h.
9397 (i386_in_indirect_branch_thunk): New.
9398 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9400 * amd64-tdep: Include x86-tdep.h.
9401 (amd64_in_indirect_branch_thunk): New.
9402 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9404 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9407 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9408 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9409 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9412 2018-04-12 Tom Tromey <tom@tromey.com>
9414 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9415 (rust_evaluate_subexp): Likewise.
9417 2018-04-12 Pedro Alves <palves@redhat.com>
9419 * procfs.c (procfs_detach): Make forward declaration's prototype
9420 match definition's protototype.
9421 (proc_get_LDT_entry): Remove stale do_cleanups call.
9423 2018-04-12 Pedro Alves <palves@redhat.com>
9425 * target.h (target_ops::to_has_exited): Delete.
9426 (target_has_exited): Delete.
9427 * target-delegates.c: Regenerate.
9429 2018-04-11 Pedro Alves <palves@redhat.com>
9431 * target.c (fileio_fh_t::t): Add comment.
9432 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9433 (target_fileio_close): Handle a NULL target.
9434 (invalidate_fileio_fh): New.
9435 (target_close): Call it.
9436 * remote.c (remote_hostio_send_command): No longer check whether
9437 remote_desc is open.
9439 2018-04-11 Pedro Alves <palves@redhat.com>
9441 * target.c (fileio_fh_t): Make it a named struct instead of a
9443 (fileio_fh_t::is_closed): New method.
9444 (DEF_VEC_O (fileio_fh_t)): Remove.
9445 (fileio_fhandles): Now a std::vector.
9446 (is_closed_fileio_fh): Delete.
9447 (acquire_fileio_fd): Adjust. Rename parameters.
9448 (release_fileio_fd): Adjust.
9449 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9450 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9451 (target_fileio_close): Adjust.
9453 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
9455 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9458 2018-04-10 Pedro Alves <palves@redhat.com>
9460 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9461 (scoped_finish_thread_state): New class.
9462 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9464 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9465 (fetch_inferior_event, normal_stop): Likewise.
9466 * thread.c (finish_thread_state_cleanup): Delete.
9468 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9469 Pedro Alves <palves@redhat.com>
9471 * value.c: Include "selftest.h" and "common/array-view.h".
9472 (struct range) <operator ==>: New.
9473 (test_ranges_contain): New.
9474 (check_ranges_vector): New.
9475 (test_insert_into_bit_range_vector): New.
9476 (_initialize_values): Register selftests.
9477 * common/array-view.h (operator==, operator!=): New.
9479 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9481 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9483 * inline-frame.c: Include <algorithm>.
9484 (struct inline_state): Add constructor.
9485 (inline_state_s): Remove.
9486 (DEF_VEC_O(inline_state_s)): Remove.
9487 (inline_states): Change type to std::vector.
9488 (find_inline_frame_state): Adjust to std::vector.
9489 (allocate_inline_frame_state): Remove.
9490 (clear_inline_frame_state): Adjust to std::vector.
9491 (skip_inline_frames): Adjust to std::vector.
9493 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9495 * tracepoint.h (struct trace_state_variable): Add constructor.
9496 <name>: Change type to std::string.
9497 * tracepoint.c (tsv_s): Remove.
9498 (DEF_VEC_O(tsv_s)): Remove.
9499 (tvariables): Change to std::vector.
9500 (create_trace_state_variable): Adjust to std::vector.
9501 (find_trace_state_variable): Likewise.
9502 (find_trace_state_variable_by_number): Likewise.
9503 (delete_trace_state_variable): Likewise.
9504 (trace_variable_command): Adjust to std::string.
9505 (delete_trace_variable_command): Likewise.
9506 (tvariables_info_1): Adjust to std::vector.
9507 (save_trace_state_variables): Likewise.
9508 (start_tracing): Likewise.
9509 (merge_uploaded_trace_state_variables): Adjust to std::vector
9511 * target.h (struct target_ops)
9512 <to_download_trace_state_variable>: Pass reference to
9513 trace_state_variable.
9514 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9515 * target-delegates.c: Re-generate.
9516 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9517 (mi_tsv_deleted): Likewise.
9518 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9519 * remote.c (remote_download_trace_state_variable): Change
9520 pointer to reference and adjust.
9521 * make-target-delegates (parse_argtypes): Handle references.
9522 (write_function_header): Likewise.
9523 (munge_type): Likewise.
9525 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9527 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9528 string_view-selftests.c.
9529 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9531 * unittests/basic_string_view/cons/char/1.cc: Likewise.
9532 * unittests/basic_string_view/cons/char/2.cc: Likewise.
9533 * unittests/basic_string_view/cons/char/3.cc: Likewise.
9534 * unittests/basic_string_view/element_access/char/1.cc:
9536 * unittests/basic_string_view/element_access/char/empty.cc:
9538 * unittests/basic_string_view/element_access/char/front_back.cc:
9540 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9541 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9543 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9545 * unittests/basic_string_view/modifiers/swap/char/1.cc:
9547 * unittests/basic_string_view/operations/compare/char/1.cc:
9549 * unittests/basic_string_view/operations/compare/char/13650.cc:
9551 * unittests/basic_string_view/operations/copy/char/1.cc:
9553 * unittests/basic_string_view/operations/data/char/1.cc:
9555 * unittests/basic_string_view/operations/find/char/1.cc:
9557 * unittests/basic_string_view/operations/find/char/2.cc:
9559 * unittests/basic_string_view/operations/find/char/3.cc:
9561 * unittests/basic_string_view/operations/find/char/4.cc:
9563 * unittests/basic_string_view/operations/rfind/char/1.cc:
9565 * unittests/basic_string_view/operations/rfind/char/2.cc:
9567 * unittests/basic_string_view/operations/rfind/char/3.cc:
9569 * unittests/basic_string_view/operations/substr/char/1.cc:
9571 * unittests/basic_string_view/operators/char/2.cc: Likewise.
9572 * unittests/string_view-selftests.c: New file.
9574 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9576 * unittests/basic_string_view/capacity/1.cc: New file.
9577 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9578 * unittests/basic_string_view/cons/char/1.cc: New file.
9579 * unittests/basic_string_view/cons/char/2.cc: New file.
9580 * unittests/basic_string_view/cons/char/3.cc: New file.
9581 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9582 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9583 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9584 * unittests/basic_string_view/element_access/char/1.cc: New file.
9585 * unittests/basic_string_view/element_access/char/2.cc: New file.
9586 * unittests/basic_string_view/element_access/char/empty.cc: New file.
9587 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9588 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9589 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9590 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9591 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9592 * unittests/basic_string_view/include.cc: New file.
9593 * unittests/basic_string_view/inserters/char/1.cc: New file.
9594 * unittests/basic_string_view/inserters/char/2.cc: New file.
9595 * unittests/basic_string_view/inserters/char/3.cc: New file.
9596 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9597 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9598 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9599 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9600 * unittests/basic_string_view/literals/types.cc: New file.
9601 * unittests/basic_string_view/literals/values.cc: New file.
9602 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9603 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9604 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9605 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9606 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9607 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9608 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9609 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9610 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9611 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9612 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9613 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9614 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9615 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9616 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9617 * unittests/basic_string_view/operations/data/char/1.cc: New file.
9618 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9619 * unittests/basic_string_view/operations/find/char/1.cc: New file.
9620 * unittests/basic_string_view/operations/find/char/2.cc: New file.
9621 * unittests/basic_string_view/operations/find/char/3.cc: New file.
9622 * unittests/basic_string_view/operations/find/char/4.cc: New file.
9623 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9624 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9625 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9626 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9627 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9628 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9629 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9630 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9631 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9632 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9633 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9634 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9635 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9636 * unittests/basic_string_view/operators/char/2.cc: New file.
9637 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9638 * unittests/basic_string_view/range_access/char/1.cc: New file.
9639 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9640 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9641 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9642 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9643 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9644 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9645 * unittests/basic_string_view/requirements/typedefs.cc: New file.
9646 * unittests/basic_string_view/typedefs.cc: New file.
9647 * unittests/basic_string_view/types/1.cc: New file.
9649 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9651 * common/gdb_string_view.h: Remove libstdc++ implementation
9652 details, adjust to gdb reality.
9653 * common/gdb_string_view.tcc: Likewise.
9654 * cli/cli-script.c (struct string_view): Remove.
9655 (user_args) <m_args>: Change element type to gdb::string_view.
9656 (user_args::insert_args): Adjust.
9658 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9660 * common/gdb_string_view.h: New file.
9661 * common/gdb_string_view.tcc: New file.
9663 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9665 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9666 * configure: Re-generate.
9668 2018-04-09 Pedro Alves <palves@redhat.com>
9670 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9671 (set_target_gdbarch): Call
9672 gdb::observers::architecture_changed.notify instead of
9673 observer_notify_architecture_changed.
9675 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9677 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9678 (do_restore_current_traceframe_cleanup): Remove.
9679 (restore_current_traceframe_cleanup_dtor): Remove.
9680 (make_cleanup_restore_current_traceframe): Remove.
9681 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9683 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9684 * infrun.c (fetch_inferior_event): Use
9685 scoped_restore_current_traceframe.
9687 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9689 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9691 <n_allocated_type_units>: Remove.
9692 <all_type_units>: Change to std::vector.
9693 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9694 to std::vector change.
9695 (dwarf2_per_objfile::get_cutu): Likewise.
9696 (dwarf2_per_objfile::get_tu): Likewise.
9697 (create_signatured_type_table_from_index): Likewise.
9698 (create_signatured_type_table_from_debug_names): Likewise.
9699 (dw2_symtab_iter_next): Likewise.
9700 (dw2_print_stats): Likewise.
9701 (dw2_expand_all_symtabs): Likewise.
9702 (dw2_expand_marked_cus): Likewise.
9703 (dw2_debug_names_iterator::next): Likewise.
9704 (dwarf2_initialize_objfile): Likewise.
9705 (add_signatured_type_cu_to_table): Likewise.
9706 (create_all_type_units): Likewise.
9707 (add_type_unit): Likewise.
9708 (struct tu_abbrev_offset): Add constructor.
9709 (build_type_psymtabs_1): Adjust to std::vector change.
9710 (print_tu_stats): Likewise.
9711 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9712 (write_debug_names): Likewise.
9714 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9716 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9717 Make an std::vector.
9718 <n_comp_units>: Remove.
9719 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9720 to std::vector change.
9721 (dwarf2_per_objfile::get_cutu): Likewise.
9722 (dwarf2_per_objfile::get_cu): Likewise.
9723 (create_cus_from_index): Likewise.
9724 (create_addrmap_from_index): Likewise.
9725 (create_addrmap_from_aranges): Likewise.
9726 (dwarf2_read_index): Likewise.
9727 (dw2_find_last_source_symtab): Likewise.
9728 (dw2_map_symtabs_matching_filename): Likewise.
9729 (dw2_symtab_iter_next): Likewise.
9730 (dw2_print_stats): Likewise.
9731 (dw2_expand_all_symtabs): Likewise.
9732 (dw2_expand_symtabs_with_fullname): Likewise.
9733 (dw2_expand_marked_cus): Likewise.
9734 (dw2_map_symbol_filenames): Likewise.
9735 (create_cus_from_debug_names): Likewise.
9736 (dwarf2_read_debug_names): Likewise.
9737 (dw2_debug_names_iterator::next): Likewise.
9738 (dwarf2_initialize_objfile): Likewise.
9739 (set_partial_user): Likewise.
9740 (dwarf2_build_psymtabs_hard): Likewise.
9741 (read_comp_units_from_section): Remove arguments, adjust to
9743 (create_all_comp_units): Adjust to std::vector and
9744 read_comp_units_from_section changes.
9745 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9747 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9748 (psyms_seen_size): Likewise.
9749 (write_gdbindex): Likewise.
9750 (write_debug_names): Likewise.
9752 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9754 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9755 with dwarf2_per_objfile.
9756 (create_cus_from_index): Likewise.
9757 (create_signatured_type_table_from_index): Likewise.
9758 (dwarf2_read_index): Likewise.
9759 (dwarf2_initialize_objfile): Likewise.
9760 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9761 per_cu rather than get_dwarf2_per_objfile.
9763 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9765 * dwarf2read.h (struct signatured_type): Forward declare.
9766 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9768 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9769 (dw2_get_cutu): ...this.
9770 (dwarf2_per_objfile::get_cu): Rename from...
9771 (dw2_get_cu): ...this.
9772 (dwarf2_per_objfile::get_tu): New.
9773 (create_addrmap_from_index): Adjust.
9774 (create_addrmap_from_aranges): Adjust.
9775 (dw2_find_last_source_symtab): Adjust.
9776 (dw2_map_symtabs_matching_filename): Adjust.
9777 (dw2_symtab_iter_next): Adjust.
9778 (dw2_print_stats): Adjust.
9779 (dw2_expand_all_symtabs): Adjust.
9780 (dw2_expand_symtabs_with_fullname): Adjust.
9781 (dw2_expand_marked_cus): Adjust.
9782 (dw_expand_symtabs_matching_file_matcher): Adjust.
9783 (dw2_map_symbol_filenames): Adjust.
9784 (dw2_debug_names_iterator::next): Adjust.
9785 (dwarf2_initialize_objfile): Adjust.
9786 (set_partial_user): Adjust.
9787 (dwarf2_build_psymtabs_hard): Adjust.
9789 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9791 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9792 Remove unused variables.
9793 (dw2_map_symtabs_matching_filename): Likewise.
9794 (dwarf2_record_block_ranges): Likewise.
9795 (dwarf2_read_addr_index): Likewise.
9796 (follow_die_offset): Likewise.
9798 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9800 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9801 to symbol_file_add_main.
9803 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9806 * mi/mi-console.c (do_fputc_async_safe): New.
9807 (mi_console_file::write_async_safe): New.
9808 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9809 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9811 * ui-file.c (ui_file::putstrn): Adjust call to
9812 fputstrn_unfiltered.
9813 * utils.c (printchar): Replace do_fputs and do_fprintf
9814 parameters by do_fputc.
9815 (fputstr_filtered): Adjust call to printchar.
9816 (fputstr_unfiltered): Likewise.
9817 (fputstrn_filtered): Likewise.
9818 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9820 * utils.h (do_fputc_ftype): New typedef.
9821 (fputstrn_unfiltered): Add do_fputc parameter.
9823 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9825 * regformats/i386/i386-avx.dat: Remove.
9827 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9830 * amd64-tdep.c (amd64_none_init_abi): New function.
9831 (amd64_x32_none_init_abi): New function.
9832 (_initialize_amd64_tdep): Register handlers for x86-64 and
9833 x64_32 with GDB_OSABI_NONE.
9834 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9835 GDB_OSABI_NONE osabi.
9837 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9840 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9842 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9843 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9845 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9847 * common/byte-vector.h (char_vector): New type.
9848 * target.h (target_read_alloc): Return
9849 gdb::optional<byte_vector>.
9850 (target_read_stralloc): Return gdb::optional<char_vector>.
9851 (target_get_osdata): Return gdb::optional<char_vector>.
9852 * target.c (target_read_alloc_1): Templatize. Replacement
9853 manual memory management with vector.
9854 (target_read_alloc): Change return type, adjust.
9855 (target_read_stralloc): Change return type, adjust.
9856 (target_get_osdata): Change return type, adjust.
9857 * auxv.c (struct auxv_info) <length>: Remove.
9858 <data>: Change type to gdb::optional<byte_vector>.
9859 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9860 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9861 (target_auxv_search): Adjust.
9862 (fprint_target_auxv): Adjust.
9863 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9864 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9865 (linux_make_corefile_notes): Adjust.
9866 * osdata.c (get_osdata): Adjust.
9867 * remote.c (remote_get_threads_with_qxfer): Adjust.
9868 (remote_memory_map): Adjust.
9869 (remote_traceframe_info): Adjust.
9870 (btrace_read_config): Adjust.
9871 (remote_read_btrace): Adjust.
9872 (remote_pid_to_exec_file): Adjust.
9873 * solib-aix.c (solib_aix_get_library_list): Adjust.
9874 * solib-dsbt.c (decode_loadmap): Don't free buf.
9875 (dsbt_get_initial_loadmaps): Adjust.
9876 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9877 * solib-target.c (solib_target_current_sos): Adjust.
9878 * tracepoint.c (sdata_make_value): Adjust.
9879 * xml-support.c (xinclude_start_include): Adjust.
9880 (xml_fetch_content_from_file): Adjust.
9881 * xml-support.h (xml_fetch_another): Change return type.
9882 (xml_fetch_content_from_file): Change return type.
9883 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9884 * xml-tdesc.c (file_read_description_xml): Adjust.
9885 (fetch_available_features_from_target): Change return type.
9886 (target_fetch_description_xml): Adjust.
9887 (target_read_description_xml): Adjust.
9889 2018-04-06 Tom Tromey <tom@tromey.com>
9891 * value.c (~value): Update.
9892 (struct value) <contents>: Now unique_xmalloc_ptr.
9893 (value_contents_bits_eq, allocate_value_contents)
9894 (value_contents_raw, value_contents_all_raw)
9895 (value_contents_for_printing, value_contents_for_printing_const)
9896 (set_value_enclosing_type): Update.
9898 2018-04-06 Tom Tromey <tom@tromey.com>
9900 * value.c (range_s): Remove typedef, VEC.
9901 (struct range): Add operator<.
9902 (range_lessthan): Remove.
9903 (ranges_contain): Change type.
9905 (struct value) <unavailable, optimized_out>: Now std::vector.
9906 (value_entirely_available)
9907 (value_entirely_covered_by_range_vector)
9908 (value_entirely_unavailable, value_entirely_optimized_out):
9910 (insert_into_bit_range_vector): Change argument type.
9911 (find_first_range_overlap): Likewise.
9912 (struct ranges_and_idx, value_contents_bits_eq)
9913 (require_not_optimized_out, require_available): Update.
9914 (ranges_copy_adjusted): Change argument types.
9915 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9917 2018-04-06 Tom Tromey <tom@tromey.com>
9919 * value.c (~value): Update.
9920 (struct value) <parent>: Now a value_ref_ptr.
9921 (value_parent, set_value_parent, value_address, value_copy):
9924 2018-04-06 Tom Tromey <tom@tromey.com>
9926 * value.c (struct value): Add constructor, destructor, and member
9928 (allocate_value_lazy, value_decref): Update.
9930 2018-04-06 Tom Tromey <tom@tromey.com>
9932 * value.c (struct value) <released, next>: Remove.
9933 (all_values): Now a std::vector.
9934 (allocate_value_lazy): Update.
9935 (value_next): Remove.
9936 (value_mark, value_free_to_mark, release_value)
9937 (value_release_to_mark): Update.
9939 2018-04-06 Tom Tromey <tom@tromey.com>
9941 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9942 (free_value_chain): Remove.
9943 * value.c (free_value_chain): Remove.
9944 (value_release_to_mark): Return a std::vector.
9945 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9947 (check_condition): Update.
9948 * eval.c (fetch_subexp_value): Change "val_chain" to a
9950 * breakpoint.c (update_watchpoint): Update.
9951 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9953 2018-04-06 Tom Tromey <tom@tromey.com>
9955 * value.h (free_all_values): Remove.
9956 * value.c (free_all_values): Remove.
9958 2018-04-06 Tom Tromey <tom@tromey.com>
9960 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9961 (value_history_chain, value_history_count): Remove.
9962 (value_history): New global.
9963 (record_latest_value, access_value_history, show_values)
9964 (preserve_values): Update.
9966 2018-04-06 Tom Tromey <tom@tromey.com>
9968 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9969 * varobj.c (varobj_set_display_format, varobj_set_value)
9970 (install_default_visualizer, construct_visualizer)
9971 (install_new_value, ~varobj, varobj_get_value_type)
9972 (my_value_of_variable, varobj_editable_p): Update.
9973 * c-varobj.c (c_describe_child, c_value_of_variable)
9974 (cplus_number_of_children, cplus_describe_child): Update.
9975 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9976 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9977 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9979 2018-04-06 Tom Tromey <tom@tromey.com>
9981 * printcmd.c (last_examine_address): Change type to
9983 (do_examine, x_command): Update.
9985 2018-04-06 Tom Tromey <tom@tromey.com>
9987 * value.c (release_value): Update.
9988 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9989 (struct bpstats) <val>: Now a value_ref_ptr.
9990 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9991 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9992 (~watchpoint, print_it_watchpoint, watch_command_1)
9993 (invalidate_bp_value_on_memory_change): Update.
9995 2018-04-06 Tom Tromey <tom@tromey.com>
9997 * varobj.c (varobj_clear_saved_item)
9998 (update_dynamic_varobj_children, install_new_value, ~varobj):
10000 * value.h (value_incref): Move declaration earlier.
10001 (value_decref): Rename from value_free.
10002 (struct value_ref_policy): New.
10003 (value_ref_ptr): New typedef.
10004 (struct value_deleter): Remove.
10005 (gdb_value_up): Remove typedef.
10006 (release_value): Change return type.
10007 (release_value_or_incref): Remove.
10008 * value.c (set_value_parent): Update.
10009 (value_incref): Change return type.
10010 (value_decref): Rename from value_free.
10011 (value_free_to_mark, free_all_values, free_value_chain): Update.
10012 (release_value): Return value_ref_ptr.
10013 (release_value_or_incref): Remove.
10014 (record_latest_value, set_internalvar, clear_internalvar):
10016 * stack.c (info_frame_command): Don't call value_free.
10017 * python/py-value.c (valpy_dealloc, valpy_new)
10018 (value_to_value_object): Update.
10019 * printcmd.c (do_examine): Update.
10020 * opencl-lang.c (lval_func_free_closure): Update.
10021 * mi/mi-main.c (register_changed_p): Don't call value_free.
10022 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10023 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10024 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10026 * guile/scm-value.c (vlscm_free_value_smob)
10027 (vlscm_scm_from_value): Update.
10028 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10029 (frame_unwind_register_unsigned, get_frame_register_bytes)
10030 (put_frame_register_bytes): Don't call value_free.
10031 * findvar.c (address_from_register): Don't call value_free.
10032 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10033 * dwarf2loc.c (entry_data_value_free_closure)
10034 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10035 (dwarf2_evaluate_loc_desc_full): Update.
10036 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10037 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10038 (~watchpoint, watch_command_1)
10039 (invalidate_bp_value_on_memory_change): Update.
10040 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10042 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10045 * warning.m4: Add -Wno-error=deprecated-register.
10046 * configure: Re-generate.
10048 2018-04-05 Tom Tromey <tom@tromey.com>
10050 * linespec.h: Remove include of "vec.h".
10052 2018-04-05 Tom Tromey <tom@tromey.com>
10054 * linespec.c (typep): Remove typedef.
10055 (find_methods, find_superclass_methods): Take a std::vector.
10056 (find_method): Use std::vector.
10058 2018-04-05 Tom Tromey <tom@tromey.com>
10060 * utils.c (compare_strings): Remove.
10061 * utils.h (compare_strings): Remove.
10062 * objc-lang.h (find_imps): Update.
10063 * objc-lang.c (find_methods): Take a std::vector.
10064 (uniquify_strings, find_imps): Likewise.
10065 * linespec.c (find_methods): Take a std::vector.
10066 (decode_objc): Use std::vector.
10067 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10069 (find_method, find_function_symbols): Use std::vector.
10071 2018-04-05 Tom Tromey <tom@tromey.com>
10073 * completer.c (completion_tracker::completion_tracker): Remove
10075 (completion_tracker::discard_completions): Likewise.
10076 * breakpoint.c (ambiguous_names_p): Remove cast.
10077 * ada-lang.c (_initialize_ada_language): Remove cast.
10078 * utils.h (streq): Update.
10079 (streq_hash): Add new declaration.
10080 * utils.c (streq): Return bool.
10081 (streq_hash): New function.
10083 2018-04-05 Tom Tromey <tom@tromey.com>
10085 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10086 Remove a string copy.
10088 2018-04-05 Tom Tromey <tom@tromey.com>
10090 * linespec.c (filter_results): Use std::vector.
10091 (decode_line_2, decode_line_full): Update.
10093 2018-04-05 Tom Tromey <tom@tromey.com>
10095 * linespec.c (canonical_to_fullform): Return std::string.
10096 (filter_results): Update.
10097 (struct decode_line_2_item): Add constructor.
10098 <fullform, displayform>: Now std::string.
10099 (decode_line_2_compare_items): Now a std::sort comparator.
10100 (decode_line_2): Update.
10102 2018-04-05 Tom Tromey <tom@tromey.com>
10104 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10105 (unexpected_linespec_error): Update.
10106 (linespec_parse_basic, parse_linespec): Update.
10108 2018-04-05 Tom Tromey <tom@tromey.com>
10110 * linespec.c (linespec_parse_basic): Reindent.
10112 2018-04-05 Tom Tromey <tom@tromey.com>
10114 * minsyms.h (iterate_over_minimal_symbols): Update.
10115 * minsyms.c (iterate_over_minimal_symbols): Take a
10116 gdb::function_view.
10117 * linespec.c (struct collect_minsyms): Remove.
10118 (compare_msyms): Now a std::sort comparator.
10119 (add_minsym): Add parameters.
10120 (search_minsyms_for_name): Update. Use std::vector.
10122 2018-04-03 Tom Tromey <tom@tromey.com>
10124 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10127 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10129 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10131 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10134 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10135 printing static type.
10137 2018-04-01 Tom Tromey <tom@tromey.com>
10139 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10140 (rs6000_xfer_shared_libraries): Update.
10142 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10144 * common/gdb_vecs.h (char_ptr): Remove.
10145 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10147 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10149 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10151 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10153 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10155 * tracepoint.h (struct uploaded_tp): Initialize fields.
10156 <actions, step_actions, cmd_strings>: Change type to
10157 std::vector<char *>.
10158 * tracepoint.c (get_uploaded_tp): Allocate with new.
10159 (free_uploaded_tps): Free with delete.
10160 (parse_tracepoint_definition): Adjust to std::vector change.
10161 * breakpoint.c (read_uploaded_action): Likewise.
10162 (create_tracepoint_from_upload): Likewise.
10163 * ctf.c (ctf_write_uploaded_tp): Likewise.
10164 (SET_ARRAY_FIELD): Likewise.
10165 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10167 2018-03-30 Tom Tromey <tom@tromey.com>
10169 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10171 (svr4_keep_data_in_core): Update.
10172 (svr4_read_so_list): Update.
10174 2018-03-30 Tom Tromey <tom@tromey.com>
10176 * windows-nat.c (handle_output_debug_string, handle_exception):
10178 * target.h (target_read_string): Update.
10179 * target.c (target_read_string): Change "string" to
10180 unique_xmalloc_ptr.
10181 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10183 * solib-frv.c (frv_current_sos): Update.
10184 * solib-dsbt.c (dsbt_current_sos): Update.
10185 * solib-darwin.c (darwin_current_sos): Update.
10186 * linux-thread-db.c (inferior_has_bug): Update.
10187 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10188 Update. Remove alloca.
10189 * ada-lang.c (ada_main_name): Update.
10191 2018-03-30 Tom Tromey <tom@tromey.com>
10193 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10194 (struct dwo_file_deleter): New.
10195 (dwo_file_up): New typedef.
10196 (open_and_init_dwo_file): Use dwo_file_up.
10197 (free_dwo_file_cleanup): Remove.
10199 2018-03-30 Tom Tromey <tom@tromey.com>
10201 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10202 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10204 2018-03-30 Tom Tromey <tom@tromey.com>
10206 * dwarf2read.c (class free_cached_comp_units): New class.
10207 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10208 (free_cached_comp_units): Remove function.
10210 2018-03-30 Tom Tromey <tom@tromey.com>
10212 * utils.h (make_cleanup_unpush_target): Remove.
10213 * inf-ptrace.c (struct target_unpusher): New.
10214 (target_unpush_up) New typedef.
10215 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10217 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10219 2018-03-27 Tom Tromey <tom@tromey.com>
10221 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10223 2018-03-27 Pedro Alves <palves@redhat.com>
10224 Tom Tromey <tom@tromey.com>
10226 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10227 destructor. Now a class.
10228 (gdb_readline_wrapper_cleanup): Remove function.
10229 (gdb_readline_wrapper): Remove cleanups.
10231 2018-03-27 Tom Tromey <tom@tromey.com>
10233 * typeprint.h (struct type_print_options) <local_typedefs,
10234 global_typedefs>: Remove "struct" keyword.
10235 (class typedef_hash_table): New class.
10236 (recursively_update_typedef_hash, add_template_parameters)
10237 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10238 (find_typedef_in_hash): Don't declare.
10239 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10240 (typedef_hash_table::recursively_update): Rename from
10241 recursively_update_typedef_hash. Now a member.
10242 (typedef_hash_table::add_template_parameters): Rename from
10243 add_template_parameters. Now a member.
10244 (typedef_hash_table::typedef_hash_table): Now a constructor;
10245 rename from create_typedef_hash.
10246 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10247 rename from free_typedef_hash.
10248 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10249 (do_free_global_table): Remove.
10250 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10251 from copy_type_recursive.
10252 (create_global_typedef_table): Remove.
10253 (typedef_hash_table::find_global_typedef): Now a member of
10254 typedef_hash_table.
10255 (typedef_hash_table::find_typedef): Rename from
10256 find_typedef_in_hash; now a member.
10257 (whatis_exp): Update.
10258 * extension.h (struct ext_lang_type_printers): Add constructor and
10260 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10262 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10263 Now a constructor; rename from start_ext_lang_type_printers.
10264 (ext_lang_type_printers): Now a destructor; rename from
10265 free_ext_lang_type_printers.
10266 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10268 (c_type_print_base_struct_union): Update. Remove cleanups.
10270 2018-03-27 Tom Tromey <tom@tromey.com>
10272 * dwarf-index-write.c: Include <cmath>.
10274 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10276 * NEWS: Add entry describing new "set|show varsize-limit" command.
10277 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10279 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10282 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10284 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10285 dwarf-index-write.c
10286 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10287 * dwarf-index-common.c: New file.
10288 * dwarf-index-common.h: New file.
10289 * dwarf-index-write.c: New file.
10290 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10291 (struct dwarf2_section_info): Move from here.
10292 (dwarf2_section_info_def): Likewise.
10293 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10294 (offset_type): Likewise.
10295 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10296 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10297 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10298 (byte_swap): Likewise.
10299 (MAYBE_SWAP): Likewise.
10300 (dwarf2_per_cu_ptr): Likewise.
10301 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10302 (struct tu_stats): Likewise.
10303 (struct dwarf2_per_objfile): Likewise.
10304 (struct dwarf2_per_cu_data): Likewise.
10305 (struct signatured_type): Likewise.
10306 (sig_type_ptr): Likewise.
10307 (DEF_VEC_P (sig_type_ptr)): Likewise.
10308 (INDEX4_SUFFIX): Likewise.
10309 (INDEX5_SUFFIX): Likewise.
10310 (DEBUG_STR_SUFFIX): Likewise.
10311 (dwarf2_read_section): Make non-static.
10312 (mapped_index_string_hash): Move from here.
10313 (dwarf5_djb_hash): Likewise.
10314 (file_write): Likewise.
10315 (class data_buf): Likewise.
10316 (struct symtab_index_entry): Likewise.
10317 (struct mapped_symtab): Likewise.
10318 (find_slot): Likewise.
10319 (hash_expand): Likewise.
10320 (add_index_entry): Likewise.
10321 (uniquify_cu_indices): Likewise.
10322 (class c_str_view): Likewise.
10323 (class c_str_view_hasher): Likewise.
10324 (class vector_hasher): Likewise.
10325 (write_hash_table): Likewise.
10326 (psym_index_map): Likewise.
10327 (struct addrmap_index_data): Likewise.
10328 (add_address_entry): Likewise.
10329 (add_address_entry_worker): Likewise.
10330 (write_address_map): Likewise.
10331 (symbol_kind): Likewise.
10332 (write_psymbols): Likewise.
10333 (struct signatured_type_index_data): Likewise.
10334 (write_one_signatured_type): Likewise.
10335 (recursively_count_psymbols): Likewise.
10336 (recursively_write_psymbols): Likewise.
10337 (class debug_names): Likewise.
10338 (check_dwarf64_offsets): Likewise.
10339 (psyms_seen_size): Likewise.
10340 (write_gdbindex): Likewise.
10341 (write_debug_names): Likewise.
10342 (assert_file_size): Likewise.
10343 (write_psymtabs_to_index): Likewise.
10344 (save_gdb_index_command): Likewise.
10345 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10347 * dwarf2read.h: New file.
10349 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10352 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10353 symbol name if the CU's language stores symbol names in linkage
10355 * language.h (struct language_defn)
10356 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10357 all instances of this struct.
10359 2018-03-26 Tom Tromey <tom@tromey.com>
10361 * stack.c (backtrace_command_1): Remove verbose code.
10363 2018-03-26 Tom Tromey <tom@tromey.com>
10365 * python/py-framefilter.c (py_print_type): Don't catch
10366 exceptions. Return void.
10367 (py_print_value): Likewise.
10368 (py_print_single_arg): Likewise.
10369 (enumerate_args): Don't catch exceptions.
10370 (py_print_args): Likewise.
10371 (py_print_frame): Likewise.
10372 (gdbpy_apply_frame_filter): Catch exceptions here.
10374 2018-03-26 Tom Tromey <tom@tromey.com>
10376 * stack.c (_initialize_stack): Remove trailing newlines from help
10377 text. Add "Usage" line to "backtrace" help.
10379 2018-03-26 Tom Tromey <tom@tromey.com>
10382 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10384 2018-03-26 Tom Tromey <tom@tromey.com>
10386 * python/py-framefilter.c (py_print_single_arg): Return
10387 EXT_LANG_BT_ERROR from catch.
10389 2018-03-26 Tom Tromey <tom@tromey.com>
10391 PR backtrace/15584:
10392 * stack.c (backtrace_command_1): Move some code into no-filters
10395 2018-03-26 Tom Tromey <tom@tromey.com>
10397 * python/py-framefilter.c (throw_quit_or_print_exception): New
10399 (gdbpy_apply_frame_filter): Use it.
10401 2018-03-26 Tom Tromey <tom@tromey.com>
10404 * python/py-framefilter.c (py_print_type, py_print_value)
10405 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10408 2018-03-26 Tom Tromey <tom@tromey.com>
10410 * python/py-framefilter.c (enumerate_args): Use
10411 gdb::unique_xmalloc_ptr.
10413 2018-03-26 Tom Tromey <tom@tromey.com>
10415 * python/py-framefilter.c (py_print_frame): Return
10417 (gdbpy_apply_frame_filter): Update comment.
10418 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10420 <EXT_LANG_BT_NO_FILTERS>: Change value.
10422 2018-03-26 Tom Tromey <tom@tromey.com>
10424 PR backtrace/15582:
10425 * stack.c (backtrace_command): Parse "hide" argument.
10426 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10427 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10430 2018-03-26 Tom Tromey <tom@tromey.com>
10432 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10434 (backtrace_command): Remove "fulltrace", add "flags".
10436 2018-03-26 Tom Tromey <tom@tromey.com>
10438 * stack.c (backtrace_command): Rewrite command line parsing.
10440 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10442 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10444 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10446 * filename-seen-cache.h: Add include guard.
10448 2018-03-26 Keith Seitz <keiths@redhat.com>
10450 * symfile.c (place_section): Remove "struct" from section_addr_info
10452 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10453 "struct" keyword from section_addr_info.
10455 2018-03-26 Alan Hayward <alan.hayward@arm.com>
10457 * regformats/regdef.h (reg): Add constructors.
10459 2018-03-25 Pedro Alves <palves@redhat.com>
10461 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10462 if then/else bodies in var_func_name extraction.
10464 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
10466 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10467 lookup_minimal_symbol() to find symbol entry.
10468 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10470 2018-03-23 Keith Seitz <keiths@redhat.com>
10473 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10474 nested type definitions for C++, too.
10476 2018-03-23 Tom Tromey <tom@tromey.com>
10478 * machoread.c (struct oso_el): Add a constructor. Don't define as
10480 (macho_register_oso): Remove.
10481 (macho_symtab_read): Take a std::vector.
10482 (oso_el_compare_name): Now a std::sort comparator.
10483 (macho_symfile_read_all_oso): Take a std::vector.
10484 (macho_symfile_read): Use std::vector. Remove cleanups.
10486 2018-03-22 Tom Tromey <tom@tromey.com>
10488 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10489 (record_full_goto_bookmark): Use std::string.
10491 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10494 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10497 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10499 * rs6000-tdep.c (store_insn_p): New function.
10500 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10501 and cr_reg to their unshifted values. Use store_insn_p to
10502 match LR saves using either R1 or fdata->alloca_reg. Use
10503 store_insn_p to match CR saves. Set alloca_reg_offset
10504 when alloca_reg and framep are set. Remove lr_reg shift
10505 when assigning to fdata->lr_register.
10507 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
10509 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10510 command line args instead of emitting a warning.
10512 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10514 * tracepoint.h (struct static_tracepoint_marker): Initialize
10515 fields, define default constructor, move constructor and move
10516 assignment, disable the rest.
10517 <str_id, extra>: Make std::string.
10518 (release_static_tracepoint_marker): Remove.
10519 (free_current_marker): Remove.
10520 * tracepoint.c (free_current_marker): Remove.
10521 (parse_static_tracepoint_marker_definition): Adjust to
10522 std::string, use new hex2str overload.
10523 (release_static_tracepoint_marker): Remove.
10524 (print_one_static_tracepoint_marker): Get marker by reference
10525 and adjust to std::string.
10526 (info_static_tracepoint_markers_command): Adjust to std::vector
10528 * target.h (static_tracepoint_marker_p): Remove typedef.
10529 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10530 (struct target_ops) <to_static_tracepoint_marker_at>: Return
10532 <to_static_tracepoint_markers_by_strid>: Return std::vector.
10534 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10535 (target_debug_print_std_vector_static_tracepoint_marker): New.
10536 (target_debug_print_struct_static_tracepoint_marker_p): Rename
10538 (target_debug_print_static_tracepoint_marker_p): ... this.
10539 * target-delegates.c: Re-generate.
10540 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10542 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10543 (decode_static_tracepoint_spec): Adjust to std::vector.
10544 (tracepoint_print_one_detail): Adjust to std::string.
10545 (strace_marker_decode_location): Adjust to std::string.
10546 (update_static_tracepoint): Adjust to std::string, remove call
10547 to release_static_tracepoint_marker.
10548 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10549 Adjust to std::vector.
10550 * remote.c (remote_static_tracepoint_marker_at): Return bool.
10551 (remote_static_tracepoint_markers_by_strid): Adjust to
10553 * common/rsp-low.h (hex2str): New overload with explicit count
10555 * common/rsp-low.c (hex2str): New overload with explicit count
10557 * unittests/rsp-low-selftests.c (test_hex2str): New function.
10558 (_initialize_rsp_low_selftests): Add test_hex2str test.
10559 * unittests/tracepoint-selftests.c
10560 (test_parse_static_tracepoint_marker_definition): Adjust to
10563 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10565 * tracepoint.c (parse_static_tracepoint_marker_definition):
10566 Consider case where the definition is followed by more
10568 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10569 tracepoint-selftests.c.
10570 * unittests/tracepoint-selftests.c: New.
10572 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10574 * MAINTAINERS (Write After Approval): Add Pedro Franco de
10577 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10579 * symtab.c (find_pc_sect_line): fixed indentation.
10581 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10583 * symtab.c (find_pc_sect_line): now uses binary search.
10585 2018-03-19 Tom Tromey <tom@tromey.com>
10587 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10588 "IDENT" production.
10590 2018-03-19 Pedro Alves <palves@redhat.com>
10591 Tom Tromey <tom@tromey.com>
10593 * unittests/observable-selftests.c: New file.
10594 * common/observable.h: New file.
10595 * observable.h: New file.
10596 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10597 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10598 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10599 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10600 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10601 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10602 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10603 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10604 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10605 python/py-breakpoint.c, python/py-finishbreakpoint.c,
10606 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10607 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10608 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10609 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10610 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10611 tui/tui-interp.c, valops.c: Update all users.
10612 * tui/tui-hooks.c (tui_bp_created_observer)
10613 (tui_bp_deleted_observer, tui_bp_modified_observer)
10614 (tui_inferior_exit_observer, tui_before_prompt_observer)
10615 (tui_normal_stop_observer, tui_register_changed_observer):
10617 (tui_observers_token): New global.
10618 (attach_or_detach, tui_attach_detach_observers): New functions.
10619 (tui_install_hooks, tui_remove_hooks): Use
10620 tui_attach_detach_observers.
10621 * record-btrace.c (record_btrace_thread_observer): Remove.
10622 (record_btrace_thread_observer_token): New global.
10623 * observer.sh: Remove.
10624 * observer.c: Rename to observable.c.
10625 * observable.c (namespace gdb_observers): Define new objects.
10626 (observer_debug): Move into gdb_observers namespace.
10627 (struct observer, struct observer_list, xalloc_observer_list_node)
10628 (xfree_observer_list_node, generic_observer_attach)
10629 (generic_observer_detach, generic_observer_notify): Remove.
10630 (_initialize_observer): Update.
10631 Don't include observer.inc.
10632 * Makefile.in (generated_files): Remove observer.h, observer.inc.
10633 (clean mostlyclean): Likewise.
10634 (observer.h, observer.inc): Remove targets.
10635 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10636 (COMMON_SFILES): Use observable.c, not observer.c.
10637 * .gitignore: Remove observer.h.
10639 2018-03-18 Tom Tromey <tom@tromey.com>
10641 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10643 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10645 2018-03-17 Tom Tromey <tom@tromey.com>
10647 * auto-load.c (auto_load_objfile_script_1): Use std::string.
10649 2018-03-17 Tom Tromey <tom@tromey.com>
10651 * target.c (class scoped_target_fd): New.
10652 (target_fileio_close_cleanup): Remove.
10653 (target_fileio_read_alloc_1): Use scoped_target_fd.
10655 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
10657 * silent-rules.mk: New.
10658 * Makefile.in: Include silent-rules.mk
10659 (srcdir, VPATH, top_srcdir): Move up.
10660 (COMPILE): Add ECHO_CXX.
10661 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10662 (init.c): Add ECHO_INIT_C.
10663 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10664 (version.c): Add ECHO_GEN.
10665 (printcmd.o): Add ECHO_CXX.
10666 (target-float.o): Add ECHO_CXX.
10667 (ada-exp.o): Add ECHO_CXX.
10668 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10669 (insight$(EXEEXT)): Add ECHO_CXXLD.
10670 * gnulib/configure.ac: Add AM_SILENT_RULES.
10671 * gnulib/aclocal.m4: Re-generate.
10672 * gnulib/configure: Re-generate.
10673 * gnulib/import/Makefile.in: Re-generate.
10675 2018-03-16 Tom Tromey <tom@tromey.com>
10677 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10678 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10679 * utils.c (do_free_section_addr_info)
10680 (make_cleanup_free_section_addr_info): Remove.
10681 * symfile.h (struct other_sections): Add constructor.
10682 (struct section_addr_info): Remove.
10683 (section_addr_info): New typedef.
10684 (struct sym_fns) <sym_offsets>: Change type of parameter.
10685 (build_section_addr_info_from_objfile)
10686 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10687 (default_symfile_offsets, symbol_file_add)
10688 (symbol_file_add_from_bfd)
10689 (build_section_addr_info_from_section_table): Update.
10690 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10691 * symfile.c (alloc_section_addr_info): Remove.
10692 (build_section_addr_info_from_section_table): Change return type.
10694 (build_section_addr_info_from_bfd)
10695 (build_section_addr_info_from_objfile): Likewise.
10696 (free_section_addr_info): Remove.
10697 (relative_addr_info_to_section_offsets): Change type of "addrs".
10698 (addrs_section_compar): Now a std::sort comparator.
10699 (addrs_section_sort): Change return type.
10700 (addr_info_make_relative): Change type of "addrs". Update.
10701 (default_symfile_offsets, syms_from_objfile_1)
10702 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10703 (symbol_file_add_separate): Update.
10704 (symbol_file_add): Change type of "addrs". Update.
10705 (add_symbol_file_command): Update. Remove cleanups.
10706 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10708 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10709 * solib.c (solib_read_symbols): Update.
10710 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10711 * machoread.c (macho_symfile_offsets): Update.
10712 * jit.c (jit_bfd_try_read_symtab): Update.
10714 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10716 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10717 unittests/utils-selftests.c.
10718 * unittests/utils-selftests.c: New file.
10720 2018-03-14 Tom Tromey <tom@tromey.com>
10723 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10726 2018-03-14 Tom Tromey <tom@tromey.com>
10729 * printcmd.c (printf_pointer): Allow "-" in format.
10731 2018-03-14 Tom Tromey <tom@tromey.com>
10733 * printcmd.c (_initialize_printcmd): Add usage to printf.
10735 2018-03-14 Yao Qi <qiyao@sourceware.org>
10737 * MAINTAINERS: Update my email address.
10739 2018-03-13 Tom Tromey <tom@tromey.com>
10741 * machoread.c (macho_check_dsym): Change filenamep to a
10743 (macho_symfile_read): Update.
10744 * symfile.c (load_command): Use std::string.
10746 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10748 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10749 to error message string.
10750 (riscv_register_name): Use xsnprintf instead of sprintf.
10751 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10753 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10755 (riscv_push_dummy_call): Likewise.
10757 2018-03-12 Tom Tromey <tom@tromey.com>
10759 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10760 Use gdb::byte_vector.
10761 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10763 2018-03-12 Yao Qi <yao.qi@linaro.org>
10765 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10766 parameter type to readable_regcache.
10767 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10770 2018-03-11 Tom Tromey <tom@tromey.com>
10772 * dwarf2read.c (struct nextfield): Add initializers.
10773 (struct nextfnfield): Remove.
10774 (struct fnfieldlist): Add initializers. Remove "length" and
10775 "head", use std::vector.
10776 (struct decl_field_list): Remove.
10777 (struct field_info): Add initializers.
10778 <fields, baseclasses>: Now std::vector.
10779 <nbaseclasses, nfnfields, typedef_field_list_count,
10780 nested_types_list_count>: Remove.
10781 (dwarf2_add_field, dwarf2_add_type_defn)
10782 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10783 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10784 (process_structure_scope): Update.
10786 2018-03-11 Tom Tromey <tom@tromey.com>
10788 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10789 for use by std::sort.
10790 (build_type_psymtabs_1): Use std::vector.
10792 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10794 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10795 and LIBMPFR in the printed configuration.
10797 2018-03-08 Tom Tromey <tom@tromey.com>
10799 * source.c (get_filename_and_charpos): Use scoped_fd.
10800 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10801 (procfs_pidlist): Likewise.
10802 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10803 (iterate_over_mappings): Likewise.
10805 2018-03-08 Tom Tromey <tom@tromey.com>
10807 * infcall.c (struct call_return_meta_info)
10808 <stack_temporaries_enabled>: Remove.
10809 (get_call_return_value, call_function_by_hand_dummy): Update.
10810 * thread.c (disable_thread_stack_temporaries): Remove.
10811 (enable_thread_stack_temporaries): Remove.
10812 (thread_stack_temporaries_enabled_p): Return bool.
10813 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10814 (get_last_thread_stack_temporary): Update.
10815 * eval.c (evaluate_subexp): Update.
10816 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10817 class, not a function.
10818 (value_ptr, value_vec): Remove typedefs.
10819 (class thread_info) <stack_temporaries_enabled>: Now bool.
10820 <stack_temporaries>: Now a std::vector.
10821 (thread_stack_temporaries_enabled_p)
10822 (value_in_thread_stack_temporaries): Return bool.
10824 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10826 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10827 (getpkt_or_notif_sane_1): Likewise.
10829 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10831 * build-id.c (build_id_to_debug_bfd): Use std::string.
10833 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10835 * build-id.c (find_separate_debug_file_by_buildid): Return
10837 * build-id.h (find_separate_debug_file_by_buildid): Return
10839 * coffread.c (coff_symfile_read): Adjust to std::string.
10840 * elfread.c (elf_symfile_read): Adjust to std::string.
10841 * symfile.c (separate_debug_file_exists): Change parameter to
10843 (find_separate_debug_file): Return std::string.
10844 (find_separate_debug_file_by_debuglink): Return std::string.
10845 * symfile.h (find_separate_debug_file_by_debuglink): Return
10848 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10850 * common/xml-utils.c (xml_escape_text): Move code to...
10851 (xml_escape_text_append): ... this new function.
10852 * common/xml-utils.h (xml_escape_text_append): New declaration.
10853 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10855 (_initialize_xml_utils): register test_xml_escape_text_append as
10858 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10860 * defs.h: Remove MAX_REGISTER_SIZE.
10861 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10863 * python/py-unwind.c (pyuw_sniffer): Likewise.
10865 2018-03-07 Tom Tromey <tom@tromey.com>
10867 * linux-tdep.c (linux_info_proc): Update.
10868 * target.h (struct target_ops) <to_fileio_readlink>: Return
10870 (target_fileio_readlink): Return optional<string>.
10871 * remote.c (remote_hostio_readlink): Return optional<string>.
10872 * inf-child.c (inf_child_fileio_readlink): Return
10874 * target.c (target_fileio_readlink): Return optional<string>.
10876 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10878 * regcache.c (cooked_read_test): Add riscv to the list of
10879 architectures that have a save_reggroup.
10881 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10883 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10884 value is not a dynamic class object.
10886 2018-03-06 Tom Tromey <tom@tromey.com>
10888 * rust-exp.y: Formatting fixes.
10890 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10892 * riscv-tdep.c (riscv_register_name): Remove target description
10894 (riscv_gdbarch_init): Remove target description check.
10896 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10898 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10900 * riscv-tdep.h: Likewise.
10902 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10904 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10905 (riscv_pseudo_register_write): Delete.
10906 (riscv_gdbarch_init): Remove all use of pseudo registers.
10908 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10910 * record-btrace.c (btrace_print_lines): Replace cleanup
10911 parameter with RAII equivalents.
10912 (btrace_insn_history): Replace cleanup with RAII equivalents.
10913 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10914 make_cleanup_ui_out_tuple_begin_end): Remove.
10915 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10916 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10917 make_cleanup_ui_out_list_begin_end): Remove.
10919 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10921 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10922 parameter types to std::vector. Use bool.
10923 (record_btrace_wait): Replace VEC(tp_t) with
10924 std::vector<thread_info *>.
10925 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10927 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10929 * record-btrace.c (record_btrace_disable_callback): Remove.
10930 (struct scoped_btrace_disable): New.
10931 (record_btrace_open): Use scoped_btrace_disable.
10933 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10935 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10936 reading values from registers.
10938 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10940 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10943 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10945 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10946 change parameter type. Use GDB's print functions, and use
10947 core_addr_to_string where appropriate.
10948 (riscv_push_dummy_call): Use core_addr_to_string where
10949 appropriate, update call to riscv_print_arg_location, and reindent
10951 (riscv_return_value): Update call to riscv_print_arg_location.
10953 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10954 Tim Newsome <tim@sifive.com>
10955 Albert Ou <a0u@eecs.berkeley.edu>
10956 Darius Rad <darius@bluespec.com>
10958 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10959 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10960 (ALLDEPFILES): Add riscv-tdep.c
10961 * configure.tgt: Add riscv support.
10962 * riscv-tdep.c: New file.
10963 * riscv-tdep.h: New file.
10964 * NEWS: Mention new target.
10965 * MAINTAINERS: Add entry for riscv.
10967 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10969 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10970 fields within aggregates.
10972 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10974 * record-btrace.c (btrace_print_lines): Change type of flags to
10975 gdb_disassembly_flags.
10977 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10979 * fbsd-nat.c: Include "inf-ptrace.h".
10980 (USE_SIGTRAP_SIGINFO): Conditionally define.
10981 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10982 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10983 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10985 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10987 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10989 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10990 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10991 "supports_stopped_by_hw_breakpoint" target methods.
10993 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10995 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10996 * fbsd-nat.c (debug_fbsd_nat): New variable.
10997 (show_fbsd_nat_debug): New function.
10998 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10999 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11001 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11003 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11004 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11006 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11007 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11010 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11012 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11013 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11015 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11017 * charset.c (struct charset_vector): New.
11018 (charsets): Change type to charset_vector.
11019 (find_charset_names): Adjust.
11021 (_initialize_charset): Adjust.
11023 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11025 * progspace.h (struct program_space) <deleted_solibs>: Change
11026 type to std::vector<std::string>.
11027 * progspace.c (clear_program_space_solib_cache): Adjust.
11028 * breakpoint.c (print_solib_event): Adjust.
11029 (check_status_catch_solib): Adjust.
11030 * solib.c (update_solib_list): Adjust.
11031 * ui-out.h (class ui_out) <field_string>: New overload.
11032 * ui-out.c (ui_out::field_string): New overload.
11034 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11036 * progspace.h (struct program_space): Add constructor and
11037 destructor, initialize fields.
11038 (add_program_space): Remove.
11039 * progspace.c (add_program_space): Rename to...
11040 (program_space::program_space): ... this.
11041 (release_program_space): Rename to...
11042 (program_space::~program_space): ... this.
11043 (delete_program_space): Use delete to delete program_space.
11044 (initialize_progspace): Use new to allocate program_space.
11045 * inferior.c (add_inferior_with_spaces): Likewise.
11046 (clone_inferior_command): Likewise.
11047 * infrun.c (follow_fork_inferior): Likewise.
11048 (handle_vfork_child_exec_or_exit): Likewise.
11050 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11052 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11053 (delim_string_to_char_ptr_vec): Return std::vector of
11054 gdb::unique_xmalloc_ptr.
11055 (dirnames_to_char_ptr_vec_append): Take std::vector of
11056 gdb::unique_xmalloc_ptr.
11057 (dirnames_to_char_ptr_vec): Return std::vector of
11058 gdb::unique_xmalloc_ptr.
11059 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11060 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11061 (delim_string_to_char_ptr_vec): Return an std::vector of
11062 gdb::unique_xmalloc_ptr, adjust the code.
11063 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11064 gdb::unique_xmalloc_ptr, adjust the code.
11065 (dirnames_to_char_ptr_vec): Return an std::vector of
11066 gdb::unique_xmalloc_ptr, adjust the code.
11067 * auto-load.c (auto_load_safe_path_vec): Change type to
11068 std::vector of gdb::unique_xmalloc_ptr.
11069 (auto_load_expand_dir_vars): Return an std::vector of
11070 gdb::unique_xmalloc_ptr, adjust the code.
11071 (auto_load_safe_path_vec_update): Adjust.
11072 (filename_is_in_auto_load_safe_path_vec): Adjust.
11073 (auto_load_objfile_script_1): Adjust.
11074 * build-id.c (build_id_to_debug_bfd): Adjust.
11075 * linux-thread-db.c (thread_db_load_search): Adjust.
11076 * source.c (add_path): Adjust.
11078 * symfile.c (find_separate_debug_file): Adjust.
11079 * utils.c (do_free_char_ptr_vec): Remove.
11080 (make_cleanup_free_char_ptr_vec): Remove.
11082 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11085 * common/pathstuff.c: Conditionally include "<windows.h>".
11087 2018-03-01 Georg Sauthoff <mail@georg.so>
11090 * gcore.in: Quote variables and switch interpreter to bash.
11092 2018-03-01 Tom Tromey <tom@tromey.com>
11094 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11095 assertion. Add assertion for discriminant_index.
11096 (quirk_rust_enum): Use correct base type name in univariant case.
11098 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11100 * record.c (get_call_history_modifiers): Return a
11101 record_print_flags.
11102 (cmd_record_call_history): Adjust.
11103 * record-btrace.c (record_btrace_call_history): Adjust.
11104 (record_btrace_call_history_range): Adjust.
11105 (record_btrace_call_history_from): Adjust.
11106 * target-debug.h (target_debug_print_record_print_flags): New.
11107 * target-delegates.c: Re-generate.
11108 * target.c (target_call_history): Change flags type.
11109 (target_call_history_from): Likewise.
11110 (target_call_history_range): Likewise.
11111 * target.h (struct target_ops) <target_call_history>: Likewise.
11112 (target_call_history_from): Likewise.
11113 (target_call_history_range): Likewise.
11115 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11116 Simon Marchi <simon.marchi@polymtl.ca>
11118 * common/common-utils.c: Include "sys/stat.h".
11119 (is_regular_file): Move here from "source.c"; change return
11121 * common/common-utils.h (is_regular_file): New prototype.
11122 * common/pathstuff.c (contains_dir_separator): New function.
11123 * common/pathstuff.h (contains_dir_separator): New prototype.
11124 * source.c: Don't include "sys/stat.h".
11125 (is_regular_file): Move to "common/common-utils.c".
11127 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11129 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11130 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11131 * auto-load.c: Include "common/pathstuff.h".
11132 * common/common-def.h (current_directory): Move here.
11133 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11135 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11137 * common/pathstuff.c: New file.
11138 * common/pathstuff.h: New file.
11139 * compile/compile.c: Include "common/pathstuff.h".
11140 * defs.h (current_directory): Move to "common/common-defs.h".
11141 * dwarf2read.c: Include "common/pathstuff.h".
11142 * exec.c: Likewise.
11143 * guile/scm-safe-call.c: Likewise.
11144 * linux-thread-db.c: Likewise.
11145 * main.c: Likewise.
11146 * nto-tdep.c: Likewise.
11147 * objfiles.c: Likewise.
11148 * source.c: Likewise.
11149 * symtab.c: Likewise.
11150 * utils.c: Include "common/pathstuff.h".
11151 (gdb_realpath): Move to "common/pathstuff.c".
11152 (gdb_realpath_keepfile): Likewise.
11153 (gdb_abspath): Likewise.
11154 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11155 (gdb_realpath_keepfile): Likewise.
11156 (gdb_abspath): Likewise.
11158 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11160 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11161 wildcard process pid for super_resume for kernels with a
11164 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11166 * compile/compile.c (get_args): Add additional comments
11167 explaining function.
11169 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11170 Tom Tromey <tom@tromey.com>
11172 * target.h (memory_write_request_s): Remove typedef. Don't define
11174 (target_write_memory_blocks): Change argument to std::vector.
11175 (struct memory_write_request): Add constructor.
11176 * target-memory.c (compare_block_starting_address): Return bool.
11177 Change argument types.
11178 (claim_memory): Change arguments to use std::vector.
11179 (split_regular_and_flash_blocks, blocks_to_erase)
11180 (compute_garbled_blocks): Likewise.
11181 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11182 (target_write_memory_blocks): Change argument to std::vector.
11183 * symfile.c (struct load_section_data): Add constructor and
11184 destructor. Use std::vector for "requests".
11185 (struct load_progress_data): Add initializers.
11186 (load_section_callback): Update. Use "new".
11187 (clear_memory_write_data): Remove.
11188 (generic_load): Update.
11190 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11192 * arch/aarch64.h: Use common/tdesc.h.
11194 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11196 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11197 architecture with a 64-bit ABI.
11199 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11201 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11202 ahead of target description loading.
11204 2018-02-26 Tom Tromey <tom@tromey.com>
11206 * stack.c (backtrace_command_1): Update.
11207 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11209 * python/py-framefilter.c (py_print_frame)
11210 (gdbpy_apply_frame_filter): Change type of "flags".
11211 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11213 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11214 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11215 * extension.h (enum frame_filter_flag): Rename from
11216 frame_filter_flags.
11217 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11218 (apply_ext_lang_frame_filter): Change type of "flags".
11219 * extension.c (apply_ext_lang_frame_filter): Change type of
11221 * extension-priv.h (struct extension_language_ops)
11222 <apply_frame_filter>: Change type of "flags".
11224 2018-02-26 Tom Tromey <tom@tromey.com>
11227 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11228 off-by-one in py_end computation.
11229 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11231 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11234 2018-02-26 Tom Tromey <tom@tromey.com>
11236 * dwarf2read.c (struct variant_field): New.
11237 (struct nextfield) <variant>: New field.
11238 (dwarf2_add_field): Handle DW_TAG_variant_part.
11239 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11240 discriminated union.
11241 (read_structure_type): Handle DW_TAG_variant_part.
11242 (handle_struct_member_die): New function, extracted from
11243 process_structure_scope. Handle DW_TAG_variant.
11244 (process_structure_scope): Handle discriminated unions. Call
11245 handle_struct_member_die.
11247 2018-02-26 Tom Tromey <tom@tromey.com>
11249 * rust-lang.h (rust_last_path_segment): Declare.
11250 * rust-lang.c (rust_last_path_segment): Now public. Change
11252 (struct disr_info): Remove.
11253 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11254 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11255 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11256 (rust_enum_p, rust_enum_variant): New function.
11257 (rust_underscore_fields): Remove "offset" parameter.
11258 (rust_print_enum): New function.
11259 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11260 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11261 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11263 (rust_internal_print_type): New function, from rust_print_type.
11265 (rust_print_type): Call rust_internal_print_type.
11266 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11267 Update enum handling.
11268 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11269 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11270 (rust_union_quirks): New functions.
11271 (process_full_comp_unit, process_full_type_unit): Call
11273 (process_structure_scope): Update rust_unions if necessary.
11275 2018-02-26 Tom Tromey <tom@tromey.com>
11277 * value.h (value_union_variant): Declare.
11278 * valops.c (value_union_variant): New function.
11279 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11280 (struct discriminant_info): New.
11281 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11283 (struct main_type) <flag_discriminated_union>: New field.
11285 2018-02-26 Tom Tromey <tom@tromey.com>
11287 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11288 unittests/unpack-selftests.c.
11289 * unittests/unpack-selftests.c: New file.
11290 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11292 2018-02-26 Yao Qi <yao.qi@linaro.org>
11294 * dwarf2read.c (struct partial_die_info) <read>: New method.
11295 (read_partial_die): Remove the declaration.
11296 (load_partial_dies): Update.
11297 (partial_die_info::partial_die_info):
11298 (read_partial_die): Change it to partial_die_info::read.
11300 2018-02-26 Yao Qi <yao.qi@linaro.org>
11302 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11303 (fixup_partial_die): Remove declaration.
11304 (scan_partial_symbols): Update.
11305 (partial_die_parent_scope): Likewise.
11306 (partial_die_full_name): Likewise.
11307 (fixup_partial_die): Change it to partial_die_info::fixup.
11309 2018-02-26 Yao Qi <yao.qi@linaro.org>
11311 * dwarf2read.c (read_partial_die): Update the declaration.
11312 (load_partial_dies): Caller update.
11313 (read_partial_die): Remove one argument abbrev_len.
11315 2018-02-26 Yao Qi <yao.qi@linaro.org>
11317 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11318 assignment operator.
11319 (load_partial_dies): Use ctor and copy ctor.
11320 (read_partial_die): Update.
11321 (dwarf2_cu::find_partial_die): Use ctor.
11323 2018-02-26 Yao Qi <yao.qi@linaro.org>
11325 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11326 (find_partial_die_in_comp_unit): Change it to
11327 dwarf2_cu::find_partial_die.
11328 (find_partial_die): Update.
11330 2018-02-26 Yao Qi <yao.qi@linaro.org>
11332 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11335 2018-02-26 Yao Qi <yao.qi@linaro.org>
11337 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11339 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11341 * arch/amd64.h: Use common/tdesc.h.
11342 * arch/i386.c: Likewise.
11343 * arch/i386.h: Likewise.
11344 * arch/tic6x.c: Likewise.
11345 * arch/tdesc.h: Move file from here...
11346 * common/tdesc.h: ...to here.
11347 * features/aarch64-core.c: Regenerate.
11348 * features/aarch64-fpu.c: Regenerate.
11349 * features/i386/32bit-avx.c: Regenerate.
11350 * features/i386/32bit-avx512.c: Regenerate.
11351 * features/i386/32bit-core.c: Regenerate.
11352 * features/i386/32bit-linux.c: Regenerate.
11353 * features/i386/32bit-mpx.c: Regenerate.
11354 * features/i386/32bit-pkeys.c: Regenerate.
11355 * features/i386/32bit-sse.c: Regenerate.
11356 * features/i386/64bit-avx.c: Regenerate.
11357 * features/i386/64bit-avx512.c: Regenerate.
11358 * features/i386/64bit-core.c: Regenerate.
11359 * features/i386/64bit-linux.c: Regenerate.
11360 * features/i386/64bit-mpx.c: Regenerate.
11361 * features/i386/64bit-pkeys.c: Regenerate.
11362 * features/i386/64bit-segments.c: Regenerate.
11363 * features/i386/64bit-sse.c: Regenerate.
11364 * features/i386/x32-core.c: Regenerate.
11365 * features/tic6x-c6xp.c: Regenerate.
11366 * features/tic6x-core.c: Regenerate.
11367 * features/tic6x-gp.c: Regenerate.
11368 * target-descriptions.c: Use common/tdesc.h.
11369 * target-descriptions.h: Likewise.
11371 2018-02-24 Tom Tromey <tom@tromey.com>
11373 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11374 (try_thread_db_load_from_dir, thread_db_load_search): Use
11376 (info_auto_load_libthread_db_compare): Return bool. Change
11378 (info_auto_load_libthread_db): Use std::vector, std::string.
11381 2018-02-24 Tom Tromey <tom@tromey.com>
11383 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11385 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11387 * gdbarch.c: Rebuild.
11388 * gdbarch.h: Rebuild.
11389 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11390 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11391 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11394 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11396 * gdbtypes.h (sect_offset): Change type to uint64_t.
11397 (sect_offset_str): New function.
11398 * dwarf2read.c (create_addrmap_from_aranges): Use
11400 (error_check_comp_unit_head): Likewise.
11401 (create_debug_type_hash_table): Likewise.
11402 (read_cutu_die_from_dwo): Likewise.
11403 (init_cutu_and_read_dies): Likewise.
11404 (init_cutu_and_read_dies_no_follow): Likewise.
11405 (process_psymtab_comp_unit_reader): Likewise.
11406 (partial_die_parent_scope): Likewise.
11407 (peek_die_abbrev): Likewise.
11408 (process_queue): Likewise.
11409 (dwarf2_physname): Likewise.
11410 (read_namespace_alias): Likewise.
11411 (read_import_statement): Likewise.
11412 (create_dwo_cu_reader): Likewise.
11413 (create_cus_hash_table): Likewise.
11414 (lookup_dwo_cutu): Likewise.
11415 (inherit_abstract_dies): Likewise.
11416 (read_func_scope): Likewise.
11417 (read_call_site_scope): Likewise.
11418 (dwarf2_add_member_fn): Likewise.
11419 (read_common_block): Likewise.
11420 (read_module_type): Likewise.
11421 (read_typedef): Likewise.
11422 (read_subrange_type): Likewise.
11423 (load_partial_dies): Likewise.
11424 (read_partial_die): Likewise.
11425 (find_partial_die): Likewise.
11426 (read_str_index): Likewise.
11427 (dwarf2_string_attr): Likewise.
11428 (build_error_marker_type): Likewise.
11429 (lookup_die_type): Likewise.
11430 (dump_die_shallow): Likewise.
11431 (follow_die_ref): Likewise.
11432 (dwarf2_fetch_die_loc_sect_off): Likewise.
11433 (dwarf2_fetch_constant_bytes): Likewise.
11434 (follow_die_sig): Likewise.
11435 (get_signatured_type): Likewise.
11436 (get_DW_AT_signature_type): Likewise.
11437 (dwarf2_find_containing_comp_unit): Likewise.
11438 (set_die_type): Likewise.
11440 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11442 * arch/aarch64.c: Include "common-defs.h".
11443 * arch/amd64.c: Likewise.
11444 * arch/i386.c: Likewise.
11446 2018-02-21 Tom Tromey <tom@tromey.com>
11448 * value.h: (extract_field_op): Update.
11449 * eval.c (extract_field_op): Return a const char *.
11450 * expression.h (parse_expression_for_completion): Update.
11451 * completer.c (complete_expression): Update.
11452 (add_struct_fields): Make fieldname const.
11453 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11454 (mark_completion_tag, parse_exp_in_context_1): Update.
11455 (parse_expression_for_completion): Change "name" to
11456 unique_xmalloc_ptr*.
11458 2018-02-21 Tom Tromey <tom@tromey.com>
11460 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11462 2018-02-21 Yao Qi <yao.qi@linaro.org>
11464 * avr-tdep.c (avr_read_pc): Change parameter type to
11466 * gdbarch.sh (read_pc): Likewise.
11467 * gdbarch.c: Re-generated.
11468 * gdbarch.h: Re-generated.
11469 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11471 * ia64-tdep.c (ia64_read_pc): Likewise.
11472 * mips-tdep.c (mips_read_pc): Likewise.
11473 * spu-tdep.c (spu_read_pc): Likewise.
11475 2018-02-21 Yao Qi <yao.qi@linaro.org>
11477 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11478 * regcache-dump.c: New file.
11479 * regcache.c: Move register_dump to regcache-dump.c.
11480 (maintenance_print_registers): Likewise.
11481 (maintenance_print_raw_registers): Likewise.
11482 (maintenance_print_cooked_registers): Likewise.
11483 (maintenance_print_register_groups): Likewise.
11484 (maintenance_print_remote_registers): Likewise.
11485 (_initialize_regcache): Likewise.
11486 * regcache.h (register_dump): Moved from regcache.c.
11488 2018-02-21 Yao Qi <yao.qi@linaro.org>
11490 * regcache.c (regcache::regcache): Update.
11491 (regcache::invalidate): Move it to detached_regcache::invalidate.
11492 (get_thread_arch_aspace_regcache): Update.
11493 (regcache::raw_update): Update.
11494 (regcache::cooked_read): Remove some code.
11495 (regcache::cooked_read_value): Likewise.
11496 (regcache::raw_write): Remove assert on m_readonly_p.
11497 (regcache::raw_supply_integer): Move it to
11498 detached_regcache::raw_supply_integer.
11499 (regcache::raw_supply_zeroed): Likewise.
11500 * regcache.h (detached_regcache) <raw_supply_integer>: New
11502 <raw_supply_zeroed, invalidate>: Likewise.
11503 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11504 <invalidate>: Likewise.
11505 <m_readonly_p>: Removed.
11507 2018-02-21 Yao Qi <yao.qi@linaro.org>
11509 * infcmd.c (get_return_value): Let stop_regs point to
11510 get_current_regcache.
11511 * regcache.c (regcache::regcache): Remove.
11512 (register_dump_reg_buffer): New class.
11513 (regcache_print): Adjust.
11514 * regcache.h (regcache): Remove constructors.
11516 2018-02-21 Yao Qi <yao.qi@linaro.org>
11518 * regcache.c (class register_dump): New class.
11519 (register_dump_regcache, register_dump_none): New class.
11520 (register_dump_remote, register_dump_groups): New class.
11521 (regcache_print): Update.
11522 * regcache.h (regcache_dump_what): Move it to regcache.c.
11523 (regcache) <dump>: Remove.
11525 2018-02-21 Yao Qi <yao.qi@linaro.org>
11527 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11529 (jit_unwind_reg_set_impl): Call raw_supply.
11530 (jit_frame_sniffer): Use reg_buffer_rw.
11531 * record-full.c (record_full_core_regbuf): Change its type.
11532 (record_full_core_open_1): Use reg_buffer_rw.
11533 (record_full_close): Likewise.
11534 (record_full_core_fetch_registers): Use regcache->raw_supply.
11535 (record_full_core_store_registers): Likewise.
11536 * regcache.c (regcache::get_register_status): Move it to
11538 (regcache_raw_set_cached_value): Remove.
11539 (regcache::raw_set_cached_value): Remove.
11540 (regcache::raw_write): Call raw_supply.
11541 (regcache::raw_supply): Move it to reg_buffer_rw.
11542 * regcache.h (regcache_raw_set_cached_value): Remove.
11543 (reg_buffer_rw): New class.
11545 2018-02-21 Yao Qi <yao.qi@linaro.org>
11547 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11548 readonly_detached_regcache.
11549 (dummy_frame_prev_register): Use regcache->cooked_read.
11550 * frame.c (frame_save_as_regcache): Change return type.
11551 (frame_pop): Update.
11552 * frame.h (frame_save_as_regcache): Update declaration.
11553 * inferior.h (get_infcall_suspend_state_regcache): Update
11555 * infrun.c (infcall_suspend_state) <registers>: use
11556 readonly_detached_regcache.
11557 (save_infcall_suspend_state): Don't use regcache_dup.
11558 (get_infcall_suspend_state_regcache): Change return type.
11559 * linux-fork.c (struct fork_info) <savedregs>: Change to
11560 readonly_detached_regcache.
11562 (fork_save_infrun_state): Don't use regcache_dup.
11563 (info_checkpoints_command): Adjust.
11564 * mi/mi-main.c (register_changed_p): Update declaration.
11565 (mi_cmd_data_list_changed_registers): Use
11566 readonly_detached_regcache.
11567 (register_changed_p): Change parameter type to
11568 readonly_detached_regcache.
11569 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11570 readonly_detached_regcache.
11571 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11572 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11574 (regcache::save): Move it to reg_buffer.
11575 (regcache::restore): Change parameter type.
11576 (regcache_dup): Remove.
11577 * regcache.h (reg_buffer) <save>: New method.
11578 (readonly_detached_regcache): New class.
11579 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11580 readonly_detached_regcache.
11581 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11583 2018-02-21 Yao Qi <yao.qi@linaro.org>
11585 * frame.c (frame_save_as_regcache): Use regcache method save.
11586 (frame_pop): Use regcache method restore.
11587 * infrun.c (restore_infcall_suspend_state): Likewise.
11588 * linux-fork.c (fork_load_infrun_state): Likewise.
11589 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11591 * regcache.c (regcache_save): Remove.
11592 (regcache::restore): More asserts.
11593 (regcache_cpy): Remove.
11594 * regcache.h (regcache_save): Remove the declaration.
11595 (regcache::restore): Move from private to public.
11596 Remove the friend declaration of regcache_cpy.
11597 (regcache_cpy): Remove declaration.
11599 2018-02-21 Yao Qi <yao.qi@linaro.org>
11601 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11602 parameter type to 'readable_regcache *'.
11603 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11604 * arm-tdep.c (arm_neon_quad_read): Likewise.
11605 (arm_pseudo_read): Likewise.
11606 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11607 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11608 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11609 * gdbarch.c: Re-generated.
11610 * gdbarch.h: Re-generated.
11611 * gdbarch.sh (pseudo_register_read): Change parameter type to
11612 'readable_regcache *'.
11613 (pseudo_register_read_value): Likewise.
11614 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11615 (h8300_pseudo_register_read): Likewise.
11616 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11617 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11618 (i386_pseudo_register_read_into_value): Likewise.
11619 (i386_pseudo_register_read_value): Likewise.
11620 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11622 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11623 * m32c-tdep.c (m32c_raw_read): Likewise.
11624 (m32c_read_flg): Likewise.
11625 (m32c_banked_register): Likewise.
11626 (m32c_banked_read): Likewise.
11627 (m32c_sb_read): Likewise.
11628 (m32c_part_read): Likewise.
11629 (m32c_cat_read): Likewise.
11630 (m32c_r3r2r1r0_read): Likewise.
11631 (m32c_pseudo_register_read): Likewise.
11632 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11633 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11634 (mep_pseudo_cr64_read): Likewise.
11635 (mep_pseudo_register_read): Likewise.
11636 * mips-tdep.c (mips_pseudo_register_read): Likewise.
11637 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11638 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11639 * regcache.c (regcache::raw_read): Move it to readable_regcache.
11640 (regcache::cooked_read): Likewise.
11641 (regcache::cooked_read_value): Likewise.
11642 (regcache_cooked_read_signed):
11643 (regcache::cooked_read): Likewise.
11644 * regcache.h (readable_regcache): New class.
11645 (regcache): Inherit readable_regcache. Move some methods to
11647 * rl78-tdep.c (rl78_pseudo_register_read): Change
11648 parameter type to 'readable_regcache *'.
11649 * rs6000-tdep.c (do_regcache_raw_read): Remove.
11650 (e500_pseudo_register_read): Change parameter type to
11651 'readable_regcache *'.
11652 (dfp_pseudo_register_read): Likewise.
11653 (vsx_pseudo_register_read): Likewise.
11654 (efpr_pseudo_register_read): Likewise.
11655 * s390-tdep.c (s390_pseudo_register_read): Likewise.
11656 * sh-tdep.c (sh_pseudo_register_read): Likewise.
11657 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11658 (sh64_pseudo_register_read): Likewise.
11659 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11660 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11661 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11662 (spu_pseudo_register_read): Likewise.
11663 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11664 (xtensa_pseudo_register_read): Likewise.
11666 2018-02-21 Yao Qi <yao.qi@linaro.org>
11668 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11669 (regcache::arch): Move it to reg_buffer::arch.
11670 (regcache::register_buffer): Likewise.
11671 (regcache::assert_regnum): Likewise.
11672 (regcache::num_raw_registers): Likewise.
11673 * regcache.h (reg_buffer): New class.
11674 (regcache): Inherit reg_buffer.
11676 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11678 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11679 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11681 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11683 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11685 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11687 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11688 (SFILES): Remove common/*.c files.
11689 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11690 * common/common.host: Add common reference.
11691 * configure.ac: Likewise.
11692 * configure: Regenerate.
11694 2018-02-16 Yao Qi <yao.qi@linaro.org>
11696 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11697 (block_initialize_namespace): Use new.
11698 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11699 (dwarf2_free_objfile): Use delete.
11700 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11701 (copy_type_recursive): Use new.
11702 * gdb_obstack.h (allocate_on_obstack): New.
11704 2018-02-15 Yao Qi <yao.qi@linaro.org>
11707 * inferior.c (exit_inferior_1): Reset inf->control.
11709 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11711 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11714 2018-02-14 Pedro Alves <palves@redhat.com>
11716 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11717 frame_cleanup_after_sniffer on exception.
11719 2018-02-14 Tom Tromey <tom@tromey.com>
11721 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11723 (solib_bfd_open): Make pathname const.
11724 * solib.c (solib_bfd_open): Make pathname const.
11725 * solib-spu.c (spu_bfd_fopen): Make name const.
11726 (spu_bfd_open): Make pathname const.
11727 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11728 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11730 2018-02-14 Tom Tromey <tom@tromey.com>
11732 * symfile.c (symfile_bfd_open): Update.
11733 * source.h (openp, source_full_path_of, find_and_open_source):
11734 Change argument type to unique_xmalloc_ptr.
11735 * source.c (openp): Take a unique_xmalloc_ptr.
11736 (source_full_path_of, find_and_open_source): Likewise.
11737 (open_source_file, symtab_to_fullname): Update.
11738 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11739 unique_xmalloc_ptr.
11740 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11741 (exec_file_find): Update.
11742 * psymtab.c (psymtab_to_fullname): Update.
11743 * nto-tdep.h (nto_find_and_open_solib): Update.
11744 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11745 unique_xmalloc_ptr.
11746 * exec.c (exec_file_attach): Update.
11747 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11748 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11750 2018-02-14 Tom Tromey <tom@tromey.com>
11752 * solib.c: Include source.h.
11753 * nto-tdep.c: Include source.h.
11754 * mi/mi-cmd-env.c: Include source.h.
11755 * infcmd.c: Include source.h.
11756 * exec.c: Include source.h.
11757 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11758 (add_path, directory_switch, source_path, init_source_path): Move
11760 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11761 (add_path, directory_switch, source_path, init_source_path):
11764 2018-02-14 Tom Tromey <tom@tromey.com>
11766 * solist.h (exec_file_find, solib_find): Return
11767 unique_xmalloc_ptr.
11768 (solib_bfd_fopen): Take a const char *.
11769 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11770 (exec_file_find, solib_find): Likewise.
11771 (solib_bfd_fopen): Do not take ownership of "pathname".
11772 (solib_bfd_open): Use unique_xmalloc_ptr.
11773 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11774 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11775 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11776 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11778 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11780 * ada-lang.c (name_match_type_from_name): Remove reference to
11781 ada_name_for_lookup in function's documentation.
11782 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11784 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11786 * defs.h (enum openp_flags): New enum.
11787 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11788 Move to enum openp_flags.
11789 (openp_flags): New enum flags.
11790 (openp): Change parameter type to openp_flags.
11791 * source.c (openp): Change parameter type to openp_flags.
11792 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11793 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11795 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11797 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11800 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11802 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11804 (class dwarf2_queue_guard): ...the destructor of this new class.
11805 (dw2_do_instantiate_symtab): Create instance of the new class
11806 dwarf2_queue_guard, remove cleanup.
11808 2018-02-09 Tom Tromey <tom@tromey.com>
11810 * source.c (find_source_lines): Don't reference past the end of
11813 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11815 * remote.c (remote_btrace_maybe_reopen): Change error message.
11816 * btrace.c (btrace_enable): Likewise.
11817 (parse_xml_btrace): Likewise.
11818 (parse_xml_btrace_conf): Likewise.
11820 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11822 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11823 (linux_enable_pt, linux_enable_bts): Call
11824 diagnose_perf_event_open_fail.
11826 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11828 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11829 Remove parameter and change return type. Update callers. Move it.
11830 (linux_enable_bts, linux_enable_pt): Improve error message.
11831 (linux_enable_pt): Remove zero buffer size check.
11832 (linux_enable_btrace): Improve error messages. Remove NULL return
11835 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11837 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11838 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11839 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11840 (linux_supports_pt, linux_supports_btrace): Remove.
11841 (linux_enable_bts): Call cpu_supports_bts.
11842 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11843 * remote.c (remote_supports_btrace): Remove.
11844 (init_remote_ops): Remove remote_supports_btrace.
11845 * target-delegates.c: Regenerated.
11846 * target.c (target_supports_btrace): Remove.
11847 * target.h (target_ops) <to_supports_btrace>: Remove
11848 (target_supports_btrace): Remove.
11849 * x86-linux-nat.c (x86_linux_create_target): Remove
11850 linux_supports_btrace.
11852 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11854 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11856 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11857 exception and use message in own exception.
11859 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11861 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11862 (perf_event_pt_event_type): Use gdb_file_up.
11863 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11864 scoped_fd, and scoped_mmap.
11866 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11868 * common/scoped_mmap.h: New.
11869 * unittests/scoped_mmap-selftest.c: New.
11870 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11871 unittests/scoped_mmap-selftest.c.
11873 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11875 * common/scoped_fd.h: New.
11876 * unittests/scoped_fd-selftest.c: New.
11877 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11878 unittests/scoped_fd-selftest.c.
11880 2018-02-09 Tom Tromey <tom@tromey.com>
11882 * auto-load.c (auto_load_section_scripts): Use
11883 gdb::unique_xmalloc_ptr.
11885 2018-02-09 Tom Tromey <tom@tromey.com>
11887 * auto-load.c (execute_script_contents): Use std::string.
11889 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11891 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11892 Python function, rather than a new command.
11894 2018-02-08 Tom Tromey <tom@tromey.com>
11896 * solib.c (solib_find_1): Use std::string.
11897 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11899 2018-02-08 Tom Tromey <tom@tromey.com>
11901 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11903 2018-02-08 Tom Tromey <tom@tromey.com>
11905 * source.c (find_source_lines): Use gdb::def_vector.
11907 2018-02-08 Tom Tromey <tom@tromey.com>
11909 * macrocmd.c (struct temporary_macro_definition): New.
11910 (macro_define_command): Use temporary_macro_definition. Remove
11912 (free_macro_definition_ptr): Remove.
11914 2018-02-08 Tom Tromey <tom@tromey.com>
11916 * macroexp.c (maybe_expand): Use std::string.
11918 2018-02-08 Tom Tromey <tom@tromey.com>
11920 * macroexp.c (struct macro_buffer): Add initializers for some
11922 (init_buffer, init_shared_buffer, free_buffer)
11923 (free_buffer_return_text): Remove.
11924 (macro_buffer): New constructors.
11925 (~macro_buffer): New destructor.
11926 (macro_buffer::set_shared): New method.
11927 (macro_buffer::resize_buffer, macro_buffer::appendc)
11928 (macro_buffer::appendmem): Now methods, not free functions.
11929 (set_token, append_tokens_without_splicing, stringify)
11930 (macro_stringify): Update.
11931 (gather_arguments): Change return type. Remove argc_p argument,
11932 add args_ptr argument. Use std::vector.
11933 (substitute_args): Remove argc argument. Accept std::vector.
11934 (expand): Update. Use std::vector.
11935 (scan, macro_expand, macro_expand_next): Update.
11937 2018-02-08 Tom Tromey <tom@tromey.com>
11939 * symtab.c (default_collect_symbol_completion_matches_break_on):
11940 Use unique_xmalloc_ptr.
11941 * macroscope.h: (sal_macro_scope, user_macro_scope)
11942 (default_macro_scope): Return unique_xmalloc_ptr.
11943 * macroscope.c (sal_macro_scope, user_macro_scope)
11944 (default_macro_scope): Return unique_xmalloc_ptr.
11945 * macroexp.h (macro_expand, macro_expand_once): Return
11946 unique_xmalloc_ptr.
11947 * macroexp.c (macro_expand, macro_expand_once): Return
11948 unique_xmalloc_ptr.
11949 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11950 (info_macro_command, info_macros_command): Use
11951 unique_xmalloc_ptr.
11952 * compile/compile-c-support.c (write_macro_definitions): Use
11953 unique_xmalloc_ptr.
11954 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11956 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11958 * value.c (value_static_field): Assign field type instead of
11959 containing type when returning an optimized out value.
11961 2018-02-06 Yao Qi <yao.qi@linaro.org>
11963 * ft32-tdep.c (ft32_read_pc): Remove.
11964 (ft32_write_pc): Remove.
11965 (ft32_gdbarch_init): Update.
11966 * m32r-tdep.c (m32r_read_pc): Remove.
11967 (m32r_gdbarch_init): Update.
11968 * mep-tdep.c (mep_read_pc): Remove.
11969 (mep_gdbarch_init): Update.
11970 * microblaze-tdep.c (microblaze_write_pc): Remove.
11971 (microblaze_gdbarch_init): Update.
11972 * mn10300-tdep.c (mn10300_read_pc): Remove.
11973 (mn10300_write_pc): Remove.
11974 (mn10300_gdbarch_init): Update.
11975 * moxie-tdep.c (moxie_read_pc): Remove.
11976 (moxie_write_pc): Remove.
11977 (moxie_gdbarch_init): Update.
11979 2018-02-06 Yao Qi <yao.qi@linaro.org>
11981 * expprint.c (print_subexp_standard): Handle
11982 OP_F77_UNDETERMINED_ARGLIST.
11983 (dump_subexp_body_standard): Likewise.
11985 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11987 * target-descriptions.c (tdesc_element_visitor) Add empty
11989 (tdesc_type): Move make_gdb_type from here.
11990 (tdesc_type_builtin): Likewise.
11991 (tdesc_type_vector): Likewise.
11992 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11993 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11994 (make_gdb_type_union): Likewise.
11995 (make_gdb_type_flags): Likewise.
11996 (make_gdb_type_enum): Likewise.
11997 (make_gdb_type): New function.
11998 (tdesc_register_type): Use static make_gdb_type.
12000 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12002 * infcmd.c (default_print_one_register_info): Align natural-format
12003 column values consistently one under another.
12004 (pad_to_column): New function.
12006 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12008 * dwarf2read.c (dwarf2_physname): Move commment.
12010 2018-02-01 Leszek Swirski <leszeks@google.com>
12012 * varobj.c (varobj_formatted_print_options): Allow recursive
12013 pretty printing if pretty printing is enabled.
12015 2018-02-01 Leszek Swirski <leszeks@google.com>
12017 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12018 names after a structop as a filename.
12020 2018-02-01 Yao Qi <yao.qi@linaro.org>
12022 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12023 (arm_record_coproc_data_proc): Likewise.
12025 2018-02-01 Yao Qi <yao.qi@linaro.org>
12027 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12029 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12031 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12032 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12034 2018-01-31 Pedro Alves <palves@redhat.com>
12036 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12037 * inflow.c (child_terminal_save_inferior): Wrap reference to
12038 tcgetpgrp in HAVE_TERMIOS_H.
12039 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12041 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12042 always iterate over all inferiors.
12043 (gdbsim_cntrl_c): Adjust.
12044 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12046 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12048 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12049 index type is objfile-owned if the element type is as well.
12051 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12055 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12057 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12058 "features/s390x-linux64.c".
12059 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12060 s390_linux32 and s390x_linux64.
12061 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12063 * s390-tdep.c: Include "features/s390-linux32.c" and
12064 "features/s390x-linux64.c".
12065 (s390_tdesc_valid): Add check for tdesc_has_registers.
12066 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12067 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12068 tdesc_s390x_linux64.
12069 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12070 tdesc_s390x_linux64 to...
12071 * s390-tdep.h: ...here.
12073 2018-01-30 Pedro Alves <palves@redhat.com>
12076 * config.in, configure: Regenerate.
12077 * configure.ac: Check for getpgid.
12078 * go32-nat.c (go32_pass_ctrlc): New.
12079 (go32_target): Install it.
12080 * inf-child.c (inf_child_target): Install
12081 child_terminal_save_inferior, child_pass_ctrlc and
12083 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12084 (inf_ptrace_target): No longer install it.
12085 * infcmd.c (interrupt_target_1): Adjust.
12086 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12087 (child_interrupt): Declare.
12088 (inferior::terminal_state): New.
12089 * inflow.c (struct terminal_info): Update comments.
12090 (inferior_process_group): Delete.
12091 (terminal_is_ours): Delete.
12092 (gdb_tty_state): New.
12093 (child_terminal_init): Adjust.
12094 (is_gdb_terminal, sharing_input_terminal_1)
12095 (sharing_input_terminal): New functions.
12096 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12097 Set the process's actual process group in the foreground if
12098 possible. Handle is_ours_for_output/is_ours distinction. Don't
12099 mark terminal as the inferior's if not sharing GDB's terminal.
12100 Don't check attach_flag.
12101 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12102 pass down a target_terminal_state.
12103 (child_terminal_save_inferior): New, factored out from ...
12104 (child_terminal_ours_1): ... this. Handle
12105 target_terminal_state::is_ours_for_output.
12106 (child_interrupt, child_pass_ctrlc): New.
12107 (inflow_inferior_exit): Clear the inferior's terminal_state.
12108 (copy_terminal_info): Copy the inferior's terminal state.
12109 (_initialize_inflow): Remove reference to terminal_is_ours.
12110 * inflow.h (inferior_process_group): Delete.
12111 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12112 * procfs.c (procfs_target): Don't install procfs_interrupt.
12113 (procfs_interrupt): Delete.
12114 * remote.c (remote_serial_quit_handler): Adjust.
12115 (remote_interrupt): Remove ptid parameter. Adjust.
12116 * target-delegates.c: Regenerate.
12117 * target.c: Include "terminal.h".
12118 (target_terminal::terminal_state): Rename to ...
12119 (target_terminal::m_terminal_state): ... this.
12120 (target_terminal::init): Adjust.
12121 (target_terminal::inferior): Adjust to per-inferior
12123 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12124 (target_terminal::ours, target_terminal::ours_for_output): Use
12125 target_terminal_is_ours_kind.
12126 (target_interrupt): Remove ptid parameter. Adjust.
12127 (default_target_pass_ctrlc): Adjust.
12128 * target.h (target_ops::to_terminal_save_inferior): New field.
12129 (target_ops::to_interrupt): Remove ptid_t parameter.
12130 (target_interrupt): Remove ptid_t parameter. Update comment.
12131 (target_pass_ctrlc): Update comment.
12132 * target/target.h (target_terminal_state): New scoped enum,
12133 factored out of ...
12134 (target_terminal::terminal_state): ... here.
12135 (target_terminal::inferior): Update comments.
12136 (target_terminal::restore_inferior): New.
12137 (target_terminal::is_inferior, target_terminal::is_ours)
12138 (target_terminal::is_ours_for_output): Adjust.
12139 (target_terminal::scoped_restore_terminal_state): Adjust to
12140 rename, and call restore_inferior() instead of inferior().
12141 (target_terminal::scoped_restore_terminal_state::m_state): Change
12143 (target_terminal::terminal_state): Rename to ...
12144 (target_terminal::m_terminal_state): ... this and change type.
12146 2018-01-30 Pedro Alves <palves@redhat.com>
12148 * linux-nat.c (wait_for_signal): New function.
12149 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12151 (async_terminal_is_ours)
12152 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12153 (linux_nat_add_target): Don't override
12154 to_terminal_inferior/to_terminal_ours.
12156 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12158 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12160 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12162 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12163 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12164 dwarf2_per_objfile_free here.
12165 (dwarf2_per_objfile_free): Remove.
12166 (_initialize_dwarf2_read): Don't register
12167 dwarf2_per_objfile_free as a registry cleanup.
12169 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12171 Avoid compilation errors in MinGW native builds
12173 The error is triggered by including python-internal.h, and the
12176 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12177 from build-gnulib/import/math.h:27,
12178 from d:/usr/Python26/include/pyport.h:235,
12179 from d:/usr/Python26/include/Python.h:58,
12180 from python/python-internal.h:94,
12181 from python/py-arch.c:24:
12182 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12186 This happens because Python headers define 'hypot' to expand t
12187 '_hypot' in the Windows builds.
12188 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12189 'hypoth'. This avoids a compilation error.
12191 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12193 * MAINTAINERS (Write After Approval): Fix ordering.
12195 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12197 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12199 2018-01-26 Alan Modra <amodra@gmail.com>
12201 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12202 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12203 Remove nop. Make const. Comment.
12204 (powerpc32_plt_stub_so_2): New.
12205 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12206 Correct count. Update uses.
12207 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12208 Move common code reading PLT entry word. Correct
12209 powerpc32_plt_stub PLT address calculation.
12210 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12211 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12212 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12213 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12214 (ppc64_standard_linkage8): Likewise.
12215 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12216 Correct insns description.
12217 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12219 2018-01-24 Pedro Alves <palves@redhat.com>
12221 GCC PR libstdc++/83906
12222 * gdbtypes.c (operator==(const dynamic_prop &,
12223 const dynamic_prop &)): New.
12224 (operator==(const range_bounds &, const range_bounds &)): New.
12225 (check_types_equal): Use them instead of memcmp.
12226 * gdbtypes.h (operator==(const dynamic_prop &,
12227 const dynamic_prop &)): Declare.
12228 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12229 (operator==(const range_bounds &, const range_bounds &)): Declare.
12230 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12232 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12234 * s390-linux-tdep.c (s390_record_address_mask)
12235 (s390_record_calc_disp_common, s390_record_calc_disp)
12236 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12237 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12238 (s390_process_record): Move to s390-tdep.c.
12239 (s390_linux_init_abi_any): Adjust.
12240 * s390-tdep.c (s390_record_address_mask)
12241 (s390_record_calc_disp_common, s390_record_calc_disp)
12242 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12243 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12244 (s390_process_record): Moved from s390-linux-tdep.c
12245 (s390_gdbarch_init): Adjust.
12247 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12249 * s390-linux-nat.c (s390-tdep.h): New include.
12250 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12251 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12252 (ALLDEPFILES): Add s390-tdep.c.
12253 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12254 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12255 * s390-tdep.h: ...this. New file.
12256 * s390-linux-tdep.c (s390-tdep.h): New include.
12257 (_initialize_s390_tdep): Rename to...
12258 (_initialize_s390_linux_tdep): ...this and adjust.
12259 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12260 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12262 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12263 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12264 (s390_is_partial_instruction, s390_software_single_step)
12265 (is_non_branch_ril, s390_displaced_step_copy_insn)
12266 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12267 (s390_prologue_data, s390_addr, s390_store, s390_load)
12268 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12269 (s390_register_call_saved, s390_guess_tracepoint_registers)
12270 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12271 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12272 (s390_pseudo_register_name, s390_pseudo_register_type)
12273 (s390_pseudo_register_read, s390_pseudo_register_write)
12274 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12275 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12276 (s390_addr_bits_remove, s390_address_class_type_flags)
12277 (s390_address_class_type_flags_to_name)
12278 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12279 (s390_function_arg_float, s390_function_arg_vector)
12280 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12281 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12282 (s390_frame_align, s390_register_return_value, s390_return_value)
12283 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12284 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12285 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12286 (s390_trad_frame_prev_register, s390_unwind_cache)
12287 (s390_prologue_frame_unwind_cache)
12288 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12289 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12290 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12291 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12292 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12293 (s390_frame_base_address, s390_local_base_address)
12294 (s390_frame_base, s390_gcc_target_options)
12295 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12296 (s390_validate_reg_range, s390_tdesc_valid)
12297 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12298 * s390-tdep.c: ...this. New file.
12300 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12302 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12303 (s390_process_record, s390_gdbarch_tdep_alloc)
12304 (s390_linux_init_abi_any): Use/set new hook.
12306 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12308 * s390-linux-tdep.c (osabi.h): New include.
12309 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12310 (s390_linux_init_abi_any): New functions.
12311 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12313 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12315 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12316 tdesc_has_registers check
12318 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12320 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12321 (s390_validate_reg_range): New macro.
12322 (s390_gdbarch_init): Adjust.
12324 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12326 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12327 (s390_gdbarch_tdep_alloc): Adjust.
12328 (s390_gdbarch_init): Adjust.
12330 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12332 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12333 <have_tdb>: Change type to bool.
12334 (s390_gdbarch_tdep_alloc): Adjust.
12335 (s390_gdbarch_init): Adjust.
12337 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12339 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12340 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12341 (s390_gdbarch_tdep_alloc): New function.
12342 (s390_gdbarch_init): Allocate tdep at start and use its fields
12343 instead of separate variables.
12345 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12347 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12348 when looking for cached gdbarch and add comment for remaining.
12350 2018-01-22 Pedro Alves <palves@redhat.com>
12351 Sergio Durigan Junior <sergiodj@redhat.com>
12353 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12356 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12358 * MAINTAINERS: Update my company e-mail address.
12360 2018-01-22 Yao Qi <yao.qi@linaro.org>
12362 * regcache.c (cooked_write_test): New function.
12363 (_initialize_regcache): Register the test.
12365 2018-01-22 Yao Qi <yao.qi@linaro.org>
12367 * ia64-tdep.c (ia64_pseudo_register_read): Call
12368 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12369 * m32c-tdep.c (m32c_cat_read): Likewise.
12370 (m32c_r3r2r1r0_read): Likewise.
12371 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12372 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12374 2018-01-22 Yao Qi <yao.qi@linaro.org>
12376 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12377 method raw_read instead of regcache_raw_read.
12378 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12379 * arm-tdep.c (arm_neon_quad_read): Likewise.
12380 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12381 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12382 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12383 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12384 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12385 (i386_pseudo_register_read_into_value): Likewise.
12386 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12387 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12388 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12389 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12390 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12391 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12392 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12393 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12394 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12396 2018-01-22 Yao Qi <yao.qi@linaro.org>
12398 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12399 * configure.tgt: Remove target mt.
12400 * mt-tdep.c: Remove.
12401 * regcache.c (cooked_read_test): Remove the check for mt.
12403 2018-01-22 Yao Qi <yao.qi@linaro.org>
12405 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12406 instead of gdbarch_pseudo_register_read_value.
12408 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12410 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12413 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12415 * linespec.c (create_sals_line_offset): Remove code that preserved
12416 the symtab_and_line's line number.
12418 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12420 * varobj.c (varobj_create): Don't set valid_block when creating a
12423 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12425 * varobj.c (varobj_create): Remove out of date comment.
12427 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12430 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12431 updating innermost block.
12432 * parse.c (innermost_block_tracker::update): Take extra type
12433 parameter, and check types match before updating innermost block.
12434 (write_dollar_variable): Update innermost block for registers.
12435 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12436 (innermost_block_tracker::innermost_block_tracker): Initialise
12438 (innermost_block_tracker::reset): Take type parameter.
12439 (innermost_block_tracker::update): Take type parameter, and pass
12440 type through as needed.
12441 (innermost_block_tracker::m_types): New member.
12442 * varobj.c (varobj_create): Pass type when reseting innermost
12445 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12447 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12448 * ada-lang.c (resolve_subexp): Likewise.
12449 * breakpoint.c (set_breakpoint_condition) Likewise.
12450 (watch_command_1) Likewise.
12451 * c-exp.y (variable): Likewise.
12452 * d-exp.y (PrimaryExpression): Likewise.
12453 * f-exp.y (variable): Likewise.
12454 * go-exp.y (variable): Likewise.
12455 * m2-exp.y (variable): Likewise.
12456 * objfiles.c (objfile::~objfile): Likewise.
12457 * p-exp.y (variable): Likewise.
12458 * parse.c (innermost_block): Change type.
12459 * parser-defs.h (class innermost_block_tracker): New.
12460 (innermost_block): Change to innermost_block_tracker.
12461 * printcmd.c (display_command): Switch to innermost_block API.
12462 (do_one_display): Likewise.
12463 * rust-exp.y (do_one_display): Likewise.
12464 * symfile.c (clear_symtab_users): Likewise.
12465 * varobj.c (varobj_create): Switch to innermost_block API, replace
12466 use of innermost_block with block stored on varobj object.
12468 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12470 * expression.h (innermost_block): Remove declaration.
12471 * varobj.c: Add 'parser-defs.h' include.
12473 2018-01-19 Tom Tromey <tom@tromey.com>
12475 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12476 symbols in the static and global blocks.
12478 2018-01-19 James Clarke <jrtc27@jrtc27.com>
12480 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12481 gdb_ptrace.h, and move including gdb_wait.h ...
12482 * nat/linux-ptrace.h: ... to here.
12484 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12486 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12487 inf_ptrace_detach_success.
12488 (inf_ptrace_detach_success): Add inferior parameter, use it
12489 instead of inferior_ptid, pass it to detach_inferior.
12490 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12492 * inferior.c (detach_inferior): Add overload that takes an
12494 * inferior.h (detach_inferior): Likewise.
12495 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12496 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12497 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12499 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12501 * target.h (struct target_ops) <to_detach>: Add inferior
12503 (target_detach): Likewise.
12504 * target.c (dispose_inferior): Pass inferior down.
12505 (target_detach): Pass inferior down. Assert that it is equal to
12506 the current inferior.
12507 * aix-thread.c (aix_thread_detach): Pass inferior down.
12508 * corefile.c (core_file_command): Pass current_inferior() down.
12509 * corelow.c (core_detach): Add inferior parameter.
12510 * darwin-nat.c (darwin_detach): Likewise.
12511 * gnu-nat.c (gnu_detach): Likewise.
12512 * inf-ptrace.c (inf_ptrace_detach): Likewise.
12513 * infcmd.c (detach_command): Pass current_inferior() down to
12515 * infrun.c (follow_fork_inferior): Pass parent_inf to
12517 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12519 * linux-nat.c (linux_nat_detach): Add inferior parameter.
12520 * linux-thread-db.c (thread_db_detach): Likewise.
12521 * nto-procfs.c (procfs_detach): Likewise.
12522 * procfs.c (procfs_detach): Likewise.
12523 * record.c (record_detach): Likewise.
12524 * record.h (struct inferior): Forward-declare.
12525 (record_detach): Add inferior parameter.
12526 * remote-sim.c (gdbsim_detach): Likewise.
12527 * remote.c (remote_detach_1): Likewise.
12528 (remote_detach): Likewise.
12529 (extended_remote_detach): Likewise.
12530 * sol-thread.c (sol_thread_detach): Likewise.
12531 * target-debug.h (target_debug_print_inferior_p): New macro.
12532 * target-delegates.c: Re-generate.
12533 * top.c (kill_or_detach): Pass inferior down to target_detach.
12534 * windows-nat.c (windows_detach): Add inferior parameter.
12536 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12538 * target.h (struct target_ops) <to_detach>: Remove args
12540 (target_detach): Likewise.
12541 * target.c (dispose_inferior): Adjust.
12542 (target_detach): Remove args parameter, adjust.
12543 * aix-thread.c (aix_thread_detach): Adjust.
12544 * corefile.c (core_file_command): Adjust.
12545 * corelow.c (core_detach): Adjust.
12546 * darwin-nat.c (darwin_detach): Adjust.
12547 * gnu-nat.c (gnu_detach): Adjust.
12548 * inf-ptrace.c (inf_ptrace_detach): Adjust.
12549 * infcmd.c (detach_command): Adjust
12550 * infrun.c (follow_fork_inferior): Adjust.
12551 (handle_vfork_child_exec_or_exit): Adjust.
12552 * linux-fork.c (linux_fork_detach): Remove args parameter.
12553 * linux-fork.h (linux_fork_detach): Likewise.
12554 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12555 * linux-thread-db.c (thread_db_detach): Likewise.
12556 * nto-procfs.c (procfs_detach): Likewise.
12557 * procfs.c (procfs_detach): Likewise.
12558 (do_detach): Remove signo parameter.
12559 * record.c (record_detach): Remove args parameter.
12560 * record.h (record_detach): Likewise.
12561 * remote-sim.c (gdbsim_detach): Likewise.
12562 * remote.c (remote_detach_1): Likewise.
12563 (remote_detach): Likewise.
12564 (extended_remote_detach): Likewise.
12565 * sol-thread.c (sol_thread_detach): Likewise.
12566 * target-delegates.c: Re-generate.
12567 * top.c (struct qt_args) <args>: Remove field.
12568 (kill_or_detach): Don't pass args.
12569 (quit_force): Don't set args.
12570 * windows-nat.c (windows_detach): Remove args parameter.
12572 2018-01-19 Yao Qi <yao.qi@linaro.org>
12574 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12575 (arm_linux_init_abi): Install it.
12577 2018-01-19 Yao Qi <yao.qi@linaro.org>
12579 * osabi.c (gdb_osabi_names): Extend the regexp for
12580 arm-linux-gnueabihf.
12582 2018-01-18 Yao Qi <yao.qi@linaro.org>
12584 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12586 (abbrev_table::add_abbrev): Update.
12587 (abbrev_table::lookup_abbrev): Update.
12589 2018-01-18 Yao Qi <yao.qi@linaro.org>
12591 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12593 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
12595 * compile/compile.c (compile_to_object): Convert "triplet_rx"
12598 2018-01-17 Tom Tromey <tom@tromey.com>
12600 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
12602 2018-01-17 Tom Tromey <tom@tromey.com>
12604 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12605 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12606 (create_array_type_with_stride): Update.
12607 * dwarf2read.c (set_die_type): Update.
12609 2018-01-17 Tom Tromey <tom@tromey.com>
12611 * dwarf2read.c (delayed_method_info): Remove typedef.
12612 (dwarf2_cu::method_info): Now a std::vector.
12613 (add_to_method_list): Update.
12614 (free_delayed_list): Remove.
12615 (compute_delayed_physnames): Update.
12616 (process_full_comp_unit, process_full_type_unit): Clear the method
12617 list. Remove cleanups.
12618 (psymtab_include_file_name): Add name_holder parameter. Use
12619 unique_xmalloc_ptr.
12620 (dwarf_decode_lines): Update.
12622 2018-01-17 Tom Tromey <tom@tromey.com>
12623 Simon Marchi <simon.marchi@ericsson.com>
12625 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12626 (dwarf2_per_objfile::free_cached_comp_units)
12627 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12628 (init_cutu_and_read_dies_no_follow): Update.
12629 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12630 (dwarf2_cu::~dwarf2_cu): New.
12631 (free_heap_comp_unit, free_stack_comp_unit): Remove.
12632 (age_cached_comp_units, free_one_cached_comp_unit): Update.
12634 2018-01-17 Tom Tromey <tom@tromey.com>
12635 Simon Marchi <simon.marchi@ericsson.com>
12637 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12638 (struct die_reader_specs) <abbrev_table>: New member.
12639 (struct abbrev_table): Add constructor.
12640 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12641 <abbrev_obstack>: Now an auto_obstack.
12642 (abbrev_table_up): New typedef.
12643 (init_cu_die_reader): Add abbrev_table parameter.
12644 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12645 Add result_dwo_abbrev_table.
12646 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12647 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12649 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12651 (skip_children): Update.
12652 (abbrev_table::alloc_abbrev): Rename from
12653 abbrev_table_alloc_abbrev.
12654 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12655 (abbrev_table::lookup_abbrev): Rename from
12656 abbrev_table_lookup_abbrev.
12657 (abbrev_table_read_table): Return abbrev_table_up.
12658 (abbrev_table_free, abbrev_table_free_cleanup)
12659 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12660 (load_partial_dies): Update.
12662 2018-01-17 Tom Tromey <tom@tromey.com>
12664 * dwarf2read.c (dwarf2_compute_name): Update comment.
12665 (read_func_scope, read_variable): Update.
12666 (new_symbol): Remove.
12667 (new_symbol_full): Rename to new_symbol.
12669 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12672 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12673 a warning instead of throwing an error, set section size to 0 and return
12675 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12677 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12679 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12681 (linux_ptrace_attach_fail_reason_string): Likewise.
12682 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12684 (linux_ptrace_attach_fail_reason_string): Likewise.
12685 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12687 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12689 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12691 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12694 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12695 checking for fs_base/gs_base fields in struct user_regs_struct.
12696 * configure: Regenerate.
12698 2018-01-17 Yao Qi <yao.qi@linaro.org>
12700 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12702 (aarch64_linux_init_abi): Install it to gdbarch hook
12703 gcc_target_options.
12705 2018-01-15 Pedro Alves <palves@redhat.com>
12707 * common/signals-state-save-restore.c
12708 (save_original_signals_state): Fix typos.
12710 2017-01-12 Tom Tromey <tom@tromey.com>
12711 Sergio Durigan Junior <sergiodj@redhat.com>
12713 * Makefile.in (install-only): Install gdb-add-index.
12715 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12717 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12719 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12721 * infrun.c (keep_going_pass_signal): Clear step-over info when
12722 insert_breakpoints fails.
12724 2018-01-11 Pedro Alves <palves@redhat.com>
12727 * infrun.c (resume): Rename to ...
12728 (resume_1): ... this.
12729 (resume): Reimplement as wrapper around resume_1.
12731 2018-01-11 Pedro Alves <palves@redhat.com>
12734 * remote.c (remote_parse_stop_reply): Default to the last-set
12735 general thread instead of to 'magic_null_ptid'.
12737 2018-01-10 Pedro Alves <palves@redhat.com>
12739 * language.h (language_get_symbol_name_matcher): Rename ...
12740 (get_symbol_name_matcher): ... this.
12741 * language.c (language_get_symbol_name_matcher): Ditto.
12742 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12745 2018-01-10 Pedro Alves <palves@redhat.com>
12749 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12750 Adjust to use language_get_symbol_name_matcher instead of
12751 language_defn::la_get_symbol_name_matcher.
12752 * language.c (language_get_symbol_name_matcher): If in Ada mode
12753 and the lookup name is a verbatim match, return Ada's matcher.
12754 * language.h (language_get_symbol_name_matcher): Adjust comment.
12755 (ada_lookup_name_info::verbatim_p):: New method.
12757 2018-01-10 Pedro Alves <palves@redhat.com>
12760 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12761 minsym's language is language_auto or language_cplus, pass down
12762 language_ada instead.
12763 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12765 2018-01-10 Pedro Alves <palves@redhat.com>
12768 * minsyms.c (linkage_name_str): New function.
12769 (iterate_over_minimal_symbols): Use it.
12771 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12773 * NEWS: Document that 'info proc' now works on FreeBSD.
12775 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12777 * configure.ac: Check for kinfo_getfile in libutil.
12778 * configure: Regenerate.
12779 * config.in: Regenerate.
12780 * fbsd-nat.c: Include "fbsd-tdep.h".
12781 (fbsd_fetch_cmdline): New.
12782 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12783 rather than calling error.
12784 (fbsd_info_proc): New.
12785 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12786 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12787 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12789 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12791 * fbsd-nat.c (struct free_deleter): Remove.
12792 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12794 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12796 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12797 NULL for an empty pathname.
12799 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12801 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12802 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12803 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12804 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12805 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12806 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12807 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12808 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12809 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12810 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12811 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12812 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12813 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12814 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12815 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12817 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12819 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12820 (gnu_xfer_auxv): New function.
12821 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12822 TARGET_OBJECT_AUXV.
12824 2018-01-08 Yao Qi <yao.qi@linaro.org>
12825 Simon Marchi <simon.marchi@ericsson.com>
12827 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12829 (COMMON_OBS): Remove selftest.o.
12830 * configure.ac: Append selftest-arch.c and common/selftest.c to
12831 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12832 * configure: Re-generated.
12833 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12835 (maintenance_info_selftests): Likewise.
12837 2018-01-08 Xavier Roirand <roirand@adacore.com>
12839 * ada-valprint.c (val_print_packed_array_elements): Use
12840 proper number of elements when printing an array indexed
12841 by an enumeration type.
12843 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12845 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12846 (dw2_get_file_names_reader): Adjust.
12847 (lookup_dwo_signatured_type): Adjust.
12848 (lookup_dwp_signatured_type): Adjust.
12849 (lookup_signatured_type): Adjust.
12850 (create_type_unit_group): Adjust.
12851 (get_type_unit_group): Adjust.
12852 (process_psymtab_comp_unit_reader): Adjust.
12853 (build_type_psymtabs_reader): Adjust.
12854 (scan_partial_symbols): Adjust.
12855 (add_partial_symbol): Adjust.
12856 (add_partial_subprogram): Adjust.
12857 (peek_die_abbrev): Adjust.
12858 (fixup_go_packaging): Adjust.
12859 (process_imported_unit_die): Adjust.
12860 (dwarf2_compute_name): Adjust.
12861 (dwarf2_physname): Adjust.
12862 (read_import_statement): Adjust.
12863 (handle_DW_AT_stmt_list): Adjust.
12864 (read_file_scope): Adjust.
12865 (read_func_scope): Adjust.
12866 (read_lexical_block_scope): Adjust.
12867 (read_call_site_scope): Adjust.
12868 (read_variable): Adjust.
12869 (dwarf2_rnglists_process): Adjust.
12870 (dwarf2_ranges_process): Adjust.
12871 (dwarf2_ranges_read): Adjust.
12872 (dwarf2_get_pc_bounds): Adjust.
12873 (dwarf2_record_block_ranges): Adjust.
12874 (dwarf2_add_field): Adjust.
12875 (dwarf2_add_member_fn): Adjust.
12876 (read_structure_type): Adjust.
12877 (process_structure_scope): Adjust.
12878 (read_enumeration_type): Adjust.
12879 (read_array_type): Adjust.
12880 (mark_common_block_symbol_computed): Adjust.
12881 (read_common_block): Adjust.
12882 (read_namespace_type): Adjust.
12883 (read_namespace): Adjust.
12884 (read_module_type): Adjust.
12885 (read_tag_pointer_type): Adjust.
12886 (read_tag_ptr_to_member_type): Adjust.
12887 (read_tag_string_type): Adjust.
12888 (read_subroutine_type): Adjust.
12889 (read_typedef): Adjust.
12890 (read_base_type): Adjust.
12891 (attr_to_dynamic_prop): Adjust.
12892 (read_subrange_type): Adjust.
12893 (read_unspecified_type): Adjust.
12894 (dwarf2_read_abbrevs): Adjust.
12895 (load_partial_dies): Adjust.
12896 (read_partial_die): Adjust.
12897 (find_partial_die): Adjust.
12898 (guess_partial_die_structure_name): Adjust.
12899 (fixup_partial_die): Adjust.
12900 (read_attribute_value): Adjust.
12901 (read_addr_index): Adjust.
12902 (read_addr_index_from_leb128): Adjust.
12903 (read_str_index): Adjust.
12904 (dwarf2_string_attr): Adjust.
12905 (get_debug_line_section): Adjust.
12906 (dwarf_decode_line_header): Adjust.
12907 (lnp_state_machine::check_line_address): Adjust.
12908 (dwarf_decode_lines_1): Adjust.
12909 (dwarf_decode_lines): Adjust.
12910 (dwarf2_start_symtab): Adjust.
12911 (var_decode_location): Adjust.
12912 (new_symbol_full): Adjust.
12913 (dwarf2_const_value_data): Adjust.
12914 (dwarf2_const_value_attr): Adjust.
12915 (dwarf2_const_value): Adjust.
12916 (die_type): Adjust.
12917 (die_containing_type): Adjust.
12918 (build_error_marker_type): Adjust.
12919 (lookup_die_type): Adjust.
12920 (guess_full_die_structure_name): Adjust.
12921 (anonymous_struct_prefix): Adjust.
12922 (determine_prefix): Adjust.
12923 (dwarf2_name): Adjust.
12924 (follow_die_ref_or_sig): Adjust.
12925 (follow_die_offset): Adjust.
12926 (follow_die_ref): Adjust.
12927 (follow_die_sig_1): Adjust.
12928 (follow_die_sig): Adjust.
12929 (get_signatured_type): Adjust.
12930 (get_DW_AT_signature_type): Adjust.
12931 (decode_locdesc): Adjust.
12932 (dwarf_decode_macros): Adjust.
12933 (cu_debug_loc_section): Adjust.
12934 (fill_in_loclist_baton): Adjust.
12935 (dwarf2_symbol_mark_computed): Adjust.
12936 (init_one_comp_unit): Don't assign
12937 dwarf2_cu::dwarf2_per_objfile.
12938 (set_die_type): Adjust.
12940 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12942 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12943 <dwarf2_per_objfile>: New field.
12944 (dwarf2_per_objfile): Remove global.
12945 (get_dwarf2_per_objfile): New function.
12946 (set_dwarf2_per_objfile): New function.
12947 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12948 dwarf2_per_objfile.
12949 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12950 (read_abbrev_offset): Likewise.
12951 (read_indirect_string): Likewise.
12952 (read_indirect_line_string): Likewise.
12953 (read_indirect_string_at_offset): Likewise.
12954 (read_indirect_string_from_dwz): Likewise.
12955 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12956 dwarf2_per_objfile.
12957 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12958 (create_all_comp_units): Change objfile parameter to
12959 dwarf2_per_objfile.
12960 (create_all_type_units): Likewise.
12961 (process_queue): Add dwarf2_per_objfile parameter.
12962 (read_and_check_comp_unit_head): Likewise.
12963 (lookup_dwo_unit_in_dwp): Likewise.
12964 (get_dwp_file): Likewise.
12965 (process_cu_includes): Likewise.
12966 (struct free_dwo_file_cleanup_data): New struct.
12967 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12968 set_dwarf2_per_objfile.
12969 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12970 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12971 context, adjust calls.
12972 (dw2_instantiate_symtab): Likewise.
12973 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12974 (dw2_get_cu): Likewise.
12975 (create_cu_from_index_list): Change objfile parameter to
12976 dwarf2_per_objfile.
12977 (create_cus_from_index_list): Get dwarf2_per_objfile from
12978 context, adjust calls.
12979 (create_cus_from_index): Likewise.
12980 (create_signatured_type_table_from_index): Change objfile
12981 parameter to dwarf2_per_objfile.
12982 (create_signatured_type_table_from_debug_names): Change objfile
12983 parameter to dwarf2_per_objfile.
12984 (create_addrmap_from_index): Likewise.
12985 (create_addrmap_from_aranges): Likewise.
12986 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12987 (dw2_setup): Remove.
12988 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12990 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12991 get_dwarf2_per_objfile.
12992 (dw2_forget_cached_source_info): Likewise.
12993 (dw2_map_symtabs_matching_filename): Likewise.
12994 (struct dw2_symtab_iterator) <index>: Remove.
12995 <dwarf2_per_objfile>: New field.
12996 (dw2_symtab_iter_init): Replace index parameter with
12997 dwarf2_per_objfile.
12998 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12999 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13000 (dw2_print_stats): Likewise.
13001 (dw2_dump): Likewise.
13002 (dw2_expand_symtabs_for_function): Likewise.
13003 (dw2_expand_all_symtabs): Likewise.
13004 (dw2_expand_symtabs_with_fullname): Likewise.
13005 (dw2_expand_marked_cus): Replace index and objfile parameters
13006 with dwarf2_per_objfile.
13007 (dw_expand_symtabs_matching_file_matcher): Add
13008 dwarf2_per_objfile parameter and adjust calls.
13009 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13011 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13012 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13014 (create_cus_from_debug_names_list): Replace objfile parameter
13015 with dwarf2_per_objfile and adjust calls.
13016 (create_cus_from_debug_names): Likewise.
13017 (dwarf2_read_debug_names): Likewise.
13018 (mapped_debug_names::namei_to_name): Adjust call.
13019 (dw2_debug_names_iterator::next): Likewise.
13020 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13021 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13022 (dw2_debug_names_dump): Likewise.
13023 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13024 (dw2_debug_names_expand_symtabs_matching): Likewise.
13025 (dwarf2_initialize_objfile): Likewise.
13026 (dwarf2_build_psymtabs): Likewise.
13027 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13029 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13030 (read_and_check_comp_unit_head): Likewise.
13031 (read_abbrev_offset): Likewise.
13032 (create_debug_type_hash_table): Likewise.
13033 (create_debug_types_hash_table): Likewise.
13034 (create_all_type_units): Replace objfile parameter with
13035 dwarf2_per_objfile.
13036 (add_type_unit): Add dwarf2_per_objfile parameter.
13037 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13038 with dwarf2_per_objfile.
13039 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13040 (lookup_dwp_signatured_type): Likewise.
13041 (lookup_signatured_type): Likewise.
13042 (read_cutu_die_from_dwo): Likewise.
13043 (init_tu_and_read_dwo_dies): Likewise.
13044 (init_cutu_and_read_dies): Likewise.
13045 (init_cutu_and_read_dies_no_follow): Likewise.
13046 (allocate_type_unit_groups_table): Add objfile parameter.
13047 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13048 (get_type_unit_group): Likewise.
13049 (process_psymtab_comp_unit): Update call.
13050 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13051 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13052 (print_tu_stats): Likewise.
13053 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13054 in void* parameter.
13055 (build_type_psymtabs): Change objfile parameter to
13056 dwarf2_per_objfile.
13057 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13058 passed in void* parameter.
13059 (process_skeletonless_type_units): Change objfile parameter to
13060 dwarf2_per_objfile.
13061 (set_partial_user): Likewise.
13062 (dwarf2_build_psymtabs_hard): Likewise.
13063 (read_comp_units_from_section): Likewise.
13064 (create_all_comp_units): Likewise.
13065 (scan_partial_symbols): Update calls.
13066 (add_partial_symbol): Likewise.
13067 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13068 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13069 (process_queue): Add dwarf2_per_objfile parameter.
13070 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13071 (compute_compunit_symtab_includes): Likewise.
13072 (process_cu_includes): Add dwarf2_per_objfile parameter.
13073 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13074 (process_full_type_unit): Likewise.
13075 (process_imported_unit_die): Update call.
13076 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13077 (read_file_scope): Likewise.
13078 (allocate_dwo_file_hash_table): Add objfile parameter.
13079 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13080 (create_cus_hash_table): Likewise.
13081 (create_dwp_hash_table): Likewise.
13082 (create_dwo_unit_in_dwp_v1): Likewise.
13083 (create_dwp_v2_section): Likewise.
13084 (create_dwo_unit_in_dwp_v2): Likewise.
13085 (lookup_dwo_unit_in_dwp): Likewise.
13086 (try_open_dwop_file): Likewise.
13087 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13088 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13089 cleanup to include a reference to dwarf2_per_objfile.
13090 (open_dwp_file): Add dwarf2_per_objfile parameter.
13091 (open_and_init_dwp_file): Likewise.
13092 (get_dwp_file): Likewise.
13093 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13094 (queue_and_load_all_dwo_tus): Update call.
13095 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13097 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13098 (dwarf2_ranges_process): Likewise.
13099 (dwarf2_get_pc_bounds): Likewise.
13100 (mark_common_block_symbol_computed): Likewise.
13101 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13102 (dwarf2_read_abbrevs): Update call.
13103 (read_partial_die): Use dwarf2_per_objfile from cu.
13104 (find_partial_die): Likewise.
13105 (fixup_partial_die): Likewise.
13106 (read_attribute_value): Likewise.
13107 (read_indirect_string_at_offset_from): Add objfile parameter.
13108 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13110 (read_indirect_string_from_dwz): Add objfile parameter.
13111 (read_indirect_string): Add objfile parameter.
13112 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13113 (read_addr_index): Use dwarf2_per_objfile from cu.
13114 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13116 (read_str_index): Use dwarf2_per_objfile from cu.
13117 (get_debug_line_section): Likewise.
13118 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13119 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13120 (new_symbol_full): Use dwarf2_per_objfile from cu.
13121 (build_error_marker_type): Likewise.
13122 (lookup_die_type): Likewise.
13123 (determine_prefix): Likewise.
13124 (follow_die_offset): Likewise.
13125 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13126 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13127 (dwarf2_fetch_die_type_sect_off): Likewise.
13128 (dwarf2_get_die_type): Likewise.
13129 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13130 (get_signatured_type): Likewise.
13131 (get_DW_AT_signature_type): Likewise.
13132 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13133 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13134 (cu_debug_loc_section): Likewise.
13135 (fill_in_loclist_baton): Likewise.
13136 (dwarf2_symbol_mark_computed): Likewise.
13137 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13138 dwarf2_per_objfile.
13139 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13141 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13142 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13143 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13144 (set_die_type): Use dwarf2_free_objfile from cu.
13145 (get_die_type_at_offset): Likewise.
13146 (dwarf2_per_objfile_free): Don't assign global variable.
13147 (debug_names) <constructor>: Add dwarf2_per_objfile
13148 parameter, update m_debugstrlookup construction.
13149 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13151 <m_dwarf2_per_objfile>: New field.
13152 <lookup>: Use m_dwarf2_per_objfile.
13153 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13154 (psyms_seen_size): Likewise.
13155 (write_gdbindex): Replace objfile parameter with
13156 dwarf2_per_objfile.
13157 (write_debug_names): Likewise.
13158 (write_psymtabs_to_index): Likewise.
13159 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13162 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13164 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13165 <dwarf2_per_objfile>: New field.
13166 (struct dwarf2_per_cu_data) <objfile>: Remove.
13167 <dwarf2_per_objfile>: New field.
13168 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13170 (create_signatured_type_table_from_index): Likewise.
13171 (create_debug_type_hash_table): Likewise.
13172 (fill_in_sig_entry_from_dwo_entry): Likewise.
13173 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13174 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13176 (create_partial_symtab): Access objfile through
13177 dwarf2_per_objfile.
13178 (process_psymtab_comp_unit_reader): Likewise.
13179 (read_comp_units_from_section): Likewise.
13180 (scan_partial_symbols): Likewise.
13181 (add_partial_symbol): Likewise.
13182 (add_partial_subprogram): Likewise.
13183 (peek_die_abbrev): Likewise.
13184 (fixup_go_packaging): Likewise.
13185 (process_full_comp_unit): Likewise.
13186 (process_full_type_unit): Likewise.
13187 (process_imported_unit_die): Likewise.
13188 (dwarf2_compute_name): Likewise.
13189 (dwarf2_physname): Likewise.
13190 (read_import_statement): Likewise.
13191 (create_cus_hash_table): Assign dwarf2_physname instead of
13193 (read_func_scope): Access objfile through dwarf2_per_objfile.
13194 (read_lexical_block_scope): Likewise.
13195 (read_call_site_scope): Likewise.
13196 (read_variable): Likewise.
13197 (dwarf2_rnglists_process): Likewise.
13198 (dwarf2_ranges_process): Likewise.
13199 (dwarf2_ranges_read): Likewise.
13200 (dwarf2_record_block_ranges): Likewise.
13201 (dwarf2_add_field): Likewise.
13202 (dwarf2_add_member_fn): Likewise.
13203 (read_structure_type): Likewise.
13204 (process_structure_scope): Likewise.
13205 (read_enumeration_type): Likewise.
13206 (read_array_type): Likewise.
13207 (read_common_block): Likewise.
13208 (read_namespace_type): Likewise.
13209 (read_namespace): Likewise.
13210 (read_module_type): Likewise.
13211 (read_tag_pointer_type): Likewise.
13212 (read_tag_ptr_to_member_type): Likewise.
13213 (read_tag_string_type): Likewise.
13214 (read_subroutine_type): Likewise.
13215 (read_typedef): Likewise.
13216 (read_base_type): Likewise.
13217 (attr_to_dynamic_prop): Likewise.
13218 (read_subrange_type): Likewise.
13219 (read_unspecified_type): Likewise.
13220 (load_partial_dies): Likewise.
13221 (read_partial_die): Likewise.
13222 (find_partial_die): Likewise.
13223 (guess_partial_die_structure_name): Likewise.
13224 (fixup_partial_die): Likewise.
13225 (read_attribute_value): Likewise.
13226 (read_addr_index_from_leb128): Likewise.
13227 (dwarf2_read_addr_index): Likewise.
13228 (dwarf2_string_attr): Likewise.
13229 (lnp_state_machine::check_line_address): Likewise.
13230 (dwarf_decode_lines_1): Likewise.
13231 (dwarf_decode_lines): Likewise.
13232 (dwarf2_start_symtab): Likewise.
13233 (var_decode_location): Likewise.
13234 (new_symbol_full): Likewise.
13235 (dwarf2_const_value_data): Likewise.
13236 (dwarf2_const_value_attr): Likewise.
13237 (dwarf2_const_value): Likewise.
13238 (die_type): Likewise.
13239 (die_containing_type): Likewise.
13240 (lookup_die_type): Likewise.
13241 (guess_full_die_structure_name): Likewise.
13242 (anonymous_struct_prefix): Likewise.
13243 (dwarf2_name): Likewise.
13244 (follow_die_ref_or_sig): Likewise.
13245 (follow_die_offset): Likewise.
13246 (follow_die_ref): Likewise.
13247 (dwarf2_fetch_die_loc_sect_off): Likewise.
13248 (dwarf2_fetch_constant_bytes): Likewise.
13249 (dwarf2_fetch_die_type_sect_off): Likewise.
13250 (dwarf2_get_die_type): Likewise.
13251 (follow_die_sig): Likewise.
13252 (decode_locdesc): Likewise.
13253 (dwarf2_per_cu_objfile): Likewise.
13254 (dwarf2_per_cu_text_offset): Likewise.
13255 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13257 (set_die_type): Access objfile through
13258 dwarf2_per_objfile.
13260 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13262 * valprint.c (converted_character_d): Remove typedef.
13263 (DEF_VEC_O (converted_character_d)): Remove.
13264 (count_next_character): Use std::vector.
13265 (print_converted_chars_to_obstack): Likewise.
13266 (generic_printstr): Likewise.
13268 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13270 * xml-support.h (struct gdb_xml_value): Add constructor.
13271 <value>: Change type to unique_xmalloc_ptr.
13272 (gdb_xml_value_s): Remove typedef.
13273 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13274 (gdb_xml_element_start_handler): Change parameter type to
13276 (xml_find_attribute): Likewise.
13277 * xml-support.c (xml_find_attribute): Change parameter type to
13278 std::vector and adjust.
13279 (gdb_xml_values_cleanup): Remove.
13280 (gdb_xml_parser::start_element): Adjust to std::vector.
13281 (xinclude_start_include): Change paraeter type to std::vector
13283 * btrace.c (check_xml_btrace_version): Likewise.
13284 (parse_xml_btrace_block): Likewise.
13285 (parse_xml_btrace_pt_config_cpu): Likewise.
13286 (parse_xml_btrace_pt): Likewise.
13287 (parse_xml_btrace_conf_bts): Likewise.
13288 (parse_xml_btrace_conf_pt): Likewise.
13289 * memory-map.c (memory_map_start_memory): Likewise.
13290 (memory_map_start_property): Likewise.
13291 * osdata.c (osdata_start_osdata): Likewise.
13292 (osdata_start_item): Likewise.
13293 (osdata_start_column): Likewise.
13294 * remote.c (start_thread): Likewise.
13295 * solib-aix.c (library_list_start_library): Likewise.
13296 (library_list_start_list): Likewise.
13297 * solib-svr4.c (library_list_start_library): Likewise.
13298 (svr4_library_list_start_list): Likewise.
13299 * solib-target.c (library_list_start_segment): Likewise.
13300 (library_list_start_section): Likewise.
13301 (library_list_start_library): Likewise.
13302 (library_list_start_list): Likewise.
13303 * tracepoint.c (traceframe_info_start_memory): Likewise.
13304 (traceframe_info_start_tvar): Likewise.
13305 * xml-syscall.c (syscall_start_syscall): Likewise.
13306 * xml-tdesc.c (tdesc_start_target): Likewise.
13307 (tdesc_start_feature): Likewise.
13308 (tdesc_start_reg): Likewise.
13309 (tdesc_start_union): Likewise.
13310 (tdesc_start_struct): Likewise.
13311 (tdesc_start_flags): Likewise.
13312 (tdesc_start_enum): Likewise.
13313 (tdesc_start_field): Likewise.
13314 (tdesc_start_enum_value): Likewise.
13315 (tdesc_start_vector): Likewise.
13317 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13319 * extension.h (struct xmethod_worker) <clone>: Remove.
13320 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13322 (python_xmethod_worker::clone): Remove.
13323 * valops.c (find_overload_match): Use std::move instead of
13326 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13328 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13329 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13330 <free_xmethod_worker_data>: Remove.
13331 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13332 <get_xmethod_arg_types>: Remove.
13333 <get_xmethod_result_type>: Remove.
13334 <invoke_xmethod>: Remove.
13335 * extension.c (new_xmethod_worker): Remove.
13336 (clone_xmethod_worker): Remove.
13337 (get_matching_xmethod_workers): Return void, pass std::vector by
13339 (get_xmethod_arg_types): Rename to...
13340 (xmethod_worker::get_arg_types): ... this, and adjust.
13341 (get_xmethod_result_type): Rename to...
13342 (xmethod_worker::get_result_type): ... this, and adjust.
13343 (invoke_xmethod): Remove.
13344 (free_xmethod_worker): Remove.
13345 (free_xmethod_worker_vec): Remove.
13346 * extension.h (enum ext_lang_rc): Move here from
13348 (struct xmethod_worker): Add constructor and destructor.
13351 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13352 virtual pure methods.
13353 <get_arg_types, get_result_type>: New methods.
13354 (xmethod_worker_ptr): Remove typedef.
13355 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13356 (xmethod_worker_vec): Remove typedef.
13357 (xmethod_worker_up): New typedef.
13358 (invoke_xmethod): Remove.
13359 (clone_xmethod_worker): Remove.
13360 (free_xmethod_worker): Remove.
13361 (free_xmethod_worker_vec): Remove.
13362 (get_xmethod_arg_types): Remove.
13363 (get_xmethod_result_type): Remove.
13364 * valops.c (find_method_list): Use std::vector, don't use
13365 intermediate vector.
13366 (value_find_oload_method_list): Use std::vector.
13367 (find_overload_match): Use std::vector.
13368 (find_oload_champ): Use std::vector.
13369 * value.c (value_free): Use operator delete.
13370 (value_of_xmethod): Rename to...
13371 (value_from_xmethod): ... this. Don't assign
13372 xmethod_worker::value, take rvalue-reference.
13373 (result_type_of_xmethod): Adjust.
13374 (call_xmethod): Adjust.
13375 * value.h: Include extension.h.
13376 (struct xmethod_worker): Don't forward-declare.
13377 (value_of_xmethod): Rename to...
13378 (value_from_xmethod): ... this, take rvalue-reference.
13379 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13380 (struct python_xmethod_worker): ... this, add constructor and
13382 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13383 (gdbpy_free_xmethod_worker_data): Rename to...
13384 (python_xmethod_worker::~python_xmethod_worker): ... this and
13386 (gdbpy_clone_xmethod_worker_data): Rename to...
13387 (python_xmethod_worker::clone): ... this and adjust.
13388 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13390 (gdbpy_get_xmethod_arg_types): Rename to...
13391 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13392 (gdbpy_get_xmethod_result_type): Rename to...
13393 (python_xmethod_worker::do_get_result_type): ... this and
13395 (gdbpy_invoke_xmethod): Rename to...
13396 (python_xmethod_worker::invoke): ... this and adjust.
13397 (new_python_xmethod_worker): Rename to...
13398 (python_xmethod_worker::python_xmethod_worker): ... this and
13400 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13402 (gdbpy_free_xmethod_worker_data): Remove.
13403 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13404 (gdbpy_get_xmethod_arg_types): Remove.
13405 (gdbpy_get_xmethod_result_type): Remove.
13406 (gdbpy_invoke_xmethod): Remove.
13407 * python/python.c (python_extension_ops): Remove obsolete
13410 2018-01-05 Pedro Alves <palves@redhat.com>
13413 * common/signals-state-save-restore.c
13414 (save_original_signals_state): New parameter 'quiet'. Warn if we
13415 find a custom handler preinstalled, instead of internal erroring.
13416 But only warn if !quiet.
13417 * common/signals-state-save-restore.h
13418 (save_original_signals_state): New parameter 'quiet'.
13419 * main.c (captured_main_1): Move save_original_signals_state call
13420 after option handling, and pass QUIET.
13422 2018-01-05 Pedro Alves <palves@redhat.com>
13424 * spu-tdep.c (spu_catch_start): Pass
13425 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13427 2018-01-05 Pedro Alves <palves@redhat.com>
13430 * ada-lang.c (literal_symbol_name_matcher): New function.
13431 (ada_get_symbol_name_matcher): Use it for
13432 symbol_name_match_type::SEARCH_NAME.
13433 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13434 it down instead of assuming symbol_name_match_type::FULL.
13435 * block.h (block_lookup_symbol): New parameter 'match_type'.
13436 * c-valprint.c (print_unpacked_pointer): Use
13437 lookup_symbol_search_name instead of lookup_symbol.
13438 * compile/compile-object-load.c (get_out_value_type): Pass down
13439 symbol_name_match_type::SEARCH_NAME.
13440 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13441 symbol_name_match_type::FULL.
13442 * cp-support.c (cp_get_symbol_name_matcher): Handle
13443 symbol_name_match_type::SEARCH_NAME.
13444 * infrun.c (insert_exception_resume_breakpoint): Use
13445 lookup_symbol_search_name.
13446 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13447 * psymtab.c (maintenance_check_psymtabs): Use
13448 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13449 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13450 SYMBOL_SEARCH_NAME.
13451 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13452 if symbol_name_match_type::SEARCH_NAME.
13453 (lookup_symbol_in_language): Pass down
13454 symbol_name_match_type::FULL.
13455 (lookup_symbol_search_name): New.
13456 (lookup_language_this): Pass down
13457 symbol_name_match_type::SEARCH_NAME.
13458 (lookup_symbol_aux, lookup_local_symbol): New parameter
13459 'match_type'. Pass it down.
13460 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13461 (lookup_symbol_search_name): New declaration.
13462 (lookup_symbol_in_block): New 'match_type' parameter.
13464 2018-01-05 Pedro Alves <palves@redhat.com>
13467 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13469 (ada_lookup_symbol): Reimplement in terms of
13470 ada_lookup_symbol_list, bits factored out from
13471 ada_lookup_encoded_symbol.
13473 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13475 * ada-exp.y (write_object_renaming): When subscripting an array
13476 using a symbol as the index, pass the block in call to
13477 ada_lookup_encoded_symbol when looking that symbol up.
13479 2018-01-05 Jerome Guitton <guitton@adacore.com>
13481 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13484 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13486 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13487 the case where VALUE_LVAL (val0) is not lval_memory.
13489 2018-01-05 Xavier Roirand <roirand@adacore.com>
13491 * ada-valprint.c (print_optional_low_bound): Handle
13492 character-indexed array printing like boolean-indexed array
13495 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13497 * NEWS: Create a new section for the next release branch.
13498 Rename the section of the current branch, now that it has
13501 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13503 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13504 * version.in: Bump version to 8.1.50.DATE-git.
13506 2018-01-03 Xavier Roirand <roirand@adacore.com>
13508 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13510 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13512 (default_exception_support_info) <catch_handlers_sym>: Add field.
13513 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13514 (ada_exception_name_addr_1): Add "catch handlers" handling.
13515 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13516 Update all callers.
13517 (create_excep_cond_exprs) <ex>: Add parameter.
13518 (re_set_exception): Update create_excep_cond_exprs call.
13519 (print_it_exception, print_one_exception, print_mention_exception)
13520 (print_recreate_exception): Add "catch handler" handling.
13521 (allocate_location_catch_handlers, re_set_catch_handlers)
13522 (check_status_catch_handlers, print_it_catch_handlers)
13523 (print_one_catch_handlers, print_mention_catch_handlers)
13524 (print_recreate_catch_handlers): New function.
13525 (catch_handlers_breakpoint_ops): New variable.
13526 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13527 Add parameter. Add "catch handler" handling.
13528 (ada_exception_sym_name, ada_exception_breakpoint_ops):
13529 Add "catch handler" handling.
13530 (ada_exception_catchpoint_cond_string): Add "catch handler"
13532 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13534 (catch_ada_handlers_command): New function.
13535 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13536 operations structure.
13537 (_initialize_ada_language): Add "catch handlers" command entry.
13538 * NEWS: Document "catch handlers" feature.
13540 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13542 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13543 account when creating the array type of the slice.
13544 (ada_value_slice): Likewise.
13546 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13548 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13550 (create_array_type_with_stride): Add byte_stride_prop parameter.
13551 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13552 New parameter. Update all callers in this file.
13553 (array_type_has_dynamic_stride): New function.
13554 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13555 of arrays with dynamic byte strides.
13556 * dwarf2read.c (read_array_type): Add support for dynamic
13557 DW_AT_byte_stride attributes.
13559 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13561 * dwarf2read.c (read_unspecified_type): Treat
13562 DW_TAG_enumeration_type DIEs from Ada units as stubs.
13564 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13566 Update copyright year range in all GDB files.
13568 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13570 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13571 and gdb/testsuite/gdb.base/step-line.c.
13573 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13575 * copyright.py (main): Dump the contents of
13576 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13577 even if BY_HAND is empty.
13579 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13581 * top.c (print_gdb_version): Update Copyright year in version
13584 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13586 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13588 For older changes see ChangeLog-2017.
13594 version-control: never