1 2018-09-16 Tom Tromey <tom@tromey.com>
3 * python/py-inferior.c (infpy_get_progspace): Update.
4 * python/python-internal.h (pspace_to_pspace_object): Change
6 * python/py-newobjfileevent.c
7 (create_clear_objfiles_event_object): Update.
8 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
10 * python/python.c (gdbpy_get_current_progspace): Update.
11 (gdbpy_progspaces): Update.
12 * python/py-progspace.c (pspace_to_pspace_object): Return a new
14 * python/py-objfile.c (objfpy_get_progspace): Update.
15 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
18 2018-09-16 Tom Tromey <tom@tromey.com>
20 * python/lib/gdb/__init__.py (current_progspace, objfiles)
21 (solib_name, block_for_pc, find_pc_line): New functions.
22 (execute_unwinders): Update.
23 * python/py-block.c (gdbpy_block_for_pc): Remove.
24 * python/py-inferior.c (infpy_get_progspace): New function.
25 (inferior_object_getset) <progspace>: Add.
26 * python/py-progspace.c (pspy_objfiles): Rewrite.
27 (pspy_solib_name, pspy_block_for_pc)
28 (pspy_find_pc_line, pspy_is_valid): New functions.
29 (progspace_object_methods): Add entries for solib_name,
30 block_for_pc, find_pc_line, is_valid.
31 * python/python-internal.h (gdbpy_block_for_pc)
32 (build_objfiles_list): Don't declare.
33 * python/python.c: Don't include solib.h.
34 (gdbpy_solib_name, gdbpy_find_pc_line)
35 (gdbpy_get_current_progspace, build_objfiles_list)
36 (gdbpy_objfiles): Remove.
37 (GdbMethods) <current_progspace, objfiles, block_for_pc,
38 solib_name, find_pc_line>: Remove entries.
40 2018-09-16 Tom Tromey <tom@tromey.com>
42 * top.c (new_ui_command): Use GNU style for metasyntactic
44 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
46 * maint.c (maintenance_translate_address): Remove "<>" around
48 * interps.c (interpreter_exec_cmd): Use GNU style for
49 metasyntactic variables.
50 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
51 metasyntactic variables.
52 * tracepoint.c (tfind_range_command): Use GNU style for
53 metasyntactic variables.
54 (tfind_outside_command): Likewise.
55 (_initialize_tracepoint): Likewise.
56 * remote.c (extended_remote_target::create_inferior): Use GNU
57 style for metasyntactic variables.
58 * sparc64-tdep.c (adi_examine_command): Use GNU style for
59 metasyntactic variables.
60 (adi_assign_command): Likewise.
62 2018-09-16 Tom Tromey <tom@tromey.com>
64 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
65 metasyntactic variables. Print message if no disassembler options
68 2018-09-15 Tom Tromey <tom@tromey.com>
70 * infcmd.c (get_inferior_args): Return const char *.
71 * inferior.h (get_inferior_args): Return type now const.
72 * linux-tdep.c (linux_fill_prpsinfo): Update.
73 * procfs.c (procfs_target::make_corefile_notes): Update.
75 2018-09-07 Tom Tromey <tom@tromey.com>
77 * python/python.c (execute_gdb_command): Call bpstat_do_actions
80 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
82 * nios2-tdep.c (nios2_type_align): New.
83 (nios2_gdb_arch_init): Install type_align hook.
85 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
87 * eval.c (fake_method::fake_method): Call xzalloc directly for a
88 type that is neither object file owned, nor gdbarch owned.
89 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
91 (alloc_type_instance): Allocate non-objfile owned types on the
93 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
94 using TYPE_ALLOC to ensure memory is allocated on the correct
96 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
97 obstack, or the gdbarch obstack.
98 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
100 2018-09-14 Tom Tromey <tom@tromey.com>
102 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
105 2018-09-14 Tom Tromey <tom@tromey.com>
107 * nat/fork-inferior.c (get_startup_shell): Remove "static".
109 2018-09-13 Tom Tromey <tom@tromey.com>
111 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
114 2018-09-13 Tom Tromey <tom@tromey.com>
116 * exec.c (try_open_exec_file): Use std::string.
118 2018-09-13 Tom Tromey <tom@tromey.com>
120 * utils.h (gdb_bfd_errmsg): Return std::string.
121 * exec.c (exec_file_attach): Update.
122 * compile/compile-object-load.c (compile_object_load): Update.
123 * utils.c (gdb_bfd_errmsg): Return std::string.
125 2018-09-13 Tom Tromey <tom@tromey.com>
127 * procfs.c (struct procinfo_deleter): New.
128 (procinfo_up): New typedef.
129 (do_destroy_procinfo_cleanup): Remove.
130 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
132 2018-09-13 Tom Tromey <tom@tromey.com>
134 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
136 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
137 2018-09-13 Tom Tromey <tom@tromey.com>
139 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
140 (pspy_get_objfiles): New function.
141 (progspace_object_methods): New.
142 (pspace_object_type): Add tp_methods callback.
143 * python/python-internal.h (build_objfiles_list): New
145 * python/python.c (build_objfiles_list): New function.
146 (gdbpy_objfiles): Implement using build_objfiles_list.
147 * NEWS: Mention the Progspace.objfiles method.
149 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
151 * python/py-inferior.c (infpy_get_progspace): New function.
152 (inferior_object_getset): Add progspace property.
153 * NEWS: Mention the new property.
155 2018-09-13 Tom Tromey <tom@tromey.com>
158 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
160 2018-09-13 Tom Tromey <tom@tromey.com>
163 * rust-lang.c (rust_enum_variant): Now static.
164 (rust_empty_enum_p): New function.
165 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
168 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
170 * python/py-inferior.c (infpy_repr): New.
171 (inferior_object_type): Register infpy_repr.
172 * python/py-objfile.c (objfpy_repr): New.
173 (objfile_object_type): Register objfpy_repr.
175 2018-09-12 John Baldwin <jhb@FreeBSD.org>
177 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
179 2018-09-12 John Baldwin <jhb@FreeBSD.org>
181 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
184 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
186 * common/common-utils.c: Don't include '<sys/stat.h>'.
187 (is_regular_file): Move to...
188 * common/filestuff.c (is_regular_file): ... here.
189 * common/common-utils.h (is_regular_file): Move to...
190 * common/filestuff.h (is_regular_file): ... here.
192 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
194 * skip.c (debug_skip): New variable.
195 (skiplist_entry::do_skip_file_p): Add debug output.
196 (skiplist_entry::do_skip_gfile_p): Likewise.
197 (skiplist_entry::skip_function_p): Likewise.
198 (_initialize_step_skip): Create debug command.
199 * NEWS: Mention set/show debug skip.
201 2018-09-11 Xavier Roirand <roirand@adacore.com>
203 * darwin-nat.c (should_disable_startup_with_shell):
205 (darwin_nat_target::create_inferior): Add call.
207 2018-09-11 Xavier Roirand <roirand@adacore.com>
209 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
210 inf_port, msg_state>: Initialize.
211 (struct darwin_thread_info) <signaled, single_step>: Change
213 (struct darwin_thread_info) <event>: Initialize.
215 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
219 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
222 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
225 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
229 * gnulib/aclocal.m4: Regenerate.
230 * gnulib/config.in: Regenerate.
231 * gnulib/configure: Regenerate.
232 * gnulib/import/Makefile.am: Update.
233 * gnulib/import/Makefile.in: Update.
234 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
235 * gnulib/import/_Noreturn.h: ... this.
236 * gnulib/import/alloca.in.h: Update.
237 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
238 * gnulib/import/arg-nonnull.h: ... this.
239 * gnulib/import/assure.h: Update.
240 * gnulib/import/at-func.c: Update.
241 * gnulib/import/basename-lgpl.c: Update.
242 * gnulib/import/extra/snippet/c++defs.h: Rename to...
243 * gnulib/import/c++defs.h: ... this.
244 * gnulib/import/canonicalize-lgpl.c: Update.
245 * gnulib/import/cdefs.h: Update.
246 * gnulib/import/chdir-long.c: Update.
247 * gnulib/import/chdir-long.h: Update.
248 * gnulib/import/cloexec.c: Update.
249 * gnulib/import/cloexec.h: Update.
250 * gnulib/import/close.c: Update.
251 * gnulib/import/closedir.c: Update.
252 * gnulib/import/config.charset: Update.
253 * gnulib/import/dirent-private.h: Update.
254 * gnulib/import/dirent.in.h: Update.
255 * gnulib/import/dirfd.c: Update.
256 * gnulib/import/dirname-lgpl.c: Update.
257 * gnulib/import/dirname.h: Update.
258 * gnulib/import/dosname.h: Update.
259 * gnulib/import/dup-safer-flag.c: Update.
260 * gnulib/import/dup-safer.c: Update.
261 * gnulib/import/dup.c: Update.
262 * gnulib/import/dup2.c: Update.
263 * gnulib/import/errno.in.h: Update.
264 * gnulib/import/error.c: Update.
265 * gnulib/import/error.h: Update.
266 * gnulib/import/exitfail.c: Update.
267 * gnulib/import/exitfail.h: Update.
268 * gnulib/import/extra/update-copyright: Update.
269 * gnulib/import/fchdir.c: Update.
270 * gnulib/import/fcntl.c: Update.
271 * gnulib/import/fcntl.in.h: Update.
272 * gnulib/import/fd-hook.c: Update.
273 * gnulib/import/fd-hook.h: Update.
274 * gnulib/import/fd-safer-flag.c: Update.
275 * gnulib/import/fd-safer.c: Update.
276 * gnulib/import/fdopendir.c: Update.
277 * gnulib/import/filename.h: Update.
278 * gnulib/import/filenamecat-lgpl.c: Update.
279 * gnulib/import/filenamecat.h: Update.
280 * gnulib/import/flexmember.h: Update.
281 * gnulib/import/float+.h: Update.
282 * gnulib/import/float.c: Update.
283 * gnulib/import/float.in.h: Update.
284 * gnulib/import/fnmatch.c: Update.
285 * gnulib/import/fnmatch.in.h: Update.
286 * gnulib/import/fnmatch_loop.c: Update.
287 * gnulib/import/fpucw.h: Update.
288 * gnulib/import/frexp.c: Update.
289 * gnulib/import/frexpl.c: Update.
290 * gnulib/import/fstat.c: Update.
291 * gnulib/import/fstatat.c: Update.
292 * gnulib/import/getcwd-lgpl.c: Update.
293 * gnulib/import/getcwd.c: Update.
294 * gnulib/import/getdtablesize.c: Update.
295 * gnulib/import/getlogin_r.c: Update.
296 * gnulib/import/getprogname.c: Update.
297 * gnulib/import/getprogname.h: Update.
298 * gnulib/import/gettext.h: Update.
299 * gnulib/import/gettimeofday.c: Update.
300 * gnulib/import/glob-libc.h: Update.
301 * gnulib/import/glob.c: Update.
302 * gnulib/import/glob.in.h: Update.
303 * gnulib/import/glob_internal.h: Update.
304 * gnulib/import/glob_pattern_p.c: Update.
305 * gnulib/import/globfree.c: Update.
306 * gnulib/import/hard-locale.c: Update.
307 * gnulib/import/hard-locale.h: Update.
308 * gnulib/import/intprops.h: Update.
309 * gnulib/import/inttypes.in.h: Update.
310 * gnulib/import/isnan.c: Update.
311 * gnulib/import/isnand-nolibm.h: Update.
312 * gnulib/import/isnand.c: Update.
313 * gnulib/import/isnanl-nolibm.h: Update.
314 * gnulib/import/isnanl.c: Update.
315 * gnulib/import/itold.c: Update.
316 * gnulib/import/libc-config.h: Update.
317 * gnulib/import/limits.in.h: Update.
318 * gnulib/import/localcharset.c: Update.
319 * gnulib/import/localcharset.h: Update.
320 * gnulib/import/localtime-buffer.c: Update.
321 * gnulib/import/localtime-buffer.h: Update.
322 * gnulib/import/lstat.c: Update.
323 * gnulib/import/m4/00gnulib.m4: Update.
324 * gnulib/import/m4/__inline.m4: Update.
325 * gnulib/import/m4/absolute-header.m4: Update.
326 * gnulib/import/m4/alloca.m4: Update.
327 * gnulib/import/m4/builtin-expect.m4: Update.
328 * gnulib/import/m4/canonicalize.m4: Update.
329 * gnulib/import/m4/chdir-long.m4: Update.
330 * gnulib/import/m4/close.m4: Update.
331 * gnulib/import/m4/closedir.m4: Update.
332 * gnulib/import/m4/configmake.m4: Update.
333 * gnulib/import/m4/d-ino.m4: Update.
334 * gnulib/import/m4/d-type.m4: Update.
335 * gnulib/import/m4/dirent_h.m4: Update.
336 * gnulib/import/m4/dirfd.m4: Update.
337 * gnulib/import/m4/dirname.m4: Update.
338 * gnulib/import/m4/double-slash-root.m4: Update.
339 * gnulib/import/m4/dup.m4: Update.
340 * gnulib/import/m4/dup2.m4: Update.
341 * gnulib/import/m4/eealloc.m4: Update.
342 * gnulib/import/m4/environ.m4: Update.
343 * gnulib/import/m4/errno_h.m4: Update.
344 * gnulib/import/m4/error.m4: Update.
345 * gnulib/import/m4/exponentd.m4: Update.
346 * gnulib/import/m4/exponentl.m4: Update.
347 * gnulib/import/m4/extensions.m4: Update.
348 * gnulib/import/m4/extern-inline.m4: Update.
349 * gnulib/import/m4/fchdir.m4: Update.
350 * gnulib/import/m4/fcntl-o.m4: Update.
351 * gnulib/import/m4/fcntl.m4: Update.
352 * gnulib/import/m4/fcntl_h.m4: Update.
353 * gnulib/import/m4/fdopendir.m4: Update.
354 * gnulib/import/m4/filenamecat.m4: Update.
355 * gnulib/import/m4/flexmember.m4: Update.
356 * gnulib/import/m4/float_h.m4: Update.
357 * gnulib/import/m4/fnmatch.m4: Update.
358 * gnulib/import/m4/fnmatch_h.m4: Update.
359 * gnulib/import/m4/fpieee.m4: Update.
360 * gnulib/import/m4/frexp.m4: Update.
361 * gnulib/import/m4/frexpl.m4: Update.
362 * gnulib/import/m4/fstat.m4: Update.
363 * gnulib/import/m4/fstatat.m4: Update.
364 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
365 * gnulib/import/m4/getcwd-path-max.m4: Update.
366 * gnulib/import/m4/getcwd.m4: Update.
367 * gnulib/import/m4/getdtablesize.m4: Update.
368 * gnulib/import/m4/getlogin.m4: Update.
369 * gnulib/import/m4/getlogin_r.m4: Update.
370 * gnulib/import/m4/getpagesize.m4: Update.
371 * gnulib/import/m4/getprogname.m4: Update.
372 * gnulib/import/m4/gettimeofday.m4: Update.
373 * gnulib/import/m4/glibc21.m4: Update.
374 * gnulib/import/m4/glob.m4: Update.
375 * gnulib/import/m4/glob_h.m4: Update.
376 * gnulib/import/m4/gnulib-cache.m4: Update.
377 * gnulib/import/m4/gnulib-common.m4: Update.
378 * gnulib/import/m4/gnulib-comp.m4: Update.
379 * gnulib/import/m4/gnulib-tool.m4: Update.
380 * gnulib/import/m4/hard-locale.m4: Update.
381 * gnulib/import/m4/include_next.m4: Update.
382 * gnulib/import/m4/inttypes-pri.m4: Update.
383 * gnulib/import/m4/inttypes.m4: Update.
384 * gnulib/import/m4/isnand.m4: Update.
385 * gnulib/import/m4/isnanl.m4: Update.
386 * gnulib/import/m4/largefile.m4: Update.
387 * gnulib/import/m4/limits-h.m4: Update.
388 * gnulib/import/m4/localcharset.m4: Update.
389 * gnulib/import/m4/locale-fr.m4: Update.
390 * gnulib/import/m4/locale-ja.m4: Update.
391 * gnulib/import/m4/locale-zh.m4: Update.
392 * gnulib/import/m4/localtime-buffer.m4: Update.
393 * gnulib/import/m4/longlong.m4: Update.
394 * gnulib/import/m4/lstat.m4: Update.
395 * gnulib/import/m4/malloc.m4: Update.
396 * gnulib/import/m4/malloca.m4: Update.
397 * gnulib/import/m4/math_h.m4: Update.
398 * gnulib/import/m4/mbrtowc.m4: Update.
399 * gnulib/import/m4/mbsinit.m4: Update.
400 * gnulib/import/m4/mbsrtowcs.m4: Update.
401 * gnulib/import/m4/mbstate_t.m4: Update.
402 * gnulib/import/m4/memchr.m4: Update.
403 * gnulib/import/m4/memmem.m4: Update.
404 * gnulib/import/m4/mempcpy.m4: Update.
405 * gnulib/import/m4/memrchr.m4: Update.
406 * gnulib/import/m4/mkdir.m4: Update.
407 * gnulib/import/m4/mkstemp.m4: Update.
408 * gnulib/import/m4/mmap-anon.m4: Update.
409 * gnulib/import/m4/mode_t.m4: Update.
410 * gnulib/import/m4/msvc-inval.m4: Update.
411 * gnulib/import/m4/msvc-nothrow.m4: Update.
412 * gnulib/import/m4/multiarch.m4: Update.
413 * gnulib/import/m4/nocrash.m4: Update.
414 * gnulib/import/m4/off_t.m4: Update.
415 * gnulib/import/m4/onceonly.m4: Update.
416 * gnulib/import/m4/open-cloexec.m4: Update.
417 * gnulib/import/m4/open.m4: Update.
418 * gnulib/import/m4/openat.m4: Update.
419 * gnulib/import/m4/opendir.m4: Update.
420 * gnulib/import/m4/pathmax.m4: Update.
421 * gnulib/import/m4/rawmemchr.m4: Update.
422 * gnulib/import/m4/readdir.m4: Update.
423 * gnulib/import/m4/readlink.m4: Update.
424 * gnulib/import/m4/realloc.m4: Update.
425 * gnulib/import/m4/rename.m4: Update.
426 * gnulib/import/m4/rewinddir.m4: Update.
427 * gnulib/import/m4/rmdir.m4: Update.
428 * gnulib/import/m4/save-cwd.m4: Update.
429 * gnulib/import/m4/secure_getenv.m4: Update.
430 * gnulib/import/m4/setenv.m4: Update.
431 * gnulib/import/m4/signal_h.m4: Update.
432 * gnulib/import/m4/ssize_t.m4: Update.
433 * gnulib/import/m4/stat-time.m4: Update.
434 * gnulib/import/m4/stat.m4: Update.
435 * gnulib/import/m4/std-gnu11.m4: Update.
436 * gnulib/import/m4/stdbool.m4: Update.
437 * gnulib/import/m4/stddef_h.m4: Update.
438 * gnulib/import/m4/stdint.m4: Update.
439 * gnulib/import/m4/stdio_h.m4: Update.
440 * gnulib/import/m4/stdlib_h.m4: Update.
441 * gnulib/import/m4/strchrnul.m4: Update.
442 * gnulib/import/m4/strdup.m4: Update.
443 * gnulib/import/m4/strerror.m4: Update.
444 * gnulib/import/m4/string_h.m4: Update.
445 * gnulib/import/m4/strstr.m4: Update.
446 * gnulib/import/m4/strtok_r.m4: Update.
447 * gnulib/import/m4/sys_socket_h.m4: Update.
448 * gnulib/import/m4/sys_stat_h.m4: Update.
449 * gnulib/import/m4/sys_time_h.m4: Update.
450 * gnulib/import/m4/sys_types_h.m4: Update.
451 * gnulib/import/m4/tempname.m4: Update.
452 * gnulib/import/m4/time_h.m4: Update.
453 * gnulib/import/m4/unistd-safer.m4: Update.
454 * gnulib/import/m4/unistd_h.m4: Update.
455 * gnulib/import/m4/warn-on-use.m4: Update.
456 * gnulib/import/m4/wchar_h.m4: Update.
457 * gnulib/import/m4/wchar_t.m4: Update.
458 * gnulib/import/m4/wctype_h.m4: Update.
459 * gnulib/import/m4/wint_t.m4: Update.
460 * gnulib/import/malloc.c: Update.
461 * gnulib/import/malloc/scratch_buffer.h: Update.
462 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
463 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
464 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
465 * gnulib/import/malloca.c: Update.
466 * gnulib/import/malloca.h: Update.
467 * gnulib/import/malloca.valgrind: Update.
468 * gnulib/import/math.in.h: Update.
469 * gnulib/import/mbrtowc.c: Update.
470 * gnulib/import/mbsinit.c: Update.
471 * gnulib/import/mbsrtowcs-impl.h: Update.
472 * gnulib/import/mbsrtowcs-state.c: Update.
473 * gnulib/import/mbsrtowcs.c: Update.
474 * gnulib/import/memchr.c: Update.
475 * gnulib/import/memmem.c: Update.
476 * gnulib/import/mempcpy.c: Update.
477 * gnulib/import/memrchr.c: Update.
478 * gnulib/import/mkdir.c: Update.
479 * gnulib/import/mkstemp.c: Update.
480 * gnulib/import/msvc-inval.c: Update.
481 * gnulib/import/msvc-inval.h: Update.
482 * gnulib/import/msvc-nothrow.c: Update.
483 * gnulib/import/msvc-nothrow.h: Update.
484 * gnulib/import/open.c: Update.
485 * gnulib/import/openat-die.c: Update.
486 * gnulib/import/openat-priv.h: Update.
487 * gnulib/import/openat-proc.c: Update.
488 * gnulib/import/openat.c: Update.
489 * gnulib/import/openat.h: Update.
490 * gnulib/import/opendir.c: Update.
491 * gnulib/import/pathmax.h: Update.
492 * gnulib/import/pipe-safer.c: Update.
493 * gnulib/import/rawmemchr.c: Update.
494 * gnulib/import/readdir.c: Update.
495 * gnulib/import/readlink.c: Update.
496 * gnulib/import/realloc.c: Update.
497 * gnulib/import/ref-add.sin: Update.
498 * gnulib/import/ref-del.sin: Update.
499 * gnulib/import/rename.c: Update.
500 * gnulib/import/rewinddir.c: Update.
501 * gnulib/import/rmdir.c: Update.
502 * gnulib/import/same-inode.h: Update.
503 * gnulib/import/save-cwd.c: Update.
504 * gnulib/import/save-cwd.h: Update.
505 * gnulib/import/scratch_buffer.h: Update.
506 * gnulib/import/secure_getenv.c: Update.
507 * gnulib/import/setenv.c: Update.
508 * gnulib/import/signal.in.h: Update.
509 * gnulib/import/stat-time.c: Update.
510 * gnulib/import/stat-time.h: Update.
511 * gnulib/import/stat-w32.c: Update.
512 * gnulib/import/stat-w32.h: Update.
513 * gnulib/import/stat.c: Update.
514 * gnulib/import/stdbool.in.h: Update.
515 * gnulib/import/stddef.in.h: Update.
516 * gnulib/import/stdint.in.h: Update.
517 * gnulib/import/stdio.in.h: Update.
518 * gnulib/import/stdlib.in.h: Update.
519 * gnulib/import/str-two-way.h: Update.
520 * gnulib/import/strchrnul.c: Update.
521 * gnulib/import/strdup.c: Update.
522 * gnulib/import/streq.h: Update.
523 * gnulib/import/strerror-override.c: Update.
524 * gnulib/import/strerror-override.h: Update.
525 * gnulib/import/strerror.c: Update.
526 * gnulib/import/string.in.h: Update.
527 * gnulib/import/stripslash.c: Update.
528 * gnulib/import/strnlen1.c: Update.
529 * gnulib/import/strnlen1.h: Update.
530 * gnulib/import/strstr.c: Update.
531 * gnulib/import/strtok_r.c: Update.
532 * gnulib/import/sys_stat.in.h: Update.
533 * gnulib/import/sys_time.in.h: Update.
534 * gnulib/import/sys_types.in.h: Update.
535 * gnulib/import/tempname.c: Update.
536 * gnulib/import/tempname.h: Update.
537 * gnulib/import/time.in.h: Update.
538 * gnulib/import/unistd--.h: Update.
539 * gnulib/import/unistd-safer.h: Update.
540 * gnulib/import/unistd.in.h: Update.
541 * gnulib/import/unsetenv.c: Update.
542 * gnulib/import/verify.h: Update.
543 * gnulib/import/extra/snippet/warn-on-use.h: Update.
544 * gnulib/import/wchar.in.h: Update.
545 * gnulib/import/wctype.in.h: Update.
546 * gnulib/import/xalloc-oversized.h: Update.
547 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
548 "53e2c179f26a890fa6685af4b6c1397ee370433b".
550 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
552 * record-btrace.c (get_thread_current_frame): Remove
555 2018-09-10 Jerome Guitton <guitton@adacore.com>
557 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
558 with check_tag to 1 if and only if the type is tagged and the
559 component being searched cannot been found in the current
560 view. Otherwise, always call ada_to_fixed_type with
563 2018-09-10 Xavier Roirand <roirand@adacore.com>
565 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
567 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
568 * ada-varobj.c (ada_varobj_get_number_of_children,
569 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
571 2018-09-10 Xavier Roirand <roirand@adacore.com>
573 * ada-valprint.c (ada_value_print): Use type instead of
576 2018-09-10 Xavier Roirand <roirand@adacore.com>
578 * ada-lang.c (ada_value_subscript): Handle case when parameter is
579 an array of access to unconstrained array.
581 2018-09-10 Xavier Roirand <roirand@adacore.com>
583 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
584 (ada_check_typedef): Use it.
586 2018-09-10 Xavier Roirand <roirand@adacore.com>
588 * ada-varobj.c (ada_varobj_describe_struct_child)
589 (ada_varobj_describe_child): Handle union case like struct one.
591 2018-09-10 Tom Tromey <tom@tromey.com>
594 * python/python.c (_initialize_python): Make example in "python"
595 help work in Python 3.
597 2018-09-10 Eli Zaretskii <eliz@gnu.org>
599 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
600 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
601 $(EXEEXT) to the script, as it is not a program.
603 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
605 * python/py-prettyprint.c (pretty_print_one_value): Return
607 (print_string_repr): Adjust.
608 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
609 * python/python-internal.h (apply_varobj_pretty_printer): Return
611 * varobj.c (varobj_value_get_print_value): Adjust.
613 2018-09-08 Tom Tromey <tom@tromey.com>
616 * python/py-prettyprint.c (pretty_print_one_value): Check for
619 2018-09-08 Joel Brobecker <brobecker@adacore.com>
621 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
622 replace_operator_with_call.
624 2018-09-08 Joel Brobecker <brobecker@adacore.com>
626 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
628 2018-09-08 Joel Brobecker <brobecker@adacore.com>
630 * ada-typeprint.c (print_range): Print the bounds using TYPE
631 rather than its TYPE_TARGET_TYPE.
633 2018-09-08 Joel Brobecker <brobecker@adacore.com>
635 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
636 call to ada_to_fixed_value_create.
638 2018-09-08 Jerome Guitton <guitton@adacore.com>
640 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
642 2018-09-08 Joel Brobecker <brobecker@adacore.com>
644 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
647 2018-09-08 Joel Brobecker <brobecker@adacore.com>
649 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
650 Move update of loop variable "fi".
652 2018-09-08 Joel Brobecker <brobecker@adacore.com>
654 * ada-lang.c (value_assign_to_component): In the case of
655 big-endian targets, extract the bits of the given VAL
656 using an src_offset of zero if container is not a scalar.
658 2018-09-06 Simon Ser <contact@emersion.fr>
661 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
662 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
663 * fbsd-tdep.c (fbsd_make_note_desc): New.
664 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
665 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
666 * target.h (enum target_object) Add FreeBSD-specific
667 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
669 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
671 * compile/compile-c.h (generate_c_for_variable_locations):
672 Change reference to pointer.
673 * compile/compile-c-support.c (compile_program) <compute>:
675 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
676 (generate_c_for_for_one_variable): Likewise
677 (generate_c_for_variable_locations): Likewise
678 * compile/compile-c-types.c (compile_c_instance::convert_type):
680 * compile/compile-cplus-symbols.c (convert_one_symbol):
681 std::move the scope passed to enter_scope.
682 * compile/compile-cplus-types.c
683 (compile_cplus_instance::enter_scope): Make parameter
685 (compile_cplus_instance::new_scope): Change reference to
687 (compile_cplus_instance::convert_type): Likewise
688 (compile_cplus_convert_typedef): std::move the scope passed to
690 (compile_cplus_convert_struct_or_union): Likewise.
691 (compile_cplus_convert_enum): Likewise.
692 (compile_cplus_convert_namespace): Likewise.
693 * compile/compile-cplus.h (compile_cplus_instance)
694 <enter_scope>: Make parameter rvalue-reference.
695 * compile/compile-internal.h (compile_instance)
696 <get_cached_type>: Likewise
697 * compile/compile-loc2c.c (push): Likewise
701 (print_label): Likewise
702 (pushf_register_address): Likewise
703 (pushf_register): Likewise
704 (do_compile_dwarf_expr_to_c): Likewise
705 (compile_dwarf_expr_to_c): Likewise
706 (compile_dwarf_bounds_to_c): Likewise
707 * compile/compile.c (compile_instance::get_cached_type):
709 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
710 (compile_dwarf_bounds_to_c): Likewise
711 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
712 (dwarf2_compile_property_to_c): Likewise
713 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
714 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
717 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
719 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
720 * tui/tui-data.c (init_content_element): Don't initialize it.
722 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
724 * tui/tui-data.h (struct tui_win_info)
725 <detail::opaque>: Remove.
726 * tui/tui-data.c (init_win_info): Remove assignment.
728 2018-09-05 Tom Tromey <tom@tromey.com>
730 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
732 * target-float.c (host_float_ops<T>::to_string)
733 (host_float_ops<T>::from_string): Use
734 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
735 * configure: Rebuild.
737 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
739 * printcmd.c (printf_c_string): Use
740 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
741 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
743 2018-09-05 Tom Tromey <tom@tromey.com>
745 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
747 2018-09-05 Tom de Vries <tdevries@suse.de>
749 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
750 with resolve_abstract_p == true.
751 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
752 defaulting to false. Propagate resolve_abstract_p to
753 dwarf2_fetch_die_loc_sect_off.
754 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
755 parameter, defaulting to false.
756 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
757 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
759 * dwarf2read.h (struct die_info): Forward-declare.
760 (die_info_ptr): New typedef.
761 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
763 2018-09-05 Joel Brobecker <brobecker@adacore.com>
767 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
768 Pedro Alves <palves@redhat.com>
770 * gnulib/Makefile.in (aclocal_m4_deps): Move to
771 "aclocal-m4-deps.mk". Include file here.
772 $(srcdir)/aclocal.m4: Add "configure.ac".
773 * gnulib/aclocal-m4-deps.mk: New file.
774 * gnulib/update-gnulib.sh: Automatically update
775 "aclocal-m4-deps.mk".
777 2018-09-04 Tom Tromey <tom@tromey.com>
779 * configure: Rebuild.
780 * configure.ac: Remove multi-ice code.
782 2018-09-04 Tom Tromey <tom@tromey.com>
784 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
787 2018-09-04 Tom Tromey <tom@tromey.com>
789 * Makefile.in (printcmd.o, target-float.o): Remove.
790 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
792 2018-09-04 Tom Tromey <tom@tromey.com>
794 * gnulib/Makefile.in: Remove obsolete comment.
795 * Makefile.in: Remove obsolete comment.
797 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
799 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
802 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
804 * riscv-tdep.c: Add 'prologue-value.h' include.
805 (struct riscv_unwind_cache): New struct.
806 (riscv_debug_unwinder): New global.
807 (riscv_scan_prologue): Update arguments, capture register details
809 (riscv_skip_prologue): Reformat arguments line, move end of
810 prologue calculation into riscv_scan_prologue.
811 (riscv_frame_cache): Update return type, create
812 riscv_unwind_cache, scan the prologue, and fill in remaining cache
814 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
815 (riscv_frame_prev_register): Use the trad_frame within the
817 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
820 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
822 * trad-frame.h (trad_frame_set_realreg): Declare.
823 (trad_frame_set_addr): Declare.
824 * trad-frame.c (trad_frame_set_realreg): Define new function.
825 (trad_frame_set_addr): Define new function.
826 (trad_frame_set_reg_realreg): Use new function.
827 (trad_frame_set_reg_addr): Use new function.
829 2018-09-01 Keith Seitz <keiths@redhat.com>
831 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
832 pulongest instead of "%lld".
833 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
836 2018-08-31 Tom Tromey <tom@tromey.com>
838 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
841 2018-08-31 Pedro Alves <palves@redhat.com>
843 * gdbarch.h: Regenerate.
845 2018-08-31 Pedro Alves <palves@redhat.com>
847 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
848 * target.h (Hardware watchpoint interfaces): Describe
849 continuable/steppable/non-steppable watchpoints.
850 * gdbarch.h, gdbarch.c: Regenerate.
852 2018-08-31 Pedro Alves <palves@redhat.com>
854 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
857 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
858 * target.h (target_ops::have_continuable_watchpoint): Delete.
859 (target_have_continuable_watchpoint): Delete.
860 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
861 * target-delegates.c: Regenerate.
863 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
865 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
866 the files present in "gnulib/import/m4/".
868 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
870 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
871 c.sw, c.swsp, and c.sdsp.
873 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
875 * riscv-tdep.c (struct riscv_inferior_data): Delete.
876 (riscv_read_misa_reg): Don't cache value read into inferior data.
877 (riscv_new_inferior_data): Delete.
878 (riscv_inferior_data_cleanup): Delete.
879 (riscv_inferior_data): Delete.
880 (riscv_invalidate_inferior_data): Delete.
881 (_initialize_riscv_tdep): Remove initialisation of inferior data.
883 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
885 * compile/compile-cplus-types.c
886 (compile_cplus_instance::leave_scope): Take the address of scope
888 (compile_cplus_instance::convert_qualified_base): Compare quals
891 2018-08-30 Keith Seitz <keiths@redhat.com>
893 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
894 Use "%s" and host_address_to_string instead of "%p" in printf.
896 2018-08-29 Keith Seitz <keiths@redhat.com>
898 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
899 and compile-cplus-types.c.
900 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
901 * c-lang.c (cplus_language_defn): Set C++ compile functions.
902 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
904 * compile/compile-c-support.c: Include compile-cplus.h.
905 (load_libcompile): Templatize.
906 (get_compile_context): "New" function.
907 (c_get_compile_context): Use get_compile_context.
908 (cplus_get_compile_context): New function.
909 (cplus_push_user_expression, cplus_pop_user_expression)
910 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
911 (cplus_compute_program): Define new structs/functions.
912 * compile/compile-cplus-symmbols.c: New file.
913 * compile/compile-cplus-types.c: New file.
914 * compile/compile-cplus.h: New file.
915 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
917 * compile/compile-object-load.c (get_out_value_type): Use
918 strncmp_iw when comparing symbol names.
919 (compile_object_load): Add mst_bss and mst_data.
920 * compile/compile.c (_initialize_compile): Remove
921 -Wno-implicit-function-declaration from `compile_args'.
922 * compile/gcc-cp-plugin.h: New file.
923 * NEWS: Mention C++ compile support and new debug options.
925 2018-08-29 Keith Seitz <keiths@redhat.com>
927 * linespec.c (collect_info::add_symbol): Make virtual.
928 (struct symbol_searcher_collect_info): New struct.
929 (symbol_searcher::find_all_symbols): New method.
930 * symtab.h (class symbol_searcher): New class.
932 2018-08-29 Keith Seitz <keiths@redhat.com>
934 * linespec.c (struct linespec) <function_symbols, label_symbols>:
935 Change to vector of block_symbol. Update all users.
936 (struct collect_info) <symbols>: Likewise.
937 (collect_info::add_symbol): Take block_symbol as argument.
939 (decode_compound_collector) <m_symbols>: Change type to vector
940 of block_symbol. Update all users.
941 (decode_compound_collector::operator ()): Change parameter type
943 (find_method, find_function_symbols, find_linespec_symbols)
944 (find_label_symbols_in_block, find_label_symbols): Change symbol
945 vectors to block_symbol vectors.
946 * symtab.h (symbol_found_callback_ftype): Change parameter type to
949 2018-08-29 Keith Seitz <keiths@redhat.com>
951 * linespec.c (symbolp): Remove typedef and VEC definitions.
952 (bound_minimal_symbol_d): Likewise.
954 2018-08-29 Keith Seitz <keiths@redhat.com>
956 * linespec.c (decode_compound_collector::decode_compound_collector):
957 Remove initialization for `m_symtabs'.
958 (decode_compound_collector::release_symbols): Change return type
959 to std::vector. Update all callers.
960 (class decode_compound_collector) <m_symbols>: Change type to
962 (lookup_prefix_sym): Change return type to std::vector. Update all
964 (compare_symbols): Remove.
965 (std_compare_symbols): Rename to `compare_symbols'.
966 (find_method): Change `sym_classes' parameter to std::vector.
967 Update all callers. Use std::sort to sort sym_classes.
968 (find_linespec_symbols): Remove cleanup.
970 2018-08-29 Keith Seitz <keiths@redhat.com>
972 * linespec.c (struct linespec) <minimal_symbols>: Change type to
973 std::vector. Update all users.
974 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
975 (struct collect_info) <minimal_symbols>: Likewise.
976 (compare_msymbols): Return bool. Change parameters to const
977 bound_minimal_symbol references.
978 (find_method, find_function_symbols, find_linespec_symbols): Change
979 `minsyms' parameter to std::vector. Update all callers.
981 2018-08-29 Keith Seitz <keiths@redhat.com>
983 * linespec.c (struct linespec) <label_symbols>: Change type to
984 std::vector. Update all users.
985 (find_label_symbols_in_block): Change `result' parameter to
986 std::vector. Update all callers.
987 (find_label_symbols): Return std::vector. Update all callers.
989 2018-08-29 Keith Seitz <keiths@redhat.com>
991 * linespec.c (struct linespec) <function_symbols>: Change type to
992 std::vector. Update all users.
993 (struct collect_info) <function_symbols>: Likewise.
994 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
995 (std_compare_symbols): New function.
996 (find_method, find_function_symbols, find_linespec_symbols)
997 (find_label_symbols_in_block): Change `symbols' parameter to
998 std::vector. Update all callers.
999 (find_label_symbols): Likewise for `function_symbols' and
1002 2018-08-29 Keith Seitz <keiths@redhat.com>
1004 * linespec.c (symtab_vector_up): Define.
1005 (struct linespec) <file_symtabs>: Change type to std::vector *.
1007 (struct collect_info) <file_symtabs>: Likewise.
1008 (collect_symtabs_from_filename): Return symtab_vector_up.
1010 (decode_objc): Remove cleanup.
1011 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1012 (symtab_collector::release_symtabs): Return symtab_vector_up.
1014 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1016 (collect_symtabs_from_filename, symtabs_from_filename): Return
1017 symtab_vector_up. Update all callers.
1019 2018-08-29 Tom Tromey <tom@tromey.com>
1021 * csky-tdep.c (csky_analyze_prologue): Use
1022 core_addr_to_string_nz.
1024 2018-08-29 Tom Tromey <tom@tromey.com>
1026 * windows-nat.c (struct xlate_exception) <them>: Change type to
1028 (xlate): Fix formatting. Remove last entry.
1029 (struct xlate_exception, xlate): Comment out.
1030 (windows_nat_target::resume): Use ranged for.
1032 2018-08-29 Jim Wilson <jimw@sifive.com>
1034 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1035 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1037 (riscv_linux_nat_target::store_registers): Likewise.
1039 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1043 * gnulib/aclocal.m4: Regenerate.
1044 * gnulib/config.in: Regenerate.
1045 * gnulib/configure: Regenerate.
1046 * gnulib/import/Makefile.am: Update.
1047 * gnulib/import/Makefile.in: Update.
1048 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1049 * gnulib/import/_Noreturn.h: ... this.
1050 * gnulib/import/alloca.in.h: Update.
1051 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1052 * gnulib/import/arg-nonnull.h: ... this.
1053 * gnulib/import/assure.h: Update.
1054 * gnulib/import/at-func.c: Update.
1055 * gnulib/import/basename-lgpl.c: Update.
1056 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1057 * gnulib/import/c++defs.h: ... this.
1058 * gnulib/import/canonicalize-lgpl.c: Update.
1059 * gnulib/import/cdefs.h: Update.
1060 * gnulib/import/chdir-long.c: Update.
1061 * gnulib/import/chdir-long.h: Update.
1062 * gnulib/import/cloexec.c: Update.
1063 * gnulib/import/cloexec.h: Update.
1064 * gnulib/import/close.c: Update.
1065 * gnulib/import/closedir.c: Update.
1066 * gnulib/import/config.charset: Update.
1067 * gnulib/import/dirent-private.h: Update.
1068 * gnulib/import/dirent.in.h: Update.
1069 * gnulib/import/dirfd.c: Update.
1070 * gnulib/import/dirname-lgpl.c: Update.
1071 * gnulib/import/dirname.h: Update.
1072 * gnulib/import/dosname.h: Update.
1073 * gnulib/import/dup-safer-flag.c: Update.
1074 * gnulib/import/dup-safer.c: Update.
1075 * gnulib/import/dup.c: Update.
1076 * gnulib/import/dup2.c: Update.
1077 * gnulib/import/errno.in.h: Update.
1078 * gnulib/import/error.c: Update.
1079 * gnulib/import/error.h: Update.
1080 * gnulib/import/exitfail.c: Update.
1081 * gnulib/import/exitfail.h: Update.
1082 * gnulib/import/extra/update-copyright: Update.
1083 * gnulib/import/fchdir.c: Update.
1084 * gnulib/import/fcntl.c: Update.
1085 * gnulib/import/fcntl.in.h: Update.
1086 * gnulib/import/fd-hook.c: Update.
1087 * gnulib/import/fd-hook.h: Update.
1088 * gnulib/import/fd-safer-flag.c: Update.
1089 * gnulib/import/fd-safer.c: Update.
1090 * gnulib/import/fdopendir.c: Update.
1091 * gnulib/import/filename.h: Update.
1092 * gnulib/import/filenamecat-lgpl.c: Update.
1093 * gnulib/import/filenamecat.h: Update.
1094 * gnulib/import/flexmember.h: Update.
1095 * gnulib/import/float+.h: Update.
1096 * gnulib/import/float.c: Update.
1097 * gnulib/import/float.in.h: Update.
1098 * gnulib/import/fnmatch.c: Update.
1099 * gnulib/import/fnmatch.in.h: Update.
1100 * gnulib/import/fnmatch_loop.c: Update.
1101 * gnulib/import/fpucw.h: Update.
1102 * gnulib/import/frexp.c: Update.
1103 * gnulib/import/frexpl.c: Update.
1104 * gnulib/import/fstat.c: Update.
1105 * gnulib/import/fstatat.c: Update.
1106 * gnulib/import/getcwd-lgpl.c: Update.
1107 * gnulib/import/getcwd.c: Update.
1108 * gnulib/import/getdtablesize.c: Update.
1109 * gnulib/import/getlogin_r.c: Update.
1110 * gnulib/import/getprogname.c: Update.
1111 * gnulib/import/getprogname.h: Update.
1112 * gnulib/import/gettext.h: Update.
1113 * gnulib/import/gettimeofday.c: Update.
1114 * gnulib/import/glob-libc.h: Update.
1115 * gnulib/import/glob.c: Update.
1116 * gnulib/import/glob.in.h: Update.
1117 * gnulib/import/glob_internal.h: Update.
1118 * gnulib/import/glob_pattern_p.c: Update.
1119 * gnulib/import/globfree.c: Update.
1120 * gnulib/import/hard-locale.c: Update.
1121 * gnulib/import/hard-locale.h: Update.
1122 * gnulib/import/intprops.h: Update.
1123 * gnulib/import/inttypes.in.h: Update.
1124 * gnulib/import/isnan.c: Update.
1125 * gnulib/import/isnand-nolibm.h: Update.
1126 * gnulib/import/isnand.c: Update.
1127 * gnulib/import/isnanl-nolibm.h: Update.
1128 * gnulib/import/isnanl.c: Update.
1129 * gnulib/import/itold.c: Update.
1130 * gnulib/import/libc-config.h: Update.
1131 * gnulib/import/limits.in.h: Update.
1132 * gnulib/import/localcharset.c: Update.
1133 * gnulib/import/localcharset.h: Update.
1134 * gnulib/import/localtime-buffer.c: Update.
1135 * gnulib/import/localtime-buffer.h: Update.
1136 * gnulib/import/lstat.c: Update.
1137 * gnulib/import/m4/00gnulib.m4: Update.
1138 * gnulib/import/m4/__inline.m4: Update.
1139 * gnulib/import/m4/absolute-header.m4: Update.
1140 * gnulib/import/m4/alloca.m4: Update.
1141 * gnulib/import/m4/builtin-expect.m4: Update.
1142 * gnulib/import/m4/canonicalize.m4: Update.
1143 * gnulib/import/m4/chdir-long.m4: Update.
1144 * gnulib/import/m4/close.m4: Update.
1145 * gnulib/import/m4/closedir.m4: Update.
1146 * gnulib/import/m4/configmake.m4: Update.
1147 * gnulib/import/m4/d-ino.m4: Update.
1148 * gnulib/import/m4/d-type.m4: Update.
1149 * gnulib/import/m4/dirent_h.m4: Update.
1150 * gnulib/import/m4/dirfd.m4: Update.
1151 * gnulib/import/m4/dirname.m4: Update.
1152 * gnulib/import/m4/double-slash-root.m4: Update.
1153 * gnulib/import/m4/dup.m4: Update.
1154 * gnulib/import/m4/dup2.m4: Update.
1155 * gnulib/import/m4/eealloc.m4: Update.
1156 * gnulib/import/m4/environ.m4: Update.
1157 * gnulib/import/m4/errno_h.m4: Update.
1158 * gnulib/import/m4/error.m4: Update.
1159 * gnulib/import/m4/exponentd.m4: Update.
1160 * gnulib/import/m4/exponentl.m4: Update.
1161 * gnulib/import/m4/extensions.m4: Update.
1162 * gnulib/import/m4/extern-inline.m4: Update.
1163 * gnulib/import/m4/fchdir.m4: Update.
1164 * gnulib/import/m4/fcntl-o.m4: Update.
1165 * gnulib/import/m4/fcntl.m4: Update.
1166 * gnulib/import/m4/fcntl_h.m4: Update.
1167 * gnulib/import/m4/fdopendir.m4: Update.
1168 * gnulib/import/m4/filenamecat.m4: Update.
1169 * gnulib/import/m4/flexmember.m4: Update.
1170 * gnulib/import/m4/float_h.m4: Update.
1171 * gnulib/import/m4/fnmatch.m4: Update.
1172 * gnulib/import/m4/fnmatch_h.m4: Update.
1173 * gnulib/import/m4/fpieee.m4: Update.
1174 * gnulib/import/m4/frexp.m4: Update.
1175 * gnulib/import/m4/frexpl.m4: Update.
1176 * gnulib/import/m4/fstat.m4: Update.
1177 * gnulib/import/m4/fstatat.m4: Update.
1178 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1179 * gnulib/import/m4/getcwd-path-max.m4: Update.
1180 * gnulib/import/m4/getcwd.m4: Update.
1181 * gnulib/import/m4/getdtablesize.m4: Update.
1182 * gnulib/import/m4/getlogin.m4: Update.
1183 * gnulib/import/m4/getlogin_r.m4: Update.
1184 * gnulib/import/m4/getpagesize.m4: Update.
1185 * gnulib/import/m4/getprogname.m4: Update.
1186 * gnulib/import/m4/gettimeofday.m4: Update.
1187 * gnulib/import/m4/glibc21.m4: Update.
1188 * gnulib/import/m4/glob.m4: Update.
1189 * gnulib/import/m4/glob_h.m4: Update.
1190 * gnulib/import/m4/gnulib-cache.m4: Update.
1191 * gnulib/import/m4/gnulib-common.m4: Update.
1192 * gnulib/import/m4/gnulib-comp.m4: Update.
1193 * gnulib/import/m4/gnulib-tool.m4: Update.
1194 * gnulib/import/m4/hard-locale.m4: Update.
1195 * gnulib/import/m4/include_next.m4: Update.
1196 * gnulib/import/m4/inttypes-pri.m4: Update.
1197 * gnulib/import/m4/inttypes.m4: Update.
1198 * gnulib/import/m4/isnand.m4: Update.
1199 * gnulib/import/m4/isnanl.m4: Update.
1200 * gnulib/import/m4/largefile.m4: Update.
1201 * gnulib/import/m4/limits-h.m4: Update.
1202 * gnulib/import/m4/localcharset.m4: Update.
1203 * gnulib/import/m4/locale-fr.m4: Update.
1204 * gnulib/import/m4/locale-ja.m4: Update.
1205 * gnulib/import/m4/locale-zh.m4: Update.
1206 * gnulib/import/m4/localtime-buffer.m4: Update.
1207 * gnulib/import/m4/longlong.m4: Update.
1208 * gnulib/import/m4/lstat.m4: Update.
1209 * gnulib/import/m4/malloc.m4: Update.
1210 * gnulib/import/m4/malloca.m4: Update.
1211 * gnulib/import/m4/math_h.m4: Update.
1212 * gnulib/import/m4/mbrtowc.m4: Update.
1213 * gnulib/import/m4/mbsinit.m4: Update.
1214 * gnulib/import/m4/mbsrtowcs.m4: Update.
1215 * gnulib/import/m4/mbstate_t.m4: Update.
1216 * gnulib/import/m4/memchr.m4: Update.
1217 * gnulib/import/m4/memmem.m4: Update.
1218 * gnulib/import/m4/mempcpy.m4: Update.
1219 * gnulib/import/m4/memrchr.m4: Update.
1220 * gnulib/import/m4/mkdir.m4: Update.
1221 * gnulib/import/m4/mkstemp.m4: Update.
1222 * gnulib/import/m4/mmap-anon.m4: Update.
1223 * gnulib/import/m4/mode_t.m4: Update.
1224 * gnulib/import/m4/msvc-inval.m4: Update.
1225 * gnulib/import/m4/msvc-nothrow.m4: Update.
1226 * gnulib/import/m4/multiarch.m4: Update.
1227 * gnulib/import/m4/nocrash.m4: Update.
1228 * gnulib/import/m4/off_t.m4: Update.
1229 * gnulib/import/m4/onceonly.m4: Update.
1230 * gnulib/import/m4/open-cloexec.m4: Update.
1231 * gnulib/import/m4/open.m4: Update.
1232 * gnulib/import/m4/openat.m4: Update.
1233 * gnulib/import/m4/opendir.m4: Update.
1234 * gnulib/import/m4/pathmax.m4: Update.
1235 * gnulib/import/m4/rawmemchr.m4: Update.
1236 * gnulib/import/m4/readdir.m4: Update.
1237 * gnulib/import/m4/readlink.m4: Update.
1238 * gnulib/import/m4/realloc.m4: Update.
1239 * gnulib/import/m4/rename.m4: Update.
1240 * gnulib/import/m4/rewinddir.m4: Update.
1241 * gnulib/import/m4/rmdir.m4: Update.
1242 * gnulib/import/m4/save-cwd.m4: Update.
1243 * gnulib/import/m4/secure_getenv.m4: Update.
1244 * gnulib/import/m4/setenv.m4: Update.
1245 * gnulib/import/m4/signal_h.m4: Update.
1246 * gnulib/import/m4/ssize_t.m4: Update.
1247 * gnulib/import/m4/stat-time.m4: Update.
1248 * gnulib/import/m4/stat.m4: Update.
1249 * gnulib/import/m4/std-gnu11.m4: Update.
1250 * gnulib/import/m4/stdbool.m4: Update.
1251 * gnulib/import/m4/stddef_h.m4: Update.
1252 * gnulib/import/m4/stdint.m4: Update.
1253 * gnulib/import/m4/stdio_h.m4: Update.
1254 * gnulib/import/m4/stdlib_h.m4: Update.
1255 * gnulib/import/m4/strchrnul.m4: Update.
1256 * gnulib/import/m4/strdup.m4: Update.
1257 * gnulib/import/m4/strerror.m4: Update.
1258 * gnulib/import/m4/string_h.m4: Update.
1259 * gnulib/import/m4/strstr.m4: Update.
1260 * gnulib/import/m4/strtok_r.m4: Update.
1261 * gnulib/import/m4/sys_socket_h.m4: Update.
1262 * gnulib/import/m4/sys_stat_h.m4: Update.
1263 * gnulib/import/m4/sys_time_h.m4: Update.
1264 * gnulib/import/m4/sys_types_h.m4: Update.
1265 * gnulib/import/m4/tempname.m4: Update.
1266 * gnulib/import/m4/time_h.m4: Update.
1267 * gnulib/import/m4/unistd-safer.m4: Update.
1268 * gnulib/import/m4/unistd_h.m4: Update.
1269 * gnulib/import/m4/warn-on-use.m4: Update.
1270 * gnulib/import/m4/wchar_h.m4: Update.
1271 * gnulib/import/m4/wchar_t.m4: Update.
1272 * gnulib/import/m4/wctype_h.m4: Update.
1273 * gnulib/import/m4/wint_t.m4: Update.
1274 * gnulib/import/malloc.c: Update.
1275 * gnulib/import/malloc/scratch_buffer.h: Update.
1276 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1277 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1278 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1279 * gnulib/import/malloca.c: Update.
1280 * gnulib/import/malloca.h: Update.
1281 * gnulib/import/malloca.valgrind: Update.
1282 * gnulib/import/math.in.h: Update.
1283 * gnulib/import/mbrtowc.c: Update.
1284 * gnulib/import/mbsinit.c: Update.
1285 * gnulib/import/mbsrtowcs-impl.h: Update.
1286 * gnulib/import/mbsrtowcs-state.c: Update.
1287 * gnulib/import/mbsrtowcs.c: Update.
1288 * gnulib/import/memchr.c: Update.
1289 * gnulib/import/memmem.c: Update.
1290 * gnulib/import/mempcpy.c: Update.
1291 * gnulib/import/memrchr.c: Update.
1292 * gnulib/import/mkdir.c: Update.
1293 * gnulib/import/mkstemp.c: Update.
1294 * gnulib/import/msvc-inval.c: Update.
1295 * gnulib/import/msvc-inval.h: Update.
1296 * gnulib/import/msvc-nothrow.c: Update.
1297 * gnulib/import/msvc-nothrow.h: Update.
1298 * gnulib/import/open.c: Update.
1299 * gnulib/import/openat-die.c: Update.
1300 * gnulib/import/openat-priv.h: Update.
1301 * gnulib/import/openat-proc.c: Update.
1302 * gnulib/import/openat.c: Update.
1303 * gnulib/import/openat.h: Update.
1304 * gnulib/import/opendir.c: Update.
1305 * gnulib/import/pathmax.h: Update.
1306 * gnulib/import/pipe-safer.c: Update.
1307 * gnulib/import/rawmemchr.c: Update.
1308 * gnulib/import/readdir.c: Update.
1309 * gnulib/import/readlink.c: Update.
1310 * gnulib/import/realloc.c: Update.
1311 * gnulib/import/ref-add.sin: Update.
1312 * gnulib/import/ref-del.sin: Update.
1313 * gnulib/import/rename.c: Update.
1314 * gnulib/import/rewinddir.c: Update.
1315 * gnulib/import/rmdir.c: Update.
1316 * gnulib/import/same-inode.h: Update.
1317 * gnulib/import/save-cwd.c: Update.
1318 * gnulib/import/save-cwd.h: Update.
1319 * gnulib/import/scratch_buffer.h: Update.
1320 * gnulib/import/secure_getenv.c: Update.
1321 * gnulib/import/setenv.c: Update.
1322 * gnulib/import/signal.in.h: Update.
1323 * gnulib/import/stat-time.c: Update.
1324 * gnulib/import/stat-time.h: Update.
1325 * gnulib/import/stat-w32.c: Update.
1326 * gnulib/import/stat-w32.h: Update.
1327 * gnulib/import/stat.c: Update.
1328 * gnulib/import/stdbool.in.h: Update.
1329 * gnulib/import/stddef.in.h: Update.
1330 * gnulib/import/stdint.in.h: Update.
1331 * gnulib/import/stdio.in.h: Update.
1332 * gnulib/import/stdlib.in.h: Update.
1333 * gnulib/import/str-two-way.h: Update.
1334 * gnulib/import/strchrnul.c: Update.
1335 * gnulib/import/strdup.c: Update.
1336 * gnulib/import/streq.h: Update.
1337 * gnulib/import/strerror-override.c: Update.
1338 * gnulib/import/strerror-override.h: Update.
1339 * gnulib/import/strerror.c: Update.
1340 * gnulib/import/string.in.h: Update.
1341 * gnulib/import/stripslash.c: Update.
1342 * gnulib/import/strnlen1.c: Update.
1343 * gnulib/import/strnlen1.h: Update.
1344 * gnulib/import/strstr.c: Update.
1345 * gnulib/import/strtok_r.c: Update.
1346 * gnulib/import/sys_stat.in.h: Update.
1347 * gnulib/import/sys_time.in.h: Update.
1348 * gnulib/import/sys_types.in.h: Update.
1349 * gnulib/import/tempname.c: Update.
1350 * gnulib/import/tempname.h: Update.
1351 * gnulib/import/time.in.h: Update.
1352 * gnulib/import/unistd--.h: Update.
1353 * gnulib/import/unistd-safer.h: Update.
1354 * gnulib/import/unistd.in.h: Update.
1355 * gnulib/import/unsetenv.c: Update.
1356 * gnulib/import/verify.h: Update.
1357 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1358 * gnulib/import/wchar.in.h: Update.
1359 * gnulib/import/wctype.in.h: Update.
1360 * gnulib/import/xalloc-oversized.h: Update.
1361 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1362 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1364 2018-08-16 Gary Benson <gbenson@redhat.com>
1367 * gdb/main.c (captured_main_1): Exit with nonzero status
1368 in batch mode if the last command to be executed failed.
1369 * NEWS: Mention the above.
1371 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
1373 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1374 end of warning message.
1376 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1379 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1380 (aarch64_extract_return_value): Use
1381 aapcs_is_vfp_call_or_return_candidate.
1382 (aarch64_return_in_memory): Likewise.
1383 (aarch64_store_return_value): Likewise.
1385 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1388 (aapcs_is_vfp_call_or_return_candidate): Make static
1389 (pass_in_v_or_stack): Remove function.
1390 (pass_in_v_vfp_candidate): New function.
1391 (aarch64_push_dummy_call): Check for float register candidates.
1393 2018-08-29 Alan Hayward <alan.hayward@arm.com>
1395 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1396 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1397 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1399 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1402 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1403 (struct ipa_sym_addresses): Rename to...
1404 (struct ipa_sym_addresses_common): ... this.
1405 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1407 2018-08-28 Tom Tromey <tom@tromey.com>
1409 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1410 (token_fifo): Now a std::vector.
1411 (yylex, c_parse): Update.
1412 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1413 (token_fifo): Now a std::vector.
1414 (yylex, d_parse): Update.
1415 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1416 (token_fifo): Now a std::vector.
1417 (yylex, go_parse): Update.
1419 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
1421 * parser-defs.h (struct type_stack) <elements>: Change type to
1422 std::vector<union type_stack_elt>.
1423 <depth, size>: Remove.
1424 * parse.c (parse_exp_in_context_1): Adjust.
1425 (type_stack_reserve): Remove.
1426 (check_type_stack_depth): Remove.
1427 (insert_into_type_stack): Adjust to std::vector.
1428 (insert_type): Likewise.
1429 (push_type): Likewise.
1430 (push_type_int): Likewise.
1431 (insert_type_address_space): Likewise.
1432 (pop_type): Likewise.
1433 (pop_type_int): Likewise.
1434 (pop_typelist): Likewise.
1435 (pop_type_stack): Likewise.
1436 (append_type_stack): Likewise.
1437 (push_type_stack): Likewise.
1438 (get_type_stack): Likewise.
1439 (type_stack_cleanup): Likewise.
1440 (push_typelist): Likewise.
1441 (follow_types): Likewise.
1442 (_initialize_parse): Likewise.
1444 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
1446 * NEWS: Mention csky target.
1448 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
1449 Hafiz Abid Qadeer <abidh@codesourcery.com>
1450 Don Breazeal <donb@codesourcery.com>
1452 * csky-linux-tdep.c: New file.
1453 * csky-tdep.c: Likewise.
1454 * csky-tdep.h: Likewise.
1455 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1457 (HFILES_NO_SRCDIR): Add csky-tdep.h.
1458 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1459 * configure.tgt: Add csky support.
1461 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
1463 * python/py-framefilter.c (py_print_frame): Print frame architecture
1464 when printing on an MI output.
1466 2018-08-27 Tom Tromey <tom@tromey.com>
1469 * configure: Rebuild.
1470 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1472 2018-08-27 Tom Tromey <tom@tromey.com>
1474 * aarch64-linux-tdep.c
1475 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1478 2018-08-27 Tom Tromey <tom@tromey.com>
1480 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1482 (ppc64_standard_linkage1, ppc64_standard_linkage2)
1483 (ppc64_standard_linkage3, ppc64_standard_linkage4)
1484 (ppc64_standard_linkage5, ppc64_standard_linkage6)
1485 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1488 2018-08-27 Tom Tromey <tom@tromey.com>
1490 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1491 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1493 2018-08-27 Tom Tromey <tom@tromey.com>
1495 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1496 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1498 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1500 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1502 * sparc-linux-tdep.c (sparc32_linux_sigframe)
1503 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1504 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1506 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1507 (ppc64_linux_sigaction_tramp_frame)
1508 (ppc32_linux_sighandler_tramp_frame)
1509 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1510 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1511 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1512 * mn10300-linux-tdep.c (am33_linux_sigframe)
1513 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1514 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1515 * mips-linux-tdep.c (mips_linux_o32_sigframe)
1516 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1517 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1518 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1519 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1520 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1521 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1522 * microblaze-linux-tdep.c
1523 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1524 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1525 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1526 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1527 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1528 * common/common-types.h (ULONGEST_MAX): New define.
1529 (CORE_ADDR_MAX): Fix formatting.
1530 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1531 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1532 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1533 (arm_linux_rt_sigreturn_tramp_frame)
1534 (arm_eabi_linux_sigreturn_tramp_frame)
1535 (arm_eabi_linux_rt_sigreturn_tramp_frame)
1536 (thumb2_eabi_linux_sigreturn_tramp_frame)
1537 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1538 (arm_linux_restart_syscall_tramp_frame)
1539 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1540 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1541 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1543 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1545 2018-08-27 Tom Tromey <tom@tromey.com>
1547 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1549 * mips-tdep.c (mips_deal_with_atomic_sequence)
1550 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1551 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1552 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1553 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1555 * aarch64-tdep.c (aarch64_software_single_step): Use
1558 2018-08-27 Tom Tromey <tom@tromey.com>
1560 * linespec.c (complete_linespec_component): Add cast to "char".
1561 * completer.c (completion_tracker::build_completion_result): Add
1564 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1566 * solist.h (struct solist, struct target_so_ops): Fix
1569 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1571 * ada-tasks.c (ada_task_info_s): Remove typedef.
1572 (DEF_VEC_O(ada_task_info_s)): Remove.
1573 (struct ada_tasks_inferior_data): Initialize fields.
1574 <task_list>: Make an std::vector.
1575 (get_ada_tasks_inferior_data): Allocate with new.
1576 (ada_get_task_number): Adjust.
1577 (get_task_number_from_id): Likewise.
1578 (valid_task_id): Likewise.
1579 (ada_get_task_info_from_ptid): Likewise.
1580 (iterate_over_live_ada_tasks): Likewise.
1581 (add_ada_task): Likewise.
1582 (read_known_tasks): Likewise.
1583 (ada_build_task_list): Likewise.
1584 (print_ada_task_info): Likewise.
1585 (info_task): Likewise.
1586 (task_command_1): Likewise.
1588 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1590 * ada-lang.c (add_angle_brackets): Return std::string.
1592 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1594 * python/py-threadevent.c (py_get_event_thread): Initialize
1597 2018-08-24 Pedro Alves <palves@redhat.com>
1599 * python/py-bpevent.c (create_breakpoint_event_object): Use
1600 copy-initialization.
1601 * python/py-continueevent.c (emit_continue_event): Use
1602 copy-initialization.
1603 * python/py-exitedevent.c (create_exited_event_object): Return a
1605 (emit_exited_event): Use copy-initialization.
1606 * python/py-inferior.c (python_new_inferior)
1607 (python_inferior_deleted, add_thread_object): Use
1608 copy-initialization.
1609 * python/py-infevents.c (create_inferior_call_event_object)
1610 (create_register_changed_event_object)
1611 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1612 (emit_inferior_call_event, emit_memory_changed_event)
1613 (emit_register_changed_event): Use copy-initialization.
1614 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1615 Return a gdbpy_ref<>.
1616 (emit_new_objfile_event): Use copy-initialization.
1617 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1618 (emit_clear_objfiles_event): Use copy-initialization.
1619 * python/py-signalevent.c (create_signal_event_object): Use
1620 copy-initialization.
1621 * python/py-threadevent.c (create_thread_event_object): Use
1622 copy-initialization.
1624 2018-08-24 Pedro Alves <palves@redhat.com>
1625 Simon Marchi <simon.marchi@ericsson.com>
1628 * python/py-continueevent.c: Include "gdbthread.h".
1629 (create_continue_event_object): Add intro comment. Add 'ptid'
1630 parameter. Use it to find thread to pass to
1631 create_thread_event_object.
1632 (emit_continue_event): Pass PTID down to
1633 create_continue_event_object.
1634 * python/py-event.h (py_get_event_thread): Declare.
1635 (create_thread_event_object): Remove default from 'thread'
1637 * python/py-stopevent.c (create_stop_event_object): Use
1638 py_get_event_thread.
1639 * python/py-threadevent.c (get_event_thread): Rename to ...
1640 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1641 and use it to find the thread.
1642 (create_thread_event_object): Assert that THREAD isn't null.
1643 Don't find the event thread here.
1645 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1647 * block.h (blockrange, blockranges): New struct declarations.
1648 (struct block): Add new field named `ranges'.
1649 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1650 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1651 macros for accessing ranges in struct block.
1652 (make_blockranges): New declaration.
1653 block.c (make_blockranges): New function.
1654 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1656 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1657 * blockframe.c (cache_pc_function_block): New static global.
1658 (clear_pc_function_cache): Clear cache_pc_function_block.
1659 (find_pc_partial_function): Move comment to symtab.h. Add
1660 support for non-contiguous blocks.
1661 * cli/cli-cmds.c (block.h): Include.
1662 (print_disassembly): Handle printing of non-contiguous blocks.
1663 (disassemble_current_function): Likewise.
1664 (disassemble_command): Likewise.
1666 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1668 * blockframe.c (get_pc_function_start): Likewise.
1669 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1670 (gcc_symbol_address): Likewise.
1671 * compile/compile-object-run.c (compile_object_run): Likewise.
1672 * compile/compile.c (get_expr_block_and_pc): Likewise.
1673 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1674 (func_addr_to_tail_call_list): Likewise.
1675 * findvar.c (default_read_var_value): Likewise.
1676 * inline-frame.c (inline_frame_this_id): Likewise.
1677 (skip-inline_frames): Likewise.
1678 * infcmd.c (until_next_command): Likewise.
1679 * linespec.c (convert_linespec_to_sals): Likewise.
1680 * parse.c (parse_exp_in_context_1): Likewise.
1681 * printcmd.c (build_address_symbolic): likewise.
1682 (info_address_command): Likewise.
1683 symtab.c (find_function_start_sal): Likewise.
1684 (skip_prologue_sal): Likewise.
1685 (find_function_alias_target): Likewise.
1686 (find_gnu_ifunc): Likewise.
1687 * stack.c (find_frame_funname): Likewise.
1688 * symtab.c (fixup_symbol_section): Likewise.
1689 (find_function_start_sal): Likewise.
1690 (skip_prologue_sal): Likewsie.
1691 (find_function_alias_target): Likewise.
1692 (find_gnu_ifunc): Likewise.
1693 * tracepoint.c (info_scope_command): Likewise.
1694 * value.c (value_fn_field): Likewise.
1696 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1697 in place of find_pc_partial_function.
1698 * blockframe.c (find_function_entry_range_from_pc): New function.
1699 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1700 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1701 for each range in a block.
1704 2018-08-23 Xavier Roirand <roirand@adacore.com>
1706 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1709 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1711 * solib-svr4.c (read_program_headers_from_bfd): Return
1712 gdb::optional<gdb::byte_vector>.
1713 (svr4_exec_displacement): Adjust.
1715 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1717 * solib-svr4.c (read_program_header): Return
1718 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1719 (find_program_interpreter): Return
1720 gdb::optional<gdb::byte_vector>.
1721 (scan_dyntag_auxv): Adjust.
1722 (enable_break): Adjust.
1723 (svr4_exec_displacement): Adjust.
1725 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1727 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1728 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1730 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1732 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1734 * guile/scm-utils.c (gdbscm_printf): Likewise.
1735 * serial.c (serial_printf): Likewise.
1736 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1738 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1740 * stack.c (print_frame): Print frame architecture when printing on
1742 * NEWS: Mention new "arch" attribute in frame output.
1744 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1746 * arch/aarch64.h (aarch64_regnum): Update comment.
1748 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1750 * NEWS: Add SVE to 8.2 section.
1752 2018-08-21 Pedro Alves <palves@redhat.com>
1754 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1755 out from gdbscm_parse_function_args.
1756 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1757 gdbscm_parse_function_args_1.
1759 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1762 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1765 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1767 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1769 2018-08-19 Michael Spang <spang@google.com>
1772 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1773 for PT_TLS segments.
1775 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1777 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1778 dwarf_variable_value.
1779 * dwarf2-frame.c (class dwarf_expr_executor):
1780 Add override for dwarf_variable_value.
1781 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1782 (class symbol_needs_eval_context): Likewise.
1783 (indirect_synthetic_pointer): Add forward declaration.
1784 (sect_variable_value): New function.
1785 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1786 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1787 for DW_OP_GNU_variable_value.
1789 2018-08-16 Tom Tromey <tom@tromey.com>
1791 * top.c (read_command_file): Update.
1792 (command_line_input): Remove "repeat" argument.
1793 * ada-lang.c (get_selections): Update.
1794 * linespec.c (decode_line_2): Update.
1795 * defs.h (command_line_input): Remove argument.
1796 * cli/cli-script.c (read_next_line): Update.
1797 * python/py-gdb-readline.c: Update.
1799 2018-08-17 Tom Tromey <tom@tromey.com>
1801 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1804 2018-08-15 Tom Tromey <tom@tromey.com>
1806 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1808 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1810 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1811 If used, use find_pc_partial_function to find address range
1813 * mi/mi-main.c (mi_cmd_list_features): Report
1814 "data-disassemble-a-option" feature.
1815 * NEWS: Mention new -data-disassemble option -a.
1817 2018-08-13 Tom Tromey <tom@tromey.com>
1819 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1821 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1823 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1824 (aarch64_linux_collect_sve_regset): Likewise.
1825 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1826 * regcache.h (regcache_map_entry_size): New function.
1828 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1830 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1831 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1832 (SVE_HEADER_VL_LENGTH): Likewise.
1833 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1834 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1835 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1836 (SVE_HEADER_SIZE_OFFSET): Likewise.
1837 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1838 (SVE_HEADER_VL_OFFSET): Likewise.
1839 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1840 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1841 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1842 (SVE_HEADER_SIZE): Likewise.
1843 (aarch64_linux_core_read_vq): Add function.
1844 (aarch64_linux_core_read_description): Check for SVE section.
1846 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1848 * aarch64-fbsd-tdep.c
1849 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1851 * aarch64-linux-tdep.c
1852 (aarch64_linux_iterate_over_regset_sections): Likewise.
1853 * alpha-linux-tdep.c
1854 (alpha_linux_iterate_over_regset_sections):
1856 (alphanbsd_iterate_over_regset_sections): Likewise.
1858 (amd64fbsd_iterate_over_regset_sections): Likewise.
1859 * amd64-linux-tdep.c
1860 (amd64_linux_iterate_over_regset_sections): Likewise.
1862 (armbsd_iterate_over_regset_sections): Likewise.
1864 (arm_fbsd_iterate_over_regset_sections): Likewise.
1866 (arm_linux_iterate_over_regset_sections): Likewise.
1867 * corelow.c (get_core_registers_cb): Likewise.
1868 (core_target::fetch_registers): Likewise.
1869 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1870 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1871 * gdbarch.h (void): Regenerate.
1872 * gdbarch.sh: Add supply_size and collect_size.
1873 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1874 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1875 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1876 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1877 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1878 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1879 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1880 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1881 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1882 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1883 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1884 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1885 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1886 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1887 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1888 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1889 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1890 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1891 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1892 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1893 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1894 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1895 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1896 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1897 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1898 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1899 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1900 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1901 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1902 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1904 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1906 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1909 2018-08-10 Keith Seitz <keiths@redhat.com>
1911 * compile/compile-c-support.c (add_code_header, add_code_footer):
1912 Move into policy class.
1913 (c_push_user_expression, pop_user_expression_nop)
1914 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1915 (compile_program): New host class.
1916 (c_compile_program): New typedef.
1917 (c_compute_porgram): Use c_compile_program.
1919 2018-08-10 Keith Seitz <keiths@redhat.com>
1921 * compile/compile-internal.h (compile_instance::~compile_instance):
1922 Remove calls to htab_delete.
1923 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1924 * compile.c (compile_instance::compile_instance): Initialize
1925 htab unique pointers.
1926 (compile_instance::get_cached_type, compile_instance::insert_type)
1927 (compile_instance::error_symbol_once): Update for unique_ptr.
1929 2018-08-10 Keith Seitz <keiths@redhat.com>
1931 * compile/compile-c-symbols.c (struct symbol_error)
1932 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1933 (compile_instance::insert_symbol_error)
1934 (compile_instance::error_symbol_once): Move to ...
1935 * compile/compile.c: ... here.
1937 2018-08-10 Keith Seitz <keiths@redhat.com>
1939 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1940 instead of `new_compile_instance'.
1941 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1943 If the symbol error map is not initialized, create it.
1944 (generate_c_for_for_one_symbol): Do not check/initialize
1945 the symbol error map.
1946 * compile/compile-c-types.c (compile_c_instance): Make a class.
1948 (compile_instance::compile_instance): Initialize the type cache.
1949 (get_cached_type): New function.
1950 (insert_type): Update description.
1951 (compile_c_instance::m_default_cflags): Define.
1952 (convert_type): Update description. Use get_cached_type.
1953 (delete_instance): Moved to destructor.
1954 (new_compile_instance): Moved to constructor.
1955 * compile/compile-c.h (compile_c_instance): Make class inheriting
1956 from compile_instance.
1957 <base>: Remove field.
1958 <type_map, symbol_err_map>: Move to base class.
1959 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1960 * compile/compile-internal.h (compile_instance): Make class.
1961 <type_map_t, symbol_err_map_t>: Define.
1962 <fe>: Rename to `m_gcc_fe'.
1963 <scope, block, gcc_target_options>: Add `m_' prefix.
1964 <m_type_map, m_symbol_err_map>: New fields, moved from
1967 (convert_type, new_compile_instance): Remove.
1968 * compile/compile.c (cleanup_compile_instance): Remove.
1969 (compile_to_object): Use unique_ptr to eliminate cleanups.
1970 (compile_instance::set_print_callback, compile_instance::version)
1971 (compile_instance::set_verbose)
1972 (compile_instance::set_driver_filename)
1973 (compile_instance::set_triplet_regexp)
1974 (compile_instance::set_arguments)
1975 (compile_instance::set_source_file)
1976 (compile_instance::compile): Define.
1978 2018-08-10 Keith Seitz <keiths@redhat.com>
1980 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1981 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1982 gcc-c-fe.def to define C plugin.
1983 (delete_instance): Delete `c_plugin'.
1984 (new_compile_instance): Initialize `c_plugin'.
1985 * compile/compile-c.h: Include gcc_c_plugin.h.
1986 (struct compile_c_instance) <c_plugin>: New member.
1987 * gcc-c-plugin.h: New file.
1988 Update all callers with API change.
1990 2018-08-10 Keith Seitz <keiths@redhat.com>
1992 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1993 (HFILES_NO_SRCDIR): ... to here.
1994 Add compile-internal.h and compile-c.h.
1995 * compile/compile-c-support.c: Include compile-c.h.
1996 * compile/compile-c-symbols.c: Include compile-c.h.
1997 (generate_c_for_variable_locations): Update comment.
1998 * compile/compile-c-types.c: Include compile-c.h.
1999 * compile/compile-c.h: New file -- moved C language declarations
2000 from other files here.
2001 * compile/compile-internal.h: Do not include hashtab.h or
2002 common/enum-flags.h.
2003 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2004 (gcc_convert_symbol, gcc_symbol_address)
2005 (generate_c_for_variable_locations, c_get_mode_for_size)
2006 (c_get_range_decl_name): Definitions moved to compile-c.h.
2007 * compile/compile-loc2c.c: Include compile-c.h.
2009 2018-08-10 Keith Seitz <keiths@redhat.com>
2011 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2012 (c_symbol_substitution_name): ... this.
2015 2018-08-10 Keith Seitz <keiths@redhat.com>
2017 * compile/compile-c-support.c (c_compute_program): Use
2018 unique_xmalloc_ptr to eliminate cleanup.
2019 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2020 Return a unique_xmalloc_ptr and eliminate cleanup.
2021 * compile/compile-internal.h (generate_c_for_variable_locations):
2022 Return unique_xmalloc_ptr and update description.
2024 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2026 * corelow.c (core_target::get_core_register_section): Rename
2027 min_size to section_min_size.
2029 2018-08-09 Jim Wilson <jimw@sifive.com>
2031 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2032 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2033 * NEWS: Mention new GNU/Linux RISC-V target.
2034 * configure.host: Add riscv*-*-linux*.
2035 * configure.nat: Add riscv*.
2036 * configure.tgt: Add riscv*-*-linux*.
2037 * riscv-linux-nat.c: New file.
2038 * riscv-linux-tdep.c: New file.
2040 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2042 * infrun.c (resume): Make static, add forward declaration.
2043 (proceed): Update header comment.
2044 * infrun.h (resume): Delete declaration.
2046 2018-08-09 Tom Tromey <tom@tromey.com>
2048 * riscv-tdep.h: Minor formatting fixes.
2050 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2052 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2053 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2054 (test_mkdir_recursive): Likewise.
2055 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2057 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2059 * valarith.c (value_subscripted_rvalue): If an array is not in
2060 memory, and we don't know the upper bound, then we can't know that
2061 the requested element exists or not.
2063 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2065 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2066 (target_options_to_string): Add comment.
2068 2018-08-08 Tom Tromey <tom@tromey.com>
2070 * unittests/scoped_mmap-selftests.c: Check result of "write".
2072 2018-08-08 Jim Wilson <jimw@sifive.com>
2074 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2075 (decode_register_index_short): New.
2076 (decode_j_type_insn, decode_cj_type_insn): New.
2077 (decode_b_type_insn, decode_cb_type_insn): New.
2078 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2079 local xlen. Check xlen when decoding ambiguous compressed insns. In
2080 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2081 is_c_sw_insn instead of is_sw_insn.
2082 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2083 (riscv_software_single_step): New.
2084 * riscv-tdep.h (riscv_software_single_step): Declare.
2086 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2087 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2089 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2092 * target.c (dispose_inferior): Don't dispose of inferiors that are
2095 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2097 * remote.c (remote_target::download_tracepoint): Change char* to
2100 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2102 * target.h (target_options_to_string): Return an std::string.
2103 * target.c (str_comma_list_concat_elem): Return void, use
2105 (do_option): Likewise.
2106 (target_options_to_string): Return an std::string.
2107 * linux-nat.c (linux_nat_target::wait): Adjust.
2108 * target-debug.h (target_debug_print_options): Adjust.
2110 2018-08-07 Tom Tromey <tom@tromey.com>
2112 * Makefile.in (CPPFLAGS): New variable.
2113 (INTERNAL_CPPFLAGS): Use it.
2115 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2117 * NEWS: Mention the index cache.
2119 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2121 * common/pathstuff.h (get_standard_cache_dir): New.
2122 * common/pathstuff.c (get_standard_cache_dir): New.
2123 * build-id.h (build_id_to_string): New.
2124 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2125 DEBUG_STR_SUFFIX): Move to here.
2126 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2127 DEBUG_STR_SUFFIX): Move from there.
2128 (write_psymtabs_to_index): Make non-static, add basename
2129 parameter. Write to temporary files, rename when done.
2130 (save_gdb_index_command): Adjust call to
2131 write_psymtabs_to_index.
2132 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2134 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2135 (get_gdb_index_contents_from_cache): New.
2136 (get_gdb_index_contents_from_cache_dwz): New.
2137 (dwarf2_initialize_objfile): Read index from cache.
2138 (dwarf2_build_psymtabs): Save to index.
2139 * dwarf-index-cache.h: New file.
2140 * dwarf-index-cache.c: New file.
2141 * dwarf-index-write.h: New file.
2143 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2145 * gnulib/aclocal.m4: Re-generate.
2146 * gnulib/config.in: Re-generate.
2147 * gnulib/configure: Re-generate.
2148 * gnulib/import/Makefile.am: Re-generate.
2149 * gnulib/import/Makefile.in: Re-generate.
2150 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2151 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2152 * gnulib/import/m4/mkdir.m4: New file.
2153 * gnulib/import/mkdir.c: New file.
2154 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2157 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2159 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2160 * common/scoped_mmap.c: New file.
2161 * common/scoped_mmap.h (destroy): New method.
2162 (~scoped_mmap, reset): Use destroy.
2163 (scoped_mmap): New move constructor.
2164 (mmap_file): New declaration.
2165 * unittests/scoped_mmap-selftests.c (test_normal,
2166 test_invalid_filename, run_tests): New functions.
2167 (_initialize_scoped_mmap_selftests): Register selftest.
2169 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2171 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2172 (read_gdb_index_from_buffer): ... this. Remove section
2173 parameter, add buffer parameter.
2174 (get_gdb_index_contents_ftype,
2175 get_gdb_index_contents_dwz_ftype): New typedefs.
2176 (dwarf2_read_gdb_index): Add callback parameters to get the
2178 (get_gdb_index_contents_from_section): New.
2179 (dwarf2_initialize_objfile): Update call to
2180 dwarf2_read_gdb_index.
2182 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2184 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2185 (gdb_open_cloexec): Likewise.
2186 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2187 (commandline_from_pid): Likewise.
2188 (linux_xfer_osdata_threads): Likewise.
2189 (linux_xfer_osdata_fds): Likewise.
2190 * ada-lang.c (is_package_name): Likewise.
2191 * auxv.c (procfs_xfer_auxv): Likewise.
2192 * breakpoint.c (print_one_breakpoint_location): Use
2194 (print_one_catch_solib): Use string_printf.
2195 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2196 (add_pe_forwarded_sym): Likewise.
2197 * dwarf2read.c (create_type_unit_group): Likewise.
2198 (build_error_marker_type): Likewise.
2199 * infcall.c (get_function_name): Likewise.
2200 * valprint.c (print_converted_chars_to_obstack): Likewise.
2201 * xtensa-tdep.c (xtensa_register_type): Likewise.
2203 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
2205 * remote.c (remote_target::download_tracepoint): Fix format
2208 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2210 * tracefile.c: Include common/byte-vector.h.
2211 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2212 with trace_regblock_size if needed. Update uses of buf.
2214 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2216 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2217 std::vector<unsigned char>.
2218 * tracepoint.c (collection_list::collection_list): Remove
2219 m_regs_mask initializer from initializer list. Resize
2220 m_regs_mask using the largest remote register number.
2221 (collection_list::add_remote_register): Remove size check on
2222 m_regs_mask. Use at to access element.
2223 (collection_list::stringify): Change type of temp_buf to
2224 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2225 stringify the register mask. Use pack_hex_byte for the register
2228 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2230 * tracepoint.h (class collection_list) <add_register>: Remove.
2231 <add_remote_register, add_ax_registers, add_local_register>:
2233 <add_memrange>: Add scope parameter.
2234 * tracepoint.c (encode_actions_1): Likewise.
2235 (collection_list::add_register): Rename to ...
2236 (collection_list::add_remote_register): ... this. Update
2238 (collection_list::add_ax_registers, add_local_register): New
2240 (collection_list::add_memrange): Add scope parameter. Call
2241 add_local_register instead of add_register.
2242 (finalize_tracepoint_aexpr): New function.
2243 (collection_list::collect_symbol): Update calls to add_memrange.
2244 Call add_local_register instead of add_register. Call
2245 add_ax_registers. Call finalize_tracepoint_aexpr.
2246 (encode_actions_1): Get remote regnos for $reg action. Call
2247 add_remote_register, add_ax_registers, and add_local_register.
2248 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2249 (validate_actionline): Call finalize_tracepoint_aexpr.
2251 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2253 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2254 Replace array buf with gdb::char_vector buf, of size
2255 get_remote_packet_size (). Replace references to buf and
2256 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2257 and xsnprintf with snprintf. Raise errors if the buffer is too
2260 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2262 * remote.c (remote_target::download_tracepoint): Fix the has_more
2263 predicate in the QTDP action list iteration.
2265 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2267 * remote.c (remote_target::download_tracepoint): Fix indentation
2270 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2272 * proc-api.c (_initialize_proc_api): Remove c, unused.
2273 * procfs.c (procfs_init_inferior): Remove signals, unused.
2274 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2277 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
2278 Andrew Burgess <andrew.burgess@embecosm.com>
2280 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2281 'W_STOPCODE (0)' as this could be ambiguous.
2283 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
2285 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2286 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2289 2018-08-02 Tom Tromey <tom@tromey.com>
2292 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2294 (process_structure_scope): Likewise.
2296 2018-08-02 Xavier Roirand <roirand@adacore.com>
2299 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2302 2018-08-02 Tom Tromey <tom@tromey.com>
2304 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2305 (darwin_suspend_inferior, darwin_resume_inferior)
2306 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2307 (darwin_check_new_threads): Check result of get_darwin_inferior.
2309 2018-07-31 Joel Brobecker <brobecker@adacore.com>
2313 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
2315 * varobj.c (varobj_get_path_expr_parent): Report an error if
2316 parent is a dynamic varobj.
2318 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2320 * gnulib/aclocal.m4: Re-generate.
2321 * gnulib/config.in: Re-generate.
2322 * gnulib/configure: Re-generate.
2323 * gnulib/import/Makefile.in: Re-generate.
2324 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2325 * gnulib/import/m4/onceonly.m4: Re-generate.
2327 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
2329 * target-descriptions.c (struct xml_test_tdesc): New.
2330 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2331 (record_xml_tdesc): Update.
2332 (maintenance_check_xml_descriptions): Update.
2333 * target-descriptions.h (record_xml_tdesc): Update comment.
2335 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
2337 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2338 checking array bounds are defined.
2340 2018-07-30 Tom Tromey <tom@tromey.com>
2342 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2343 irreflexivity violation.
2345 2018-07-30 Tom Tromey <tom@tromey.com>
2347 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2348 * value.c (unpack_long): Remove lint code.
2349 * valops.c (value_ind): Remove lint code.
2350 * valarith.c (value_x_binop, value_x_unop, value_equal)
2351 (value_pos): Remove lint code.
2353 2018-07-28 Tom de Vries <tdevries@suse.de>
2355 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2356 with undefined upper bound as <optimized out>.
2358 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
2360 * gcore.in: Rename variable "name" to "prefix". Expand
2363 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2365 * windows-nat.c (windows_nat_target::create_inferior): Update to
2366 call close() in global namespace.
2368 2018-07-26 Tom Tromey <tom@tromey.com>
2370 * dwarf-index-write.c (add_address_entry): Don't add objfile
2372 * dbxread.c (find_stab_function): Rename from
2373 find_stab_function_addr. Return a bound_minimal_symbol.
2374 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2375 Don't add objfile offsets.
2376 (end_psymtab): Use raw_text_low, raw_text_high,
2377 MSYMBOL_VALUE_RAW_ADDRESS.
2378 (read_ofile_symtab): Update.
2379 (process_one_symbol): Update.
2380 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2382 (dw2_relocate): Remove.
2383 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2385 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2387 (process_psymtab_comp_unit_reader, add_partial_symbol)
2388 (add_partial_subprogram, dwarf2_ranges_read): Update.
2389 (load_partial_dies): Update.
2390 (add_address_entry): Don't add objfile offsets.
2391 (dwarf2_build_include_psymtabs): Update.
2392 (create_addrmap_from_aranges): Don't add objfile offsets.
2393 (dw2_find_pc_sect_compunit_symtab): Update.
2394 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2395 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2397 (parse_partial_symbols): Don't add objfile offsets. Use
2398 raw_text_low, raw_text_high. Update.
2399 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2400 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2401 or call 'relocate' quick function. Clear psymbol_map.
2402 * psympriv.h (struct partial_symbol) <address>: Add section
2404 <set_unrelocated_address>: Rename from set_address.
2405 <raw_text_low, raw_text_high>: New methods.
2406 <text_low, text_high>: Add objfile parameter.
2407 (add_psymbol_to_bcache): Add 'section' parameter. Call
2408 set_unrelocated_address.
2409 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2410 (find_pc_psymbol): Update.
2411 (fixup_psymbol_section, relocate_psymtabs): Remove.
2412 (dump_psymtab, psym_functions): Update.
2413 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2415 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2416 (start_psymtab_common): Update.
2417 * symfile-debug.c (debug_qf_relocate): Remove.
2418 (debug_sym_quick_functions): Update.
2419 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2420 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2423 2018-07-26 Tom Tromey <tromey@redhat.com>
2425 * dbxread.c (end_psymtab): Use text_high_valid and
2427 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2428 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2429 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2431 <text_low_valid, text_high_valid>: New fields.
2432 <set_text_low, set_text_high>: Update.
2433 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2435 2018-07-26 Tom Tromey <tom@tromey.com>
2437 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2439 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2440 textlow and texthigh fields.
2441 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2443 * mdebugread.c (parse_lines, parse_partial_symbols)
2444 (psymtab_to_symtab_1): Update.
2445 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2446 Rename fields. Update comment. Now private.
2447 <text_low, text_high, set_text_low, set_text_high>: New methods.
2448 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2449 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2450 (start_psymtab_common, maintenance_info_psymtabs)
2451 (maintenance_check_psymtabs): Update.
2452 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2454 (scan_xcoff_symtab): Update.
2456 2018-07-26 Tom Tromey <tromey@redhat.com>
2458 * psympriv.h (struct partial_symbol) <unrelocated_address,
2459 address, set_address>: New methods.
2460 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2461 (fixup_psymbol_section, relocate_psymtabs): Update.
2462 (print_partial_symbols): Add 'objfile' parameter. Update.
2463 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2466 2018-07-26 Tom Tromey <tom@tromey.com>
2468 * dwarf-index-write.c (write_psymbols, debug_names::insert)
2469 (debug_names::write_psymbols): Update.
2470 * psympriv.h (struct partial_symbol): Derive from
2471 general_symbol_info.
2472 <obj_section>: New method.
2473 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2474 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2475 (find_pc_sect_psymbol, fixup_psymbol_section)
2476 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2477 (print_partial_symbols, recursively_search_psymtabs)
2478 (compare_psymbols, psymbol_hash, psymbol_compare)
2479 (add_psymbol_to_bcache, maintenance_check_psymtabs)
2480 (psymbol_name_matches, psym_fill_psymbol_map): Update.
2482 2018-07-26 Tom Tromey <tromey@redhat.com>
2484 * dbxread.c (end_psymtab): Remove dead code.
2486 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
2488 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2489 DWARF unwinders are disabled.
2490 * dwarf2-frame.c: Add dwarf2read.h include.
2491 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2493 (dwarf2_frame_unwinders_enabled_p): Define.
2494 (show_dwarf_unwinders_enabled_p): New function.
2495 (_initialize_dwarf2_frame): Register switch to control DWARF
2497 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2498 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2499 (show_dwarf_cmdlist): Remove static keyword.
2500 * dwarf2read.h (set_dwarf_cmdlist): Declare.
2501 (show_dwarf_cmdlist): Declare.
2502 * NEWS: Document new feature.
2504 2018-07-26 Tom de Vries <tdevries@suse.de>
2506 PR breakpoints/23366
2507 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2509 2018-07-26 Tom de Vries <tdevries@suse.de>
2511 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2512 DW_AT_count can't be translated to a dynamic prop.
2514 2018-07-25 Tom de Vries <tdevries@suse.de>
2516 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2519 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
2521 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2523 2018-07-25 Joel Brobecker <brobecker@adacore.com>
2525 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2527 2018-07-24 Keith Seitz <keiths@redhat.comt
2530 * dwarf2read.c (dw2_add_symbol_to_list): New function.
2531 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2532 instead of add_symbol_to_list.
2533 (read_file_scope): Call prepare_one_comp_unit before reading
2536 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
2538 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2540 2018-07-24 Tom Tromey <tom@tromey.com>
2542 * utils.c (malloc, realloc, free): Don't declare.
2543 * configure, config.in: Rebuild.
2544 * configure.ac: Don't check for declarations of free, malloc, or
2547 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2549 * aarch64-linux-nat.c
2550 (aarch64_linux_nat_target::stopped_data_address): Remove unused
2552 * arm-linux-nat.c (fetch_regs): Likewise.
2553 (store_regs): Likewise.
2554 (fetch_vfp_regs): Likewise.
2555 (store_vfp_regs): Likewise.
2556 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2557 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2558 (arm_linux_nat_target::insert_watchpoint): Likewise.
2559 (arm_linux_nat_target::remove_watchpoint): Likewise.
2560 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2562 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2564 * ppc-linux-nat.c (fetch_register): Likewise.
2565 (fetch_all_gp_regs): Likewise.
2566 (fetch_ppc_registers): Likewise.
2567 (store_all_gp_regs): Likewise.
2568 (store_ppc_registers): Likewise.
2569 (hwdebug_insert_point): Likewise.
2570 (can_use_watchpoint_cond_accel): Likewise.
2571 * remote-sim.c (gdb_os_write_stdout): Likewise.
2573 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2574 Tom Tromey <tom@tromey.com>
2576 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2578 * configure: Rebuild.
2580 2018-07-22 Tom Tromey <tom@tromey.com>
2582 * regformats/regdat.sh: Define xmltarget_${name} inside
2583 #ifndef IN_PROCESS_AGENT.
2585 2018-07-22 Tom Tromey <tom@tromey.com>
2587 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2589 2018-07-22 Tom Tromey <tom@tromey.com>
2591 * symfile.c (reread_symbols): Notify iter, not objfile.
2593 2018-07-22 Tom Tromey <tom@tromey.com>
2595 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2597 (ravenscar_thread_target::prepare_to_store): Likewise.
2599 2018-07-22 Tom Tromey <tom@tromey.com>
2601 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2602 unused variable. Call value_fetch_lazy when needed.
2603 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2604 Remove unused variable. Call value_fetch_lazy when needed.
2606 2018-07-22 Tom Tromey <tom@tromey.com>
2608 * m32c-tdep.c (mark_dma): Return void.
2609 (make_regs): Remove unused declarations.
2611 2018-07-22 Tom Tromey <tom@tromey.com>
2613 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2614 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2615 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2616 bkscm_get_valid_block_smob_arg_unsafe for effect.
2618 2018-07-22 Tom Tromey <tom@tromey.com>
2620 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2623 2018-07-22 Tom Tromey <tom@tromey.com>
2625 * windows-nat.c (saved_context): Conditionally define.
2626 * remote.c (remote_target::remote_btrace_maybe_reopen):
2627 Conditionally declare "warned".
2628 * inflow.c (sigquit_ours): Conditionally define.
2629 (new_tty): Move "tty" declaration inside #if.
2630 * guile/guile.c (guile_datadir): Conditionally define.
2631 * charset.c (set_be_le_names): Move some declarations inside #if.
2632 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2634 (parse_xml_btrace_conf): Likewise.
2636 2018-07-22 Tom Tromey <tom@tromey.com>
2638 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2640 2018-07-22 Tom Tromey <tom@tromey.com>
2642 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2643 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2644 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2645 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2646 * stack.c (frame_apply_level_command): Remove unused variable.
2647 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2648 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2649 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2651 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2652 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2653 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2655 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2656 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2658 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2659 Remove unused variable.
2660 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2662 * common/tdesc.c (print_xml_feature::visit): Remove unused
2664 * compile/compile-object-load.c (store_regs): Remove unused
2666 * complaints.c (clear_complaints): Remove unused variable.
2667 * corelow.c (core_target_open): Remove unused variable.
2668 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2670 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2672 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2674 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2676 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2678 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2680 * ia64-tdep.c (examine_prologue): Remove unused variable.
2681 * infcall.c (run_inferior_call): Remove unused variable.
2682 * inferior.c (exit_inferior): Remove unused variable.
2683 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2684 * linespec.c (decode_line_2): Remove unused variable.
2685 * linux-nat.c (super_close): Remove.
2686 * linux-tdep.c (linux_info_proc): Remove unused variable.
2687 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2688 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2689 Remove unused variable.
2690 * parse.c (find_minsym_type_and_address): Remove unused variable.
2691 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2693 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2695 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2697 * record-btrace.c (record_btrace_target::store_registers): Remove
2699 (cmd_show_record_btrace_cpu): Remove unused variable.
2700 * riscv-tdep.c (riscv_register_reggroup_p)
2701 (riscv_push_dummy_call, riscv_return_value): Remove unused
2703 * rust-exp.y (literal): Remove unused variable.
2704 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2706 <STRUCTOP_ANONYMOUS>: Likewise.
2707 * s390-linux-tdep.c (s390_linux_init_abi_31)
2708 (s390_linux_init_abi_64): Remove unused variable.
2709 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2710 (file_select_thread, net_windows_open, _initialize_ser_windows):
2711 Remove unused variables.
2712 * symtab.c (find_pc_sect_line): Remove unused variable.
2713 * target-memory.c (compute_garbled_blocks): Remove unused
2715 (target_write_memory_blocks): Remove unused variable.
2716 * target.c (target_stack::unpush): Remove unused variables.
2717 * tracepoint.c (start_tracing, all_tracepoint_actions)
2718 (merge_uploaded_trace_state_variables)
2719 (print_one_static_tracepoint_marker): Remove unused variable.
2720 * unittests/basic_string_view/element_access/char/1.cc (test01):
2721 Remove unused variable.
2722 * windows-nat.c (windows_continue, windows_add_all_dlls)
2723 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2724 Remove unused variables.
2726 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2728 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2729 attr_profile in HAVE_ELF.
2730 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2733 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2735 * frame.c (frame_register_unwind): Change parameter name.
2736 (frame_unwind_register): Likewise.
2737 (frame_unwind_register_value): Likewise.
2738 (frame_unwind_register_signed): Likewise.
2739 (frame_unwind_register_unsigned): Likewise.
2740 * frame.h (frame_register_unwind): Likewise.
2741 (frame_unwind_register): Likewise.
2742 (frame_unwind_register_value): Likewise.
2743 (frame_unwind_register_signed): Likewise.
2744 (frame_unwind_register_unsigned): Likewise.
2745 (frame_unwind_arch): Likewise.
2747 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2749 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2752 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2754 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2755 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2758 2018-07-20 Keith Seitz <keiths@redhat.com>
2760 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2761 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2762 m_compunit_symtab, m_language>: Add "m_" prefix.
2764 * buildsym.c: Update all uses.
2766 2018-07-20 Tom Tromey <tom@tromey.com>
2768 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2769 * buildsym.h (record_line_ftype): Remove typedef.
2771 2018-07-20 Tom Tromey <tom@tromey.com>
2773 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2774 (end_expandable_symtab): Likewise.
2775 (end_symtab_get_static_block): Likewise.
2776 (end_symtab_from_static_block): Likewise.
2777 * buildsym-legacy.c (augment_type_symtab): Remove.
2778 (end_expandable_symtab): Remove.
2779 (end_symtab_get_static_block): Remove.
2780 (end_symtab_from_static_block): Remove.
2782 2018-07-20 Tom Tromey <tom@tromey.com>
2784 * dwarf2read.c: Include buildsym.h.
2785 (struct dwarf2_cu) <builder>: New method.
2786 (fixup_go_packaging): Update.
2787 (process_full_comp_unit, process_full_type_unit): Update. Don't
2788 use scoped_free_pendings.
2789 (using_directives): Add "cu" parameter, remove "language".
2790 (read_import_statement, setup_type_unit_groups, )
2791 (read_func_scope, read_lexical_block_scope)
2792 (dwarf2_record_block_ranges, read_namespace): Update.
2793 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2794 (lnp_state_machine::handle_end_sequence): Update.
2795 (class lnp_state_machine) <m_cu>: New member.
2796 <m_record_line_callback>: Remove.
2797 <m_currently_recording_lines>: New member.
2798 (lnp_state_machine::handle_set_file): Update.
2799 (noop_record_line): Remove.
2800 (dwarf_record_line_p): Add cu parameter.
2801 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2802 (lnp_state_machine::record_line)
2803 (lnp_state_machine::lnp_state_machine)
2804 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2805 (dwarf_decode_lines): Update.
2806 (dwarf2_start_subfile): Add cu parameter.
2807 (dwarf2_start_symtab, new_symbol): Update.
2808 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2809 Remove dwarf2_per_objfile parameter.
2810 (dwarf_decode_macros): Update.
2812 2018-07-20 Tom Tromey <tom@tromey.com>
2814 * stabsread.c (define_symbol): Update.
2815 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2816 * dwarf2read.c (new_symbol): Update.
2817 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2818 * cp-namespace.c: Include buildsym.h.
2819 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2820 * buildsym-legacy.c (get_buildsym_compunit): New function.
2822 2018-07-20 Tom Tromey <tom@tromey.com>
2824 * xcoffread.c: Include buildsym-legacy.h.
2825 * windows-nat.c: Include buildsym-legacy.h.
2826 * stabsread.c: Include buildsym-legacy.h.
2827 * mdebugread.c: Include buildsym-legacy.h.
2828 * buildsym-legacy.h: New file.
2829 * buildsym-legacy.c: New file, from buildsym.c.
2830 * go32-nat.c: Include buildsym-legacy.h.
2831 * dwarf2read.c: Include buildsym-legacy.h.
2832 * dbxread.c: Include buildsym-legacy.h.
2833 * cp-namespace.c: Include buildsym-legacy.h.
2834 * coffread.c: Include buildsym-legacy.h.
2835 * buildsym.h: Move some contents to buildsym-legacy.h.
2836 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2838 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2840 2018-07-20 Tom Tromey <tom@tromey.com>
2842 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2843 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2844 (buildsym_compunit::buildsym_compunit)
2845 (buildsym_compunit::~buildsym_compunit)
2846 (buildsym_compunit::get_macro_table): Define.
2848 2018-07-20 Tom Tromey <tom@tromey.com>
2850 * buildsym.c (reset_symtab_globals): Remove.
2851 (buildsym_compunit::end_symtab_from_static_block): Update.
2852 (buildsym_compunit::augment_type_symtab): Update.
2853 (end_symtab_from_static_block): Call free_buildsym_compunit.
2854 (augment_type_symtab, end_symtab, end_expandable_symtab):
2857 2018-07-20 Tom Tromey <tom@tromey.com>
2859 * arch-utils.c: Do not include buildsym.h.
2860 * mipsread.c: Do not include buildsym.h.
2861 * machoread.c: Do not include buildsym.h.
2862 * elfread.c: Do not include buildsym.h.
2864 2018-07-20 Tom Tromey <tom@tromey.com>
2866 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2868 (buildsym_compunit): Add new constructor.
2869 (struct buildsym_compunit) <get_last_source_file, finish_block,
2870 record_block_range, start_subfile, patch_subfile_names,
2871 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2872 set_last_source_start_addr, get_last_source_start_addr,
2873 get_local_using_directives, set_local_using_directives,
2874 get_global_using_directives, outermost_context_p,
2875 get_current_context_stack, get_context_stack_depth,
2876 get_current_subfile, get_local_symbols, get_file_symbols,
2877 get_global_symbols, record_debugformat, record_producer,
2878 push_context, pop_context, end_symtab_get_static_block,
2879 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2881 <record_pending_block, finish_block_internal, make_blockvector,
2882 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2886 2018-05-22 Tom Tromey <tom@tromey.com>
2888 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2890 (finish_block_internal): Update.
2892 2018-07-20 Tom Tromey <tom@tromey.com>
2894 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2896 (finish_block_internal): Update.
2898 2018-07-20 Tom Tromey <tom@tromey.com>
2900 * buildsym.h (EXTERN): Don't define or undef.
2901 * buildsym.c (EXTERN): Don't define.
2903 2018-07-20 Tom Tromey <tom@tromey.com>
2905 * buildsym.c: Remove TODO comment.
2907 2018-07-20 Tom Tromey <tom@tromey.com>
2909 * coffread.c (coff_symtab_read): Update.
2910 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2911 (xcoff_new_init): Update.
2912 * mipsread.c (mipscoff_new_init): Update.
2913 * mdebugread.c (mdebug_build_psymtabs): Update.
2914 * elfread.c (elf_new_init): Update.
2915 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2917 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2918 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2919 (stabsect_build_psymtabs): Update.
2920 * buildsym.h (buildsym_init): Don't declare.
2921 * buildsym.c: Update comment.
2922 (prepare_for_building): Remove.
2923 (start_symtab, restart_symtab): Update.
2924 (reset_symtab_globals): Update comment.
2925 (buildsym_init): Remove.
2927 2018-07-20 Tom Tromey <tom@tromey.com>
2929 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2930 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2931 (read_enum_type, common_block_start, common_block_end)
2932 (cleanup_undefined_types_1, finish_global_stabs): Update.
2933 * mdebugread.c (psymtab_to_symtab_1): Update.
2934 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2935 (read_lexical_block_scope, new_symbol): Update.
2936 * dbxread.c (process_one_symbol): Update.
2937 * coffread.c (coff_symtab_read, process_coff_symbol)
2938 (coff_read_enum_type): Update.
2939 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2941 (get_local_symbols, get_file_symbols, get_global_symbols): New
2943 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2945 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2946 (~scoped_free_pendings): Update.
2947 (finish_block, prepare_for_building, reset_symtab_globals)
2948 (end_symtab_get_static_block, end_symtab_with_blockvector)
2949 (augment_type_symtab, push_context): Update.
2950 (get_local_symbols, get_file_symbols, get_global_symbols): New
2952 (buildsym_init): Update.
2954 2018-07-20 Tom Tromey <tom@tromey.com>
2956 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2957 (process_full_type_unit): Likewise.
2958 (dwarf2_start_symtab): Set list_in_scope.
2960 2018-07-20 Tom Tromey <tom@tromey.com>
2962 * dwarf2read.c (process_psymtab_comp_unit_reader)
2963 (build_type_psymtabs_reader): Do not set list_in_scope.
2965 2018-07-20 Tom Tromey <tom@tromey.com>
2967 * buildsym.c (free_pendings): Remove.
2968 (add_symbol_to_list, scoped_free_pendings)
2969 (finish_block_internal, buildsym_init): Update.
2971 2018-07-20 Tom Tromey <tom@tromey.com>
2973 * xcoffread.c (read_xcoff_symtab): Update.
2974 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2976 * dbxread.c (process_one_symbol): Update.
2977 * coffread.c (coff_symtab_read): Update.
2978 * buildsym.h (finish_block): Update.
2979 * buildsym.c (finish_block): Remove "listhead" argument.
2980 (end_symtab_get_static_block): Update.
2982 2018-07-20 Tom Tromey <tom@tromey.com>
2984 * buildsym.h (class scoped_free_pendings): Remove constructor.
2985 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2987 <m_pending_block_obstack, m_pending_blocks>: New members.
2988 (pending_block_obstack, pending_blocks): Remove.
2989 (scoped_free_pendings::scoped_free_pendings): Default.
2990 (~scoped_free_pendings): Update.
2991 (free_pending_blocks): Remove.
2992 (finish_block_internal, record_pending_block, make_blockvector)
2993 (end_symtab_get_static_block, augment_type_symtab, push_context)
2994 (buildsym_init): Update.
2996 2018-07-20 Tom Tromey <tom@tromey.com>
2998 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2999 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3001 (pending_addrmap, pending_addrmap_obstack)
3002 (pending_addrmap_interesting): Remove.
3003 (scoped_free_pendings, record_block_range, make_blockvector)
3004 (prepare_for_building, reset_symtab_globals, buildsym_init):
3007 2018-07-20 Tom Tromey <tom@tromey.com>
3009 * xcoffread.c (process_linenos): Update.
3010 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3011 * mdebugread.c (psymtab_to_symtab_1): Update.
3012 * dwarf2read.c (setup_type_unit_groups)
3013 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3014 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3015 * dbxread.c (process_one_symbol): Update.
3016 * coffread.c (coff_symtab_read, enter_linenos)
3017 (process_coff_symbol): Update.
3018 * buildsym.h (current_subfile): Don't declare.
3019 (get_current_subfile): Declare.
3020 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3022 (start_subfile, free_buildsym_compunit, push_subfile)
3023 (prepare_for_building, start_symtab): Update.
3024 (get_current_subfile): New function.
3026 2018-07-20 Tom Tromey <tom@tromey.com>
3028 * coffread.c (coff_symtab_read): Update.
3029 * xcoffread.c (read_xcoff_symtab): Update.
3030 * dwarf2read.c (new_symbol): Update.
3031 (read_func_scope, read_lexical_block_scope): Update.
3032 * dbxread.c (process_one_symbol): Update.
3033 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3034 (outermost_context_p): Remove macro.
3035 (outermost_context_p, get_current_context_stack)
3036 (get_context_stack_depth): Declare.
3037 (pop_context): Return struct context_stack.
3038 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3040 (context_stack_size): Remove.
3041 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3042 (prepare_for_building, end_symtab_get_static_block)
3043 (augment_type_symtab, push_context): Update.
3044 (pop_context): Return struct context_stack.
3045 (outermost_context_p, get_current_context_stack)
3046 (get_context_stack_depth): New functions.
3047 (buildsym_init): Update.
3049 2018-07-20 Tom Tromey <tom@tromey.com>
3051 * rust-exp.y: Now a pure parser. Update all rules.
3052 (%union): Move earlier.
3053 (current_parser, work_obstack): Remove globals.
3054 (rust_parser, ~rust_parser): Update.
3055 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3056 lex_character, lex_number, lex_string, lex_identifier,
3057 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3058 convert_name, convert_params_to_expression,
3059 convert_ast_to_expression, ast_basic_type, ast_operation,
3060 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3061 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3062 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3063 ast_array_type, ast_slice_type, ast_reference_type,
3064 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3065 (rust_parse): Update.
3066 (rustyyerror, rustyylex): Add parser parameter.
3067 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3068 (rust_lex_stringish_test, rust_lex_test_sequence)
3069 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3070 (rust_lex_test_push_back, rust_lex_tests): Update.
3072 2018-07-19 Pedro Alves <palves@redhat.com>
3074 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3075 gdb::unique_xmalloc_ptr.
3076 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3077 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3078 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3079 copy-initialization.
3080 * guile/scm-pretty-print.c (ppscm_print_children): Use
3081 gdb::unique_xmalloc_ptr instead of cleanups.
3082 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3083 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3084 gdb::unique_xmalloc_ptr.
3085 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3086 Adjust to use gdb::unique_xmalloc_ptr.
3087 * guile/scm-utils.c (extract_arg): Adjust.
3088 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3089 gdb::unique_xmalloc_ptr instead of a cleanup.
3091 2018-07-19 Tom Tromey <tom@tromey.com>
3093 * utils.c (do_value_free_to_mark)
3094 (make_cleanup_value_free_to_mark): Remove.
3095 * utils.h (make_cleanup_value_free_to_mark): Remove.
3097 2018-07-19 Pedro Alves <palves@redhat.com>
3099 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3100 forwarding reference.
3102 2018-07-18 Pedro Alves <palves@redhat.com>
3104 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3105 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3108 2018-07-18 Pedro Alves <palves@redhat.com>
3110 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3112 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3114 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3115 directly instead of a cleanup.
3116 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3117 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3118 (vlscm_binop_gdbthrow): New, factored out from ...
3119 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3120 (vlscm_rich_compare): Use gdbscm_wrap.
3121 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3122 instead of a cleanup.
3123 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3125 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3126 Use xfree directly instead of a cleanup.
3127 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3128 Adjust to use gdbscm_wrap and scoped_value_mark.
3129 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3130 (gdbscm_value_address, gdbscm_value_dereference)
3131 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3133 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3134 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3136 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3137 gdbscm_wrap and scoped_value_mark.
3138 (gdbscm_value_to_string): Use xfree directly instead of a
3139 cleanup. Move 'buffer' unique_ptr to TRY scope.
3140 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3141 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3143 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3144 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3146 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3149 2018-07-18 Tom de Vries <tdevries@suse.de>
3151 * findvar.c (default_read_var_value): Also resolve dynamic type for
3152 LOC_OPTIMIZED_OUT vars.
3154 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3156 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3159 2018-07-17 Tom Tromey <tom@tromey.com>
3161 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3162 (compute_enum_list, pascm_set_param_value_x)
3163 (gdbscm_parameter_value): Update.
3164 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3165 (gdbscm_scm_to_host_string): Update.
3166 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3168 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3169 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3170 * guile/scm-string.c (gdbscm_scm_to_string): Return
3172 (gdbscm_scm_to_host_string): Likewise.
3174 2018-07-17 Tom Tromey <tom@tromey.com>
3176 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3177 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3178 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3179 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3182 2018-07-17 Tom Tromey <tom@tromey.com>
3184 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3185 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3187 * guile/scm-cmd.c (cmdscm_function): Update.
3188 * guile/scm-pretty-print.c
3189 (ppscm_print_exception_unless_memory_error): Update.
3190 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3191 Return unique_xmalloc_ptr.
3193 2018-07-17 Tom Tromey <tom@tromey.com>
3195 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3198 2018-07-17 Jim Wilson <jimw@sifive.com>
3200 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3201 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3202 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3203 unecessary braces after EF_RISCV_RVC test. Delete call to
3204 set_gdbarch_decr_pc_after_break.
3206 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3207 RISCV_LAST_FP_REGNUM + 1.
3208 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3210 2018-07-17 Tom Tromey <tom@tromey.com>
3212 * configure.ac: Remove --disable-gdbcli.
3213 * configure: Rebuild.
3214 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3215 (SUBDIR_CLI_CFLAGS): Remove.
3216 (SFILES): Use SUBDIR_CLI_SRCS.
3217 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3219 2018-07-17 Tom Tromey <tom@tromey.com>
3222 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3224 2018-07-16 Jim Wilson <jimw@sifive.com>
3226 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3228 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3230 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3232 (libunwind_frame_sniffer): Likewise.
3233 (libunwind_frame_prev_register): Likewise.
3234 (libunwind_sigtramp_frame_sniffer): Likewise.
3235 * ia64-tdep.c (ia64_access_reg): Likewise.
3236 (ia64_access_rse_reg): Likewise.
3237 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3238 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3240 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3242 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3244 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
3246 * remote-sim.c (gdbsim_target::close,
3247 gdbsim_target::mourn_inferior): Remove unused variables.
3249 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
3251 * ia64-tdep.c (ktab_buf): New global.
3252 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3253 (get_kernel_table): Adjust.
3255 2018-07-16 Tom Tromey <tom@tromey.com>
3257 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3258 * dwarf2read.c (using_directives, new_symbol): Use
3259 outermost_context_p.
3260 * dbxread.c (process_one_symbol): Use outermost_context_p.
3261 * coffread.c (coff_symtab_read): Use outermost_context_p.
3263 2018-07-16 Tom Tromey <tom@tromey.com>
3265 * dwarf2read.c (using_directives, read_func_scope)
3266 (read_lexical_block_scope): Update.
3267 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3268 * buildsym.h (local_using_directives, global_using_directives):
3270 (get_local_using_directives, set_local_using_directives)
3271 (get_global_using_directives): Declare.
3272 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3273 m_global_using_directives>: New members.
3274 (finish_block_internal, prepare_for_building)
3275 (reset_symtab_globals, end_symtab_get_static_block)
3276 (push_context): Update.
3277 (get_local_using_directives, set_local_using_directives)
3278 (get_global_using_directives): New functions.
3279 (buildsym_init): Update.
3281 2018-07-16 Tom Tromey <tom@tromey.com>
3283 * xcoffread.c (xcoff_initial_scan): Don't call
3284 free_pending_blocks.
3285 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3286 * buildsym.h (class scoped_free_pendings): Add constructor.
3287 (free_pending_blocks): Don't declare.
3288 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3289 (free_pending_blocks): Now static.
3291 2018-07-16 Tom Tromey <tom@tromey.com>
3293 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3294 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3296 (struct subfile_stack): Remove.
3297 (subfile_stack): Remove.
3298 (push_subfile, pop_subfile, buildsym_init): Update.
3300 2018-07-16 Tom Tromey <tom@tromey.com>
3302 * buildsym.c (push_subfile): Use gdb_assert.
3303 (pop_subfile): Use gdb_assert.
3305 2018-07-16 Tom Tromey <tom@tromey.com>
3307 * buildsym.h (merge_symbol_lists): Remove.
3308 * buildsym.c (merge_symbol_lists): Remove.
3310 2018-07-16 Tom Tromey <tom@tromey.com>
3312 * stabsread.c (scan_file_globals): Update comment.
3313 * stabsread.h (scan_file_globals): Move from buildsym.h.
3314 * buildsym.h (scan_file_globals): Move to stabsread.h.
3316 2018-07-16 Tom Tromey <tom@tromey.com>
3318 * xcoffread.c (xcoff_new_init): Update.
3319 * mipsread.c (mipscoff_new_init): Update.
3320 * mdebugread.c (mdebug_build_psymtabs): Update.
3321 * elfread.c (elf_new_init): Update.
3322 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3323 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3324 * buildsym.h (buildsym_new_init): Don't declare.
3325 * buildsym.c (buildsym_new_init): Remove.
3327 2018-07-16 Tom Tromey <tom@tromey.com>
3329 * stabsread.h (within_function): Move from buildsym.h.
3330 * stabsread.c (start_stabs): Clear within_function.
3331 * coffread.c (coff_start_symtab): Clear within_function.
3332 * buildsym.h (within_function): Move to stabsread.h.
3333 * buildsym.c (prepare_for_building): Update.
3335 2018-07-16 Tom Tromey <tom@tromey.com>
3337 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3338 * dwarf2read.c (dwarf2_start_symtab): Don't set
3339 processing_gcc_compilation.
3340 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3342 2018-07-16 Tom Tromey <tom@tromey.com>
3344 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3345 (next_symbol_text_func): Move from buildsym.h.
3346 * stabsread.c (hashname): Move from buildsym.c.
3347 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3348 (next_symbol_text_func, hashname): Move to stabsread.h.
3349 * buildsym.c: Don't include bcache.h
3350 (hashname): Move to stasbread.c.
3352 2018-07-16 Tom Tromey <tom@tromey.com>
3354 * buildsym.h (context_stack_size): Don't declare.
3355 * buildsym.c (context_stack_size): New global.
3357 2018-07-16 Tom Tromey <tom@tromey.com>
3359 * dbxread.c (processing_acc_compilation): New global.
3360 * buildsym.h (processing_acc_compilation): Don't declare.
3362 2018-07-16 Tom Tromey <tom@tromey.com>
3364 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3365 * dbxread.c (read_ofile_symtab): Update.
3366 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3367 * buildsym.h (last_source_start_addr): Remove.
3368 (set_last_source_start_addr, get_last_source_start_addr):
3370 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3372 (struct buildsym_compunit) <m_last_source_start_addr>: New
3374 (prepare_for_building): Remove start_addr parameter.
3375 (start_symtab, restart_symtab, end_symtab_get_static_block)
3376 (end_symtab_with_blockvector): Update.
3377 (set_last_source_start_addr, get_last_source_start_addr): New
3380 2018-07-16 Tom Tromey <tom@tromey.com>
3382 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3384 (have_line_numbers): Remove.
3385 (record_line, prepare_for_building, end_symtab_get_static_block)
3386 (augment_type_symtab): Update.
3388 2018-07-16 Tom Tromey <tom@tromey.com>
3390 * buildsym.c (~buildsym_compunit): Free the macro table.
3391 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3393 <m_pending_macros>: New member.
3394 (pending_macros): Remove.
3395 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3396 (reset_symtab_globals, end_symtab_get_static_block)
3397 (end_symtab_with_blockvector, augment_type_symtab)
3398 (buildsym_init): Update.
3400 2018-07-16 Tom Tromey <tom@tromey.com>
3402 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3404 (buildsym_compunit::set_last_source_file): New method.
3405 <m_last_source_file>: New member.
3406 (prepare_for_building): Remove "name" parameter.
3407 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3408 (last_source_file): Remove.
3409 (set_last_source_file, get_last_source_file): Update.
3411 2018-07-16 Tom Tromey <tom@tromey.com>
3413 * buildsym.c (prepare_for_building): Add assert.
3415 2018-07-16 Tom Tromey <tom@tromey.com>
3417 * buildsym.c (~buildsym_compunit): Update.
3418 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3419 (start_subfile, patch_subfile_names)
3420 (end_symtab_with_blockvector): Update.
3422 2018-07-16 Tom Tromey <tom@tromey.com>
3424 * buildsym.c (struct buildsym_compunit): Add constructor,
3425 destructor, initializers.
3426 (start_buildsym_compunit): Remove.
3427 (free_buildsym_compunit): Use "delete".
3428 (start_symtab, restart_symtab): Use "new".
3430 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
3432 * symfile.c (set_objfile_default_section_offset): Remove struct
3435 2018-07-14 Stafford Horne <shorne@gmail.com>
3437 * (Responsible Maintainers): Add myself as or1k maintainer.
3439 2018-07-13 Tom Tromey <tom@tromey.com>
3441 * symfile.c (set_objfile_default_section_offset): Use extra braces
3444 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3446 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3449 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3451 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3452 unittests/cli-utils-selftests.c
3453 * unittests/cli-utils-selftests.c: New file.
3455 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3457 * NEWS: Mention new commands. Mention change to 'thread apply'.
3459 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3461 * thread.c (thr_try_catch_cmd): New function.
3462 (thread_apply_all_command): Handle qcs flags.
3463 (thread_apply_command): Handle qcs flags.
3464 (taas_command): New function.
3465 (tfaas_command): New function.
3466 (_initialize_thread): Update to setup the new commands 'taas
3467 and 'tfaas'. Change doc string for 'thread apply'.
3469 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3471 * stack.c: (trailing_outermost_frame): New function, mostly
3472 extracted from backtrace_command_1.
3473 (leading_innermost_frame): New function.
3474 (backtrace_command_1): Update to call trailing_outermost_frame.
3475 (frame_apply_command_count): New function.
3476 (frame_apply_level_command): New function.
3477 (frame_apply_all_command): New function.
3478 (frame_apply_command): New function.
3479 (faas_command): New function.
3480 (frame_cmd_list): New variable.
3481 (_initialize_stack): Update to setup the new commands 'frame apply'
3484 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3486 * cli-utils.c (number_or_range_parser::get_number): Only handle
3487 numbers or convenience var as numbers.
3488 (parse_flags): New function.
3489 (parse_flags_qcs): New function.
3490 (number_or_range_parser::finished): Ensure parsing end is detected
3491 before end of string.
3492 * cli-utils.h (parse_flags): New function.
3493 (parse_flags_qcs): New function.
3494 (number_or_range_parser): Remove m_finished bool.
3495 (number_or_range_parser::skip_range): Set m_in_range to false.
3497 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
3499 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3502 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3503 Jan Kratochvil <jan.kratochvil@redhat.com>
3504 Paul Fertser <fercerpav@gmail.com>
3505 Tsutomu Seki <sekiriki@gmail.com>
3506 Pedro Alves <palves@redhat.com>
3508 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3509 'unittests/parse-connection-spec-selftests.c'.
3510 (COMMON_SFILES): Add 'common/netstuff.c'.
3511 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3512 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3513 * common/netstuff.c: New file.
3514 * common/netstuff.h: New file.
3515 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3516 (wait_for_connect): Update comment. New parameter
3517 'gdb::optional<int> sock' instead of 'struct serial *scb'.
3518 Use 'sock' directly instead of 'scb->fd'.
3519 (try_connect): New function, with code from 'net_open'.
3520 (net_open): Rewrite main loop to deal with multiple
3521 sockets/addresses. Handle IPv6-style hostnames; implement
3522 support for IPv6 connections.
3523 * unittests/parse-connection-spec-selftests.c: New file.
3525 2018-07-11 Pedro Alves <palves@redhat.com>
3528 * remote.c (remote_target::remote_detach_pid): Call
3529 set_current_process.
3531 2018-07-11 Pedro Alves <palves@redhat.com>
3533 * h8300-tdep.c (h8300_gdbarch_init): Remove
3534 set_gdbarch_ecoff_reg_to_regnum calls.
3536 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3539 * c-typeprint.c (c_type_print_base_struct_union): Don't print
3540 offsets/sizes for static members of a class/struct.
3542 2018-07-11 Alan Hayward <alan.hayward@arm.com>
3544 * target-descriptions.c (tdesc_register_bitsize): Rename.
3545 * target-descriptions.h (tdesc_register_bitsize): Likewise.
3546 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3547 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3549 2018-07-10 Tom Tromey <tom@tromey.com>
3551 * breakpoint.c (moribund_locations): Now static and a
3553 (breakpoint_init_inferior, moribund_breakpoint_here_p)
3554 (build_bpstat_chain, update_global_location_list)
3555 (breakpoint_retire_moribund): Update.
3556 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
3559 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3561 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3562 (riscv_register_reggroup_p): Use new function, remove unneeded
3564 (riscv_push_dummy_call): Extend assert to compare against xlen or
3565 flen based on register type.
3567 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3569 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3571 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
3573 * remote.c (show_hardware_watchpoint_limit): New function.
3574 (show_hardware_watchpoint_length_limit): New function.
3575 (show_hardware_breakpoint_limit): New function.
3576 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3577 where appropriate, update help text.
3579 2018-07-09 Tom Tromey <tom@tromey.com>
3581 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3582 (CLIBS): Don't mention NAT_CLIBS.
3584 2018-07-09 Tom Tromey <tom@tromey.com>
3586 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3587 (LIBGDB_OBS, clean mostlyclean): Update.
3588 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3590 2018-07-09 Tom Tromey <tom@tromey.com>
3592 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3593 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3594 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3596 2018-07-09 Tom Tromey <tom@tromey.com>
3598 * Makefile.in (ALLDEPFILES): Remove exec.c.
3599 (COMMON_OBS): Remove exec.o.
3600 (COMMON_SFILES): Add exec.c.
3602 2018-07-09 Tom Tromey <tom@tromey.com>
3604 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3606 2018-07-09 Tom Tromey <tom@tromey.com>
3608 * Makefile.in (clean mostlyclean): Remove stamp-version.
3609 (version.c): Depend on stamp-version.
3610 (stamp-version): New rule, from version.c rule.
3612 2018-07-09 Tom Tromey <tom@tromey.com>
3614 * Makefile.in (init.c): Depend on stamp-init.
3615 (stamp-init): New rule, from init.c rule.
3616 (clean mostlyclean): Remove stamp-init.
3618 2018-07-09 Tom Tromey <tom@tromey.com>
3620 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3621 SUBDIR_GCC_COMPILE_SRCS.
3623 2018-07-09 Tom Tromey <tom@tromey.com>
3625 * Makefile.in (init.c): Remove some unused sed rules.
3627 2018-07-09 Tom Tromey <tom@tromey.com>
3629 * Makefile.in (TSOBS): Remove.
3630 (INIT_FILES): Update.
3631 (LIBGDB_OBS): Update.
3632 (COMMON_SFILES): Add inflow.c.
3633 (SFILES): Remove inflow.c.
3635 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3637 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3639 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3641 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3642 get_saveloc_name, is_signal_frame_name, step_name,
3643 init_remote_name, create_addr_space_name,
3644 destroy_addr_space_name, search_unwind_table_name,
3645 find_dyn_list_name): Constify.
3647 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3649 * darwin-nat.c (darwin_pthread_kill): New function.
3650 (darwin_resume_thread): Use darwin_pthread_kill.
3652 2018-07-05 Tom de Vries <tdevries@suse.de>
3654 * macroexp.c (macro_buffer) <operator=>: New member function.
3656 2018-07-04 Tom Tromey <tom@tromey.com>
3658 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3660 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3662 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3663 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3664 * maint.c: Likewise.
3667 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3669 * NEWS: Create a new section for the next release branch.
3670 Rename the section of the current branch, now that it has
3673 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3675 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3676 * version.in: Bump version to 8.2.50.DATE-git.
3678 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3679 Pedro Alves <palves@redhat.com>
3681 * linux-nat.c (linux_init_ptrace): Rename to ...
3682 (linux_init_ptrace_procfs): ... this. Call
3683 linux_proc_init_warnings.
3684 (linux_nat_target::post_attach)
3685 (linux_nat_target::post_startup_inferior): Adjust.
3686 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3687 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3689 2018-07-04 Tom de Vries <tdevries@suse.de>
3691 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3693 (read_comp_unit_head): ... here.
3695 2018-07-03 Tom Tromey <tom@tromey.com>
3697 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3698 (stop_tracing, tstatus_command)
3699 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3700 (print_one_static_tracepoint_marker): Update.
3701 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3703 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3705 (all_tracepoints, static_tracepoints_here): Return std::vector.
3707 2018-07-03 Tom Tromey <tom@tromey.com>
3709 * common/ptid.c (ptid_equal): Remove.
3710 * common/ptid.h (ptid_equal): Don't declare.
3711 * ada-tasks.c: Update.
3712 * breakpoint.c: Update.
3713 * common/agent.c: Update.
3714 * corelow.c: Update.
3715 * darwin-nat-info.c: Update.
3716 * darwin-nat.c: Update.
3718 * dtrace-probe.c: Update.
3719 * dummy-frame.c: Update.
3720 * fbsd-nat.c: Update.
3722 * gdbthread.h: Update.
3723 * gnu-nat.c: Update.
3724 * go32-nat.c: Update.
3725 * inf-loop.c: Update.
3726 * inf-ptrace.c: Update.
3727 * infcall.c: Update.
3731 * linux-fork.c: Update.
3732 * linux-nat.c: Update.
3733 * linux-thread-db.c: Update.
3734 * mi/mi-cmd-var.c: Update.
3735 * mi/mi-interp.c: Update.
3736 * mi/mi-main.c: Update.
3737 * nto-procfs.c: Update.
3738 * ppc-linux-tdep.c: Update.
3740 * python/py-inferior.c: Update.
3741 * python/py-record-btrace.c: Update.
3742 * python/py-record.c: Update.
3743 * ravenscar-thread.c: Update.
3744 * regcache.c: Update.
3745 * remote-sim.c: Update.
3747 * sol-thread.c: Update.
3750 * tui/tui-stack.c: Update.
3752 * windows-nat.c: Update.
3753 * windows-tdep.c: Update.
3755 2018-07-03 Tom Tromey <tom@tromey.com>
3757 * common/ptid.c (ptid_match): Remove.
3758 * common/ptid.h (ptid_match): Don't declare.
3759 * fbsd-nat.c: Update.
3762 * linux-nat.c: Update.
3763 * record-btrace.c: Update.
3764 * regcache.c: Update.
3767 2018-07-03 Tom Tromey <tom@tromey.com>
3769 * common/ptid.c (ptid_tid_p): Remove.
3770 * common/ptid.h (ptid_tid_p): Don't declare.
3771 * sol-thread.c: Update.
3773 2018-07-03 Tom Tromey <tom@tromey.com>
3775 * common/ptid.c (ptid_lwp_p): Remove.
3776 * common/ptid.h (ptid_lwp_p): Don't declare.
3777 * fbsd-nat.c: Update.
3778 * linux-nat.c: Update.
3779 * nat/linux-procfs.c: Update.
3780 * nat/x86-linux-dregs.c: Update.
3781 * sol-thread.c: Update.
3783 2018-07-03 Tom Tromey <tom@tromey.com>
3785 * common/ptid.c (ptid_is_pid): Remove.
3786 * common/ptid.h (ptid_is_pid): Don't declare.
3788 * linux-nat.c: Update.
3789 * mi/mi-interp.c: Update.
3793 2018-07-03 Tom Tromey <tom@tromey.com>
3795 * common/ptid.c (ptid_get_tid): Remove.
3796 * common/ptid.h (ptid_get_tid): Don't declare.
3797 * ada-tasks.c: Update.
3798 * aix-thread.c: Update.
3799 * bsd-uthread.c: Update.
3800 * darwin-nat.c: Update.
3801 * fbsd-nat.c: Update.
3802 * i386-darwin-nat.c: Update.
3804 * linux-tdep.c: Update.
3805 * nto-procfs.c: Update.
3806 * ppc-ravenscar-thread.c: Update.
3807 * python/py-infthread.c: Update.
3808 * ravenscar-thread.c: Update.
3809 * sol-thread.c: Update.
3810 * sparc-ravenscar-thread.c: Update.
3811 * windows-nat.c: Update.
3813 2018-07-03 Tom Tromey <tom@tromey.com>
3815 * common/ptid.c (ptid_get_lwp): Remove.
3816 * common/ptid.h (ptid_get_lwp): Don't declare.
3817 * aarch64-linux-nat.c: Update.
3818 * ada-tasks.c: Update.
3819 * aix-thread.c: Update.
3820 * amd64-linux-nat.c: Update.
3821 * arm-linux-nat.c: Update.
3822 * corelow.c: Update.
3823 * fbsd-nat.c: Update.
3824 * fbsd-tdep.c: Update.
3825 * gnu-nat.c: Update.
3826 * i386-cygwin-tdep.c: Update.
3827 * i386-gnu-nat.c: Update.
3828 * i386-linux-nat.c: Update.
3829 * ia64-linux-nat.c: Update.
3830 * inf-ptrace.c: Update.
3832 * linux-fork.c: Update.
3833 * linux-nat.c: Update.
3834 * linux-tdep.c: Update.
3835 * linux-thread-db.c: Update.
3836 * mips-linux-nat.c: Update.
3837 * nat/aarch64-linux-hw-point.c: Update.
3838 * nat/aarch64-linux.c: Update.
3839 * nat/linux-btrace.c: Update.
3840 * nat/linux-osdata.c: Update.
3841 * nat/linux-procfs.c: Update.
3842 * nat/x86-linux-dregs.c: Update.
3843 * obsd-nat.c: Update.
3844 * ppc-fbsd-nat.c: Update.
3845 * ppc-linux-nat.c: Update.
3847 * python/py-infthread.c: Update.
3848 * ravenscar-thread.c: Update.
3850 * s390-linux-nat.c: Update.
3851 * sol-thread.c: Update.
3852 * sol2-tdep.c: Update.
3853 * spu-linux-nat.c: Update.
3854 * x86-linux-nat.c: Update.
3855 * xtensa-linux-nat.c: Update.
3857 2018-07-03 Tom Tromey <tom@tromey.com>
3859 * common/ptid.c (ptid_get_pid): Remove.
3860 * common/ptid.h (ptid_get_pid): Don't declare.
3861 * aarch64-linux-nat.c: Update.
3862 * ada-lang.c: Update.
3863 * aix-thread.c: Update.
3864 * alpha-bsd-nat.c: Update.
3865 * amd64-fbsd-nat.c: Update.
3866 * amd64-linux-nat.c: Update.
3867 * arm-linux-nat.c: Update.
3868 * arm-nbsd-nat.c: Update.
3870 * break-catch-syscall.c: Update.
3871 * breakpoint.c: Update.
3872 * bsd-uthread.c: Update.
3873 * corelow.c: Update.
3875 * darwin-nat.c: Update.
3876 * fbsd-nat.c: Update.
3877 * fbsd-tdep.c: Update.
3879 * gnu-nat.c: Update.
3880 * hppa-nbsd-nat.c: Update.
3881 * hppa-obsd-nat.c: Update.
3882 * i386-fbsd-nat.c: Update.
3883 * ia64-linux-nat.c: Update.
3884 * inf-ptrace.c: Update.
3886 * inferior.c: Update.
3887 * inferior.h: Update.
3890 * linux-fork.c: Update.
3891 * linux-nat.c: Update.
3892 * linux-tdep.c: Update.
3893 * linux-thread-db.c: Update.
3894 * m68k-bsd-nat.c: Update.
3895 * mi/mi-interp.c: Update.
3896 * mi/mi-main.c: Update.
3897 * mips-linux-nat.c: Update.
3898 * mips-nbsd-nat.c: Update.
3899 * mips64-obsd-nat.c: Update.
3900 * nat/aarch64-linux-hw-point.c: Update.
3901 * nat/aarch64-linux.c: Update.
3902 * nat/linux-btrace.c: Update.
3903 * nat/linux-osdata.c: Update.
3904 * nat/linux-procfs.c: Update.
3905 * nat/x86-linux-dregs.c: Update.
3906 * nto-procfs.c: Update.
3907 * obsd-nat.c: Update.
3908 * ppc-linux-nat.c: Update.
3909 * ppc-nbsd-nat.c: Update.
3910 * ppc-obsd-nat.c: Update.
3911 * proc-service.c: Update.
3913 * python/py-inferior.c: Update.
3914 * python/py-infthread.c: Update.
3915 * ravenscar-thread.c: Update.
3917 * remote-sim.c: Update.
3919 * rs6000-nat.c: Update.
3920 * s390-linux-nat.c: Update.
3921 * sh-nbsd-nat.c: Update.
3922 * sol-thread.c: Update.
3923 * sparc-nat.c: Update.
3924 * sparc64-tdep.c: Update.
3925 * spu-linux-nat.c: Update.
3926 * spu-tdep.c: Update.
3927 * target-debug.h: Update.
3930 * tid-parse.c: Update.
3931 * tracefile-tfile.c: Update.
3932 * vax-bsd-nat.c: Update.
3933 * windows-nat.c: Update.
3934 * x86-linux-nat.c: Update.
3935 * x86-nat.c: Update.
3937 2018-07-03 Tom Tromey <tom@tromey.com>
3939 * common/ptid.c (pid_to_ptid): Remove.
3940 * common/ptid.h (pid_to_ptid): Don't declare.
3941 * aix-thread.c: Update.
3942 * arm-linux-nat.c: Update.
3943 * common/ptid.c: Update.
3944 * common/ptid.h: Update.
3945 * corelow.c: Update.
3947 * darwin-nat.c: Update.
3948 * fbsd-nat.c: Update.
3949 * fork-child.c: Update.
3950 * gnu-nat.c: Update.
3951 * go32-nat.c: Update.
3952 * inf-ptrace.c: Update.
3954 * inferior.c: Update.
3956 * linux-fork.c: Update.
3957 * linux-nat.c: Update.
3958 * nat/aarch64-linux-hw-point.c: Update.
3959 * nat/fork-inferior.c: Update.
3960 * nat/x86-linux-dregs.c: Update.
3961 * nto-procfs.c: Update.
3962 * obsd-nat.c: Update.
3964 * progspace.c: Update.
3966 * rs6000-nat.c: Update.
3967 * s390-linux-nat.c: Update.
3968 * sol-thread.c: Update.
3969 * spu-linux-nat.c: Update.
3972 * tracefile-tfile.c: Update.
3973 * windows-nat.c: Update.
3975 2018-07-03 Tom Tromey <tom@tromey.com>
3977 * common/ptid.h (ptid_build): Don't declare.
3978 * common/ptid.c (ptid_build): Remove.
3979 * aix-thread.c: Update.
3980 * bsd-kvm.c: Update.
3981 * bsd-uthread.c: Update.
3982 * common/agent.c: Update.
3983 * common/ptid.c: Update.
3984 * common/ptid.h: Update.
3985 * corelow.c: Update.
3986 * darwin-nat.c: Update.
3987 * fbsd-nat.c: Update.
3988 * gnu-nat.c: Update.
3989 * linux-fork.c: Update.
3990 * linux-nat.c: Update.
3991 * linux-thread-db.c: Update.
3992 * nat/linux-osdata.c: Update.
3993 * nat/linux-procfs.c: Update.
3994 * nto-procfs.c: Update.
3995 * obsd-nat.c: Update.
3996 * proc-service.c: Update.
3998 * ravenscar-thread.c: Update.
3999 * remote-sim.c: Update.
4001 * sol-thread.c: Update.
4003 * windows-nat.c: Update.
4005 2018-07-03 Tom Tromey <tom@tromey.com>
4007 * infrun.c (follow_exec): Use exit_inferior_silent.
4008 * inferior.c (exit_inferior_num_silent): Remove.
4009 * inferior.h (exit_inferior_num_silent): Don't declare.
4011 2018-07-03 Tom Tromey <tom@tromey.com>
4014 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4015 inferior_ptid on error.
4017 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4018 Simon Marchi <simon.marchi@polymtl.ca>
4021 * disasm.h (gdb_disassembler): Add
4022 `m_disassembler_options_holder'. member
4023 * disasm.c (get_all_disassembler_options): New function.
4024 (gdb_disassembler::gdb_disassembler): Use it.
4025 (gdb_buffered_insn_length_init_dis): Likewise.
4026 (gdb_buffered_insn_length): Adjust accordingly.
4027 (set_disassembler_options): Handle options with arguments.
4028 (show_disassembler_options_sfunc): Likewise. Add a leading new
4029 line if showing options with descriptions.
4030 (disassembler_options_completer): Adapt to using the
4031 `disasm_options_and_args_t' structure.
4032 * mips-tdep.c (mips_disassembler_options): New variable.
4033 (mips_disassembler_options_o32): Likewise.
4034 (mips_disassembler_options_n32): Likewise.
4035 (mips_disassembler_options_n64): Likewise.
4036 (gdb_print_insn_mips): Don't set `disassembler_options'.
4037 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4039 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4040 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4041 `gdbarch_disassembler_options_implicit' and
4042 `gdbarch_valid_disassembler_options'.
4043 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4044 `disasm_options_and_args_t' structure.
4045 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4047 (valid_disassembler_options): Switch from `disasm_options_t' to
4048 the `disasm_options_and_args_t' structure.
4049 * NEWS: Document `set disassembler-options' support for the MIPS
4051 * gdbarch.h: Regenerate.
4052 * gdbarch.c: Regenerate.
4054 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4056 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4058 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4060 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4061 parameter in call to amd64_target_description.
4062 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4063 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4064 (amd64fbsd_init_abi): Likewise.
4065 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4066 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4067 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4068 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4070 2018-06-29 Pedro Alves <palves@redhat.com>
4072 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4073 "segments" parameter.
4074 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4075 (_initialize_amd64_tdep): Update call to
4076 amd64_create_target_description.
4077 (amd64_target_description): Add "segments" parameter. Adjust
4078 the implementation to use it.
4079 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4080 call to amd64_create_target_description.
4081 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4082 * gdb/arch/amd64.h (amd64_create_target_description): Add
4083 "segments" register.
4084 * gdb/arch/amd64.c (amd64_create_target_description): Add
4085 "segments" parameter. Call create_feature_i386_64bit_segments
4086 only if SEGMENTS is true.
4087 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4088 call to amd64_create_target_description.
4090 2018-06-29 Pedro Alves <palves@redhat.com>
4092 * thread.c (thread_target_id_str): New, factored out from ...
4093 (print_thread_info_1): ... here. Use it to compute the max
4094 "Target Id" column width.
4096 2018-06-29 Pedro Alves <palves@redhat.com>
4098 * remote.c (remote_target::extra_thread_info): Delete
4099 'display_buf' and 'n' locals. from the cache, regardless of
4100 packet mechanims is in use. Use cache for qThreadExtra and qP
4103 2018-06-29 Pedro Alves <palves@redhat.com>
4105 * blockframe.c (find_pc_sect_containing_function): New function.
4106 * breakpoint.c (print_breakpoint_location): Don't call
4107 find_pc_sect_function.
4108 * linespec.c (create_sals_line_offset): Record the location's
4110 * linespec.c (convert_address_location_to_sals): Fill in sal's
4111 symbol with find_pc_sect_containing_function.
4112 * symtab.c (find_function_start_sal): Rename to ...
4113 (find_function_start_sal_1): ... this.
4114 (find_function_start_sal): Reimplement as wrapper around
4115 find_function_start_sal_1, and use
4116 find_pc_sect_containing_function to fill in the sal's symbol.
4117 (find_function_start_sal(symbol*, bool)): Adjust.
4118 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4120 (find_pc_sect_containing_function): Declare.
4122 2018-06-29 Pedro Alves <palves@redhat.com>
4124 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4125 true if the the location has no symbol.
4127 2018-06-28 Tom Tromey <tom@tromey.com>
4129 * NEWS: Mention --enable-codesign.
4130 * silent-rules.mk (ECHO_SIGN): New variable.
4131 * configure.ac: Add --enable-codesign.
4132 * configure: Rebuild.
4133 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4134 (gdb$(EXEEXT)): Optionally invoke codesign.
4136 2018-06-28 Pedro Alves <palves@redhat.com>
4138 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4140 (switch_to_thread_no_regs): Adjust comment.
4141 * infcmd.c (stop_pc): Delete.
4142 (post_create_inferior, info_program_command): Replace references
4143 to stop_pc with references to thread_info->suspend.stop_pc.
4144 * inferior.h (stop_pc): Delete declaration.
4145 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4146 (handle_inferior_event_1, handle_signal_stop)
4147 (process_event_stop_test, keep_going_stepped_thread)
4148 (handle_step_into_function, handle_step_into_function_backward)
4149 (print_stop_location): Replace references to stop_pc with
4150 references to thread_info->suspend.stop_pc.
4151 (struct infcall_suspend_state) <stop_pc>: Delete field.
4152 (save_infcall_suspend_state, restore_infcall_suspend_state):
4153 Remove references to inf_stat->stop_pc.
4154 * linux-fork.c (fork_load_infrun_state): Likewise.
4155 * record-btrace.c (record_btrace_set_replay): Likewise.
4156 * record-full.c (record_full_goto_entry): Likewise.
4157 * remote.c (print_one_stopped_thread): Likewise.
4158 * target.c (target_resume): Extend comment.
4159 * thread.c (set_executing_thread): New.
4160 (set_executing): Use it.
4161 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4162 Remove references to stop_pc.
4164 2018-06-28 Pedro Alves <palves@redhat.com>
4166 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4167 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4169 2018-06-28 Tom Tromey <tom@tromey.com>
4171 * coffread.c (coff_symfile_finish): Update.
4172 * xcoffread.c (xcoff_symfile_finish): Update.
4173 * elfread.c (elf_symfile_finish): Update.
4174 * symfile.h (dwarf2_free_objfile): Don't declare.
4175 * dwarf2read.c (_initialize_dwarf2_read): Use
4176 register_objfile_data_with_cleanup.
4177 (dwarf2_free_objfile): Now static. Change signature.
4179 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4181 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4182 option "-o" to add-symbol-file-load to add an offset to each
4183 section's load address.
4184 * symfile.c (set_objfile_default_section_offset): New function.
4186 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4188 * symfile.c (add_symbol_file_command): Make sure that sections
4189 with the same name are sorted in the same order.
4191 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4193 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4194 require the second argument. If omitted, load sections at the
4195 addresses specified in the file.
4197 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4199 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4200 (_initialize_symfile): Add option "-o" to symbol-file to add an
4201 offset to each section of the symbol file.
4203 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4205 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4207 2018-06-27 Tom Tromey <tom@tromey.com>
4209 * stack.c (_initialize_stack): Update "func" help text.
4211 2018-06-27 Tom Tromey <tom@tromey.com>
4213 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4215 (unwind_infopy_str, pyuw_create_unwind_info)
4216 (unwind_infopy_add_saved_register, pyuw_sniffer)
4217 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4219 (struct saved_reg): Add constructor.
4220 <value>: Now a gdbpy_ref<>.
4222 2018-06-27 Tom Tromey <tom@tromey.com>
4224 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4226 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4228 * gdb-gdb.py.in: Format using autopep8.
4230 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4232 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4233 (type_lookup_function): Recognize CORE_ADDR values.
4235 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4237 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4240 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4242 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4245 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4247 * gdb-gdb.py: Move to...
4248 * gdb-gdb.py.in: ... here.
4249 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4250 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4252 (distclean): Remove gdb-gdb.py when cleaning.
4253 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4254 * configure: Re-generate.
4256 2018-06-27 Pedro Alves <palves@redhat.com>
4258 * proc-service.c (get_ps_regcache): New.
4259 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4260 (ps_lsetfpregs): Use it.
4262 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
4265 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4266 (dwarf_decode_lines_1): Adjust.
4268 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
4270 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4272 <info_proc>: Likewise.
4274 2018-06-26 Joel Brobecker <brobecker@adacore.com>
4276 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4277 to windows_fetch_one_register, and only handle the case of
4278 fetching one register. Move the code that reloads the context
4279 and iterates over all registers if R is negative to...
4280 (windows_nat_target::fetch_registers): ... here.
4281 (do_windows_store_inferior_registers): Rename to
4282 windows_store_one_register, and only handle the case of storing
4283 one register. Move the code that handles the case where r is
4285 (windows_nat_target::store_registers) ... here.
4287 2018-06-26 Tom Tromey <tom@tromey.com>
4290 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4291 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4293 (rust_internal_print_type): Add podata parameter.
4294 (rust_print_type): Update.
4296 2018-06-26 Tom Tromey <tom@tromey.com>
4298 * typeprint.h (struct print_offset_data) <update, finish,
4299 maybe_print_hole>: New methods.
4300 <indentation>: New constant.
4301 * typeprint.c (print_offset_data::indentation): Define.
4302 (print_offset_data::maybe_print_hole, print_offset_data::update)
4303 (print_offset_data::finish): Move from c-typeprint.c and rename.
4304 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4305 (print_spaces_filtered_with_print_options): Update.
4306 (c_print_type_union_field_offset, maybe_print_hole)
4307 (c_print_type_struct_field_offset): Move to typeprint.c and
4309 (c_type_print_base_struct_union): Update.
4311 2018-06-25 Pedro Alves <palves@redhat.com>
4313 * gdbthread.h (thread_info_ref, delete_thread)
4314 (delete_thread_silent, first_thread_of_inferior)
4315 (any_thread_of_inferior, switch_to_thread)
4316 (enable_thread_stack_temporaries)
4317 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4318 (get_last_thread_stack_temporary)
4319 (value_in_thread_stack_temporaries, can_access_registers_thread):
4320 Spell out "struct thread_info" instead of just "thread_info".
4321 * inferior.h (notice_new_inferior): Likewise.
4323 2018-06-25 Pedro Alves <palves@redhat.com>
4325 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4326 pass thread_info pointer to delete_thread.
4327 (windows_nat_target::detach): Pass inferior pointer to
4329 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4331 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4332 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4333 and pass a thread_info pointer to delete_thread.
4334 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4335 pass thread_info pointer to delete_thread.
4336 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4337 delete_thread_silent call.
4338 * procfs.c (procfs_target::detach): Pass inferior pointer to
4340 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4341 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4342 delete_thread_silent call.
4343 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4344 pass thread_info pointer to delete_thread.
4345 (windows_nat_target::detach): Pass inferior pointer to
4348 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4350 * regcache.c (readable_regcache::read_part): Fix asserts.
4351 (reg_buffer::raw_collect_part): New function.
4352 (regcache::write_part): Fix asserts.
4353 (reg_buffer::raw_supply_part): New function.
4354 (regcache::transfer_regset_register): New helper function.
4355 (regcache::transfer_regset): Call new functions.
4356 (regcache_supply_regset): Use gdb_byte*.
4357 (regcache::supply_regset): Likewise.
4358 (regcache_collect_regset): Likewise.
4359 (regcache::collect_regset): Likewise.
4360 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4361 (reg_buffer::raw_supply_part): Likewise.
4362 (regcache::transfer_regset_register): Likewise.
4363 (regcache::transfer_regset): Use gdb_byte*.
4365 2018-06-22 Alan Hayward <alan.hayward@arm.com>
4367 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4369 2018-06-21 Pedro Alves <palves@redhat.com>
4371 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4372 instead of a ptid_t. All callers adjusted.
4373 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4375 (print_ada_task_info, display_current_task_id, task_command_1):
4377 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4379 (breakpoint_kind): Adjust.
4380 (remove_breakpoints_pid): Rename to ...
4381 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4382 pointer. All callers adjusted.
4383 (bpstat_clear_actions): Use inferior_thread.
4384 (get_bpstat_thread): New.
4385 (bpstat_do_actions): Use it.
4386 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4387 to take a thread_info pointer. All callers adjusted.
4388 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4389 (breakpoint_re_set_thread): Use inferior_thread.
4390 * breakpoint.h (struct inferior): Forward declare.
4391 (bpstat_stop_status): Update.
4392 (remove_breakpoints_pid): Delete.
4393 (remove_breakpoints_inf): New.
4394 * bsd-uthread.c (bsd_uthread_target::wait)
4395 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4396 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4397 (maint_btrace_packet_history_cmd)
4398 (maint_btrace_clear_packet_history_cmd): Adjust.
4399 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4401 * cli/cli-interp.c: Include "inferior.h".
4402 * common/refcounted-object.h (struct
4403 refcounted_object_ref_policy): New.
4404 * compile/compile-object-load.c: Include gdbthread.h.
4405 (store_regs): Use inferior_thread.
4406 * corelow.c (core_target::close): Use current_inferior.
4407 (core_target_open): Adjust to use first_thread_of_inferior and use
4408 the current inferior.
4409 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4410 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4411 <thread>: ... this new field. All references adjusted.
4412 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4413 Take a thread_info pointer instead of a ptid_t.
4414 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4415 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4416 thread_info pointer instead of a ptid_t.
4417 * elfread.c: Include "inferior.h".
4418 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4419 Use inferior_thread.
4420 * eval.c (evaluate_subexp): Likewise.
4421 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4423 * gdb_proc_service.h (struct thread_info): Forward declare.
4424 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4425 <thread>: ... this new field. All references adjusted.
4426 * gdbarch.h, gdbarch.c: Regenerate.
4427 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4428 'thread' parameter. All implementations and callers adjusted.
4429 * gdbthread.h (thread_info) <set_running>: New method.
4430 (delete_thread, delete_thread_silent): Take a thread_info pointer
4432 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4433 (first_thread_of_process): Delete, replaced by ...
4434 (first_thread_of_inferior): ... this new function. All callers
4436 (any_live_thread_of_process): Delete, replaced by ...
4437 (any_live_thread_of_inferior): ... this new function. All callers
4439 (switch_to_thread, switch_to_no_thread): Declare.
4440 (is_executing): Delete.
4441 (enable_thread_stack_temporaries): Update comment.
4442 <enable_thread_stack_temporaries>: Take a thread_info pointer
4443 instead of a ptid_t. Incref the thread.
4444 <~enable_thread_stack_temporaries>: Decref the thread.
4447 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4448 (get_last_thread_stack_temporary)
4449 (value_in_thread_stack_temporaries, can_access_registers_thread):
4450 Take a thread_info pointer instead of a ptid_t. All callers
4452 * infcall.c (get_call_return_value): Use inferior_thread.
4453 (run_inferior_call): Work with thread pointers instead of ptid_t.
4454 (call_function_by_hand_dummy): Work with thread pointers instead
4455 of ptid_t. Use thread_info_ref.
4456 * infcmd.c (proceed_thread_callback): Access thread's state
4458 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4459 access thread's state directly.
4460 (continue_command): Use inferior_thread.
4461 (info_program_command): Use find_thread_ptid and access thread
4463 (proceed_after_attach_callback): Use thread state directly.
4464 (notice_new_inferior): Take a thread_info pointer instead of a
4465 ptid_t. All callers adjusted.
4466 (exit_inferior): Take an inferior pointer instead of a pid. All
4468 (exit_inferior_silent): New.
4469 (detach_inferior): Delete.
4470 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4471 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4472 (detach_inferior_command, kill_inferior_command): Use
4473 find_inferior_id instead of valid_gdb_inferior_id and
4474 gdb_inferior_id_to_pid.
4475 (inferior_command): Use inferior and thread pointers.
4476 * inferior.h (struct thread_info): Forward declare.
4477 (notice_new_inferior): Take a thread_info pointer instead of a
4478 ptid_t. All callers adjusted.
4479 (detach_inferior): Delete declaration.
4480 (exit_inferior, exit_inferior_silent): Take an inferior pointer
4481 instead of a pid. All callers adjusted.
4482 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4483 (valid_gdb_inferior_id): Delete.
4484 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4485 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4486 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4488 <inf>: ... this new field.
4489 <step_ptid>: Delete, replaced by ...
4490 <step_thread>: ... this new field.
4491 (get_displaced_stepping_state): Take an inferior pointer instead
4492 of a pid. All callers adjusted.
4493 (displaced_step_in_progress_any_inferior): Adjust.
4494 (displaced_step_in_progress_thread): Take a thread pointer instead
4495 of a ptid_t. All callers adjusted.
4496 (displaced_step_in_progress, add_displaced_stepping_state): Take
4497 an inferior pointer instead of a pid. All callers adjusted.
4498 (get_displaced_step_closure_by_addr): Adjust.
4499 (remove_displaced_stepping_state): Take an inferior pointer
4500 instead of a pid. All callers adjusted.
4501 (displaced_step_prepare_throw, displaced_step_prepare)
4502 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4503 All callers adjusted.
4504 (start_step_over): Adjust.
4505 (infrun_thread_ptid_changed): Remove bit updating ptids in the
4506 displaced step queue.
4507 (do_target_resume): Adjust.
4508 (fetch_inferior_event): Use inferior_thread.
4509 (context_switch, get_inferior_stop_soon): Take an
4510 execution_control_state pointer instead of a ptid_t. All callers
4512 (switch_to_thread_cleanup): Delete.
4513 (stop_all_threads): Use scoped_restore_current_thread.
4514 * inline-frame.c: Include "gdbthread.h".
4515 (inline_state) <inline_state>: Take a thread pointer instead of a
4516 ptid_t. All callers adjusted.
4517 <ptid>: Delete, replaced by ...
4518 <thread>: ... this new field.
4519 (find_inline_frame_state): Take a thread pointer instead of a
4520 ptid_t. All callers adjusted.
4521 (skip_inline_frames, step_into_inline_frame)
4522 (inline_skipped_frames, inline_skipped_symbol): Take a thread
4523 pointer instead of a ptid_t. All callers adjusted.
4524 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4525 (inline_skipped_frames, inline_skipped_symbol): Likewise.
4526 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4528 * linux-nat.c (get_detach_signal): Likewise.
4529 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4530 (thread_db_notice_clone): Adjust.
4531 (thread_db_find_new_threads_silently)
4532 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4533 a thread pointer instead of a ptid_t. All callers adjusted.
4534 * mi/mi-cmd-var.c: Include "inferior.h".
4535 (mi_cmd_var_update_iter): Update to use thread pointers.
4536 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4538 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4540 (mi_output_running): ... this new function.
4541 (mi_on_resume_1): Adjust to use it.
4542 (mi_user_selected_context_changed): Adjust to use inferior_thread.
4543 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4545 (interrupt_thread_callback): : Adjust to use thread and inferior
4547 * proc-service.c: Include "gdbthread.h".
4548 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4549 * progspace-and-thread.c: Include "inferior.h".
4550 * progspace.c: Include "inferior.h".
4551 * python/py-exitedevent.c (create_exited_event_object): Adjust to
4552 hold a reference to an inferior_object.
4553 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4555 * python/py-inferior.c (struct inferior_object): Give the type a
4556 tag name instead of a typedef.
4557 (python_on_normal_stop): No need to check if the current thread is
4559 (inferior_to_inferior_object): Change return type to
4560 inferior_object. All callers adjusted.
4561 (find_thread_object): Delete, bits factored out to ...
4562 (thread_to_thread_object): ... this new function.
4563 * python/py-infthread.c (create_thread_object): Use
4564 inferior_to_inferior_object.
4565 (thpy_is_stopped): Use thread pointer directly.
4566 (gdbpy_selected_thread): Use inferior_thread.
4567 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4568 field, replaced with ...
4569 <thread>: ... this new field. All users adjusted.
4570 (btpy_insn_or_gap_new): Drop const.
4571 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
4573 * python/py-record.c: Include "gdbthread.h".
4574 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4575 a ptid_t. All callers adjusted.
4576 (gdbpy_current_recording): Use inferior_thread.
4577 * python/py-record.h (recpy_record_object) <ptid>: Delete
4578 field, replaced with ...
4579 <thread>: ... this new field. All users adjusted.
4580 (recpy_element_object) <ptid>: Delete
4581 field, replaced with ...
4582 <thread>: ... this new field. All users adjusted.
4583 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4584 a ptid_t. All callers adjusted.
4585 * python/py-threadevent.c: Include "gdbthread.h".
4586 (get_event_thread): Use thread_to_thread_object.
4587 * python/python-internal.h (struct inferior_object): Forward
4589 (find_thread_object, find_inferior_object): Delete declarations.
4590 (thread_to_thread_object, inferior_to_inferior_object): New
4592 * record-btrace.c: Include "inferior.h".
4593 (require_btrace_thread): Use inferior_thread.
4594 (record_btrace_frame_sniffer)
4595 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4596 (get_thread_current_frame): Use scoped_restore_current_thread and
4598 (get_thread_current_frame): Use thread pointer directly.
4599 (record_btrace_replay_at_breakpoint): Use thread's inferior
4601 * record-full.c: Include "inferior.h".
4602 * regcache.c: Include "gdbthread.h".
4603 (get_thread_arch_regcache): Use the inferior's address space
4605 (get_thread_regcache, registers_changed_thread): New.
4606 * regcache.h (get_thread_regcache(thread_info *thread)): New
4608 (registers_changed_thread): New.
4609 (remote_target) <remote_detach_1>: Swap order of parameters.
4610 (remote_add_thread): <remote_add_thread>: Return the new thread.
4611 (get_remote_thread_info(ptid_t)): New overload.
4612 (remote_target::remote_notice_new_inferior): Use thread pointers
4614 (remote_target::process_initial_stop_replies): Use
4615 thread_info::set_running.
4616 (remote_target::remote_detach_1, remote_target::detach)
4617 (extended_remote_target::detach): Adjust.
4618 * stack.c (frame_show_address): Use inferior_thread.
4619 * target-debug.h (target_debug_print_thread_info_pp): New.
4620 * target-delegates.c: Regenerate.
4621 * target.c (default_thread_address_space): Delete.
4622 (memory_xfer_partial_1): Use current_inferior.
4623 (target_detach): Use current_inferior.
4624 (target_thread_address_space): Delete.
4625 (generic_mourn_inferior): Use current_inferior.
4626 * target.h (struct target_ops) <thread_address_space>: Delete.
4627 (target_thread_address_space): Delete.
4628 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4630 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4631 thread pointer instead of a ptid_t. Adjust all callers.
4632 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4633 (first_thread_of_process): Delete, replaced by ...
4634 (first_thread_of_inferior): ... this new function. All callers
4636 (any_thread_of_process): Rename to ...
4637 (any_thread_of_inferior): ... this, and take an inferior pointer.
4638 (any_live_thread_of_process): Rename to ...
4639 (any_live_thread_of_inferior): ... this, and take an inferior
4641 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4642 (value_in_thread_stack_temporaries)
4643 (get_last_thread_stack_temporary): Take a thread pointer instead
4644 of a ptid_t. Adjust all callers.
4645 (thread_info::set_running): New.
4646 (validate_registers_access): Use inferior_thread.
4647 (can_access_registers_ptid): Rename to ...
4648 (can_access_registers_thread): ... this, and take a thread
4650 (print_thread_info_1): Adjust to compare thread pointers instead
4652 (switch_to_no_thread, switch_to_thread): Make extern.
4653 (scoped_restore_current_thread::~scoped_restore_current_thread):
4654 Use m_thread pointer directly.
4655 (scoped_restore_current_thread::scoped_restore_current_thread):
4656 Use inferior_thread.
4657 (thread_command): Use thread pointer directly.
4658 (thread_num_make_value_helper): Use inferior_thread.
4659 * top.c (execute_command): Use inferior_thread.
4660 * tui/tui-interp.c: Include "inferior.h".
4661 * varobj.c (varobj_create): Use inferior_thread.
4662 (value_of_root_1): Use find_thread_global_id instead of
4663 global_thread_id_to_ptid.
4665 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4667 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4669 (regcache::write_part): Likewise.
4670 (readable_regcache::cooked_read_part): Update comment.
4671 (readable_regcache::cooked_write_part): Likewise.
4672 * regcache.h: (readable_regcache::read_part): Likewise.
4673 (regcache::write_part): Likewise.
4675 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4676 Dirk Schubert <dirk.schubert@arm.com>
4678 * aarch64-linux-nat.c (post_attach): New.
4679 (aarch64_linux_nat_target::post_attach): Override post_attach to
4680 record the number of hardware debug registers.
4682 2018-06-20 Tom Tromey <tom@tromey.com>
4684 * python/py-param.c (add_setshow_generic): Make parameters const.
4685 (parmpy_init): Update.
4687 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4689 * regcache.h (regcache_cooked_read_ftype): Rename to...
4690 (register_read_ftype): ...this, change type to function_view.
4691 (class reg_buffer) <save>: Remove src parameter.
4692 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4693 parameter non-const in first overload. Remove src parameter in
4695 * regcache.c (do_cooked_read): Remove.
4696 (readonly_detached_regcache::readonly_detached_regcache): Make
4697 parameter non-const, adjust call to other constructor.
4698 (reg_buffer::save): Remove src parameter.
4699 * frame.c (do_frame_register_read): Remove.
4700 (frame_save_as_regcache): Use lambda function.
4701 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4702 parameter to ppu2spu_data *.
4703 (ppu2spu_sniffer): Use lambda function.
4705 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4707 * record-full.c (record_full_target::insert_breakpoint): Remove
4708 "struct" keyword, add const.
4710 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4712 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4713 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4714 * configure.ac: Remove AC_PREREQ, add missing quoting.
4715 * gnulib/configure.ac: Modernize usage of
4716 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4717 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4718 (AUTOMAKE_VERSION): Bump to 1.15.1.
4719 * configure: Re-generate.
4720 * config.in: Re-generate.
4721 * aclocal.m4: Re-generate.
4722 * gnulib/aclocal.m4: Re-generate.
4723 * gnulib/config.in: Re-generate.
4724 * gnulib/configure: Re-generate.
4725 * gnulib/import/Makefile.in: Re-generate.
4727 2018-06-19 Pedro Alves <palves@redhat.com>
4729 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4730 (lookup_minimal_symbol_by_pc_section): ... here with
4731 gdb_assert_not_reached added.
4733 2018-06-19 Pedro Alves <palves@redhat.com>
4735 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4736 parameter with a block parameter. Compare location's block symbol
4737 with the frame's block instead of addresses.
4738 (skip_inline_frames): Pass the current block instead of the
4739 frame's address. Break out as soon as we determine the frame
4740 should not be skipped.
4742 2018-06-18 Tom Tromey <tom@tromey.com>
4744 * solib-aix.c (solib_aix_get_section_offsets): Return
4746 (solib_aix_solib_create_inferior_hook): Update.
4748 2018-06-18 Tom Tromey <tom@tromey.com>
4750 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4752 2018-06-18 Tom Tromey <tom@tromey.com>
4754 * solib-frv.c (frv_relocate_main_executable): Use
4756 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4759 2018-06-18 Tom Tromey <tom@tromey.com>
4761 * objfiles.h (inhibit_section_map_updates): Update.
4762 (resume_section_map_updates, resume_section_map_updates_cleanup):
4764 * solib-svr4.c (svr4_handle_solib_event): Update.
4765 * objfiles.c (inhibit_section_map_updates): Return
4766 scoped_restore_tmpl<int>.
4767 (resume_section_map_updates, resume_section_map_updates_cleanup):
4770 2018-06-18 Tom Tromey <tom@tromey.com>
4772 * valprint.h (read_string): Update.
4773 * valprint.c (read_string): Change type of "buffer".
4774 (val_print_string): Update.
4775 * python/py-value.c (valpy_string): Update.
4776 * language.h (struct language_defn) <la_get_string>: Change
4778 (default_get_string, c_get_string): Update.
4779 * language.c (default_get_string): Change type of "buffer".
4780 * guile/scm-value.c (gdbscm_value_to_string): Update.
4781 * c-lang.c (c_get_string): Change type of "buffer".
4783 2018-06-18 Tom Tromey <tom@tromey.com>
4785 * ser-mingw.c (struct pipe_state_destroyer): New.
4786 (pipe_state_up): New typedef.
4787 (cleanup_pipe_state): Remove.
4788 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4790 2018-06-18 Tom Tromey <tom@tromey.com>
4792 * rust-lang.h (rust_yyerror): Don't declare.
4793 * rust-lang.c (rust_language_defn): Update.
4794 * rust-exp.y (yyerror): Now static.
4795 * parse.c (parse_exp_in_context_1): Update.
4796 * p-lang.h (p_yyerror): Don't declare.
4797 * p-lang.c (p_language_defn): Update.
4798 * p-exp.y (yyerror): Now static.
4799 * opencl-lang.c (opencl_language_defn): Update.
4800 * objc-lang.c (objc_language_defn): Update.
4801 * m2-lang.h (m2_yyerror): Don't declare.
4802 * m2-lang.c (m2_language_defn): Update.
4803 * m2-exp.y (yyerror): Now static.
4804 * language.h (struct language_defn) <la_error>: Remove.
4805 * language.c (unk_lang_error): Remove.
4806 (unknown_language_defn, auto_language_defn): Remove.
4807 * go-lang.h (go_yyerror): Don't declare.
4808 * go-lang.c (go_language_defn): Update.
4809 * go-exp.y (yyerror): Now static.
4810 * f-lang.h (f_yyerror): Don't declare.
4811 * f-lang.c (f_language_defn): Update.
4812 * f-exp.y (yyerror): Now static.
4813 * d-lang.h (d_yyerror): Don't declare.
4814 * d-lang.c (d_language_defn): Update.
4815 * d-exp.y (yyerror): Now static.
4816 * c-lang.h (c_yyerror): Don't declare.
4817 * c-lang.c (c_language_defn, cplus_language_defn)
4818 (asm_language_defn, minimal_language_defn): Update.
4819 * c-exp.y (yyerror): Now static.
4820 * ada-lang.h (ada_yyerror): Don't declare.
4821 * ada-lang.c (ada_language_defn): Update.
4822 * ada-exp.y (yyerror): Now static.
4824 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4826 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4827 (store_sveregs_to_thread): Likewise.
4828 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4829 (aarch64_linux_store_inferior_registers): Likewise.
4830 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4832 (aarch64_sve_regs_copy_to_regcache): Likewise.
4833 (aarch64_sve_regs_copy_from_regcache): Likewise.
4834 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4836 (aarch64_sve_regs_copy_to_regcache): Likewise.
4837 (aarch64_sve_regs_copy_from_regcache): Likewise.
4838 (sve_context): Structure from Linux headers.
4839 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4840 (SVE_SIG_ZREG_SIZE): Likewise.
4841 (SVE_SIG_PREG_SIZE): Likewise.
4842 (SVE_SIG_FFR_SIZE): Likewise.
4843 (SVE_SIG_REGS_OFFSET): Likewise.
4844 (SVE_SIG_ZREGS_OFFSET): Likewise.
4845 (SVE_SIG_ZREG_OFFSET): Likewise.
4846 (SVE_SIG_ZREGS_SIZE): Likewise.
4847 (SVE_SIG_PREGS_OFFSET): Likewise.
4848 (SVE_SIG_PREG_OFFSET): Likewise.
4849 (SVE_SIG_PREGS_SIZE): Likewise.
4850 (SVE_SIG_FFR_OFFSET): Likewise.
4851 (SVE_SIG_REGS_SIZE): Likewise.
4852 (SVE_SIG_CONTEXT_SIZE): Likewise.
4853 (SVE_PT_REGS_MASK): Likewise.
4854 (SVE_PT_REGS_FPSIMD): Likewise.
4855 (SVE_PT_REGS_SVE): Likewise.
4856 (SVE_PT_VL_INHERIT): Likewise.
4857 (SVE_PT_VL_ONEXEC): Likewise.
4858 (SVE_PT_REGS_OFFSET): Likewise.
4859 (SVE_PT_FPSIMD_OFFSET): Likewise.
4860 (SVE_PT_FPSIMD_SIZE): Likewise.
4861 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4862 (SVE_PT_SVE_PREG_SIZE): Likewise.
4863 (SVE_PT_SVE_FFR_SIZE): Likewise.
4864 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4865 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4866 (__SVE_SIG_TO_PT): Likewise.
4867 (SVE_PT_SVE_OFFSET): Likewise.
4868 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4869 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4870 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4871 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4872 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4873 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4874 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4875 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4876 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4877 (SVE_PT_SVE_SIZE): Likewise.
4878 (SVE_PT_SIZE): Likewise.
4879 (HAS_SVE_STATE): New define.
4881 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4883 * nat/aarch64-sve-linux-sigcontext.h: New file.
4884 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4886 (SVE_VQ_MIN): Likewise.
4887 (SVE_VQ_MAX): Likewise.
4888 (SVE_VL_MIN): Likewise.
4889 (SVE_VL_MAX): Likewise.
4890 (SVE_NUM_ZREGS): Likewise.
4891 (SVE_NUM_PREGS): Likewise.
4892 (sve_vl_valid): Likewise.
4893 (struct user_sve_header): Likewise.
4895 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4896 Richard Bunt <Richard.Bunt@arm.com>
4898 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4899 was requested by GDB.
4901 2018-06-15 Tom de Vries <tdevries@suse.de>
4903 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4905 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4907 * gnulib/update-gnulib.sh: Print expected versions of
4910 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4912 * arch-utils.c (default_type_align): Use type_length_units.
4913 * gdbtypes.c (type_align): Use type_length_units.
4915 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4917 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4918 of 'define' command.
4920 2018-06-14 Tom de Vries <tdevries@suse.de>
4923 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4924 get_no_prettyformat_print_options.
4926 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4928 * sparc-nat.h: Include target.h.
4929 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4930 <fetch_registers>: Remove this argument in function call.
4931 <store_registers>: Remove this argument in function call, remove
4933 <low_forget_process>: Call sparc64_forget_process instead of
4934 sparc_forget_process.
4936 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4938 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4939 (procfs_target::make_corefile_notes): Adjust to new
4940 target_read_alloc return type.
4942 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4943 Stephen Roberts <stephen.roberts@arm.com>
4946 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4947 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4948 Move should_notify_stop local into more inner scope.
4950 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4951 Stephen Roberts <stephen.roberts@arm.com>
4954 * infrun.c (resume_1): Add call to mark_async_event_handler.
4956 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4958 * infrun.c (do_target_wait): Change old version of $pc printed.
4960 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4962 * dwarf2read.c (read_index_from_section): Rename to...
4963 (read_gdb_index_from_section): ... this, update all callers.
4964 (dwarf2_read_index): Rename to...
4965 (dwarf2_read_gdb_index): ... this, update all callers.
4967 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4969 * gdb/hppa-linux-nat.c
4970 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4971 hppa_linux_nat_target::fetch_registers.
4973 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4975 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4976 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4977 (AARCH64_DWARF_SVE_FFR): Likewise.
4978 (AARCH64_DWARF_SVE_P0): Likewise.
4979 (AARCH64_DWARF_SVE_Z0): Likewise.
4981 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4983 * common/common-regcache.h (raw_compare): New function.
4984 * regcache.c (regcache::raw_compare): Likewise.
4985 * regcache.h (regcache::raw_compare): New declaration.
4987 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4989 * common/common-regcache.h (reg_buffer_common): New structure.
4990 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4991 (reg_buffer::raw_supply): Likewise.
4992 (reg_buffer::raw_supply_integer): Likewise.
4993 (reg_buffer::raw_supply_zeroed): Likewise.
4994 (reg_buffer::raw_collect): Likewise.
4995 (reg_buffer::raw_collect_integer): Likewise.
4996 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4997 (reg_buffer::raw_supply): Likewise.
4998 (reg_buffer::raw_supply_integer): Likewise.
4999 (reg_buffer::raw_supply_zeroed): Likewise.
5000 (reg_buffer::raw_collect): Likewise.
5001 (reg_buffer::raw_collect_integer): Likewise.
5003 2018-06-10 Tom Tromey <tom@tromey.com>
5005 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5006 (class remote_state) <stop_reply_queue>: Now std::vector.
5007 (remote_state::~remote_state)
5008 (remote_target::stop_reply_queue_length): Update.
5009 (struct queue_iter_param, remove_child_of_pending_fork)
5010 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5011 (check_pending_event_prevents_wildcard_vcont_callback)
5012 (remove_stop_reply_for_inferior)
5013 (remove_stop_reply_of_remote_state)
5014 (remote_notif_remove_once_on_match)
5015 (stop_reply_match_ptid_and_ws)
5016 (remote_kill_child_of_pending_fork): Remove.
5017 (remote_target::remove_new_fork_children)
5018 (remote_target::check_pending_events_prevent_wildcard_vcont)
5019 (remote_target::discard_pending_stop_replies)
5020 (remote_target::discard_pending_stop_replies_in_queue)
5021 (remote_target::remote_notif_remove_queued_reply)
5022 (remote_target::queued_stop_reply)
5023 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5024 (remote_target::wait, remote_target::kill_new_fork_children)
5025 (remote_target::async): Update.
5027 2018-06-10 Tom Tromey <tom@tromey.com>
5029 * record-full.c (record_full_arch_list_cleanups): Remove.
5030 (record_full_message): Use try/catch.
5031 (record_full_wait_cleanups): Remove.
5032 (record_full_wait_1): Use try/catch.
5033 (record_full_restore): Likewise.
5035 2018-06-10 Tom Tromey <tom@tromey.com>
5037 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5038 declare VEC. Add constructor.
5039 <in_target_beneath>: Now bool.
5040 (record_full_breakpoints): Now a std::vector, static.
5041 (record_full_sync_record_breakpoints)
5042 (record_full_init_record_breakpoints)
5043 (record_full_target::insert_breakpoint)
5044 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5046 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5048 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5049 * serial.c (serial_interface_lookup): Remove struct keyword.
5051 2018-06-10 Tom Tromey <tom@tromey.com>
5053 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5055 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5057 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5059 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5060 "beneath" as a method.
5061 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5062 Use "beneath" as a method.
5064 2018-06-10 Tom Tromey <tom@tromey.com>
5066 * tracefile.c (struct trace_file_writer_deleter): New.
5067 <operator()>: Rename from trace_file_writer_xfree.
5068 (trace_file_writer_up): New typedef.
5069 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5071 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5073 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5074 <m_registers, m_register_status>: Change type to
5076 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5079 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5081 * common/common-regcache.h (enum register_status): Add
5082 underlying type "signed char".
5083 * regcache.h (reg_buffer) <m_register_status>: Change type to
5085 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5086 register_status instead of signed char.
5087 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5088 (reg_buffer::get_register_status): Remove cast.
5089 (readable_regcache::raw_read): Remove cast.
5090 (readable_regcache::cooked_read): Remove cast.
5092 2018-06-09 Tom Tromey <tom@tromey.com>
5094 * source.c (reverse_search_command, forward_search_command): Use
5097 2018-06-09 Tom Tromey <tom@tromey.com>
5099 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5100 (serial_ops_list): Now static, std::vector.
5101 (serial_interface_lookup, serial_add_interface): Update.
5103 2018-06-09 Tom Tromey <tom@tromey.com>
5105 * dwarf2read.c (process_cu_includes): Update.
5106 (process_full_comp_unit): Update.
5107 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5110 2018-06-08 Paul Koning <paul_koning@dell.com>
5114 * python/python.c (do_start_initialization):
5115 Avoid call to internal Python API.
5116 (init__gdb_module): New function.
5118 2018-06-08 Gary Benson <gbenson@redhat.com>
5120 * linux-thread-db.c (valprint.h): New include.
5121 (struct check_thread_db_info): New structure.
5122 (check_thread_db_on_load, tdb_testinfo): New static globals.
5123 (check_thread_db, check_thread_db_callback): New functions.
5124 (try_thread_db_load_1): Run integrity checks if requested.
5125 (maintenance_check_libthread_db): New function.
5126 (_initialize_thread_db): Register "maint check libthread-db"
5127 and "maint set/show check-libthread-db".
5128 * NEWS: Mention the above new commands.
5130 2018-06-08 Tom Tromey <tom@tromey.com>
5132 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5135 2018-06-08 Tom Tromey <tom@tromey.com>
5137 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5139 2018-06-08 Tom Tromey <tom@tromey.com>
5141 * common/btrace-common.h (struct btrace_data): Add constructor,
5142 destructor, move assignment operator.
5143 <empty, clear, fini>: New methods.
5144 <format>: Initialize.
5145 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5146 (btrace_data_empty): Don't declare.
5147 * common/btrace-common.c (btrace_data_init): Remove.
5148 (btrace_data::fini): Rename from btrace_data_fini.
5149 (btrace_data::empty): Rename from btrace_data_empty.
5150 (btrace_data::clear): Rename from btrace_data_clear. Return
5152 * btrace.h (make_cleanup_btrace_data): Don't declare.
5153 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5154 (parse_xml_btrace): Update.
5155 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5156 (maint_btrace_clear_packet_history_cmd): Update.
5158 2018-06-07 Pedro Alves <palves@redhat.com>
5160 * target.h (target_ops) <beneath>: Now a method. All references
5162 (class target_stack): New.
5163 * target.c (g_target_stack): New.
5164 (g_current_top_target): Delete.
5165 (current_top_target): Get the top target out of g_target_stack.
5166 (target_stack::push, target_stack::unpush): New.
5167 (push_target, unpush_target): Reimplement.
5168 (target_is_pushed): Reimplement in terms of g_target_stack.
5169 (target_ops::beneath, target_stack::find_beneath): New.
5171 2018-06-07 Pedro Alves <palves@redhat.com>
5173 * target.h (find_target_beneath): Delete declaration.
5174 * target.c (find_target_beneath): Delete definition.
5175 * aix-thread.c: All callers of find_target_beneath adjusted to
5176 call target_ops::beneath instead.
5177 * bsd-uthread.c: Likewise.
5178 * linux-thread-db.c: Likewise.
5179 * ravenscar-thread.c: Likewise.
5180 * sol-thread.c: Likewise.
5181 * spu-multiarch.c: Likewise.
5183 2018-06-07 Pedro Alves <palves@redhat.com>
5185 * target.h (target_ops) <beneath>: Now a method. All references
5187 (target_ops) <m_beneath>: New.
5188 * target.c (target_ops::beneath): New.
5189 * corelow.c: Adjust all references to target_ops::beneath.
5190 * linux-thread-db.c: Likewise.
5191 * make-target-delegates: Likewise.
5192 * record-btrace.c: Likewise.
5193 * record-full.c: Likewise.
5194 * remote.c: Likewise.
5195 * target.c: Likewise.
5196 * target-delegates.c: Regenerate.
5198 2018-06-07 Pedro Alves <palves@redhat.com>
5200 * target.h (target_stack): Delete.
5201 (current_top_target): Declare function.
5202 * target.c (target_stack): Delete.
5203 (g_current_top_target): New.
5204 (current_top_target): New function.
5205 * auxv.c: Use current_top_target instead of target_stack
5207 * avr-tdep.c: Likewise.
5208 * breakpoint.c: Likewise.
5209 * corefile.c: Likewise.
5210 * elfread.c: Likewise.
5212 * exceptions.c: Likewise.
5213 * frame.c: Likewise.
5214 * gdbarch-selftests.c: Likewise.
5215 * gnu-v3-abi.c: Likewise.
5216 * ia64-tdep.c: Likewise.
5217 * ia64-vms-tdep.c: Likewise.
5218 * infcall.c: Likewise.
5219 * infcmd.c: Likewise.
5220 * infrun.c: Likewise.
5221 * linespec.c: Likewise.
5222 * linux-tdep.c: Likewise.
5223 * minsyms.c: Likewise.
5224 * ppc-linux-nat.c: Likewise.
5225 * ppc-linux-tdep.c: Likewise.
5226 * procfs.c: Likewise.
5227 * regcache.c: Likewise.
5228 * remote.c: Likewise.
5229 * rs6000-tdep.c: Likewise.
5230 * s390-linux-nat.c: Likewise.
5231 * s390-tdep.c: Likewise.
5232 * solib-aix.c: Likewise.
5233 * solib-darwin.c: Likewise.
5234 * solib-dsbt.c: Likewise.
5235 * solib-spu.c: Likewise.
5236 * solib-svr4.c: Likewise.
5237 * solib-target.c: Likewise.
5238 * sparc-tdep.c: Likewise.
5239 * sparc64-tdep.c: Likewise.
5240 * spu-tdep.c: Likewise.
5241 * symfile.c: Likewise.
5242 * symtab.c: Likewise.
5243 * target-descriptions.c: Likewise.
5244 * target-memory.c: Likewise.
5245 * target.c: Likewise.
5246 * target.h: Likewise.
5247 * tracefile-tfile.c: Likewise.
5248 * tracepoint.c: Likewise.
5249 * valops.c: Likewise.
5250 * valprint.c: Likewise.
5251 * value.c: Likewise.
5252 * windows-tdep.c: Likewise.
5253 * mi/mi-main.c: Likewise.
5255 2018-06-07 Tom Tromey <tom@tromey.com>
5257 * valprint.h (build_address_symbolic): Declare.
5258 * printcmd.c (print_address_symbolic): Update.
5259 (build_address_symbolic): Change "name" and "filename" to
5261 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5263 * defs.h (build_address_symbolic): Remove declaration.
5265 2018-06-07 Alan Hayward <alan.hayward@arm.com>
5267 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5268 (aarch64_vnv_type): Add function.
5269 (aarch64_pseudo_register_name): Add V regs for SVE.
5270 (aarch64_pseudo_register_type): Likewise.
5271 (aarch64_pseudo_register_reggroup_p): Likewise.
5272 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5273 (aarch64_pseudo_read_value): Add V regs for SVE.
5274 (aarch64_pseudo_write_2): Use V0 offset for SVE
5275 (aarch64_pseudo_write): Add V regs for SVE.
5276 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5278 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
5280 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5281 (sve_vl_from_vq): Likewise.
5283 2018-06-05 Tom Tromey <tom@tromey.com>
5285 * cli/cli-cmds.c (show_version): Update.
5286 * top.c (print_gdb_version): Add "interactive" parameter.
5288 * main.c (captured_main_1): Update.
5289 * top.h (print_gdb_version): Add "interactive" parameter and a
5292 2018-06-05 David Malcolm <dmalcolm@redhat.com>
5294 * common/enum-flags.h: Add trailing semicolon to example in
5297 2018-06-05 Tom Tromey <tom@tromey.com>
5300 * NEWS: Add entry about pager.
5301 * utils.c (pagination_disabled_for_command): New global.
5302 (prompt_for_continue): Allow "c" response to prompt.
5303 (reinitialize_more_filter): Clear
5304 pagination_disabled_for_command.
5305 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5307 2018-06-04 Tom Tromey <tom@tromey.com>
5309 * ada-lang.h (ada_lookup_symbol_list): Update.
5310 * ada-lang.c (resolve_subexp): Update.
5311 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5313 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5314 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5315 results parameter to std::vector.
5316 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5318 * ada-exp.y (block_lookup): Update.
5319 (select_possible_type_sym): Change type of syms. Remove nsyms
5321 (write_var_or_type, write_name_assoc): Update.
5323 2018-06-04 Joel Brobecker <brobecker@adacore.com>
5325 * windows-nat.c (windows_nat_target::xfer_partial): Return
5326 TARGET_XFER_E_IO if we need to delegate to the target beneath
5327 but BENEATH is NULL.
5329 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
5331 * Makefile.in (config.status): Add configure.nat as a
5334 2018-06-04 Tom Tromey <tom@tromey.com>
5336 * cp-name-parser.y (cpname_state): Add method declarations.
5337 (HANDLE_QUAL): Update.
5338 (cpname_state::d_grab, cpname_state::fill_comp)
5339 (cpname_state::make_operator, cpname_state::make_dtor)
5340 (cpname_state::make_builtin_type, cpname_state::make_name)
5341 (cpname_state::d_qualify, cpname_state::d_int_type)
5342 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5343 (%union): Move earlier.
5345 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5347 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5349 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5351 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5352 (aarch64_pseudo_write_1): Likewise.
5353 (aarch64_pseudo_read_value): Use helper.
5354 (aarch64_pseudo_write): Likewise.
5356 2018-06-04 Pedro Alves <palves@redhat.com>
5358 * darwin-nat.c (darwin_ops): Delete.
5359 (darwin_attach_pid): Use get_native_target.
5361 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5363 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5364 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5366 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5368 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5369 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5370 (aarch64_gdbarch_init): Check for SVE.
5371 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5373 2018-06-04 Alan Hayward <alan.hayward@arm.com>
5375 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5376 * aarch64-tdep.h (aarch64_read_description): Likewise.
5377 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5378 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5379 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5380 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5381 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5383 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
5385 * value.c (value_fetch_lazy_bitfield): New.
5386 (value_fetch_lazy_memory): New.
5387 (value_fetch_lazy_register): New.
5388 (value_fetch_lazy): Factor out to smaller functions.
5390 2018-06-01 Tom Tromey <tom@tromey.com>
5392 * cp-name-parser.y (backslashable, represented): Now const.
5394 2018-06-01 Tom Tromey <tom@tromey.com>
5396 * cp-name-parser.y: Include parser-defs.h.
5397 (parser_fprintf): Remove declaration.
5399 2018-06-01 Tom Tromey <tom@tromey.com>
5401 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5403 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5404 (global_result): Remove globals.
5405 (struct cpname_state): New.
5406 (yyparse): Don't declare.
5407 (yylex, yyerror): Move declarations after %union.
5408 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5409 (make_name): Add state parameter.
5411 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5413 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5415 (yylex): Add lvalp, state parameters.
5416 (yyerror): Add state parameter.
5417 (cp_demangled_name_to_comp): Update.
5419 2018-06-01 Tom Tromey <tom@tromey.com>
5421 * cp-name-parser.y (parser_fprintf): Declare.
5422 (GDB_YY_REMAP_PREFIX): Define.
5423 Include yy-remap.h. Don't redefine yy* identifiers.
5425 2018-06-01 Tom Tromey <tom@tromey.com>
5427 * python/py-type.c (typy_legacy_template_argument): Update.
5428 * cp-support.h (cp_demangled_name_to_comp): Update.
5429 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5430 parameter to be a "std::string *".
5433 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
5435 * ada-lex.l: Include "diagnostics.h" instead of
5436 "common/diagnostics.h".
5437 * unittests/environ-selftests.c: Likewise.
5438 * common/diagnostics.h: Moved to ../include.
5440 2018-06-01 Joel Brobecker <brobecker@adacore.com>
5442 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5443 to language_mode_manual while calling breakpoint_re_set_one.
5445 2018-06-01 Tom Tromey <tom@tromey.com>
5447 * valops.c (value_cast_structs, destructor_name_p): Update.
5448 * symtab.c (gdb_mangle_name): Update.
5449 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5451 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5452 (pascal_object_print_value_fields, pascal_object_print_value):
5454 * p-typeprint.c (pascal_type_print_derivation_info): Update.
5455 * linespec.c (find_methods): Update.
5456 * gdbtypes.h (type_name_no_tag): Remove.
5457 (type_name_or_error): Rename from type_name_no_tag_or_error.
5458 * gdbtypes.c (type_name_no_tag): Remove.
5459 (type_name_or_error): Rename from type_name_no_tag_or_error.
5460 (lookup_struct_elt_type, check_typedef): Update.
5461 * expprint.c (print_subexp_standard): Update.
5462 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5463 * d-namespace.c (d_lookup_nested_symbol): Update.
5464 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5465 (cp_print_class_member): Update.
5466 * cp-namespace.c (cp_lookup_nested_symbol): Update.
5467 * completer.c (add_struct_fields): Update.
5468 * c-typeprint.c (cp_type_print_derivation_info)
5469 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5471 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5472 (ada_prefer_type, ada_is_exception_sym): Update.
5474 2018-06-01 Tom Tromey <tom@tromey.com>
5476 * valops.c (enum_constant_from_type, value_namespace_elt)
5477 (value_maybe_namespace_elt): Update.
5478 * valarith.c (find_size_for_pointer_math): Update.
5479 * target-descriptions.c (make_gdb_type): Update.
5480 * symmisc.c (print_symbol): Update.
5481 * stabsread.c (define_symbol, read_type)
5482 (complain_about_struct_wipeout, add_undefined_type)
5483 (cleanup_undefined_types_1): Update.
5484 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5485 (rust_range_type_p, val_print_struct, rust_print_struct_def)
5486 (rust_internal_print_type, rust_composite_type)
5487 (rust_evaluate_funcall, rust_evaluate_subexp)
5488 (rust_inclusive_range_type_p): Update.
5489 * python/py-type.c (typy_get_tag): Update.
5490 * p-typeprint.c (pascal_type_print_base): Update.
5491 * mdebugread.c (parse_symbol, parse_type): Update.
5492 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5494 * guile/scm-type.c (gdbscm_type_tag): Update.
5495 * go-lang.c (sixg_string_p): Update.
5496 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5498 * gdbtypes.h (struct main_type) <tag_name>: Remove.
5499 (TYPE_TAG_NAME): Remove.
5500 * gdbtypes.c (type_name_no_tag): Simplify.
5501 (check_typedef, check_types_equal, recursive_dump_type)
5502 (copy_type_recursive, arch_composite_type): Update.
5503 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
5504 in summary mode when needed.
5505 * eval.c (evaluate_funcall): Update.
5506 * dwarf2read.c (fixup_go_packaging, read_structure_type)
5507 (process_structure_scope, read_enumeration_type)
5508 (read_namespace_type, read_module_type, determine_prefix): Update.
5509 * cp-support.c (inspect_type): Update.
5510 * coffread.c (process_coff_symbol, decode_base_type): Update.
5511 * c-varobj.c (c_is_path_expr_parent): Update.
5512 * c-typeprint.c (c_type_print_base_struct_union): Update.
5513 (c_type_print_base_1): Update. Print struct/class/union/enum in
5514 summary when using C language.
5515 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5516 (gen_maybe_namespace_elt): Update.
5517 * ada-lang.c (ada_type_name): Simplify.
5518 (empty_record, ada_template_to_fixed_record_type_1)
5519 (template_to_static_fixed_type)
5520 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5522 2018-06-01 Tom Tromey <tom@tromey.com>
5524 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5526 * c-typeprint.c (c_print_type_1): Add "language" parameter.
5527 (c_print_type): Update.
5528 (c_print_type): New overload.
5529 (c_type_print_varspec_prefix, c_type_print_args)
5530 (c_type_print_varspec_suffix, c_print_type_no_offsets)
5531 (c_type_print_base_struct_union, c_type_print_base_1)
5532 (cp_type_print_method_args): Add "language" parameter.
5533 (c_type_print_base): Update.
5534 * c-lang.h (c_print_type): Add new overload.
5536 2018-06-01 Tom Tromey <tom@tromey.com>
5538 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5539 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5541 2018-06-01 Alan Hayward <alan.hayward@arm.com>
5543 * aarch64-tdep.c (aarch64_sve_register_names): New const
5545 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5546 (AARCH64_SVE_Z_REGS_NUM): New define.
5547 (AARCH64_SVE_P_REGS_NUM): Likewise.
5548 (AARCH64_SVE_NUM_REGS): Likewise.
5550 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5552 * nat/linux-ptrace.h [__alpha__]
5553 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5556 2018-05-31 Maciej W. Rozycki <macro@mips.com>
5558 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5559 the endianness selected.
5560 * NEWS: Document `set endian auto' mode operation update.
5562 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5564 * Makefile.in: Add new header.
5565 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5566 (sve_vl_from_vg): Likewise.
5567 (sve_vq_from_vl): Likewise.
5568 (sve_vl_from_vq): Likewise.
5569 (sve_vq_from_vg): Likewise.
5570 (sve_vg_from_vq): Likewise.
5571 * configure.nat: Add new c file.
5572 * nat/aarch64-sve-linux-ptrace.c: New file.
5573 * nat/aarch64-sve-linux-ptrace.h: New file.
5575 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5577 * aarch64-linux-nat.c (aarch64_linux_read_description):
5579 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5581 * aarch64-tdep.c (tdesc_aarch64_list): Add.
5582 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5583 (aarch64_gdbarch_init): Add parmeter zero.
5584 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5585 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5586 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5588 * doc/gdb.texinfo: Describe SVE feature
5589 * features/aarch64-sve.c: New file.
5591 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5594 * gdbarch.sh (significant_addr_bit): Default to zero when
5595 not set by target architecture.
5596 * gdbarch.c: Re-generated.
5597 * utils.c (address_significant): Update.
5599 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5601 * stack.c (func_command): Remove trailing newline in call to error.
5603 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5605 * regcache.h (regcache_raw_collect): Remove, update callers to
5606 use regcache::raw_collect.
5607 * regcache.c (regcache_raw_collect): Remove.
5609 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5611 * regcache.h (regcache_raw_supply): Remove, update callers to
5612 use detached_regcache::raw_supply.
5613 * regcache.c (regcache_raw_supply): Remove.
5615 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5617 * regcache.h (regcache_cooked_write_part): Remove, update
5618 callers to use regcache::cooked_write_part.
5619 * regcache.c (regcache_cooked_write_part): Remove.
5621 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5623 * regcache.h (regcache_cooked_read_part): Remove, update callers
5624 to use readable_regcache::cooked_read_part.
5625 * regcache.c (regcache_cooked_read_part): Remove.
5627 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5629 * regcache.h (regcache_cooked_read_value): Remove, update
5630 callers to use readable_regcache::cooked_read_value.
5631 * regcache.c (regcache_cooked_read_value): Remove.
5633 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5635 * regcache.h (regcache_cooked_write): Remove, update callers to
5636 use regcache::cooked_write.
5637 * regcache.c (regcache_cooked_write): Remove.
5639 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5641 * regcache.h (regcache_invalidate): Remove, update callers to
5642 use detached_regcache::invalidate instead.
5643 * regcache.c (regcache_invalidate): Remove.
5645 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5647 * regcache.h (regcache_raw_write_part): Remove, update callers
5648 to use regcache::raw_write_part instead.
5649 * regcache.c (regcache_raw_write_part): Remove.
5651 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5653 * regcache.h (regcache_raw_read_part): Remove, update callers to
5654 use readable_regcache::raw_read_part instead.
5655 * regcache.c (regcache_raw_read_part): Remove.
5657 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5659 * regcache.h (regcache_cooked_read): Remove, update callers to
5660 use readable_regcache::cooked_read instead.
5661 * regcache.c (regcache_cooked_read): Remove.
5663 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5665 * regcache.h (regcache_raw_write): Remove, update callers to use
5666 regcache::raw_write instead.
5667 * regcache.c (regcache_raw_write): Remove.
5669 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5671 * regcache.h (regcache_raw_read): Remove, update callers to use
5672 readable_regcache::raw_read instead.
5673 * regcache.c (regcache_raw_read): Remove.
5675 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5677 * regcache.h (regcache_raw_update): Remove, update callers to
5678 use readable_regcache::raw_update instead.
5679 * regcache.c (regcache_raw_update): Remove.
5681 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5683 * regcache.h (regcache_register_status): Remove, update callers
5684 to use reg_buffer::get_register_status directly instead.
5685 * regcache.c (regcache_register_status): Remove.
5687 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5689 * regcache.h (regcache_get_ptid): Remove, update all callers to
5690 call regcache::ptid instead.
5691 * regcache.c (regcache_get_ptid): Remove.
5693 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5695 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5697 2018-05-30 Pedro Alves <palves@redhat.com>
5699 * common/common-exceptions.h (exception_rethrow): Use
5702 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5704 * breakpoint.c (print_solib_event, check_status_catch_solib):
5705 Remove struct keyword in range-based for loops.
5706 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5707 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5709 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5711 * symfile.c (addr_info_make_relative): Likewise.
5712 * thread.c (value_in_thread_stack_temporaries): Likewise.
5714 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5717 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5718 aggregate type to get its real type before accessing it.
5720 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5722 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5723 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5724 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5725 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5726 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5727 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5728 * printcmd.c (info_address_command): Likewise.
5730 2018-05-29 Tom Tromey <tom@tromey.com>
5732 * windows-nat.c (handle_exception): Update fall-through comment.
5734 2018-05-29 Tom Tromey <tom@tromey.com>
5736 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5737 (struct program_space) <added_solibs>: Now a std::vector.
5738 * breakpoint.c (print_solib_event): Update.
5739 (check_status_catch_solib): Update.
5740 * progspace.c (clear_program_space_solib_cache): Update.
5741 * solib.c (update_solib_list): Update.
5743 2018-05-29 Tom Tromey <tom@tromey.com>
5745 * python/py-type.c (typy_richcompare): Update.
5746 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5747 * gdbtypes.h (types_deeply_equal): Return bool.
5748 (types_equal): Likewise.
5749 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5751 (check_types_equal): Change worklist to std::vector. Return
5753 (struct type_equality_entry): Add constructor.
5754 (compare_maybe_null_strings): Return bool.
5755 (check_types_worklist): Return bool. Change worklist to
5757 (types_deeply_equal): Use std::vector.
5758 (types_equal): Return bool.
5759 (compare_maybe_null_strings): Simplify.
5761 2018-05-29 Tom Tromey <tom@tromey.com>
5763 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5765 2018-05-29 Tom Tromey <tom@tromey.com>
5767 * objc-lang.h: Don't include cp-support.h.
5768 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5771 2018-05-27 Tom Tromey <tom@tromey.com>
5773 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5775 2018-05-25 Tom Tromey <tom@tromey.com>
5777 * value.c (value::location): Initialize.
5779 2018-05-25 Tom Tromey <tom@tromey.com>
5781 * dbxread.c (init_bincl_list): Remove.
5782 (bincl_list): Now a std::vector.
5783 (bincls_allocated, next_bincl): Remove.
5784 (free_bincl_list, do_free_bincl_list_cleanup)
5785 (make_cleanup_free_bincl_list): Remove.
5786 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5788 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5789 (struct header_file_location): Add constructor.
5790 (add_bincl_to_list): Remove.
5792 2018-05-25 Tom Tromey <tom@tromey.com>
5794 * tui/tui.c (tui_enable): Update.
5795 * mi/mi-interp.c (mi_interp::init): Update.
5796 * interps.h (class interp) <name>: New method.
5797 <m_name>: Rename from name.
5798 (~scoped_restore_interp): Update.
5799 * interps.c (interp::interp): Update.
5800 (interp_add, interp_set, interp_lookup_existing)
5801 (current_interp_named_p): Update.
5803 2018-05-25 Tom Tromey <tom@tromey.com>
5805 * interps.c (interp_name): Remove.
5806 * mi/mi-interp.c (mi_interp::init): Update.
5807 * interps.h (interp_name): Remove.
5808 (~scoped_restore_interp): Update.
5809 * tui/tui.c (tui_enable): Update.
5811 2018-05-25 Tom Tromey <tom@tromey.com>
5813 * utils.c (fputs_maybe_filtered): Update.
5814 * linespec.c (decode_line_full): Update.
5815 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5816 (mi_print_breakpoint_for_event, mi_solib_loaded)
5817 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5818 (mi_user_selected_context_changed): Update.
5819 * mi/mi-main.c (mi_execute_command): Update.
5820 * cli/cli-script.c (execute_control_command): Update.
5821 * python/python.c (execute_gdb_command): Update.
5822 * solib.c (info_sharedlibrary_command): Update.
5823 * interps.c (interp_ui_out): Remove.
5824 * interps.h (interp_ui_out): Remove.
5826 2018-05-25 Tom Tromey <tom@tromey.com>
5828 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5829 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5830 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5832 2018-05-25 Tom Tromey <tom@tromey.com>
5834 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5835 * interps.c (interp_exec): Use scoped_restore.
5837 2018-05-25 Tom Tromey <tom@tromey.com>
5839 * remote.c (remote_target::remote_file_get): Use
5841 (remote_target::remote_file_put): Likewise.
5843 2018-05-25 Tom Tromey <tom@tromey.com>
5845 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5847 (get_pe_section_index, add_pe_exported_sym): Update.
5848 (read_pe_exported_syms): Use gdb::def_vector.
5850 2018-05-25 Tom Tromey <tom@tromey.com>
5852 * frame.c (remove_prev_frame): Remove.
5853 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5855 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5857 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5859 * mips-linux-nat.c (supply_fpregset): Always call
5860 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5861 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5862 `mips_fill_fpregset'.
5863 * mips-linux-tdep.c (mips_supply_fpregset)
5864 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5865 (mips_fill_fpregset_wrapper): Remove functions.
5866 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5867 (mips_linux_fpregset): Remove variable.
5868 (mips_linux_iterate_over_regset_sections): Use
5869 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5870 (mips_linux_o32_sigframe_init): Remove comment.
5872 2018-05-25 Pedro Alves <palves@redhat.com>
5874 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5875 (struct readahead_cache, struct packet_reg, struct
5876 remote_arch_state, class remote_state): Move higher up in the
5878 (remote_target::m_remote_state): Now an object instead of a pointer.
5879 (remote_target::get_remote_state): Adjust.
5881 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5883 * stack.c (select_and_print_frame): Delete.
5884 (struct function_bounds): Move struct within function.
5885 (func_command): Most content moved into new function
5886 find_frame_for_function, use new function, print result, add
5888 (find_frame_for_function): New function, now returns a result.
5890 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5892 * stack.c (iterate_over_block_arg_vars): Fix comment.
5893 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5895 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5899 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5901 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5903 * frame.h (class scoped_restore_selected_frame): New class.
5904 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5905 of any exception, use scoped_restore_selected_frame to restore the
5908 2018-05-24 Pedro Alves <palves@redhat.com>
5910 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5913 2018-05-23 Tom Tromey <tom@tromey.com>
5915 * complaints.c (struct complaints): Remove.
5916 (symfile_complaint_book): Remove.
5917 (series): New global.
5918 (complaint_internal): Update.
5919 (clear_complaints): Update.
5921 2018-05-23 Tom Tromey <tom@tromey.com>
5923 * complaints.c (counters): New global.
5924 (struct complain): Remove.
5925 (struct complaints) <root>: Remove.
5926 (complaint_sentinel): Remove.
5927 (symfile_complaint_book): Update.
5928 (find_complaint) Remove.
5929 (complaint_internal, clear_complaints): Update.
5931 2018-05-23 Tom Tromey <tom@tromey.com>
5933 * complaints.c (struct complain) <file, line>: Remove.
5934 (find_complaint): Remove file, line parameters.
5935 (complaint_internal): Update.
5937 2018-05-23 Tom Tromey <tom@tromey.com>
5939 * complaints.c (vcomplaint): Remove.
5940 (complaint_internal) Merge in contents of vcomplaint.
5942 2018-05-23 Tom Tromey <tom@tromey.com>
5944 * complaints.c (struct complaints) <explanation>: Remove.
5945 (symfile_explanations): Remove.
5946 (symfile_complaint_book): Update.
5947 (vcomplaint): Update.
5948 (struct explanation): Remove.
5950 2018-05-23 Tom Tromey <tom@tromey.com>
5952 * complaints.c (symfile_complaints): Remove.
5953 (complaint_internal): Remove "complaints" parameter.
5954 (clear_complaints, vcomplaint): Remove "c" parameter.
5955 (get_complaints): Remove.
5956 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5957 (dwarf2_debug_line_missing_file_complaint)
5958 (dwarf2_debug_line_missing_end_sequence_complaint)
5959 (dwarf2_complex_location_expr_complaint)
5960 (dwarf2_const_value_length_mismatch_complaint)
5961 (dwarf2_section_buffer_overflow_complaint)
5962 (dwarf2_macro_malformed_definition_complaint)
5963 (dwarf2_invalid_attrib_class_complaint)
5964 (create_addrmap_from_index, dw2_symtab_iter_next)
5965 (dw2_expand_marked_cus)
5966 (dw2_debug_names_iterator::find_vec_in_debug_names)
5967 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5968 (create_debug_type_hash_table, init_cutu_and_read_dies)
5969 (partial_die_parent_scope, add_partial_enumeration)
5970 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5971 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5972 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5973 (create_cus_hash_table, create_dwp_hash_table)
5974 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5975 (dwarf2_rnglists_process, dwarf2_ranges_process)
5976 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5977 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5978 (handle_struct_member_die, process_structure_scope)
5979 (read_array_type, read_common_block, read_module_type)
5980 (read_tag_pointer_type, read_typedef, read_base_type)
5981 (read_subrange_type, load_partial_dies, partial_die_info::read)
5982 (partial_die_info::read, partial_die_info::read)
5983 (partial_die_info::read, read_checked_initial_length_and_offset)
5984 (dwarf2_string_attr, read_formatted_entries)
5985 (dwarf_decode_line_header)
5986 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5987 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5988 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5989 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5990 (get_signatured_type, get_DW_AT_signature_type)
5991 (decode_locdesc, file_file_name, consume_improper_spaces)
5992 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5993 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5994 (dwarf2_symbol_mark_computed, set_die_type)
5995 (read_attribute_value): Update.
5996 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5998 * dbxread.c (unknown_symtype_complaint)
5999 (lbrac_mismatch_complaint, repeated_header_complaint)
6000 (set_namestring, function_outside_compilation_unit_complaint)
6001 (read_dbx_symtab, process_one_symbol): Update.
6002 * gdbtypes.c (stub_noname_complaint): Update.
6003 * windows-nat.c (handle_unload_dll): Update.
6004 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6005 (decode_base_type): Update.
6006 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6007 (eb_complaint, record_include_begin, record_include_end)
6008 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6009 (process_xcoff_symbol, read_symbol)
6010 (function_outside_compilation_unit_complaint)
6011 (scan_xcoff_symtab): Update.
6012 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6013 * buildsym.c (finish_block_internal, make_blockvector)
6014 (end_symtab_get_static_block, augment_type_symtab): Update.
6015 * dtrace-probe.c (dtrace_process_dof)
6016 (dtrace_static_probe_ops::get_probes): Update.
6017 * complaints.h (struct complaint): Don't declare.
6018 (symfile_complaints): Remove.
6019 (complaint_internal): Remove "complaints" parameter.
6020 (complaint): Likewise.
6021 (clear_complaints): Likewise.
6022 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6023 (reread_symbols): Update.
6024 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6025 (dwarf2_frame_cache, decode_frame_entry): Update.
6026 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6027 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6028 (info_selectors_command): Update.
6029 * macrotab.c (macro_include, check_for_redefinition)
6030 (macro_undef): Update.
6031 * objfiles.c (filter_overlapping_sections): Update.
6032 * stabsread.c (invalid_cpp_abbrev_complaint)
6033 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6034 (define_symbol, error_type, read_type, rs6000_builtin_type)
6035 (stabs_method_name_from_physname, read_member_functions)
6036 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6037 (attach_fields_to_type, complain_about_struct_wipeout)
6038 (read_range_type, read_args, common_block_start)
6039 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6041 * mdebugread.c (index_complaint, unknown_ext_complaint)
6042 (basic_type_complaint, bad_tag_guess_complaint)
6043 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6044 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6045 (parse_procedure, parse_lines)
6046 (function_outside_compilation_unit_complaint)
6047 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6048 (bad_tag_guess_complaint, reg_value_complaint): Update.
6049 * cp-support.c (demangled_name_complaint): Update.
6050 * macroscope.c (sal_macro_scope): Update.
6051 * dwarf-index-write.c (class debug_names): Update.
6053 2018-05-23 Tom Tromey <tom@tromey.com>
6055 * complaints.c (clear_complaints): Remove "noisy" parameter.
6056 * complaints.h (clear_complaints): Update.
6057 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6058 (reread_symbols): Update.
6060 2018-05-23 Tom Tromey <tom@tromey.com>
6062 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6064 (vcomplaint, clear_complaints): Update.
6065 (symfile_explanations): Remove some messages.
6067 2018-05-23 Tom Tromey <tom@tromey.com>
6069 * complaints.c (internal_complaint): Remove.
6070 * complaints.h (internal_complaint): Remove.
6072 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6074 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6076 2018-05-22 Pedro Alves <palves@redhat.com>
6078 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6079 (remote_fileio_badfd, remote_fileio_return_errno)
6080 (remote_fileio_return_success, remote_fileio_func_open)
6081 (remote_fileio_func_open, remote_fileio_func_close)
6082 (remote_fileio_func_read, remote_fileio_func_write)
6083 (remote_fileio_func_lseek, remote_fileio_func_rename)
6084 (remote_fileio_func_unlink, remote_fileio_func_stat)
6085 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6086 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6087 remote_target parameter.
6088 (remote_fio_func_map) <func>: Add remote_target parameter.
6089 (do_remote_fileio_request, remote_fileio_request):
6090 * remote-fileio.h (remote_fileio_request):
6091 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6092 remote_target parameter.
6093 (remote_notif_process, handle_notification): Adjust to pass down
6095 (remote_notif_state_allocate): Add remote_target parameter. Save
6097 * remote-notif.h (struct remote_target): Forward declare.
6098 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6099 remote_target parameter.
6100 (struct remote_notif_state) <remote>: New field.
6101 (remote_notif_ack, remote_notif_parse): Add remote_target
6103 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6104 remote_target parameter.
6105 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6106 (threads_listing_context, rmt_thread_action, protocol_feature)
6107 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6108 (packet_result, struct threads_listing_context, remote_state):
6109 Move definitions and declarations higher up.
6110 (remote_target) <~remote_target>: Declare.
6111 (remote_download_command_source, remote_file_put, remote_file_get)
6112 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6113 (remote_hostio_pread_vFile, remote_hostio_send_command)
6114 (remote_hostio_set_filesystem, remote_hostio_open)
6115 (remote_hostio_close, remote_hostio_unlink, remote_state)
6116 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6117 (get_memory_write_packet_size, get_memory_read_packet_size)
6118 (append_pending_thread_resumptions, remote_detach_1)
6119 (append_resumption, remote_resume_with_vcont)
6120 (add_current_inferior_and_thread, wait_ns, wait_as)
6121 (process_stop_reply, remote_notice_new_inferior)
6122 (process_initial_stop_replies, remote_add_thread)
6123 (btrace_sync_conf, remote_btrace_maybe_reopen)
6124 (remove_new_fork_children, kill_new_fork_children)
6125 (discard_pending_stop_replies, stop_reply_queue_length)
6126 (check_pending_events_prevent_wildcard_vcont)
6127 (discard_pending_stop_replies_in_queue, stop_reply)
6128 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6129 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6130 (remote_interrupt_as, remote_interrupt_ns)
6131 (remote_get_noisy_reply, remote_query_attached)
6132 (remote_add_inferior, remote_current_thread, get_current_thread)
6133 (set_thread, set_general_thread, set_continue_thread)
6134 (set_general_process, write_ptid)
6135 (remote_unpack_thread_info_response, remote_get_threadinfo)
6136 (parse_threadlist_response, remote_get_threadlist)
6137 (remote_threadlist_iterator, remote_get_threads_with_ql)
6138 (remote_get_threads_with_qxfer)
6139 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6140 (get_offsets, remote_check_symbols, remote_supported_packet)
6141 (remote_query_supported, remote_packet_size)
6142 (remote_serial_quit_handler, remote_detach_pid)
6143 (remote_vcont_probe, remote_resume_with_hc)
6144 (send_interrupt_sequence, interrupt_query)
6145 (remote_notif_get_pending_events, fetch_register_using_p)
6146 (send_g_packet, process_g_packet, fetch_registers_using_g)
6147 (store_register_using_P, store_registers_using_G)
6148 (set_remote_traceframe, check_binary_download)
6149 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6150 (remote_xfer_live_readonly_partial, remote_read_bytes)
6151 (remote_send_printf, remote_flash_write, readchar)
6152 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6153 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6154 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6155 (extended_remote_disable_randomization, extended_remote_run)
6156 (send_environment_packet, extended_remote_environment_support)
6157 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6158 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6159 (packet_command): Now methods of ...
6160 (remote_target): ... this class.
6161 (m_remote_state) <remote_target>: New field.
6162 (struct remote_state) <stop_reply_queue,
6163 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6165 (remote_state::remote_state): Allocate stop_reply_queue.
6166 (remote_state): Delete global.
6167 (get_remote_state_raw): Delete.
6168 (remote_target::get_remote_state): Allocate m_remote_state on
6170 (get_current_remote_target): New.
6171 (remote_ops, extended_remote_ops): Delete.
6172 (wait_forever_enabled_p, remote_async_inferior_event_token):
6173 Delete, moved to struct remote_state.
6174 (remote_target::close): Delete self. Destruction bits split to
6176 (remote_target::~remote_target): ... this.
6177 (show_memory_packet_size): Adjust to use
6178 get_current_remote_target.
6179 (struct protocol_feature) <func>: Add remote_target parameter.
6180 All callers adjusted.
6181 (curr_quit_handler_target): New.
6182 (remote_serial_quit_handler): Reimplement.
6183 (remote_target::open_1): Adjust to use get_current_remote_target.
6184 Heap-allocate remote_target/extended_remote_target instances.
6185 (vcont_builder::vcont_builder): Add remote_target parameter, and
6186 save it in m_remote. All callers adjusted.
6187 (vcont_builder::m_remote): New field.
6188 (vcont_builder::restart, vcont_builder::flush)
6189 (vcont_builder::push_action): Use it.
6190 (remote_target::commit_resume): Use it.
6191 (struct queue_iter_param) <remote>: New field.
6192 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6193 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6194 (check_pending_event_prevents_wildcard_vcont_callback)
6195 (remote_target::check_pending_events_prevent_wildcard_vcont)
6196 (remote_target::discard_pending_stop_replies)
6197 (remote_target::discard_pending_stop_replies_in_queue)
6198 (remote_target::remote_notif_remove_queued_reply): Fill in
6200 (remote_notif_get_pending_events): New.
6201 (remote_target::readchar, remote_target::remote_serial_write):
6202 Save/restore curr_quit_handler_target.
6204 (kill_new_fork_children): Fill in 'remote' field.
6205 (packet_command): Use get_current_remote_target, defer to
6206 remote_target method of same name.
6207 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6208 parameter, and save it in m_remote. All callers adjusted.
6209 (scoped_remote_fd::release): Use m_remote.
6210 (scoped_remote_fd::m_remote): New field.
6211 (remote_file_put, remote_file_get, remote_file_delete): Use
6212 get_current_remote_target, defer to remote_target method of same
6214 (remote_btrace_reset): Add remote_state paremeter. Update all
6216 (remote_async_inferior_event_handler). Pass down 'data'.
6217 (remote_new_objfile): Use get_current_remote_target.
6218 (remote_target::vcont_r_supported): New.
6219 (set_range_stepping): Use get_current_remote_target and
6220 remote_target::vcont_r_supported.
6221 (_initialize_remote): Don't allocate 'remote_state' and
6222 'stop_reply_queue' globals.
6223 * remote.h (struct remote_target): Forward declare.
6224 (getpkt, putpkt, remote_notif_get_pending_events): Add
6225 'remote_target' parameter.
6227 2018-05-22 Pedro Alves <palves@redhat.com>
6229 * remote.c (vcont_builder): Now a class. Make all data members
6231 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6233 (vcont_builder_restart): Rename to ...
6234 (vcont_builder::restart): ... this.
6235 (vcont_builder_flush): Rename to ...
6236 (vcont_builder::flush): ... this.
6237 (vcont_builder_push_action): Rename to ...
6238 (vcont_builder::push_action): ... this.
6239 (remote_target::commit_resume): Adjust.
6241 2018-05-22 Pedro Alves <palves@redhat.com>
6243 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6244 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6245 (get_fixed_memory_packet_size): New.
6246 (get_memory_packet_size): Use it.
6247 (set_memory_packet_size): Don't override the config size with
6248 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6249 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6250 Don't refer to get_memory_packet_size if not connected to a remote
6251 target. Show "(default)" if configured size is 0.
6253 2018-05-22 Pedro Alves <palves@redhat.com>
6255 * remote.c (remote_target::mourn_inferior): Move
6256 discard_pending_stop_replies call here from ...
6257 (_initialize_remote): ... here.
6259 2018-05-22 Pedro Alves <palves@redhat.com>
6261 * remote.c (compare_section_command): Remove set_general_process
6264 2018-05-22 Pedro Alves <palves@redhat.com>
6266 * remote.c (struct packet_reg, struct remote_arch_state):
6267 Move higher up in the file.
6268 (remote_state) <m_arch_states>: Store remote_arch_state values
6269 instead of remote_arch_state pointers.
6270 (remote_state::get_remote_arch_state): Adjust.
6272 2018-05-22 Pedro Alves <palves@redhat.com>
6274 * remote.c: Include <unordered_map>.
6275 (remote_state): Now a class.
6276 (remote_state) <get_remote_arch_state>: Declare method.
6277 <get_remote_arch_state>: New field.
6278 (remote_arch_state) <remote_arch_state>: Declare ctor.
6279 <regs>: Now a unique_ptr.
6280 (remote_gdbarch_data_handle): Delete.
6281 (get_remote_arch_state): Delete.
6282 (remote_state::get_remote_arch_state): New.
6283 (get_remote_state): Adjust to call remote_state's
6284 get_remote_arch_state method.
6285 (init_remote_state): Delete, bits factored out to ...
6286 (remote_arch_state::remote_arch_state): ... this new method.
6287 (get_remote_packet_size, get_memory_packet_size)
6288 (process_g_packet, remote_target::fetch_registers)
6289 (remote_target::prepare_to_store, store_registers_using_G)
6290 (remote_target::store_registers, remote_target::get_trace_status):
6291 Adjust to call remote_state's method.
6292 (_initialize_remote): Remove reference to
6293 remote_gdbarch_data_handle.
6295 2018-05-22 Pedro Alves <palves@redhat.com>
6297 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6298 pread>: New method declarations.
6299 (remote_target::open_1): Adjust.
6300 (readahead_cache_invalidate): Rename to ...
6301 (readahead_cache::invalidate): ... this, and adjust to be a class
6303 (readahead_cache_invalidate_fd): Rename to ...
6304 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6306 (remote_hostio_pwrite): Adjust.
6307 (remote_hostio_pread_from_cache): Rename to ...
6308 (readahead_cache::pread): ... this, and adjust to be a class
6310 (remote_hostio_close): Adjust.
6312 2018-05-22 Pedro Alves <palves@redhat.com>
6314 * remote.c (remote_hostio_close_cleanup): Delete.
6315 (class scoped_remote_fd): New.
6316 (remote_file_put, remote_file_get): Use it.
6318 2018-05-22 Pedro Alves <palves@redhat.com>
6320 (struct vCont_action_support): Use bool and initialize all fields.
6321 (struct readahead_cache): Initialize all fields.
6322 (remote_state): Use bool and initialize all fields.
6323 (remote_state::remote_state, remote_state::~remote_state): New.
6324 (new_remote_state): Delete.
6325 (_initialize_remote): Use new to allocate remote_state.
6327 2018-05-22 Pedro Alves <palves@redhat.com>
6331 * c-exp.y: Include "c-support.h".
6332 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6333 of tolower. Use c_ident_is_alpha to scan names.
6334 * c-lang.c: Include "c-support.h".
6335 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6336 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6337 * c-support.h: New file, with bits factored out from ...
6338 * cp-name-parser.y: ... this file.
6339 Include "c-support.h".
6340 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6341 c-support.h and renamed.
6342 (symbol_end, yylex): Adjust.
6344 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6346 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6347 parameter type to CORE_ADDR.
6348 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6349 parameter type in declaration to CORE_ADDR.
6350 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6351 target_auxv_search to get AT_HWCAP and use the result to get the
6353 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6354 to CORE_ADDR. Remove the cast of the return value to unsigned
6355 long. Fix error predicate of target_auxv_search.
6356 (ppc_linux_nat_target::read_description): Change the type of the
6357 hwcap variable to CORE_ADDR.
6359 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6361 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6362 if the size of fpscr is larger than 32 bits.
6364 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6366 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6367 (ppc32_linux_vsxregmap): New global.
6368 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6369 regcache_supply_regset, and regcache_collect_regset.
6370 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6371 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6372 (fetch_vsx_register, store_vsx_register): Remove.
6373 (fetch_vsx_registers): Add regno parameter. Get regset using
6374 ppc_linux_vsxregset. Use regset to supply registers.
6375 (store_vsx_registers): Add regno parameter. Get regset using
6376 ppc_linux_vsxregset. Use regset to collect registers.
6377 (fetch_register): Call fetch_vsx_registers instead of
6379 (store_register): Call store_vsx_registers instead of
6381 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6382 new regno parameter.
6383 (store_ppc_registers): Call store_vsx_registers with -1 for the
6384 new regno parameter.
6385 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6386 (ppc_collect_vsxregset): Remove.
6388 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6390 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6392 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6393 for vector register offset fields.
6394 (ppc64_fbsd_reg_offsets): Likewise.
6395 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6396 to vector register offset fields.
6397 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6398 to vector register offset fields.
6399 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6400 vector register offset fields.
6401 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6402 initializers for vector register offset fields.
6403 (rs6000_aix64_reg_offsets): Likewise.
6404 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6405 (ppc_supply_vrregset): Remove.
6406 (ppc_collect_vrregset): Remove.
6407 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6408 (ppc_linux_vrregset) : New function.
6409 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6410 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6411 (ppc32_linux_vrregset): Remove.
6412 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6413 and use result instead of ppc32_linux_vrregset.
6414 (ppc32_linux_reg_offsets): Remove initializers for vector register
6416 (ppc64_linux_reg_offsets): Likewise.
6417 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6418 * ppc-linux-nat.c: Include regset.h.
6419 (gdb_vrregset_t): Adjust comment to account for little-endian
6421 (supply_vrregset, fill_vrregset): Remove.
6422 (fetch_altivec_register, store_altivec_register): Remove.
6423 (fetch_altivec_registers): Add regno parameter. Get regset using
6424 ppc_linux_vrregset. Use regset to supply registers.
6425 (store_altivec_registers): Add regno parameter. Get regset using
6426 ppc_linux_vrregset. Use regset to collect registers.
6427 (fetch_register): Call fetch_altivec_registers instead of
6428 fetch_altivec_register.
6429 (store_register): Call store_altivec_registers instead of
6430 store_altivec_register.
6431 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6432 the new regno parameter.
6433 (store_ppc_registers): Call store_altivec_registers with -1 for
6434 the new regno parameter.
6436 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6438 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6439 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6440 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6441 (gdb_vrregset_t): Change array type size to
6442 PPC_LINUX_SIZEOF_VRREGSET.
6443 (gdb_vsxregset_t): Change array type size to
6444 PPC_LINUX_SIZEOF_VSXREGSET.
6445 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6446 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6447 PPC_LINUX_SIZEOF_VSXREGSET.
6449 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6451 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6452 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6454 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6455 ppc_linux_target_wordsize with tid.
6456 (ppc_linux_nat_target::read_description): Call ppc_linux_target
6458 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6459 (ppc64_64bit_inferior_p): Add static and inline specifiers.
6460 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6461 tid parameter. Remove static specifier.
6462 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6463 (ppc_linux_target_wordsize): New declaration.
6465 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6467 * arch/ppc-linux-common.c: New file.
6468 * arch/ppc-linux-common.h: New file.
6469 * arch/ppc-linux-tdesc.h: New file.
6470 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6471 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6472 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6473 arch/ppc-linux-tdesc.h.
6474 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6475 arch/ppc-linux-tdesc.h.
6476 (ppc_linux_nat_target::read_description): Remove target
6477 description matching code. Fill a ppc_linux_features struct and
6478 call ppc_linux_match_description with it. Move comment about ISA
6479 2.05 to ppc-linux-common.c.
6480 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6481 arch/ppc-linux-tdesc.h.
6482 (ppc_linux_core_read_description): Remove target description
6483 matching code. Fill a ppc_linux_features struct and call
6484 ppc_linux_match_description with it.
6485 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6486 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6487 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6488 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6489 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6490 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6491 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6492 (tdesc_powerpc_e500l): Remove.
6494 2018-05-22 Joel Brobecker <brobecker@adacore.com>
6496 * ada-lang.c (catch_assert_command): Pass empty string instead
6497 of NULL for excep_string argument.
6499 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6501 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6502 the width of the requested register exceeds the width of the
6505 2018-05-21 Tom Tromey <tom@tromey.com>
6507 * printcmd.c (output_command): Remove.
6508 (output_command_const): Rename to output_command.
6509 * valprint.h (output_command): Rename from output_command_const.
6510 * tracepoint.c (trace_dump_actions): Call output_command.
6512 2018-05-21 Tom Tromey <tom@tromey.com>
6514 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6515 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6516 * ada-lang.h (create_ada_exception_catchpoint): Update.
6517 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6519 (create_excep_cond_exprs, ~ada_catchpoint)
6520 (should_stop_exception, print_one_exception)
6521 (print_mention_exception, print_recreate_exception): Update.
6522 (ada_get_next_arg): Remove.
6523 (catch_ada_exception_command_split): Use std::string. Change type
6524 of "excep_string", "cond_string".
6525 (catch_ada_exception_command): Update.
6526 (create_ada_exception_catchpoint): Change type of excep_string.
6527 (ada_exception_sal): Remove excep_string parameter.
6528 (~ada_catchpoint): Remove.
6530 2018-05-21 Tom Tromey <tom@tromey.com>
6532 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6535 2018-05-21 Tom Tromey <tom@tromey.com>
6537 * ada-lang.c (ada_exception_message_1, ada_exception_message):
6538 Return unique_xmalloc_ptr.
6539 (print_it_exception): Update.
6541 2018-05-21 Tom Tromey <tom@tromey.com>
6543 * tracepoint.c (trace_dump_actions): Use std::string.
6545 2018-05-21 Tom Tromey <tom@tromey.com>
6547 * symfile.c (reread_symbols): Use std::string for original_name.
6549 2018-05-21 Tom Tromey <tom@tromey.com>
6551 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6552 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
6555 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
6557 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6559 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6560 * objfiles.c (get_objfile_bfd_data): Allocate
6561 objfile_per_bfd_storage with obstack_new when allocating on
6564 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6566 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6568 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6569 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6570 * mdebugread.c (mdebug_build_psymtabs): Likewise.
6571 (add_pending): Likewise.
6572 (parse_symbol): Likewise.
6573 (parse_partial_symbols): Likewise.
6574 (psymtab_to_symtab_1): Likewise.
6575 (new_psymtab): Likewise.
6576 (elfmdebug_build_psymtabs): Likewise.
6577 * minsyms.c (terminate_minimal_symbol_table): Likewise.
6578 * objfiles.c (get_objfile_bfd_data): Likewise.
6579 (objfile_register_static_link): Likewise.
6580 * psymtab.c (allocate_psymtab): Likewise.
6581 * stabsread.c (read_member_functions): Likewise.
6582 * xcoffread.c (xcoff_end_psymtab): Likewise.
6584 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6586 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6587 compiler supports std::is_trivially_constructible.
6588 * common/poison.h: Include obstack.h.
6589 (IsMallocable): Define to is_trivially_constructible if the
6590 compiler supports it, define to true_type otherwise.
6594 (XOBNEWVEC): Redefine.
6595 * gdb_obstack.h (obstack_zalloc): New.
6596 (OBSTACK_ZALLOC): Redefine.
6597 (obstack_calloc): New.
6598 (OBSTACK_CALLOC): Redefine.
6600 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6601 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6603 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6604 obstack_calloc/obstack_zalloc.
6605 (gdbarch_obstack_zalloc): Remove.
6606 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6608 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6610 * stack.c (backtrace_command_1): Remove useless variable int i.
6612 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6614 * stack.c (print_frame_info): Fix comment.
6616 2018-05-18 Tom Tromey <tom@tromey.com>
6618 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6619 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6620 (~dwarf2_per_objfile): Update
6621 (dwarf2_get_dwz_file): Use new.
6622 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6625 2018-05-18 Tom Tromey <tom@tromey.com>
6627 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6629 * dwarf2read.c (struct dwp_file): Add constructor and
6631 (open_and_init_dwp_file): Return a unique_ptr.
6632 (dwarf2_per_objfile, create_dwp_hash_table)
6633 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6634 (lookup_dwo_unit_in_dwp): Update.
6635 (open_and_init_dwp_file, get_dwp_file): Update.
6637 2018-05-18 Tom Tromey <tom@tromey.com>
6639 * dwarf2read.c (dwarf2_per_objfile): Update.
6640 (struct mapped_index): Add initializers.
6641 (dwarf2_read_index): Use new.
6642 (dw2_symtab_iter_init): Update.
6643 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6646 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6648 * dwarf2read.c (mapped_index) <total_size>: Remove.
6650 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6652 * unittests/format_pieces-selftests.c (test_format_specifier):
6655 2018-05-18 Tom Tromey <tom@tromey.com>
6657 * c-typeprint.c (maybe_print_hole): New function.
6658 (c_print_type_struct_field_offset): Update.
6659 (c_type_print_base_struct_union): Call maybe_print_hole.
6661 2018-05-17 Keith Seitz <keiths@redhat.com>
6663 * breakpoint.c (build_bpstat_chain): New function, moved from
6665 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6666 If no stop chain is passed, call build_bpstat_chain to build it.
6667 * breakpoint.h (build_bpstat_chain): Declare.
6668 (bpstat_stop_status): Move documentation here from breakpoint.c.
6669 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6670 build the stop chain and pass it to skip_inline_frames.
6671 Pass this stop chain to bpstat_stop_status.
6672 * inline-frame.c: Include breakpoint.h.
6673 (stopped_by_user_bp_inline_frame): New function.
6674 (skip_inline_frames): Add parameter `stop_chain'.
6675 Move documention to inline-frame.h.
6676 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6677 whether the frame should be elided.
6678 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6679 Add moved documentation and update for new parameter.
6681 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6684 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6685 unittests/format_pieces-selftests.c.
6686 * common/format.h (format_piece) <operator==>: New.
6687 (format_pieces) <operator[]>: Remove.
6688 * common/format.c (format_pieces::format_pieces): Handle \e.
6689 * unittests/format_pieces-selftests.c: New.
6691 2018-05-17 Tom Tromey <tom@tromey.com>
6694 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6695 (dw2_instantiate_symtab): Add skip_partial parameter.
6696 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6697 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6698 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6699 (dw2_expand_symtabs_matching_one)
6700 (dw2_find_pc_sect_compunit_symtab)
6701 (dw2_debug_names_lookup_symbol)
6702 (dw2_debug_names_expand_symtabs_for_function): Update.
6703 (init_cutu_and_read_dies): Add skip_partial parameter.
6704 (process_psymtab_comp_unit, build_type_psymtabs_1)
6705 (process_skeletonless_type_unit, load_partial_comp_unit)
6706 (psymtab_to_symtab_1): Update.
6707 (load_full_comp_unit): Add skip_partial parameter.
6708 (process_imported_unit_die, dwarf2_read_addr_index)
6709 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6710 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6711 (read_signatured_type): Update.
6713 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6715 * value.c (release_value): Remove unused variable.
6716 (record_latest_value): Likewise.
6717 (access_value_history): Likewise.
6718 (preserve_values): Likewise.
6720 2018-05-17 Tom Tromey <tom@tromey.com>
6722 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6725 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6728 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6729 Also handle registers whose width is not a multiple of
6731 (linux_nat_trad_target::store_register): Likewise.
6733 2018-05-16 Tom Tromey <tom@tromey.com>
6735 * gdbcore.h (core_bfd): Redefine.
6736 * corelow.c (core_target::close): Update.
6737 (core_target_open): Update.
6738 * progspace.h (struct program_space) <cbfd>: Now a
6741 2018-05-16 Tom Tromey <tom@tromey.com>
6744 * symfile-add-flags.h (enum symfile_add_flags)
6745 <SYMFILE_NOT_FILENAME>: New constant.
6746 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6747 objfile name from BFD.
6748 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6749 * minidebug.c (find_separate_debug_file_in_section): Put
6750 ".gnu_debugdata" into BFD's file name.
6752 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6754 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6757 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6760 * aarch64-tdep.c (aarch64_analyze_prologue,
6761 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6762 Indicate not interested in errors.
6764 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6766 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6767 Supply the MIPS_ZERO_REGNUM register.
6769 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6771 * mips-tdep.c (mask_address_var): Make variable static.
6773 2018-05-14 Tom Tromey <tom@tromey.com>
6775 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6777 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6779 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6780 FXSAVE_ADDR for the mxcsr register.
6782 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6784 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6786 2018-05-11 Pedro Alves <palves@redhat.com>
6788 * corelow.c (core_target) <core_target>: No longer inline.
6789 Initialize m_core_gdbarch, m_core_vec and build the section table
6791 <~core_target>: New.
6792 <core_gdbarch, get_core_register_section>: New methods.
6793 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6794 factored out from ...
6795 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6797 (sniff_core_bfd): Add gdbarch parameter.
6798 (core_close): Delete, merged into ...
6799 (core_target::close): ... here. Delete self.
6800 (core_close_cleanup): Delete.
6801 (core_target_open): Allocate a core_target on the heap. Use a
6802 unique_ptr instead of a cleanup. Bits moved into the core_target
6803 ctor. Adjust to use core_target methods instead of globals.
6804 (get_core_register_section): Rename to ...
6805 (core_target::get_core_register_section): ... this and adjust.
6806 (struct get_core_registers_cb_data): New.
6807 (get_core_registers_cb): Use it. Use bool.
6808 (core_target::fetch_registers, core_target::files_info)
6809 (core_target::xfer_partial, core_target::read_description)
6810 (core_target::pid_to, core_target::thread_name): Adjust to
6811 reference class fields instead of globals.
6812 * target.h (struct target_ops_deleter, target_ops_up): New.
6814 2018-05-11 Pedro Alves <palves@redhat.com>
6816 * corefile.c (core_file_command): Move to corelow.c.
6817 * corelow.c (the_core_target): Delete.
6818 (core_file_command): Moved from corefile.c. Check exec_bfd
6819 instead of the_core_target. Use target_detach instead of calling
6820 into the_core_target directly.
6821 (maybe_say_no_core_file_now): New.
6822 (core_target::detach): Use it.
6823 (_initialize_corelow): Remove references to the_core_target.
6824 * gdbcore.h (the_core_target): Delete.
6826 2018-05-11 Tom Tromey <tromey@redhat.com>
6827 Pedro Alves <palves@redhat.com>
6829 * corefile.c (core_bfd): Remove.
6830 * gdbcore.h (core_bfd): Now a macro.
6831 * progspace.h (struct program_space) <cbfd>: New field.
6833 2018-05-11 Tom Tromey <tom@tromey.com>
6835 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6838 2018-05-10 Tom Tromey <tom@tromey.com>
6840 * configure: Rebuild.
6841 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6843 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6846 * regformats/regdat.sh: Adjust script, following the addition
6847 of the new expedite_regs parameter to init_target_desc.
6849 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6852 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6853 set_gdbarch_significant_addr_bit.
6854 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6855 set_gdbarch_significant_addr_bit.
6856 * utils.c (address_significant): Update to sign extend addr.
6858 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6860 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6861 (xtensa_linux_init_abi): Limit tdep->num_regs by
6862 tdep->num_nopriv_regs.
6863 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6864 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6867 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6869 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6871 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6873 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6874 (I387_MXCSR_INIT_VAL): New constant.
6875 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6876 buffer if it was supplied by the inferior.
6877 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6878 (i387_xsave_get_clear_bv): New function.
6879 (i387_supply_xsave): Only read x87 control registers from the
6880 xsave buffer if the feature is enabled, and the state will have
6881 been written, otherwise, provide a suitable default.
6882 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6883 including x87 control registers. Update control registers if they
6884 have changed from the default value, and mark features as enabled
6886 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6888 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6890 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6892 2018-05-07 Tom Tromey <tom@tromey.com>
6894 * configure: Rebuild.
6895 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6897 2018-05-07 Tom Tromey <tom@tromey.com>
6900 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6901 bit. Use correct value for VDIV.
6903 2018-05-04 Tom Tromey <tom@tromey.com>
6905 * configure: Rebuild.
6906 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6908 2018-05-04 Tom Tromey <tom@tromey.com>
6910 * linux-record.c (record_linux_system_call) <case
6911 RECORD_SYS_RECVFROM>: Add "break".
6913 2018-05-04 Tom Tromey <tom@tromey.com>
6915 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6916 Add missing "break".
6917 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6918 Add missing "break".
6920 2018-05-04 Tom Tromey <tom@tromey.com>
6922 * rs6000-tdep.c (ppc_process_record_op4)
6923 (ppc_process_record_op63): Add fall-through comment.
6925 2018-05-04 Tom Tromey <tom@tromey.com>
6927 * i386-tdep.c (i386_process_record): Add fall-through comment.
6929 2018-05-04 Tom Tromey <tom@tromey.com>
6931 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6934 2018-05-04 Tom Tromey <tom@tromey.com>
6936 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6937 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6938 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6940 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6942 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6945 2018-05-04 Tom Tromey <tom@tromey.com>
6947 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6949 2018-05-04 Tom Tromey <tom@tromey.com>
6951 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6952 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6953 * symfile.c (section_is_mapped): Fix fall-through comment.
6954 * stabsread.c (define_symbol, read_member_functions): Fix
6955 fall-through comment.
6956 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6958 * remote.c (remote_wait_as): Fix fall-through comment.
6959 * p-exp.y (yylex): Fix fall-through comment.
6960 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6962 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6963 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6964 * jv-exp.y (yylex): Fix fall-through comment.
6965 * go-exp.y (lex_one_token): Fix fall-through comment.
6966 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6967 fall-through comment.
6968 * f-exp.y (yylex): Fix fall-through comment.
6969 * dwarf2read.c (process_die): Fix fall-through comments.
6970 * dbxread.c (process_one_symbol): Fix fall-through comment.
6971 * d-exp.y (lex_one_token): Fix fall-through comment.
6972 * cp-name-parser.y (yylex): Fix fall-through comment.
6973 * coffread.c (coff_symtab_read): Fix fall-through comment.
6974 * c-exp.y (lex_one_token): Fix fall-through comment.
6975 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6977 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6980 2018-05-04 Tom Tromey <tom@tromey.com>
6983 * NEWS: Mention gdb.execute change.
6984 * gdbcmd.h (execute_control_command): Don't declare.
6985 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6986 execute_control_commands, execute_control_commands_to_string.
6987 * cli/cli-script.h (execute_control_commands)
6988 (execute_control_commands_to_string): Declare.
6989 (execute_control_command): Add from_tty parameter.
6990 * cli/cli-script.c (execute_control_commands)
6991 (execute_control_commands_to_string): New functions.
6992 (execute_user_command): Use execute_control_commands.
6993 (execute_control_command_1): Add "from_tty" parameter. Update.
6994 (execute_control_command): Likewise.
6996 2018-05-04 Tom Tromey <tom@tromey.com>
6999 * NEWS: Mention that breakpoint commands are writable.
7000 * python/py-breakpoint.c (bppy_set_commands): New function.
7001 (breakpoint_object_getset) <"commands">: Use it.
7003 2018-05-04 Tom Tromey <tom@tromey.com>
7005 * tracepoint.c (actions_command): Update.
7006 * mi/mi-cmd-break.c (mi_command_line_array)
7007 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7008 (mi_read_next_line): Remove.
7009 (mi_cmd_break_commands): Update.
7010 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7012 * cli/cli-script.c (get_command_line): Update.
7013 (process_next_line): Use function_view. Constify.
7014 (recurse_read_control_structure, read_command_lines)
7015 (read_command_lines_1): Change argument types to function_view.
7016 (do_define_command, document_command): Update.
7017 * breakpoint.h (check_tracepoint_command): Don't declare.
7018 * breakpoint.c (check_tracepoint_command): Remove.
7019 (commands_command_1, create_tracepoint_from_upload): Update.
7021 2018-05-04 Tom Tromey <tom@tromey.com>
7024 * cli/cli-script.h (enum command_control_type) <define_control>:
7026 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7027 (build_command_line, execute_control_command_1)
7028 (process_next_line): Likewise.
7029 (do_define_command): New function, extracted from define_command.
7030 (define_command): Use it.
7032 2018-05-04 Tom Tromey <tom@tromey.com>
7034 * tracepoint.c (actions_command): Update.
7035 * cli/cli-script.h (read_command_lines): Update.
7036 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7037 (MAX_TMPBUF): Remove define.
7038 (define_command): Use string_printf.
7039 (document_command): Likewise.
7040 * breakpoint.c (commands_command_1): Update.
7042 2018-05-04 Tom Tromey <tom@tromey.com>
7044 * top.c (execute_command): Update.
7045 * cli/cli-script.h (print_command_lines): Now varargs.
7046 * cli/cli-script.c (print_command_lines): Now varargs.
7047 (execute_control_command_1) <case while_control, case if_control>:
7050 2018-05-04 Tom Tromey <tom@tromey.com>
7052 * tracepoint.c (all_tracepoint_actions): Rename from
7053 all_tracepoint_actions_and_cleanup. Change return type.
7054 (actions_command, encode_actions_1, encode_actions)
7055 (trace_dump_actions, tdump_command): Update.
7056 * remote.c (remote_download_command_source): Update.
7057 * python/python.c (gdbpy_eval_from_control_command)
7058 (python_command, python_interactive_command): Update.
7059 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7060 * guile/guile.c (guile_command)
7061 (gdbscm_eval_from_control_command, guile_command): Update.
7062 * compile/compile.c (compile_code_command)
7063 (compile_print_command, compile_to_object): Update.
7064 * cli/cli-script.h (struct command_lines_deleter): New.
7065 (counted_command_line): New typedef.
7066 (struct command_line): Add constructor, destructor.
7067 <body_list>: Remove.
7068 <body_list_0, body_list_1>: New members.
7069 (command_line_up): Remove typedef.
7070 (read_command_lines, read_command_lines_1, get_command_line):
7072 (copy_command_lines): Don't declare.
7073 * cli/cli-script.c (build_command_line): Use "new".
7074 (get_command_line): Return counted_command_line.
7075 (print_command_lines, execute_user_command)
7076 (execute_control_command_1, while_command, if_command): Update.
7077 (realloc_body_list): Remove.
7078 (process_next_line, recurse_read_control_structure): Update.
7079 (read_command_lines, read_command_lines_1): Return counted_command_line.
7080 (free_command_lines): Use "delete".
7081 (copy_command_lines): Remove.
7082 (define_command, document_command, show_user_1): Update.
7083 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7084 a counted_command_line.
7085 * breakpoint.h (counted_command_line): Remove typedef.
7086 (breakpoint_set_commands): Update.
7087 * breakpoint.c (check_no_tracepoint_commands)
7088 (validate_commands_for_breakpoint): Update.
7089 (breakpoint_set_commands): Change commands to be a
7090 counted_command_line.
7091 (commands_command_1, update_dprintf_command_list)
7092 (create_tracepoint_from_upload): Update.
7094 2018-05-04 Tom Tromey <tom@tromey.com>
7096 * cli/cli-decode.h (cmd_list_element): New constructor.
7097 (~cmd_list_element): New destructor.
7098 (struct cmd_list_element): Add initializers.
7099 * cli/cli-decode.c (do_add_cmd): Use "new".
7100 (delete_cmd): Use "delete".
7102 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7103 Pedro Alves <palves@redhat.com>
7105 PR breakpoints/19806 and support for PR external/20207.
7106 * NEWS: Mention Aarch64 watchpoint improvements.
7107 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7108 watchpoints and PR external/20207 watchpoints.
7109 * nat/aarch64-linux-hw-point.c
7110 (kernel_supports_any_contiguous_range): New.
7111 (aarch64_watchpoint_offset): New.
7112 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7113 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7114 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7115 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7116 next_addr_orig_p. Support PR external/20207 watchpoints.
7117 (aarch64_downgrade_regs): New.
7118 (aarch64_dr_state_insert_one_point): New parameters offset and
7120 (aarch64_dr_state_remove_one_point): Likewise.
7121 (aarch64_handle_breakpoint): Update caller.
7122 (aarch64_handle_aligned_watchpoint): Likewise.
7123 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7125 (aarch64_linux_set_debug_regs): Remove const from state. Call
7126 aarch64_downgrade_regs.
7127 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7128 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7129 (DR_CONTROL_MASK): ... this.
7130 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7131 (unsigned int aarch64_watchpoint_offset): New prototype.
7132 (aarch64_linux_set_debug_regs): Remove const from state.
7133 * utils.c (align_up, align_down): Move to ...
7134 * common/common-utils.c (align_up, align_down): ... here.
7135 * utils.h (align_up, align_down): Move to ...
7136 * common/common-utils.h (align_up, align_down): ... here.
7138 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7140 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7141 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7142 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7143 Re-implement to match the ABI as summarized in GCC's
7144 gcc/config/sparc/sparc.c. All callers updated.
7145 (sparc32_store_arguments): Remove assertion.
7147 2018-05-04 Tom Tromey <tom@tromey.com>
7149 * printcmd.c: Don't include tui.h.
7150 (decode_format): Use skip_spaces.
7152 2018-05-04 Tom Tromey <tom@tromey.com>
7155 * printcmd.c (last_count): New global.
7156 (x_command): Use saved count when repeating.
7158 2018-05-04 Tom Tromey <tom@tromey.com>
7160 * nto-procfs.c (do_closedir_cleanup): Remove.
7161 (procfs_pidlist): Use gdb_dir_up.
7162 * procfs.c (do_closedir_cleanup): Remove.
7163 (proc_update_threads): Use gdb_dir_up.
7164 * common/filestuff.h (struct gdb_dir_deleter): New.
7165 (gdb_dir_up): New typedef.
7167 2018-05-04 Tom Tromey <tom@tromey.com>
7169 * ada-lang.c (print_mention_exception): Use std::string.
7171 2018-05-04 Tom Tromey <tom@tromey.com>
7173 * ada-lang.c (create_excep_cond_exprs): Update.
7174 (ada_exception_catchpoint_cond_string): Use std::string.
7176 2018-05-04 Tom Tromey <tom@tromey.com>
7178 * ada-lang.c (xget_renaming_scope): Return std::string.
7179 (old_renaming_is_invisible): Update.
7181 2018-05-04 Tom Tromey <tom@tromey.com>
7183 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7184 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7186 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7188 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7190 2018-05-04 Tom Tromey <tom@tromey.com>
7192 * remote.c (remote_query_supported_append): Change type.
7193 (remote_check_symbols): Update.
7195 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
7198 * configure.ac: Prepend libpython.
7199 * python/python-config.py: Likewise.
7200 * configure: Regenerate.
7202 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
7204 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7206 2018-05-03 Pedro Alves <palves@redhat.com>
7209 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7210 override. Write 'true' instead of '1'.
7211 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7214 2018-05-02 Pedro Alves <palves@redhat.com>
7216 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7217 add_inf_child_target.
7218 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7219 add_inf_child_target.
7220 * aix-thread.c (aix_thread_target_info): New.
7221 (aix_thread_target) <shortname, longname, doc>: Delete.
7223 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7224 add_inf_child_target.
7225 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7226 add_inf_child_target.
7227 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7228 add_inf_child_target.
7229 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7230 add_inf_child_target.
7231 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7232 add_inf_child_target.
7233 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7234 add_inf_child_target.
7235 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7236 add_inf_child_target.
7237 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7238 add_inf_child_target.
7239 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7240 add_inf_child_target.
7241 * bfd-target.c (target_bfd_target_info): New.
7242 (target_bfd) <shortname, longname, doc>: Delete.
7244 * bsd-kvm.c (bsd_kvm_target_info): New.
7245 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7247 (bsd_kvm_target::open): Rename to ...
7248 (bsd_kvm_target_open): ... this. Adjust.
7249 * bsd-uthread.c (bsd_uthread_target_info): New.
7250 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7252 * corefile.c (core_file_command): Adjust.
7253 * corelow.c (core_target_info): New.
7254 (core_target) <shortname, longname, doc>: Delete.
7256 (core_target::open): Rename to ...
7257 (core_target_open): ... this. Adjust.
7258 * ctf.c (ctf_target_info): New.
7259 (ctf_target) <shortname, longname, doc>: Delete.
7261 (ctf_target::open): Rename to ...
7262 (ctf_target_open): ... this.
7263 (_initialize_ctf): Adjust.
7264 * exec.c (exec_target_info): New.
7265 (exec_target) <shortname, longname, doc>: Delete.
7267 (exec_target::open): Rename to ...
7268 (exec_target_open): ... this.
7269 * gdbcore.h (core_target_open): Declare.
7270 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7271 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7272 add_inf_child_target.
7273 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7274 add_inf_child_target.
7275 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7276 add_inf_child_target.
7277 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7278 add_inf_child_target.
7279 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7280 add_inf_child_target.
7281 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7282 add_inf_child_target.
7283 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7284 add_inf_child_target.
7285 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7286 add_inf_child_target.
7287 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7288 add_inf_child_target.
7289 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7290 add_inf_child_target.
7291 * inf-child.c (inf_child_target_info): New.
7292 (inf_child_target::info): New.
7293 (inf_child_open_target): Remove 'target' parameter. Use
7294 get_native_target instead.
7295 (inf_child_target::open): Delete.
7296 (add_inf_child_target): New.
7297 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7300 (add_inf_child_target): Declare.
7301 (inf_child_open_target): Declare.
7302 * linux-thread-db.c (thread_db_target_info): New.
7303 (thread_db_target) <shortname, longname, doc>: Delete.
7305 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7306 add_inf_child_target.
7307 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7308 add_inf_child_target.
7309 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7310 add_inf_child_target.
7311 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7312 add_inf_child_target.
7313 * make-target-delegates (print_class): Adjust.
7314 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7315 add_inf_child_target.
7316 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7317 add_inf_child_target.
7318 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7319 add_inf_child_target.
7320 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7321 add_inf_child_target.
7322 * nto-procfs.c (nto_native_target_info): New.
7323 (nto_procfs_target_native) <shortname, longname, doc>:
7326 (nto_procfs_target_info): New.
7327 (nto_procfs_target_procfs) <shortname, longname, doc>:
7330 (init_procfs_targets): Adjust.
7331 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7332 add_inf_child_target.
7333 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7334 add_inf_child_target.
7335 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7336 add_inf_child_target.
7337 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7338 add_inf_child_target.
7339 * ravenscar-thread.c (ravenscar_target_info): New.
7340 (ravenscar_thread_target) <shortname, longname, doc>:
7343 * record-btrace.c (record_btrace_target_info):
7344 (record_btrace_target) <shortname, longname, doc>: Delete.
7346 (record_btrace_target::open): Rename to ...
7347 (record_btrace_target_open): ... this. Adjust.
7348 * record-full.c (record_longname, record_doc): New.
7349 (record_full_base_target) <shortname, longname, doc>: Delete.
7351 (record_full_target_info): New.
7352 (record_full_target): <shortname>: Delete.
7354 (record_full_core_open_1, record_full_open_1): Update comments.
7355 (record_full_base_target::open): Rename to ...
7356 (record_full_open): ... this.
7357 (cmd_record_full_restore): Update.
7358 (_initialize_record_full): Update.
7359 * remote-sim.c (remote_sim_target_info): New.
7360 (gdbsim_target) <shortname, longname, doc>: Delete.
7362 (gdbsim_target::open): Rename to ...
7363 (gdbsim_target_open): ... this.
7364 (_initialize_remote_sim): Adjust.
7365 * remote.c (remote_doc): New.
7366 (remote_target_info): New.
7367 (remote_target) <shortname, longname, doc>: Delete.
7369 (extended_remote_target_info): New.
7370 (extended_remote_target) <shortname, longname, doc>: Delete.
7372 (remote_target::open_1): Make static. Adjust.
7373 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7374 * s390-linux-nat.c (_initialize_s390_nat): Use
7375 add_inf_child_target.
7376 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7377 add_inf_child_target.
7378 * sol-thread.c (thread_db_target_info): New.
7379 (sol_thread_target) <shortname, longname, doc>: Delete.
7381 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7382 add_inf_child_target.
7383 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7384 add_inf_child_target.
7385 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7386 add_inf_child_target.
7387 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7388 add_inf_child_target.
7389 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7390 add_inf_child_target.
7391 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7392 add_inf_child_target.
7393 * spu-linux-nat.c (_initialize_spu_nat): Use
7394 add_inf_child_target.
7395 * spu-multiarch.c (spu_multiarch_target_info): New.
7396 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7398 * target-delegates.c: Regenerate.
7399 * target.c: Include <unordered_map>.
7400 (target_ops_p): Delete.
7401 (DEF_VEC_P(target_ops_p)): Delete.
7402 (target_factories): New.
7403 (test_target_info): New.
7404 (test_target_ops::info): New.
7405 (open_target): Adjust to use target_factories.
7406 (add_target_with_completer): Rename to ...
7407 (add_target): ... this. Change prototype. Register target_info
7408 and open callback in target_factories. Register target_info in
7409 command context instead of target_ops.
7410 (add_target): Delete old implementation.
7411 (add_deprecated_target_alias): Change prototype. Adjust.
7412 (the_native_target): New.
7413 (set_native_target, get_native_target): New.
7414 (find_default_run_target): Use the_native_target.
7415 (find_attach_target, find_run_target): Simplify.
7416 (target_ops::open): Delete.
7417 (dummy_target_info): New.
7418 (dummy_target::shortname, dummy_target::longname)
7419 (dummy_target::doc): Delete.
7420 (dummy_target::info): New.
7421 (debug_target::shortname, debug_target::longname)
7422 (debug_target::doc): Delete.
7423 (debug_target::info): New.
7424 * target.h (struct target_info): New.
7425 (target_ops::~target_ops): Add comment.
7426 (target_ops::info): New.
7427 (target_ops::shortname, target_ops::longname, target_ops::doc): No
7428 longer virtual. Implement in terms of target_info.
7429 (set_native_target, get_native_target): Declare.
7430 (target_open_ftype): New.
7431 (add_target, add_target_with_completer)
7432 (add_deprecated_target_alias): Change prototype.
7433 (test_target) <shortname, longname, doc>: Delete.
7435 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7436 add_inf_child_target.
7437 * tracefile-tfile.c (tfile_target_info): New.
7438 (tfile_target) <shortname, longname, doc>: Delete.
7440 (tfile_target::open): Rename to ...
7441 (tfile_target_open): ... this.
7442 (_initialize_tracefile_tfile): Adjust.
7443 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7444 add_inf_child_target.
7445 * windows-nat.c (_initialize_windows_nat): Use
7446 add_inf_child_target.
7447 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7448 add_inf_child_target.
7450 2018-05-02 Pedro Alves <palves@redhat.com>
7452 * linux-nat.h (linux_nat_target) <low_new_thread,
7453 low_delete_thread, low_new_fork, low_forget_process,
7454 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7455 New virtual methods.
7456 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7457 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7458 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7459 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7460 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7462 * linux-fork.c (delete_fork): Adjust to call low method.
7463 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7464 (linux_nat_new_fork, linux_nat_forget_process_hook)
7465 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7466 (linux_nat_status_is_event):
7467 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7468 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7470 (sigtrap_is_event): Rename to ...
7471 (linux_nat_target::low_status_is_event): ... this.
7472 (linux_nat_set_status_is_event): Delete.
7473 (save_stop_reason, linux_nat_wait_1)
7474 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7476 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7477 (linux_nat_set_new_fork, linux_nat_set_forget_process)
7478 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7479 (linux_nat_set_prepare_to_resume): Delete.
7480 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7481 low virtual methods.
7482 * amd64-linux-nat.c: Likewise.
7483 * arm-linux-nat.c: Likewise.
7484 * i386-linux-nat.c: Likewise.
7485 * ia64-linux-nat.c: Likewise.
7486 * mips-linux-nat.c: Likewise.
7487 * ppc-linux-nat.c: Likewise.
7488 * s390-linux-nat.c: Likewise.
7489 * sparc64-linux-nat.c: Likewise.
7490 * x86-linux-nat.c: Likewise.
7491 * x86-linux-nat.h: Include "nat/x86-linux.h".
7492 (x86_linux_nat_target) <low_new_fork, low_forget_process,
7493 low_prepare_to_resume, low_new_thread, low_delete_thread>:
7496 2018-05-02 Pedro Alves <palves@redhat.com>
7498 * target.h (target_ops)
7499 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7500 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7501 stopped_by_watchpoint, have_continuable_watchpoint,
7502 stopped_data_address, watchpoint_addr_within_range,
7503 can_accel_watchpoint_condition, can_run, thread_alive,
7504 has_all_memory, has_memory, has_stack, has_registers,
7505 has_execution, can_async_p, is_async_p, supports_non_stop,
7506 always_non_stop_p, can_execute_reverse, supports_multi_process,
7507 supports_enable_disable_tracepoint,
7508 supports_disable_randomization, supports_string_tracing,
7509 supports_evaluation_of_breakpoint_conditions,
7510 can_run_breakpoint_commands, filesystem_is_local,
7511 can_download_tracepoint, get_trace_state_variable_value,
7512 set_trace_notes, get_tib_address, use_agent, can_use_agent,
7513 record_is_replaying, record_will_replay,
7514 augmented_libraries_svr4_read>: Adjust to return bool.
7515 * aarch64-linux-nat.c: All implementations adjusted.
7516 * aix-thread.c: All implementations adjusted.
7517 * arm-linux-nat.c: All implementations adjusted.
7518 * breakpoint.c: All implementations adjusted.
7519 * bsd-kvm.c: All implementations adjusted.
7520 * bsd-uthread.c: All implementations adjusted.
7521 * corelow.c: All implementations adjusted.
7522 * ctf.c: All implementations adjusted.
7523 * darwin-nat.c: All implementations adjusted.
7524 * darwin-nat.h: All implementations adjusted.
7525 * exec.c: All implementations adjusted.
7526 * fbsd-nat.c: All implementations adjusted.
7527 * fbsd-nat.h: All implementations adjusted.
7528 * gnu-nat.c: All implementations adjusted.
7529 * gnu-nat.h: All implementations adjusted.
7530 * go32-nat.c: All implementations adjusted.
7531 * ia64-linux-nat.c: All implementations adjusted.
7532 * inf-child.c: All implementations adjusted.
7533 * inf-child.h: All implementations adjusted.
7534 * inf-ptrace.c: All implementations adjusted.
7535 * inf-ptrace.h: All implementations adjusted.
7536 * linux-nat.c: All implementations adjusted.
7537 * linux-nat.h: All implementations adjusted.
7538 * mips-linux-nat.c: All implementations adjusted.
7539 * nto-procfs.c: All implementations adjusted.
7540 * ppc-linux-nat.c: All implementations adjusted.
7541 * procfs.c: All implementations adjusted.
7542 * ravenscar-thread.c: All implementations adjusted.
7543 * record-btrace.c: All implementations adjusted.
7544 * record-full.c: All implementations adjusted.
7545 * remote-sim.c: All implementations adjusted.
7546 * remote.c: All implementations adjusted.
7547 * s390-linux-nat.c: All implementations adjusted.
7548 * sol-thread.c: All implementations adjusted.
7549 * spu-multiarch.c: All implementations adjusted.
7550 * target-delegates.c: All implementations adjusted.
7551 * target.c: All implementations adjusted.
7552 * target.h: All implementations adjusted.
7553 * tracefile-tfile.c: All implementations adjusted.
7554 * tracefile.c: All implementations adjusted.
7555 * tracefile.h: All implementations adjusted.
7556 * windows-nat.c: All implementations adjusted.
7557 * x86-linux-nat.h: All implementations adjusted.
7558 * x86-nat.h: All implementations adjusted.
7560 2018-05-02 Pedro Alves <palves@redhat.com>
7562 * make-target-delegates (scan_target_h): Don't trim lines here.
7563 Replace sequences of tabs and/or whitespace with a single
7565 (top level, parsing methods): Trim each line before processing it
7568 2018-05-02 Pedro Alves <palves@redhat.com>
7569 John Baldwin <jhb@freebsd.org>
7571 * target.h (enum strata) <debug_stratum>: New.
7572 (struct target_ops) <all delegation methods>: Replace by C++
7573 virtual methods, and drop "to_" prefix. All references updated
7575 <to_shortname, to_longname, to_doc, to_data,
7576 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7577 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7578 virtual methods. All references updated throughout.
7579 <can_attach, supports_terminal_ours, can_create_inferior,
7580 get_thread_control_capabilities, attach_no_wait>: New
7582 <insert_breakpoint, remove_breakpoint>: Now
7583 TARGET_DEFAULT_NORETURN methods.
7584 <info_proc>: Now returns bool.
7586 (OPS_MAGIC): Delete.
7587 (current_target): Delete. All references replaced by references
7589 (target_stack): ... this. New.
7590 (target_shortname, target_longname): Adjust.
7591 (target_can_run): Now a function declaration.
7592 (default_child_has_all_memory, default_child_has_memory)
7593 (default_child_has_stack, default_child_has_registers)
7594 (default_child_has_execution): Remove target_ops parameter.
7595 (complete_target_initialization): Delete.
7596 (memory_breakpoint_target): New template class.
7597 (test_target_ops): Refactor as a C++ class with virtual methods.
7598 * make-target-delegates (NAME_PART): Tighten.
7599 (POINTER_PART, CP_SYMBOL): New.
7600 (SIMPLE_RETURN_PART): Reimplement.
7601 (VEC_RETURN_PART): Expect less.
7602 (RETURN_PART, VIRTUAL_PART): New.
7603 (METHOD): Adjust to C++ virtual methods.
7604 (scan_target_h): Remove reference to C99.
7605 (dname): Output "target_ops::" prefix.
7606 (write_function_header): Adjust to output a C++ class method.
7607 (write_declaration): New.
7608 (write_delegator): Adjust to output a C++ class method.
7609 (tdname): Output "dummy_target::" prefix.
7610 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7612 (tdefault_names, debug_names): Delete.
7613 (return_types, tdefaults, styles, argtypes_array): New.
7614 (top level): All methods are delegators.
7616 (top level): Print dummy_target and debug_target classes.
7617 * target-delegates.c: Regenerate.
7618 * target-debug.h (target_debug_print_enum_info_proc_what)
7619 (target_debug_print_thread_control_capabilities)
7620 (target_debug_print_thread_info_p): New.
7621 * target.c (dummy_target): Delete.
7622 (the_dummy_target, the_debug_target): New.
7623 (target_stack): Now extern.
7624 (set_targetdebug): Push/unpush debug target.
7625 (default_child_has_all_memory, default_child_has_memory)
7626 (default_child_has_stack, default_child_has_registers)
7627 (default_child_has_execution): Remove target_ops parameter.
7628 (complete_target_initialization): Delete.
7629 (add_target_with_completer): No longer call
7630 complete_target_initialization.
7631 (target_supports_terminal_ours): Use regular delegation.
7632 (update_current_target): Delete.
7633 (push_target): No longer check magic number. Don't call
7634 update_current_target.
7635 (unpush_target): Don't call update_current_target.
7636 (target_is_pushed): No longer check magic number.
7637 (target_require_runnable): Skip for all stratums over
7639 (target_ops::info_proc): New.
7640 (target_info_proc): Use find_target_at and
7641 find_default_run_target.
7642 (target_supports_disable_randomization): Use regular delegation.
7643 (target_get_osdata): Use find_target_at.
7644 (target_ops::open, target_ops::close, target_ops::can_attach)
7645 (target_ops::attach, target_ops::can_create_inferior)
7646 (target_ops::create_inferior, target_ops::can_run)
7647 (target_can_run): New.
7648 (default_fileio_target): Use regular delegation.
7649 (target_ops::fileio_open, target_ops::fileio_pwrite)
7650 (target_ops::fileio_pread, target_ops::fileio_fstat)
7651 (target_ops::fileio_close, target_ops::fileio_unlink)
7652 (target_ops::fileio_readlink): New.
7653 (target_fileio_open_1, target_fileio_unlink)
7654 (target_fileio_readlink): Always call the target method. Handle
7656 (return_zero, return_zero_has_execution): Delete.
7657 (init_dummy_target): Delete.
7658 (dummy_target::dummy_target, dummy_target::shortname)
7659 (dummy_target::longname, dummy_target::doc)
7660 (debug_target::debug_target, debug_target::shortname)
7661 (debug_target::longname, debug_target::doc): New.
7662 (target_supports_delete_record): Use regular delegation.
7663 (setup_target_debug): Delete.
7664 (maintenance_print_target_stack): Skip debug_stratum.
7665 (initialize_targets): Instantiate the_dummy_target and
7667 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7669 (target_auxv_search, fprint_target_auxv): Adjust.
7670 (info_auxv_command): Adjust to use target_stack.
7671 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7672 * exceptions.c (print_flush): Handle a NULL target_stack.
7673 * regcache.c (target_ops_no_register): Refactor as class with
7676 * exec.c (exec_target): New class.
7677 (exec_ops): Now an exec_target.
7678 (exec_open, exec_close_1, exec_get_section_table)
7679 (exec_xfer_partial, exec_files_info, exec_has_memory)
7680 (exec_make_note_section): Refactor as exec_target methods.
7681 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7683 (exec_target::find_memory_regions): New.
7684 (_initialize_exec): Don't call init_exec_ops.
7685 * gdbcore.h (exec_file_clear): Delete.
7687 * corefile.c (core_target): Delete.
7688 (core_file_command): Adjust.
7689 * corelow.c (core_target): New class.
7690 (the_core_target): New.
7691 (core_close): Remove target_ops parameter.
7692 (core_close_cleanup): Adjust.
7693 (core_target::close): New.
7694 (core_open, core_detach, get_core_registers, core_files_info)
7695 (core_xfer_partial, core_thread_alive, core_read_description)
7696 (core_pid_to_str, core_thread_name, core_has_memory)
7697 (core_has_stack, core_has_registers, core_info_proc): Rework as
7698 core_target methods.
7699 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7700 (_initialize_corelow): Initialize the_core_target.
7701 * gdbcore.h (core_target): Delete.
7702 (the_core_target): New.
7704 * ctf.c: (ctf_target): New class.
7705 (ctf_ops): Now a ctf_target.
7706 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7707 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7708 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7710 (init_ctf_ops): Delete.
7711 (_initialize_ctf): Don't call it.
7712 * tracefile-tfile.c (tfile_target): New class.
7713 (tfile_ops): Now a tfile_target.
7714 (tfile_open, tfile_close, tfile_files_info)
7715 (tfile_get_tracepoint_status, tfile_trace_find)
7716 (tfile_fetch_registers, tfile_xfer_partial)
7717 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7718 Refactor as tfile_target methods.
7719 (tfile_xfer_partial_features): Remove target_ops parameter.
7720 (init_tfile_ops): Delete.
7721 (_initialize_tracefile_tfile): Don't call it.
7722 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7723 (tracefile_has_stack, tracefile_has_registers)
7724 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7725 tracefile_target methods.
7726 (init_tracefile_ops): Delete.
7727 (tracefile_target::tracefile_target): New.
7728 * tracefile.h: Include "target.h".
7729 (tracefile_target): New class.
7730 (init_tracefile_ops): Delete.
7732 * spu-multiarch.c (spu_multiarch_target): New class.
7733 (spu_ops): Now a spu_multiarch_target.
7734 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7735 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7736 (spu_search_memory, spu_mourn_inferior): Refactor as
7737 spu_multiarch_target methods.
7738 (init_spu_ops): Delete.
7739 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7740 complete_target_initialization.
7742 * ravenscar-thread.c (ravenscar_thread_target): New class.
7743 (ravenscar_ops): Now a ravenscar_thread_target.
7744 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7745 (ravenscar_thread_alive, ravenscar_pid_to_str)
7746 (ravenscar_fetch_registers, ravenscar_store_registers)
7747 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7748 (ravenscar_stopped_by_hw_breakpoint)
7749 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7750 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7751 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7753 (init_ravenscar_thread_ops): Delete.
7754 (_initialize_ravenscar): Remove references to
7755 init_ravenscar_thread_ops and complete_target_initialization.
7757 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7758 (bsd_uthread_target): New class.
7759 (bsd_uthread_ops): Now a bsd_uthread_target.
7760 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7761 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7762 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7763 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7764 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7765 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7766 (bsd_uthread_target): Delete function.
7767 (_initialize_bsd_uthread): Remove reference to
7768 complete_target_initialization.
7770 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7771 (target_bfd): ... this new class.
7772 (target_bfd_xfer_partial, target_bfd_get_section_table)
7773 (target_bfd_close): Refactor as target_bfd methods.
7774 (target_bfd::~target_bfd): New.
7775 (target_bfd_reopen): Adjust.
7776 (target_bfd::close): New.
7778 * record-btrace.c (record_btrace_target): New class.
7779 (record_btrace_ops): Now a record_btrace_target.
7780 (record_btrace_open, record_btrace_stop_recording)
7781 (record_btrace_disconnect, record_btrace_close)
7782 (record_btrace_async, record_btrace_info)
7783 (record_btrace_insn_history, record_btrace_insn_history_range)
7784 (record_btrace_insn_history_from, record_btrace_call_history)
7785 (record_btrace_call_history_range)
7786 (record_btrace_call_history_from, record_btrace_record_method)
7787 (record_btrace_is_replaying, record_btrace_will_replay)
7788 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7789 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7790 (record_btrace_store_registers, record_btrace_prepare_to_store)
7791 (record_btrace_to_get_unwinder)
7792 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7793 (record_btrace_commit_resume, record_btrace_wait)
7794 (record_btrace_stop, record_btrace_can_execute_reverse)
7795 (record_btrace_stopped_by_sw_breakpoint)
7796 (record_btrace_supports_stopped_by_sw_breakpoint)
7797 (record_btrace_stopped_by_hw_breakpoint)
7798 (record_btrace_supports_stopped_by_hw_breakpoint)
7799 (record_btrace_update_thread_list, record_btrace_thread_alive)
7800 (record_btrace_goto_begin, record_btrace_goto_end)
7801 (record_btrace_goto, record_btrace_stop_replaying_all)
7802 (record_btrace_execution_direction)
7803 (record_btrace_prepare_to_generate_core)
7804 (record_btrace_done_generating_core): Refactor as
7805 record_btrace_target methods.
7806 (init_record_btrace_ops): Delete.
7807 (_initialize_record_btrace): Remove reference to
7808 init_record_btrace_ops.
7809 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7810 the execution_direction global.
7811 (record_full_base_target, record_full_target)
7812 (record_full_core_target): New classes.
7813 (record_full_ops): Now a record_full_target.
7814 (record_full_core_ops): Now a record_full_core_target.
7815 (record_full_target::detach, record_full_target::disconnect)
7816 (record_full_core_target::disconnect)
7817 (record_full_target::mourn_inferior, record_full_target::kill):
7819 (record_full_open, record_full_close, record_full_async): Refactor
7820 as methods of the record_full_base_target class.
7821 (record_full_resume, record_full_commit_resume): Refactor
7822 as methods of the record_full_target class.
7823 (record_full_wait, record_full_stopped_by_watchpoint)
7824 (record_full_stopped_data_address)
7825 (record_full_stopped_by_sw_breakpoint)
7826 (record_full_supports_stopped_by_sw_breakpoint)
7827 (record_full_stopped_by_hw_breakpoint)
7828 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7829 methods of the record_full_base_target class.
7830 (record_full_store_registers, record_full_xfer_partial)
7831 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7832 Refactor as methods of the record_full_target class.
7833 (record_full_can_execute_reverse, record_full_get_bookmark)
7834 (record_full_goto_bookmark, record_full_execution_direction)
7835 (record_full_record_method, record_full_info, record_full_delete)
7836 (record_full_is_replaying, record_full_will_replay)
7837 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7838 (record_full_stop_replaying): Refactor as methods of the
7839 record_full_base_target class.
7840 (record_full_core_resume, record_full_core_kill)
7841 (record_full_core_fetch_registers)
7842 (record_full_core_prepare_to_store)
7843 (record_full_core_store_registers, record_full_core_xfer_partial)
7844 (record_full_core_insert_breakpoint)
7845 (record_full_core_remove_breakpoint)
7846 (record_full_core_has_execution): Refactor
7847 as methods of the record_full_core_target class.
7848 (record_full_base_target::supports_delete_record): New.
7849 (init_record_full_ops): Delete.
7850 (init_record_full_core_ops): Delete.
7851 (record_full_save): Refactor as method of the
7852 record_full_base_target class.
7853 (_initialize_record_full): Remove references to
7854 init_record_full_ops and init_record_full_core_ops.
7856 * remote.c (remote_target, extended_remote_target): New classes.
7857 (remote_ops): Now a remote_target.
7858 (extended_remote_ops): Now an extended_remote_target.
7859 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7860 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7861 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7862 (remote_pass_signals, remote_set_syscall_catchpoint)
7863 (remote_program_signals, )
7864 (remote_thread_always_alive): Remove target_ops parameter.
7865 (remote_thread_alive, remote_thread_name)
7866 (remote_update_thread_list, remote_threads_extra_info)
7867 (remote_static_tracepoint_marker_at)
7868 (remote_static_tracepoint_markers_by_strid)
7869 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7870 (remote_open): Refactor as methods of remote_target.
7871 (extended_remote_open, extended_remote_detach)
7872 (extended_remote_attach, extended_remote_post_attach):
7873 (extended_remote_supports_disable_randomization)
7874 (extended_remote_create_inferior): : Refactor as method of
7875 extended_remote_target.
7876 (remote_set_permissions, remote_open_1, remote_detach)
7877 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7878 (remote_resume, remote_commit_resume, remote_stop)
7879 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7880 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7881 (remote_prepare_to_store, remote_store_registers)
7882 (remote_flash_erase, remote_flash_done, remote_files_info)
7883 (remote_kill, remote_mourn, remote_insert_breakpoint)
7884 (remote_remove_breakpoint, remote_insert_watchpoint)
7885 (remote_watchpoint_addr_within_range)
7886 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7887 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7888 (remote_supports_stopped_by_sw_breakpoint)
7889 (remote_stopped_by_hw_breakpoint)
7890 (remote_supports_stopped_by_hw_breakpoint)
7891 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7892 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7893 (remote_verify_memory): Refactor as methods of remote_target.
7894 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7896 (remote_xfer_partial, remote_get_memory_xfer_limit)
7897 (remote_search_memory, remote_rcmd, remote_memory_map)
7898 (remote_pid_to_str, remote_get_thread_local_address)
7899 (remote_get_tib_address, remote_read_description): Refactor as
7900 methods of remote_target.
7901 (remote_target::fileio_open, remote_target::fileio_pwrite)
7902 (remote_target::fileio_pread, remote_target::fileio_close): New.
7903 (remote_hostio_readlink, remote_hostio_fstat)
7904 (remote_filesystem_is_local, remote_can_execute_reverse)
7905 (remote_supports_non_stop, remote_supports_disable_randomization)
7906 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7907 (remote_supports_enable_disable_tracepoint)
7908 (remote_supports_string_tracing)
7909 (remote_can_run_breakpoint_commands, remote_trace_init)
7910 (remote_download_tracepoint, remote_can_download_tracepoint)
7911 (remote_download_trace_state_variable, remote_enable_tracepoint)
7912 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7913 (remote_trace_start, remote_get_trace_status)
7914 (remote_get_tracepoint_status, remote_trace_stop)
7915 (remote_trace_find, remote_get_trace_state_variable_value)
7916 (remote_save_trace_data, remote_get_raw_trace_data)
7917 (remote_set_disconnected_tracing, remote_core_of_thread)
7918 (remote_set_circular_trace_buffer, remote_traceframe_info)
7919 (remote_get_min_fast_tracepoint_insn_len)
7920 (remote_set_trace_buffer_size, remote_set_trace_notes)
7921 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7922 (remote_disable_btrace, remote_teardown_btrace)
7923 (remote_read_btrace, remote_btrace_conf)
7924 (remote_augmented_libraries_svr4_read, remote_load)
7925 (remote_pid_to_exec_file, remote_can_do_single_step)
7926 (remote_execution_direction, remote_thread_handle_to_thread_info):
7927 Refactor as methods of remote_target.
7928 (init_remote_ops, init_extended_remote_ops): Delete.
7929 (remote_can_async_p, remote_is_async_p, remote_async)
7930 (remote_thread_events, remote_upload_tracepoints)
7931 (remote_upload_trace_state_variables): Refactor as methods of
7933 (_initialize_remote): Remove references to init_remote_ops and
7934 init_extended_remote_ops.
7936 * remote-sim.c (gdbsim_target): New class.
7937 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7938 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7939 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7940 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7941 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7942 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7943 Refactor as methods of gdbsim_target.
7944 (gdbsim_ops): Now a gdbsim_target.
7945 (init_gdbsim_ops): Delete.
7946 (gdbsim_cntrl_c): Adjust.
7947 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7949 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7950 (the_amd64_linux_nat_target): New.
7951 (amd64_linux_fetch_inferior_registers)
7952 (amd64_linux_store_inferior_registers): Refactor as methods of
7953 amd64_linux_nat_target.
7954 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7955 * i386-linux-nat.c: Don't include "linux-nat.h".
7956 (i386_linux_nat_target): New class.
7957 (the_i386_linux_nat_target): New.
7958 (i386_linux_fetch_inferior_registers)
7959 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7960 as methods of i386_linux_nat_target.
7961 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7962 * inf-child.c (inf_child_ops): Delete.
7963 (inf_child_fetch_inferior_registers)
7964 (inf_child_store_inferior_registers): Delete.
7965 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7966 methods of inf_child_target.
7967 (inf_child_target::supports_terminal_ours)
7968 (inf_child_target::terminal_init)
7969 (inf_child_target::terminal_inferior)
7970 (inf_child_target::terminal_ours_for_output)
7971 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7972 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7974 (inf_child_open, inf_child_disconnect, inf_child_close)
7975 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7976 (inf_child_post_startup_inferior, inf_child_can_run)
7977 (inf_child_pid_to_exec_file): Refactor as methods of
7979 (inf_child_follow_fork): Delete.
7980 (inf_child_target::can_create_inferior)
7981 (inf_child_target::can_attach): New.
7982 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7983 (inf_child_target::has_stack, inf_child_target::has_registers)
7984 (inf_child_target::has_execution): New.
7985 (inf_child_fileio_open, inf_child_fileio_pwrite)
7986 (inf_child_fileio_pread, inf_child_fileio_fstat)
7987 (inf_child_fileio_close, inf_child_fileio_unlink)
7988 (inf_child_fileio_readlink, inf_child_use_agent)
7989 (inf_child_can_use_agent): Refactor as methods of
7991 (return_zero, inf_child_target): Delete.
7992 (inf_child_target::inf_child_target): New.
7993 * inf-child.h: Include "target.h".
7994 (inf_child_target): Delete function prototype.
7995 (inf_child_target): New class.
7996 (inf_child_open_target, inf_child_mourn_inferior)
7997 (inf_child_maybe_unpush_target): Delete.
7998 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7999 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8000 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8001 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8002 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8003 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8004 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8005 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8006 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8007 methods of inf_ptrace_target.
8008 (inf_ptrace_target): Delete function.
8009 * inf-ptrace.h: Include "inf-child.h".
8010 (inf_ptrace_target): Delete function declaration.
8011 (inf_ptrace_target): New class.
8012 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8013 * linux-nat.c (linux_target): New.
8014 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8015 (linux_nat_target::~linux_nat_target): New.
8016 (linux_child_post_attach, linux_child_post_startup_inferior)
8017 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8018 (linux_child_remove_fork_catchpoint)
8019 (linux_child_insert_vfork_catchpoint)
8020 (linux_child_remove_vfork_catchpoint)
8021 (linux_child_insert_exec_catchpoint)
8022 (linux_child_remove_exec_catchpoint)
8023 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8024 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8025 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8026 (linux_nat_stopped_data_address)
8027 (linux_nat_stopped_by_sw_breakpoint)
8028 (linux_nat_supports_stopped_by_sw_breakpoint)
8029 (linux_nat_stopped_by_hw_breakpoint)
8030 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8031 (linux_nat_kill, linux_nat_mourn_inferior)
8032 (linux_nat_xfer_partial, linux_nat_thread_alive)
8033 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8034 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8035 (linux_child_static_tracepoint_markers_by_strid)
8036 (linux_nat_is_async_p, linux_nat_can_async_p)
8037 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8038 (linux_nat_supports_multi_process)
8039 (linux_nat_supports_disable_randomization, linux_nat_async)
8040 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8041 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8042 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8043 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8044 methods of linux_nat_target.
8045 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8046 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8048 (check_stopped_by_watchpoint): Adjust.
8049 (linux_xfer_partial): Delete.
8050 (linux_target_install_ops, linux_target, linux_nat_add_target):
8052 (linux_nat_target::linux_nat_target): New.
8053 * linux-nat.h: Include "inf-ptrace.h".
8054 (linux_nat_target): New.
8055 (linux_target, linux_target_install_ops, linux_nat_add_target):
8056 Delete function declarations.
8057 (linux_target): Declare global.
8058 * linux-thread-db.c (thread_db_target): New.
8059 (thread_db_target::thread_db_target): New.
8060 (thread_db_ops): Delete.
8061 (the_thread_db_target): New.
8062 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8063 (thread_db_update_thread_list, thread_db_pid_to_str)
8064 (thread_db_extra_thread_info)
8065 (thread_db_thread_handle_to_thread_info)
8066 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8067 (thread_db_resume): Refactor as methods of thread_db_target.
8068 (init_thread_db_ops): Delete.
8069 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8070 * x86-linux-nat.c: Don't include "linux-nat.h".
8071 (super_post_startup_inferior): Delete.
8072 (x86_linux_nat_target::~x86_linux_nat_target): New.
8073 (x86_linux_child_post_startup_inferior)
8074 (x86_linux_read_description, x86_linux_enable_btrace)
8075 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8076 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8077 methods of x86_linux_nat_target.
8078 (x86_linux_create_target): Delete. Bits folded ...
8079 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8081 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8082 (x86_linux_nat_target): New class.
8083 (x86_linux_create_target): Delete.
8084 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8085 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8086 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8087 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8088 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8089 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8091 (x86_use_watchpoints): Delete.
8092 * x86-nat.h: Include "breakpoint.h" and "target.h".
8093 (x86_use_watchpoints): Delete.
8094 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8095 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8096 (x86_insert_watchpoint, x86_remove_watchpoint)
8097 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8098 (x86_stopped_by_hw_breakpoint): New declarations.
8099 (x86_nat_target): New template class.
8101 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8102 (the_ppc_linux_nat_target): New.
8103 (ppc_linux_fetch_inferior_registers)
8104 (ppc_linux_can_use_hw_breakpoint)
8105 (ppc_linux_region_ok_for_hw_watchpoint)
8106 (ppc_linux_ranged_break_num_registers)
8107 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8108 (ppc_linux_insert_mask_watchpoint)
8109 (ppc_linux_remove_mask_watchpoint)
8110 (ppc_linux_can_accel_watchpoint_condition)
8111 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8112 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8113 (ppc_linux_watchpoint_addr_within_range)
8114 (ppc_linux_masked_watch_num_registers)
8115 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8116 (ppc_linux_read_description): Refactor as methods of
8117 ppc_linux_nat_target.
8118 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8120 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8121 (procfs_target): New class.
8122 (the_procfs_target): New.
8123 (procfs_target): Delete function.
8124 (procfs_auxv_parse, procfs_attach, procfs_detach)
8125 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8126 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8127 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8128 (procfs_create_inferior, procfs_update_thread_list)
8129 (procfs_thread_alive, procfs_pid_to_str)
8130 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8131 (procfs_stopped_data_address, procfs_insert_watchpoint)
8132 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8133 (proc_find_memory_regions, procfs_info_proc)
8134 (procfs_make_note_section): Refactor as methods of procfs_target.
8135 (_initialize_procfs): Adjust.
8136 * sol-thread.c (sol_thread_target): New class.
8137 (sol_thread_ops): Now a sol_thread_target.
8138 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8139 (sol_thread_fetch_registers, sol_thread_store_registers)
8140 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8141 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8142 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8143 (init_sol_thread_ops): Delete.
8144 (_initialize_sol_thread): Adjust. Remove references to
8145 init_sol_thread_ops and complete_target_initialization.
8147 * windows-nat.c (windows_nat_target): New class.
8148 (windows_fetch_inferior_registers)
8149 (windows_store_inferior_registers, windows_resume, windows_wait)
8150 (windows_attach, windows_detach, windows_pid_to_exec_file)
8151 (windows_files_info, windows_create_inferior)
8152 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8153 (windows_close, windows_pid_to_str, windows_xfer_partial)
8154 (windows_get_tib_address, windows_get_ada_task_ptid)
8155 (windows_thread_name, windows_thread_alive): Refactor as
8156 windows_nat_target methods.
8157 (do_initial_windows_stuff): Adjust.
8158 (windows_target): Delete function.
8159 (_initialize_windows_nat): Adjust.
8161 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8162 (darwin_mourn_inferior, darwin_kill_inferior)
8163 (darwin_create_inferior, darwin_attach, darwin_detach)
8164 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8165 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8166 (darwin_supports_multi_process): Refactor as darwin_nat_target
8168 (darwin_resume_to, darwin_files_info): Delete.
8169 (_initialize_darwin_inferior): Rename to ...
8170 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8171 * darwin-nat.h: Include "inf-child.h".
8172 (darwin_nat_target): New class.
8173 (darwin_complete_target): Delete.
8174 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8175 (darwin_target): New.
8176 (i386_darwin_fetch_inferior_registers)
8177 (i386_darwin_store_inferior_registers): Refactor as methods of
8179 (darwin_complete_target): Delete, with ...
8180 (_initialize_i386_darwin_nat): ... bits factored out here.
8182 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8183 (the_alpha_linux_nat_target): New.
8184 (alpha_linux_register_u_offset): Refactor as
8185 alpha_linux_nat_target method.
8186 (_initialize_alpha_linux_nat): Adjust.
8187 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8188 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8189 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8190 methods of linux_nat_trad_target.
8191 (linux_trad_target): Delete.
8192 * linux-nat-trad.h (linux_trad_target): Delete function.
8193 (linux_nat_trad_target): New class.
8194 * mips-linux-nat.c (mips_linux_nat_target): New class.
8195 (super_fetch_registers, super_store_registers, super_close):
8197 (the_mips_linux_nat_target): New.
8198 (mips64_linux_regsets_fetch_registers)
8199 (mips64_linux_regsets_store_registers)
8200 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8201 (mips_linux_register_u_offset, mips_linux_read_description)
8202 (mips_linux_can_use_hw_breakpoint)
8203 (mips_linux_stopped_by_watchpoint)
8204 (mips_linux_stopped_data_address)
8205 (mips_linux_region_ok_for_hw_watchpoint)
8206 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8207 (mips_linux_close): Refactor as methods of mips_linux_nat.
8208 (_initialize_mips_linux_nat): Adjust to C++ification.
8210 * aix-thread.c (aix_thread_target): New class.
8211 (aix_thread_ops): Now an aix_thread_target.
8212 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8213 (aix_thread_fetch_registers, aix_thread_store_registers)
8214 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8215 (aix_thread_thread_alive, aix_thread_pid_to_str)
8216 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8217 Refactor as methods of aix_thread_target.
8218 (init_aix_thread_ops): Delete.
8219 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8220 and complete_target_initialization.
8221 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8222 (rs6000_nat_target): New class.
8223 (the_rs6000_nat_target): New.
8224 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8225 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8226 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8227 (super_create_inferior): Delete.
8228 (_initialize_rs6000_nat): Adjust to C++ification.
8230 * arm-linux-nat.c (arm_linux_nat_target): New class.
8231 (the_arm_linux_nat_target): New.
8232 (arm_linux_fetch_inferior_registers)
8233 (arm_linux_store_inferior_registers, arm_linux_read_description)
8234 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8235 (arm_linux_remove_hw_breakpoint)
8236 (arm_linux_region_ok_for_hw_watchpoint)
8237 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8238 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8239 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8240 arm_linux_nat_target.
8241 (_initialize_arm_linux_nat): Adjust to C++ification.
8243 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8244 (the_aarch64_linux_nat_target): New.
8245 (aarch64_linux_fetch_inferior_registers)
8246 (aarch64_linux_store_inferior_registers)
8247 (aarch64_linux_child_post_startup_inferior)
8248 (aarch64_linux_read_description)
8249 (aarch64_linux_can_use_hw_breakpoint)
8250 (aarch64_linux_insert_hw_breakpoint)
8251 (aarch64_linux_remove_hw_breakpoint)
8252 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8253 (aarch64_linux_region_ok_for_hw_watchpoint)
8254 (aarch64_linux_stopped_data_address)
8255 (aarch64_linux_stopped_by_watchpoint)
8256 (aarch64_linux_watchpoint_addr_within_range)
8257 (aarch64_linux_can_do_single_step): Refactor as methods of
8258 aarch64_linux_nat_target.
8259 (super_post_startup_inferior): Delete.
8260 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8262 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8263 (the_hppa_linux_nat_target): New.
8264 (hppa_linux_fetch_inferior_registers)
8265 (hppa_linux_store_inferior_registers): Refactor as methods of
8266 hppa_linux_nat_target.
8267 (_initialize_hppa_linux_nat): Adjust to C++ification.
8269 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8270 (the_ia64_linux_nat_target): New.
8271 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8272 (ia64_linux_stopped_data_address)
8273 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8274 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8275 ia64_linux_nat_target methods.
8276 (super_xfer_partial): Delete.
8277 (_initialize_ia64_linux_nat): Adjust to C++ification.
8279 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8280 (the_m32r_linux_nat_target): New.
8281 (m32r_linux_fetch_inferior_registers)
8282 (m32r_linux_store_inferior_registers): Refactor as
8283 m32r_linux_nat_target methods.
8284 (_initialize_m32r_linux_nat): Adjust to C++ification.
8286 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8287 (the_m68k_linux_nat_target): New.
8288 (m68k_linux_fetch_inferior_registers)
8289 (m68k_linux_store_inferior_registers): Refactor as
8290 m68k_linux_nat_target methods.
8291 (_initialize_m68k_linux_nat): Adjust to C++ification.
8293 * s390-linux-nat.c (s390_linux_nat_target): New class.
8294 (the_s390_linux_nat_target): New.
8295 (s390_linux_fetch_inferior_registers)
8296 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8297 (s390_insert_watchpoint, s390_remove_watchpoint)
8298 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8299 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8300 (s390_auxv_parse, s390_read_description): Refactor as methods of
8301 s390_linux_nat_target.
8302 (_initialize_s390_nat): Adjust to C++ification.
8304 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8305 (the_sparc_linux_nat_target): New.
8306 (_initialize_sparc_linux_nat): Adjust to C++ification.
8307 * sparc-nat.c (sparc_fetch_inferior_registers)
8308 (sparc_store_inferior_registers): Remove target_ops parameter.
8309 * sparc-nat.h (sparc_fetch_inferior_registers)
8310 (sparc_store_inferior_registers): Remove target_ops parameter.
8311 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8312 (the_sparc64_linux_nat_target): New.
8313 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8315 * spu-linux-nat.c (spu_linux_nat_target): New class.
8316 (the_spu_linux_nat_target): New.
8317 (spu_child_post_startup_inferior, spu_child_post_attach)
8318 (spu_child_wait, spu_fetch_inferior_registers)
8319 (spu_store_inferior_registers, spu_xfer_partial)
8320 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8322 (_initialize_spu_nat): Adjust to C++ification.
8324 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8325 (the_tilegx_linux_nat_target): New.
8326 (fetch_inferior_registers, store_inferior_registers):
8327 Refactor as methods.
8328 (_initialize_tile_linux_nat): Adjust to C++ification.
8330 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8331 (the_xtensa_linux_nat_target): New.
8332 (xtensa_linux_fetch_inferior_registers)
8333 (xtensa_linux_store_inferior_registers): Refactor as
8334 xtensa_linux_nat_target methods.
8335 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8337 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8338 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8339 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8340 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8341 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8342 (fbsd_stopped_by_sw_breakpoint)
8343 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8344 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8345 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8346 (fbsd_post_startup_inferior, fbsd_post_attach)
8347 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8348 (fbsd_set_syscall_catchpoint)
8349 (super_xfer_partial, super_resume, super_wait)
8350 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8351 (fbsd_handle_debug_trap): Remove target_ops parameter.
8352 (fbsd_nat_add_target): Delete.
8353 * fbsd-nat.h: Include "inf-ptrace.h".
8354 (fbsd_nat_add_target): Delete.
8355 (USE_SIGTRAP_SIGINFO): Define.
8356 (fbsd_nat_target): New class.
8358 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8359 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8360 (amd64bsd_target): Delete.
8361 * amd64-bsd-nat.h: New file.
8362 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8364 (amd64_fbsd_nat_target): New class.
8365 (the_amd64_fbsd_nat_target): New.
8366 (amd64fbsd_read_description): Refactor as method of
8367 amd64_fbsd_nat_target.
8368 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8369 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8370 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8371 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8372 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8373 (i386bsd_target): Delete.
8374 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8375 (i386bsd_fetch_inferior_registers)
8376 (i386bsd_store_inferior_registers): Declare.
8377 (i386_bsd_nat_target): New class.
8378 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8379 (the_i386_fbsd_nat_target): New.
8380 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8381 i386_fbsd_nat_target methods.
8382 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8383 (_initialize_i386fbsd_nat): Adjust to C++ification.
8384 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8385 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8386 (_initialize_x86_bsd_nat): Adjust to C++ification.
8387 * x86-bsd-nat.h: Include "x86-nat.h".
8388 (x86bsd_target): Delete declaration.
8389 (x86bsd_nat_target): New class.
8391 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8392 (the_aarch64_fbsd_nat_target): New.
8393 (aarch64_fbsd_fetch_inferior_registers)
8394 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8395 aarch64_fbsd_nat_target.
8396 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8397 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8398 (the_alpha_bsd_nat_target): New.
8399 (alphabsd_fetch_inferior_registers)
8400 (alphabsd_store_inferior_registers): Refactor as
8401 alpha_bsd_nat_target methods.
8402 (_initialize_alphabsd_nat): Refactor as methods of
8403 alpha_bsd_nat_target.
8404 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8405 (the_amd64_nbsd_nat_target): New.
8406 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8407 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8408 (the_amd64_obsd_nat_target): New.
8409 (_initialize_amd64obsd_nat): Adjust to C++ification.
8410 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8411 (the_arm_fbsd_nat_target): New.
8412 (arm_fbsd_fetch_inferior_registers)
8413 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8414 (_initialize_arm_fbsd_nat): Refactor as methods of
8415 arm_fbsd_nat_target.
8416 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8417 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8418 (the_arm_netbsd_nat_target): New.
8419 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8420 arm_netbsd_nat_target.
8421 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8422 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8423 (the_hppa_nbsd_nat_target): New.
8424 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8425 hppa_nbsd_nat_target methods.
8426 (_initialize_hppanbsd_nat): Adjust to C++ification.
8427 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8428 (the_hppa_obsd_nat_target): New.
8429 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8430 methods of hppa_obsd_nat_target.
8431 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
8433 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8434 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
8436 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8437 (_initialize_i386obsd_nat): Use add_target.
8438 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8439 (the_m68k_bsd_nat_target): New.
8440 (m68kbsd_fetch_inferior_registers)
8441 (m68kbsd_store_inferior_registers): Refactor as methods of
8442 m68k_bsd_nat_target.
8443 (_initialize_m68kbsd_nat): Adjust to C++ification.
8444 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8445 (the_mips_fbsd_nat_target): New.
8446 (mips_fbsd_fetch_inferior_registers)
8447 (mips_fbsd_store_inferior_registers): Refactor as methods of
8448 mips_fbsd_nat_target.
8449 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
8451 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8452 (the_mips_nbsd_nat_target): New.
8453 (mipsnbsd_fetch_inferior_registers)
8454 (mipsnbsd_store_inferior_registers): Refactor as methods of
8455 mips_nbsd_nat_target.
8456 (_initialize_mipsnbsd_nat): Adjust to C++ification.
8457 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8458 (the_mips64_obsd_nat_target): New.
8459 (mips64obsd_fetch_inferior_registers)
8460 (mips64obsd_store_inferior_registers): Refactor as methods of
8461 mips64_obsd_nat_target.
8462 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
8464 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8466 * nbsd-nat.h: Include "inf-ptrace.h".
8467 (nbsd_nat_target): New class.
8468 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8469 (obsd_wait): Refactor as methods of obsd_nat_target.
8470 (obsd_add_target): Delete.
8471 * obsd-nat.h: Include "inf-ptrace.h".
8472 (obsd_nat_target): New class.
8473 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8474 (the_ppc_fbsd_nat_target): New.
8475 (ppcfbsd_fetch_inferior_registers)
8476 (ppcfbsd_store_inferior_registers): Refactor as methods of
8477 ppc_fbsd_nat_target.
8478 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
8480 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8481 (the_ppc_nbsd_nat_target): New.
8482 (ppcnbsd_fetch_inferior_registers)
8483 (ppcnbsd_store_inferior_registers): Refactor as methods of
8484 ppc_nbsd_nat_target.
8485 (_initialize_ppcnbsd_nat): Adjust to C++ification.
8486 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8487 (the_ppc_obsd_nat_target): New.
8488 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8489 methods of ppc_obsd_nat_target.
8490 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
8492 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8493 (the_sh_nbsd_nat_target): New.
8494 (shnbsd_fetch_inferior_registers)
8495 (shnbsd_store_inferior_registers): Refactor as methods of
8497 (_initialize_shnbsd_nat): Adjust to C++ification.
8498 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8499 (inf_ptrace_xfer_partial): Delete.
8500 (sparc_xfer_partial, sparc_target): Delete.
8501 * sparc-nat.h (sparc_fetch_inferior_registers)
8502 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8503 (sparc_target): Delete function declaration.
8504 (sparc_target): New template class.
8505 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8506 (_initialize_sparcnbsd_nat): Adjust to C++ification.
8507 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8508 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
8510 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8511 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8512 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8513 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
8515 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8516 (the_vax_bsd_nat_target): New.
8517 (vaxbsd_fetch_inferior_registers)
8518 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8520 (_initialize_vaxbsd_nat): Adjust to C++ification.
8522 * bsd-kvm.c (bsd_kvm_target): New class.
8523 (bsd_kvm_ops): Now a bsd_kvm_target.
8524 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8525 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8526 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8528 (bsd_kvm_return_one): Delete.
8529 (bsd_kvm_add_target): Adjust to C++ification.
8531 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8532 (nto_procfs_target_procfs): New classes.
8533 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8534 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8535 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8536 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8537 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8538 (procfs_remove_hw_breakpoint, procfs_resume)
8539 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8540 (procfs_kill_inferior, procfs_store_registers)
8541 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8542 as methods of nto_procfs_target.
8543 (nto_procfs_ops): Now an nto_procfs_target_procfs.
8544 (nto_native_ops): Delete.
8545 (procfs_open, procfs_native_open): Delete.
8546 (nto_native_ops): Now an nto_procfs_target_native.
8547 (init_procfs_targets): Adjust to C++ification.
8548 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8549 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8550 Refactor as methods of nto_procfs_target.
8552 * go32-nat.c (go32_nat_target): New class.
8553 (the_go32_nat_target): New.
8554 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8555 (go32_store_registers, go32_xfer_partial, go32_files_info)
8556 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8557 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8558 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8559 (go32_pid_to_str): Refactor as methods of go32_nat_target.
8560 (go32_target): Delete.
8561 (_initialize_go32_nat): Adjust to C++ification.
8563 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8564 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8565 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8566 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8568 (gnu_target): Delete.
8569 * gnu-nat.h (gnu_target): Delete.
8570 (gnu_nat_target): New class.
8571 * i386-gnu-nat.c (gnu_base_target): New.
8572 (i386_gnu_nat_target): New class.
8573 (the_i386_gnu_nat_target): New.
8574 (_initialize_i386gnu_nat): Adjust to C++ification.
8576 2018-05-02 Pedro Alves <palves@redhat.com>
8578 * bfd-target.c (target_bfd_xclose): Rename to ...
8579 (target_bfd_close): ... this.
8580 (target_bfd_reopen): Adjust.
8581 * target.c (target_close): Remove references to to_xclose.
8582 * target.h (target_ops::to_xclose): Delete.
8583 (target_ops::to_close): Update comments.
8585 2018-05-02 Pedro Alves <palves@redhat.com>
8587 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8589 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8590 * inf-ptrace.c (inf_ptrace_register_u_offset)
8591 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8592 (inf_ptrace_store_register, inf_ptrace_store_registers)
8593 (inf_ptrace_trad_target): Move to ...
8594 * linux-nat-trad.c: ... this new file.
8595 * linux-nat-trad.h: New file.
8596 * linux-nat.c (linux_target_install_ops): Make extern.
8597 (linux_trad_target): Delete.
8598 * linux-nat.h (linux_trad_target): Delete declaration.
8599 (linux_target_install_ops): Declare.
8600 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8603 2018-05-02 Pedro Alves <palves@redhat.com>
8605 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8606 procfs_target/add_target here.
8607 * procfs.c (procfs_target): Make static.
8608 (_initialize_procfs): Call add_target here.
8609 * procfs.h (struct target_ops): Remove forward declaration.
8610 (procfs_target): Remove declaration.
8611 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8613 2018-05-02 Pedro Alves <palves@redhat.com>
8615 * procfs.c (procfs_stopped_by_watchpoint)
8616 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8617 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8619 (procfs_use_watchpoints): Delete, move contents...
8620 (procfs_target): ... here.
8621 * procfs.h (procfs_use_watchpoints): Delete declaration.
8622 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8623 procfs_use_watchpoints.
8624 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8625 procfs_use_watchpoints.
8627 2018-05-02 Tom Tromey <tom@tromey.com>
8630 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8631 and var_zuinteger_unlimited.
8632 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8633 and PARAM_ZUINTEGER_UNLIMITED.
8634 (set_parameter_value): Handle var_zuinteger and
8635 var_zuinteger_unlimited.
8636 (add_setshow_generic): Likewise.
8637 (parmpy_init): Likewise.
8639 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8642 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8643 pointer is not null before dereferencing it.
8645 2018-04-30 Tom Tromey <tom@tromey.com>
8647 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8650 2018-04-30 Tom Tromey <tom@tromey.com>
8652 * breakpoint.c (mention): Remove use of is_mi_like_p.
8653 (print_mention_ranged_breakpoint): Likewise.
8654 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8657 2018-04-30 Tom Tromey <tom@tromey.com>
8659 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8661 2018-04-30 Tom Tromey <tom@tromey.com>
8663 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8664 (info_spu_event_command): Remove some uses of is_mi_like_p.
8666 2018-04-30 Tom Tromey <tom@tromey.com>
8668 * python/py-framefilter.c (py_print_single_arg)
8669 (enumerate_locals, py_print_args, py_print_frame): Remove some
8670 uses of is_mi_like_p.
8672 2018-04-30 Tom Tromey <tom@tromey.com>
8675 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8676 * ui-out.h (ui_out::is_mi_like_p): Now const.
8677 (ui_out::do_is_mi_like_p): Now const.
8678 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8680 2018-04-30 Tom Tromey <tom@tromey.com>
8682 * varobj.c (varobj_set_visualizer): Use new_reference.
8683 * python/python.c (gdbpy_decode_line): Use new_reference.
8684 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8687 2018-04-30 Tom Tromey <tom@tromey.com>
8689 * varobj.c (install_new_value): Use new_reference.
8690 * value.h (value_incref): Return void. Swap intro comment with
8692 * value.c (set_value_parent): Use new_reference.
8693 (value_incref): Return void. Update intro comment.
8694 (release_value): Use new_reference.
8695 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8697 2018-04-30 Tom Tromey <tom@tromey.com>
8699 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8700 * gdb_bfd.h (new_bfd_ref): Remove.
8701 (gdb_bfd_open): Update comment.
8702 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8703 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8704 (gdb_bfd_fdopenr): Use new_reference.
8705 * exec.c (exec_file_attach): Use new_reference.
8707 2018-04-30 Tom Tromey <tom@tromey.com>
8709 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8712 2018-04-30 Tom Tromey <tom@tromey.com>
8714 * jit.c (jit_read_code_entry): Use type_align.
8715 * i386-tdep.c (i386_gdbarch_init): Don't call
8716 set_gdbarch_long_long_align_bit.
8717 * gdbarch.sh: Remove long_long_align_bit.
8718 * gdbarch.c, gdbarch.h: Rebuild.
8719 * arc-tdep.c (arc_type_align): New function.
8720 (arc_gdbarch_init): Use arc_type_align. Don't call
8721 set_gdbarch_long_long_align_bit.
8723 2018-04-30 Tom Tromey <tom@tromey.com>
8725 * rust-lang.c (rust_type_alignment): Remove.
8726 (rust_composite_type): Use type_align.
8728 2018-04-30 Tom Tromey <tom@tromey.com>
8730 * NEWS: Mention Type.align.
8731 * python/py-type.c (typy_get_alignof): New function.
8732 (type_object_getset): Add "alignof".
8734 2018-04-30 Tom Tromey <tom@tromey.com>
8738 * std-operator.def (UNOP_ALIGNOF): New operator.
8739 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8741 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8742 * c-lang.c (c_op_print_tab): Add alignof.
8743 * c-exp.y (ALIGNOF): New token.
8744 (exp): Add "ALIGNOF" production.
8745 (ident_tokens): Add _Alignof and alignof.
8747 2018-04-30 Tom Tromey <tom@tromey.com>
8749 * i386-tdep.c (i386_type_align): New function.
8750 (i386_gdbarch_init): Update.
8751 * gdbarch.sh (type_align): New method.
8752 * gdbarch.c, gdbarch.h: Rebuild.
8753 * arch-utils.h (default_type_align): Declare.
8754 * arch-utils.c (default_type_align): New function.
8755 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8756 (struct type) <align_log2>: New field.
8757 <instance_flags>: Now a bitfield.
8758 (TYPE_RAW_ALIGN): New macro.
8759 (type_align, type_raw_align, set_type_align): Declare.
8760 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8762 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8763 (get_alignment, maybe_set_alignment): New functions.
8764 (read_structure_type, read_enumeration_type, read_array_type)
8765 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8766 (read_subrange_type, read_base_type): Set type alignment.
8768 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8770 * dwarf2read.c (read_index_from_section): Use bool.
8772 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8775 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8778 2018-04-29 John Reiser <jreiser@BitWagon.com>
8781 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8782 last step, and do it atomically.
8784 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8786 * compile/compile-c-types.c (convert_int, convert_float):
8789 2018-04-27 Tom Tromey <tom@tromey.com>
8792 * rust-lang.c (rust_inclusive_range_type_p): New function.
8793 (rust_range): Handle inclusive ranges.
8794 (rust_compute_range): Likewise.
8795 * rust-exp.y (struct rust_op) <inclusive>: New field.
8796 (DOTDOTEQ): New constant.
8797 (range_expr): Add "..=" productions.
8798 (operator_tokens): Add "..=" token.
8799 (ast_range): Add "inclusive" parameter.
8800 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8802 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8804 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8805 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8807 * expprint.c (print_subexp_standard): Handle new bounds values.
8808 (dump_subexp_body_standard): Likewise.
8810 2018-04-27 Tom Tromey <tom@tromey.com>
8812 * configure: Rebuild.
8813 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8814 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8816 (class symbol_needs_eval_context): Likewise.
8817 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8818 (mock_mapped_index::symbol_name_at): Use "override". Remove
8820 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8822 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8823 * aarch64-tdep.c (instruction_reader::read): Use "override".
8824 (instruction_reader_test::read): Likewise.
8825 * arm-tdep.c (instruction_reader::read): Use "override".
8826 (instruction_reader_thumb::read): Likewise.
8828 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8831 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8832 instead of remote_send.
8833 (remote_send): Remove.
8835 2018-04-26 Pedro Alves <palves@redhat.com>
8837 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8838 find_function_start_sal instead of find_pc_line.
8840 2018-04-26 Pedro Alves <palves@redhat.com>
8842 * breakpoint.c (set_breakpoint_location_function): Handle
8844 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8845 * elfread.c (elf_symtab_read): Give data symbols with
8846 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8847 (elf_rel_plt_read): Update comment.
8848 * linespec.c (convert_linespec_to_sals): Handle
8850 (minsym_found): Handle mst_data_gnu_ifunc.
8851 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8852 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8853 * parse.c (find_minsym_type_and_address): Handle
8855 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8856 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8857 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8859 <mst_data_gnu_ifunc>: New enumerator.
8861 2018-04-26 Pedro Alves <palves@redhat.com>
8863 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8864 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8865 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8867 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8868 (lookup_minimal_symbol_by_pc): Adjust.
8869 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8870 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8871 * minsyms.h (lookup_msym_prefer): New enum.
8872 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8873 parameter by a lookup_msym_prefer parameter.
8875 2018-04-26 Pedro Alves <palves@redhat.com>
8877 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8878 ends in "@plt" instead of looking at the symbol's section.
8880 2018-04-26 Pedro Alves <palves@redhat.com>
8882 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8884 (find_pc_partial_function_gnu_ifunc): Rename to ...
8885 (find_pc_partial_function): ... this, and remove references to
8887 (find_pc_partial_function): Delete old implementation.
8888 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8890 2018-04-26 Pedro Alves <palves@redhat.com>
8892 * linespec.c (struct bound_minimal_symbol_search_key): New.
8893 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8894 skip first line if we found a GNU ifunc minimal symbol by name.
8895 (compare_msymbols): Change parameters to work with a destructured
8897 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8900 2018-04-26 Pedro Alves <palves@redhat.com>
8902 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8903 ifunc targets here. Instead, if we have an ifunc minsym, use its
8905 (add_location_to_breakpoint): Store the minsym and the objfile in
8906 the breakpoint location.
8907 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8908 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8909 Record the minsym in the sal.
8910 * symtab.h (symtab_and_line) <msymbol>: New field.
8912 2018-04-26 Pedro Alves <palves@redhat.com>
8914 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8915 unless we actually resolved the ifunc.
8917 2018-04-26 Pedro Alves <palves@redhat.com>
8919 * c-exp.y (variable production): Prefer ifunc minsyms over
8920 regular function symbols.
8921 * symtab.c (find_gnu_ifunc): New function.
8922 * minsyms.h (lookup_msym_prefer): New enum.
8923 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8924 parameter by a lookup_msym_prefer parameter.
8925 * symtab.h (find_gnu_ifunc): New declaration.
8927 2018-04-26 Pedro Alves <palves@redhat.com>
8929 * blockframe.c (find_gnu_ifunc_target_type): New function.
8930 (find_function_type): New.
8931 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8932 return a value with a memory address.
8933 (eval_call): For calls to GNU ifunc functions, try to find the
8934 type of the target function from the type that the resolver
8936 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8938 * infcall.c (find_function_return_type): Delete.
8939 (find_function_addr): Add 'function_type' parameter. For calls to
8940 GNU ifunc functions, try to find the type of the target function
8941 from the type that the resolver returns, and return it via
8943 (call_function_by_hand_dummy): Adjust to use the function type
8944 returned by find_function_addr.
8945 (find_function_addr): Add 'function_type' parameter and move
8947 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8950 2018-04-26 Pedro Alves <palves@redhat.com>
8952 * c-exp.y (variable production): Skip finding an alias for ifunc
8955 2018-04-26 Pedro Alves <palves@redhat.com>
8957 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8959 2018-04-25 Pedro Alves <palves@redhat.com>
8961 * infcmd.c (kill_command): Print the pid as string, not the whole
8962 thread's ptid. Add comment. s/has been killed/killed/ in output
8964 * remote.c (remote_detach_1): Print the pid as string, not the
8965 whole thread's ptid.
8967 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8968 Sergio Durigan Junior <sergiodj@redhat.com>
8969 Pedro Alves <palves@redhat.com>
8971 * infcmd.c (kill_command): Print message when inferior has
8973 * inferior.c (print_inferior_events): Remove 'static'. Set as
8975 (add_inferior): Improve message printed when
8976 'print_inferior_events' is on.
8977 (exit_inferior): Remove message printed when
8978 'print_inferior_events' is on.
8979 (detach_inferior): Improve message printed when
8980 'print_inferior_events' is on.
8981 (initialize_inferiors): Use 'add_inferior_silent' to set
8982 'current_inferior_'.
8983 * inferior.h (print_inferior_events): Declare here as
8985 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8986 '[Detaching...]' messages when 'print_inferior_events' is on.
8987 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8988 as prefix/suffix for messages. Remove periods. Fix erroneous
8989 'Detaching after fork from child...', replace it by '... from
8991 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8992 prefix/suffix when printing 'Detaching...' messages. Print
8993 them when 'print_inferior_events' is on.
8994 * remote.c (remote_detach_1): Print message when detaching
8995 from inferior and '!is_fork_parent'.
8997 2018-04-24 Tom Tromey <tom@tromey.com>
8999 * cli-out.h: Reindent.
9001 2018-04-24 Tom Tromey <tom@tromey.com>
9003 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9004 (cli_ui_out::do_field_string): Use fputs_filtered.
9005 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9007 2018-04-23 Tom Tromey <tom@tromey.com>
9009 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9010 gdb::unique_xmalloc_ptr.
9012 2018-04-23 Tom Tromey <tom@tromey.com>
9014 * configure: Rebuild.
9016 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9019 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9020 prepare_for_testing. Set normal_bp to r_debug_state if target
9023 2018-04-21 Pedro Alves <palves@redhat.com>
9024 Rajendra SY <rajendra.sy@gmail.com>
9026 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9027 * remote.c (extended_remote_attach): In all-stop mode, mark the
9028 thread as executing.
9030 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9032 * thread.c (thread_apply_all_command): Fix comment.
9033 (thread_command): Fix comment.
9035 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9037 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9039 * features/aarch64-core.c (create_feature_aarch64_core):
9041 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9043 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9045 * features/i386/32bit-avx512.c
9046 (create_feature_i386_32bit_avx512): Likewise.
9047 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9049 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9051 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9053 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9055 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9057 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9059 * features/i386/64bit-avx512.c
9060 (create_feature_i386_64bit_avx512): Likewise.
9061 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9063 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9065 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9067 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9069 * features/i386/64bit-segments.c
9070 (create_feature_i386_64bit_segments): Likewise.
9071 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9073 * features/i386/x32-core.c
9074 (create_feature_i386_x32_core): Likewise.
9075 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9076 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9077 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9078 * target-descriptions.c: In generated code, don't pass xml
9081 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9083 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9084 (print_xml_feature::visit_post): Likewise.
9085 (print_xml_feature::visit): Likewise.
9086 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9087 (print_xml_feature): Add new class.
9088 * regformats/regdat.sh: Null xmltarget on feature targets.
9089 * target-descriptions.c (struct target_desc): Add xmltarget.
9090 (maintenance_check_tdesc_xml_convert): Add unittest function.
9091 (tdesc_get_features_xml): Add function to get xml.
9092 (maintenance_check_xml_descriptions): Test xml generation.
9093 * xml-tdesc.c (string_read_description_xml): Add function.
9094 * xml-tdesc.h (string_read_description_xml): Add declaration.
9096 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9098 * features/Makefile: Add feature marker to targets with new style
9099 target descriptions.
9100 * regformats/aarch64.dat: Regenerate.
9101 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9102 * regformats/i386/amd64-avx-linux.dat: Likewise.
9103 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9104 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9105 * regformats/i386/amd64-linux.dat: Likewise.
9106 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9107 * regformats/i386/amd64.dat: Likewise.
9108 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9109 * regformats/i386/i386-avx-linux.dat: Likewise.
9110 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9111 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9112 * regformats/i386/i386-linux.dat: Likewise.
9113 * regformats/i386/i386-mmx-linux.dat: Likewise.
9114 * regformats/i386/i386-mpx-linux.dat: Likewise.
9115 * regformats/i386/i386.dat: Likewise.
9116 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9117 * regformats/i386/x32-avx-linux.dat: Likewise.
9118 * regformats/i386/x32-linux.dat: Likewise.
9119 * regformats/tic6x-c62x-linux.dat: Likewise.
9120 * regformats/tic6x-c64x-linux.dat: Likewise.
9121 * regformats/tic6x-c64xp-linux.dat: Likewise.
9122 * regformats/regdat.sh: Parse feature marker.
9124 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9126 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9127 (tdesc_osabi_name): Likewise.
9128 * target-descriptions.c (tdesc_architecture_name): Add new
9130 (tdesc_osabi_name): Likewise.
9132 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9134 * common/tdesc.c (tdesc_predefined_type): Move to here.
9135 (tdesc_named_type): Likewise.
9136 (tdesc_create_vector): Likewise.
9137 (tdesc_create_struct): Likewise.
9138 (tdesc_set_struct_size): Likewise.
9139 (tdesc_create_union): Likewise.
9140 (tdesc_create_flags): Likewise.
9141 (tdesc_create_enum): Likewise.
9142 (tdesc_add_field): Likewise.
9143 (tdesc_add_typed_bitfield): Likewise.
9144 (tdesc_add_bitfield): Likewise.
9145 (tdesc_add_flag): Likewise.
9146 (tdesc_add_enum_value): Likewise.
9147 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9148 (struct tdesc_type_vector): Likewise.
9149 (struct tdesc_type_field): Likewise.
9150 (struct tdesc_type_with_fields): Likewise.
9151 (tdesc_create_enum): Add declaration.
9152 (tdesc_add_typed_bitfield): Likewise.
9153 (tdesc_add_enum_value): Likewise.
9154 * target-descriptions.c (tdesc_type_field): Move from here.
9155 (tdesc_type_builtin): Likewise.
9156 (tdesc_type_vector): Likewise.
9157 (tdesc_type_with_fields): Likewise.
9158 (tdesc_predefined_types): Likewise.
9159 (tdesc_named_type): Likewise.
9160 (tdesc_create_vector): Likewise.
9161 (tdesc_create_struct): Likewise.
9162 (tdesc_set_struct_size): Likewise.
9163 (tdesc_create_union): Likewise.
9164 (tdesc_create_flags): Likewise.
9165 (tdesc_create_enum): Likewise.
9166 (tdesc_add_field): Likewise.
9167 (tdesc_add_typed_bitfield): Likewise.
9168 (tdesc_add_bitfield): Likewise.
9169 (tdesc_add_flag): Likewise.
9170 (tdesc_add_enum_value): Likewise.
9171 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9172 (tdesc_add_typed_bitfield): Likewise.
9173 (tdesc_add_enum_value): Likewise.
9175 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9177 * common/tdesc.c (tdesc_feature::accept): Move to here.
9178 (tdesc_feature::operator==): Likewise.
9179 (tdesc_create_reg): Likewise.
9180 * common/tdesc.h (tdesc_type_kind): Likewise.
9181 (struct tdesc_type): Likewise.
9182 (struct tdesc_feature): Likewise.
9183 * regformats/regdat.sh: Create a feature.
9184 * target-descriptions.c (tdesc_type_kind): Move from here.
9185 (tdesc_type): Likewise.
9186 (tdesc_type_up): Likewise.
9187 (tdesc_feature): Likewise.
9188 (tdesc_create_reg): Likewise.
9190 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9192 * Makefile.in: Add arch/tdesc.c
9193 * common/tdesc.c: New file.
9194 * common/tdesc.h (tdesc_element_visitor): Move to here.
9195 (tdesc_element): Likewise.
9196 (tdesc_reg): Likewise.
9197 (tdesc_reg_up): Likewise.
9198 * regformats/regdef.h (reg): Add offset to constructors.
9199 * target-descriptions.c (tdesc_element_visitor): Move from here.
9200 (tdesc_element): Likewise.
9201 (tdesc_reg): Likewise.
9202 (tdesc_reg_up): Likewise.
9204 2018-04-17 Tom Tromey <tom@tromey.com>
9206 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9209 2018-04-17 Tom Tromey <tom@tromey.com>
9211 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9213 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
9215 * symtab.c (print_symbol_info): Skip printing filename and line
9216 number when `last' is NULL.
9217 (symtab_symbol_info): Use empty string instead of NULL for first
9218 invocation of print_symbol_info.
9219 (rbreak_command): Pass NULL to `last' parameter of
9222 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
9224 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9227 2018-04-16 Pedro Alves <palves@redhat.com>
9229 * MAINTAINERS (sh): Remove.
9230 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9231 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9232 (ALLDEPFILES): Remove sh64-tdep.c.
9233 * NEWS: Mentions that support for SH-5/SH64 is removed.
9234 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9235 (sh*-*-openbsd*): Ditto.
9236 (sh64-*-elf*): Remove.
9238 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9239 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9240 * sh-tdep.c: No longer include "sh64-tdep.h".
9241 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9242 * sh64-tdep.c, sh64-tdep.h: Remove files.
9244 2018-04-16 Pedro Alves <palves@redhat.com>
9246 * MAINTAINERS: Remove m88k.
9247 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9248 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9249 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9250 * NEWS: Mention that support for m88k was removed.
9251 * configure.host (m88*-*-*): Remove support.
9252 * configure.nat (m88k-*-*): Remove support.
9253 * configure.tgt (m88*-*-openbsd*): Remove.
9254 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9256 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
9258 * configure.tgt (x86_tobjs): New variable.
9259 (amd64_tobjs, i386_tobjs): Use it.
9261 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9263 * symtab.c (print_symbol_info): Precede the symbol definition by
9264 the line number when available.
9265 * NEWS: Advertise this enhancement.
9267 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9269 * NEWS (New options): announce set/show record btrace cpu.
9270 * btrace.c: Include record-btrace.h.
9271 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9272 the vendor is unknown.
9273 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9274 Maybe overwrite the btrace configuration's cpu.
9275 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9276 (btrace_fetch): Add cpu parameter. Update callers.
9277 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9278 Maybe overwrite the btrace configuration's cpu. Skip enabling
9279 errata workarounds if the vendor is unknown.
9280 * python/py-record-btrace.c: Include record-btrace.h.
9281 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9282 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9283 * record-btrace.c (record_btrace_cpu_state_kind): New.
9284 (record_btrace_cpu): New.
9285 (set_record_btrace_cpu_cmdlist): New.
9286 (record_btrace_get_cpu): New.
9287 (require_btrace_thread, record_btrace_info)
9288 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9289 (cmd_set_record_btrace_cpu_none): New.
9290 (cmd_set_record_btrace_cpu_auto): New.
9291 (cmd_set_record_btrace_cpu): New.
9292 (cmd_show_record_btrace_cpu): New.
9293 (_initialize_record_btrace): Initialize set/show record btrace cpu
9295 * record-btrace.h (record_btrace_get_cpu): New.
9297 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9299 * record.c (set_record_command): Fix typo in message.
9301 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9303 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9305 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
9307 * infrun.c (process_event_stop_test): Call
9308 gdbarch_in_indirect_branch_thunk.
9309 * gdbarch.sh (in_indirect_branch_thunk): New.
9310 * gdbarch.c: Regenerated.
9311 * gdbarch.h: Regenerated.
9314 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9315 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9316 (ALLDEPFILES): Add x86-tdep.c.
9317 * arch-utils.h (default_in_indirect_branch_thunk): New.
9318 * arch-utils.c (default_in_indirect_branch_thunk): New.
9319 * i386-tdep: Include x86-tdep.h.
9320 (i386_in_indirect_branch_thunk): New.
9321 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9323 * amd64-tdep: Include x86-tdep.h.
9324 (amd64_in_indirect_branch_thunk): New.
9325 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9327 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9330 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9331 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9332 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9335 2018-04-12 Tom Tromey <tom@tromey.com>
9337 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9338 (rust_evaluate_subexp): Likewise.
9340 2018-04-12 Pedro Alves <palves@redhat.com>
9342 * procfs.c (procfs_detach): Make forward declaration's prototype
9343 match definition's protototype.
9344 (proc_get_LDT_entry): Remove stale do_cleanups call.
9346 2018-04-12 Pedro Alves <palves@redhat.com>
9348 * target.h (target_ops::to_has_exited): Delete.
9349 (target_has_exited): Delete.
9350 * target-delegates.c: Regenerate.
9352 2018-04-11 Pedro Alves <palves@redhat.com>
9354 * target.c (fileio_fh_t::t): Add comment.
9355 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9356 (target_fileio_close): Handle a NULL target.
9357 (invalidate_fileio_fh): New.
9358 (target_close): Call it.
9359 * remote.c (remote_hostio_send_command): No longer check whether
9360 remote_desc is open.
9362 2018-04-11 Pedro Alves <palves@redhat.com>
9364 * target.c (fileio_fh_t): Make it a named struct instead of a
9366 (fileio_fh_t::is_closed): New method.
9367 (DEF_VEC_O (fileio_fh_t)): Remove.
9368 (fileio_fhandles): Now a std::vector.
9369 (is_closed_fileio_fh): Delete.
9370 (acquire_fileio_fd): Adjust. Rename parameters.
9371 (release_fileio_fd): Adjust.
9372 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9373 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9374 (target_fileio_close): Adjust.
9376 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
9378 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9381 2018-04-10 Pedro Alves <palves@redhat.com>
9383 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9384 (scoped_finish_thread_state): New class.
9385 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9387 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9388 (fetch_inferior_event, normal_stop): Likewise.
9389 * thread.c (finish_thread_state_cleanup): Delete.
9391 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9392 Pedro Alves <palves@redhat.com>
9394 * value.c: Include "selftest.h" and "common/array-view.h".
9395 (struct range) <operator ==>: New.
9396 (test_ranges_contain): New.
9397 (check_ranges_vector): New.
9398 (test_insert_into_bit_range_vector): New.
9399 (_initialize_values): Register selftests.
9400 * common/array-view.h (operator==, operator!=): New.
9402 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9404 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9406 * inline-frame.c: Include <algorithm>.
9407 (struct inline_state): Add constructor.
9408 (inline_state_s): Remove.
9409 (DEF_VEC_O(inline_state_s)): Remove.
9410 (inline_states): Change type to std::vector.
9411 (find_inline_frame_state): Adjust to std::vector.
9412 (allocate_inline_frame_state): Remove.
9413 (clear_inline_frame_state): Adjust to std::vector.
9414 (skip_inline_frames): Adjust to std::vector.
9416 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9418 * tracepoint.h (struct trace_state_variable): Add constructor.
9419 <name>: Change type to std::string.
9420 * tracepoint.c (tsv_s): Remove.
9421 (DEF_VEC_O(tsv_s)): Remove.
9422 (tvariables): Change to std::vector.
9423 (create_trace_state_variable): Adjust to std::vector.
9424 (find_trace_state_variable): Likewise.
9425 (find_trace_state_variable_by_number): Likewise.
9426 (delete_trace_state_variable): Likewise.
9427 (trace_variable_command): Adjust to std::string.
9428 (delete_trace_variable_command): Likewise.
9429 (tvariables_info_1): Adjust to std::vector.
9430 (save_trace_state_variables): Likewise.
9431 (start_tracing): Likewise.
9432 (merge_uploaded_trace_state_variables): Adjust to std::vector
9434 * target.h (struct target_ops)
9435 <to_download_trace_state_variable>: Pass reference to
9436 trace_state_variable.
9437 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9438 * target-delegates.c: Re-generate.
9439 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9440 (mi_tsv_deleted): Likewise.
9441 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9442 * remote.c (remote_download_trace_state_variable): Change
9443 pointer to reference and adjust.
9444 * make-target-delegates (parse_argtypes): Handle references.
9445 (write_function_header): Likewise.
9446 (munge_type): Likewise.
9448 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9450 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9451 string_view-selftests.c.
9452 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9454 * unittests/basic_string_view/cons/char/1.cc: Likewise.
9455 * unittests/basic_string_view/cons/char/2.cc: Likewise.
9456 * unittests/basic_string_view/cons/char/3.cc: Likewise.
9457 * unittests/basic_string_view/element_access/char/1.cc:
9459 * unittests/basic_string_view/element_access/char/empty.cc:
9461 * unittests/basic_string_view/element_access/char/front_back.cc:
9463 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9464 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9466 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9468 * unittests/basic_string_view/modifiers/swap/char/1.cc:
9470 * unittests/basic_string_view/operations/compare/char/1.cc:
9472 * unittests/basic_string_view/operations/compare/char/13650.cc:
9474 * unittests/basic_string_view/operations/copy/char/1.cc:
9476 * unittests/basic_string_view/operations/data/char/1.cc:
9478 * unittests/basic_string_view/operations/find/char/1.cc:
9480 * unittests/basic_string_view/operations/find/char/2.cc:
9482 * unittests/basic_string_view/operations/find/char/3.cc:
9484 * unittests/basic_string_view/operations/find/char/4.cc:
9486 * unittests/basic_string_view/operations/rfind/char/1.cc:
9488 * unittests/basic_string_view/operations/rfind/char/2.cc:
9490 * unittests/basic_string_view/operations/rfind/char/3.cc:
9492 * unittests/basic_string_view/operations/substr/char/1.cc:
9494 * unittests/basic_string_view/operators/char/2.cc: Likewise.
9495 * unittests/string_view-selftests.c: New file.
9497 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9499 * unittests/basic_string_view/capacity/1.cc: New file.
9500 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9501 * unittests/basic_string_view/cons/char/1.cc: New file.
9502 * unittests/basic_string_view/cons/char/2.cc: New file.
9503 * unittests/basic_string_view/cons/char/3.cc: New file.
9504 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9505 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9506 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9507 * unittests/basic_string_view/element_access/char/1.cc: New file.
9508 * unittests/basic_string_view/element_access/char/2.cc: New file.
9509 * unittests/basic_string_view/element_access/char/empty.cc: New file.
9510 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9511 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9512 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9513 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9514 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9515 * unittests/basic_string_view/include.cc: New file.
9516 * unittests/basic_string_view/inserters/char/1.cc: New file.
9517 * unittests/basic_string_view/inserters/char/2.cc: New file.
9518 * unittests/basic_string_view/inserters/char/3.cc: New file.
9519 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9520 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9521 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9522 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9523 * unittests/basic_string_view/literals/types.cc: New file.
9524 * unittests/basic_string_view/literals/values.cc: New file.
9525 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9526 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9527 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9528 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9529 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9530 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9531 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9532 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9533 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9534 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9535 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9536 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9537 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9538 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9539 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9540 * unittests/basic_string_view/operations/data/char/1.cc: New file.
9541 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9542 * unittests/basic_string_view/operations/find/char/1.cc: New file.
9543 * unittests/basic_string_view/operations/find/char/2.cc: New file.
9544 * unittests/basic_string_view/operations/find/char/3.cc: New file.
9545 * unittests/basic_string_view/operations/find/char/4.cc: New file.
9546 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9547 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9548 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9549 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9550 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9551 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9552 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9553 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9554 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9555 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9556 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9557 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9558 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9559 * unittests/basic_string_view/operators/char/2.cc: New file.
9560 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9561 * unittests/basic_string_view/range_access/char/1.cc: New file.
9562 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9563 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9564 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9565 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9566 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9567 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9568 * unittests/basic_string_view/requirements/typedefs.cc: New file.
9569 * unittests/basic_string_view/typedefs.cc: New file.
9570 * unittests/basic_string_view/types/1.cc: New file.
9572 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9574 * common/gdb_string_view.h: Remove libstdc++ implementation
9575 details, adjust to gdb reality.
9576 * common/gdb_string_view.tcc: Likewise.
9577 * cli/cli-script.c (struct string_view): Remove.
9578 (user_args) <m_args>: Change element type to gdb::string_view.
9579 (user_args::insert_args): Adjust.
9581 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9583 * common/gdb_string_view.h: New file.
9584 * common/gdb_string_view.tcc: New file.
9586 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9588 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9589 * configure: Re-generate.
9591 2018-04-09 Pedro Alves <palves@redhat.com>
9593 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9594 (set_target_gdbarch): Call
9595 gdb::observers::architecture_changed.notify instead of
9596 observer_notify_architecture_changed.
9598 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9600 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9601 (do_restore_current_traceframe_cleanup): Remove.
9602 (restore_current_traceframe_cleanup_dtor): Remove.
9603 (make_cleanup_restore_current_traceframe): Remove.
9604 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9606 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9607 * infrun.c (fetch_inferior_event): Use
9608 scoped_restore_current_traceframe.
9610 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9612 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9614 <n_allocated_type_units>: Remove.
9615 <all_type_units>: Change to std::vector.
9616 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9617 to std::vector change.
9618 (dwarf2_per_objfile::get_cutu): Likewise.
9619 (dwarf2_per_objfile::get_tu): Likewise.
9620 (create_signatured_type_table_from_index): Likewise.
9621 (create_signatured_type_table_from_debug_names): Likewise.
9622 (dw2_symtab_iter_next): Likewise.
9623 (dw2_print_stats): Likewise.
9624 (dw2_expand_all_symtabs): Likewise.
9625 (dw2_expand_marked_cus): Likewise.
9626 (dw2_debug_names_iterator::next): Likewise.
9627 (dwarf2_initialize_objfile): Likewise.
9628 (add_signatured_type_cu_to_table): Likewise.
9629 (create_all_type_units): Likewise.
9630 (add_type_unit): Likewise.
9631 (struct tu_abbrev_offset): Add constructor.
9632 (build_type_psymtabs_1): Adjust to std::vector change.
9633 (print_tu_stats): Likewise.
9634 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9635 (write_debug_names): Likewise.
9637 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9639 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9640 Make an std::vector.
9641 <n_comp_units>: Remove.
9642 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9643 to std::vector change.
9644 (dwarf2_per_objfile::get_cutu): Likewise.
9645 (dwarf2_per_objfile::get_cu): Likewise.
9646 (create_cus_from_index): Likewise.
9647 (create_addrmap_from_index): Likewise.
9648 (create_addrmap_from_aranges): Likewise.
9649 (dwarf2_read_index): Likewise.
9650 (dw2_find_last_source_symtab): Likewise.
9651 (dw2_map_symtabs_matching_filename): Likewise.
9652 (dw2_symtab_iter_next): Likewise.
9653 (dw2_print_stats): Likewise.
9654 (dw2_expand_all_symtabs): Likewise.
9655 (dw2_expand_symtabs_with_fullname): Likewise.
9656 (dw2_expand_marked_cus): Likewise.
9657 (dw2_map_symbol_filenames): Likewise.
9658 (create_cus_from_debug_names): Likewise.
9659 (dwarf2_read_debug_names): Likewise.
9660 (dw2_debug_names_iterator::next): Likewise.
9661 (dwarf2_initialize_objfile): Likewise.
9662 (set_partial_user): Likewise.
9663 (dwarf2_build_psymtabs_hard): Likewise.
9664 (read_comp_units_from_section): Remove arguments, adjust to
9666 (create_all_comp_units): Adjust to std::vector and
9667 read_comp_units_from_section changes.
9668 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9670 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9671 (psyms_seen_size): Likewise.
9672 (write_gdbindex): Likewise.
9673 (write_debug_names): Likewise.
9675 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9677 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9678 with dwarf2_per_objfile.
9679 (create_cus_from_index): Likewise.
9680 (create_signatured_type_table_from_index): Likewise.
9681 (dwarf2_read_index): Likewise.
9682 (dwarf2_initialize_objfile): Likewise.
9683 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9684 per_cu rather than get_dwarf2_per_objfile.
9686 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9688 * dwarf2read.h (struct signatured_type): Forward declare.
9689 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9691 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9692 (dw2_get_cutu): ...this.
9693 (dwarf2_per_objfile::get_cu): Rename from...
9694 (dw2_get_cu): ...this.
9695 (dwarf2_per_objfile::get_tu): New.
9696 (create_addrmap_from_index): Adjust.
9697 (create_addrmap_from_aranges): Adjust.
9698 (dw2_find_last_source_symtab): Adjust.
9699 (dw2_map_symtabs_matching_filename): Adjust.
9700 (dw2_symtab_iter_next): Adjust.
9701 (dw2_print_stats): Adjust.
9702 (dw2_expand_all_symtabs): Adjust.
9703 (dw2_expand_symtabs_with_fullname): Adjust.
9704 (dw2_expand_marked_cus): Adjust.
9705 (dw_expand_symtabs_matching_file_matcher): Adjust.
9706 (dw2_map_symbol_filenames): Adjust.
9707 (dw2_debug_names_iterator::next): Adjust.
9708 (dwarf2_initialize_objfile): Adjust.
9709 (set_partial_user): Adjust.
9710 (dwarf2_build_psymtabs_hard): Adjust.
9712 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9714 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9715 Remove unused variables.
9716 (dw2_map_symtabs_matching_filename): Likewise.
9717 (dwarf2_record_block_ranges): Likewise.
9718 (dwarf2_read_addr_index): Likewise.
9719 (follow_die_offset): Likewise.
9721 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9723 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9724 to symbol_file_add_main.
9726 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9729 * mi/mi-console.c (do_fputc_async_safe): New.
9730 (mi_console_file::write_async_safe): New.
9731 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9732 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9734 * ui-file.c (ui_file::putstrn): Adjust call to
9735 fputstrn_unfiltered.
9736 * utils.c (printchar): Replace do_fputs and do_fprintf
9737 parameters by do_fputc.
9738 (fputstr_filtered): Adjust call to printchar.
9739 (fputstr_unfiltered): Likewise.
9740 (fputstrn_filtered): Likewise.
9741 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9743 * utils.h (do_fputc_ftype): New typedef.
9744 (fputstrn_unfiltered): Add do_fputc parameter.
9746 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9748 * regformats/i386/i386-avx.dat: Remove.
9750 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9753 * amd64-tdep.c (amd64_none_init_abi): New function.
9754 (amd64_x32_none_init_abi): New function.
9755 (_initialize_amd64_tdep): Register handlers for x86-64 and
9756 x64_32 with GDB_OSABI_NONE.
9757 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9758 GDB_OSABI_NONE osabi.
9760 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9763 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9765 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9766 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9768 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9770 * common/byte-vector.h (char_vector): New type.
9771 * target.h (target_read_alloc): Return
9772 gdb::optional<byte_vector>.
9773 (target_read_stralloc): Return gdb::optional<char_vector>.
9774 (target_get_osdata): Return gdb::optional<char_vector>.
9775 * target.c (target_read_alloc_1): Templatize. Replacement
9776 manual memory management with vector.
9777 (target_read_alloc): Change return type, adjust.
9778 (target_read_stralloc): Change return type, adjust.
9779 (target_get_osdata): Change return type, adjust.
9780 * auxv.c (struct auxv_info) <length>: Remove.
9781 <data>: Change type to gdb::optional<byte_vector>.
9782 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9783 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9784 (target_auxv_search): Adjust.
9785 (fprint_target_auxv): Adjust.
9786 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9787 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9788 (linux_make_corefile_notes): Adjust.
9789 * osdata.c (get_osdata): Adjust.
9790 * remote.c (remote_get_threads_with_qxfer): Adjust.
9791 (remote_memory_map): Adjust.
9792 (remote_traceframe_info): Adjust.
9793 (btrace_read_config): Adjust.
9794 (remote_read_btrace): Adjust.
9795 (remote_pid_to_exec_file): Adjust.
9796 * solib-aix.c (solib_aix_get_library_list): Adjust.
9797 * solib-dsbt.c (decode_loadmap): Don't free buf.
9798 (dsbt_get_initial_loadmaps): Adjust.
9799 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9800 * solib-target.c (solib_target_current_sos): Adjust.
9801 * tracepoint.c (sdata_make_value): Adjust.
9802 * xml-support.c (xinclude_start_include): Adjust.
9803 (xml_fetch_content_from_file): Adjust.
9804 * xml-support.h (xml_fetch_another): Change return type.
9805 (xml_fetch_content_from_file): Change return type.
9806 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9807 * xml-tdesc.c (file_read_description_xml): Adjust.
9808 (fetch_available_features_from_target): Change return type.
9809 (target_fetch_description_xml): Adjust.
9810 (target_read_description_xml): Adjust.
9812 2018-04-06 Tom Tromey <tom@tromey.com>
9814 * value.c (~value): Update.
9815 (struct value) <contents>: Now unique_xmalloc_ptr.
9816 (value_contents_bits_eq, allocate_value_contents)
9817 (value_contents_raw, value_contents_all_raw)
9818 (value_contents_for_printing, value_contents_for_printing_const)
9819 (set_value_enclosing_type): Update.
9821 2018-04-06 Tom Tromey <tom@tromey.com>
9823 * value.c (range_s): Remove typedef, VEC.
9824 (struct range): Add operator<.
9825 (range_lessthan): Remove.
9826 (ranges_contain): Change type.
9828 (struct value) <unavailable, optimized_out>: Now std::vector.
9829 (value_entirely_available)
9830 (value_entirely_covered_by_range_vector)
9831 (value_entirely_unavailable, value_entirely_optimized_out):
9833 (insert_into_bit_range_vector): Change argument type.
9834 (find_first_range_overlap): Likewise.
9835 (struct ranges_and_idx, value_contents_bits_eq)
9836 (require_not_optimized_out, require_available): Update.
9837 (ranges_copy_adjusted): Change argument types.
9838 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9840 2018-04-06 Tom Tromey <tom@tromey.com>
9842 * value.c (~value): Update.
9843 (struct value) <parent>: Now a value_ref_ptr.
9844 (value_parent, set_value_parent, value_address, value_copy):
9847 2018-04-06 Tom Tromey <tom@tromey.com>
9849 * value.c (struct value): Add constructor, destructor, and member
9851 (allocate_value_lazy, value_decref): Update.
9853 2018-04-06 Tom Tromey <tom@tromey.com>
9855 * value.c (struct value) <released, next>: Remove.
9856 (all_values): Now a std::vector.
9857 (allocate_value_lazy): Update.
9858 (value_next): Remove.
9859 (value_mark, value_free_to_mark, release_value)
9860 (value_release_to_mark): Update.
9862 2018-04-06 Tom Tromey <tom@tromey.com>
9864 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9865 (free_value_chain): Remove.
9866 * value.c (free_value_chain): Remove.
9867 (value_release_to_mark): Return a std::vector.
9868 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9870 (check_condition): Update.
9871 * eval.c (fetch_subexp_value): Change "val_chain" to a
9873 * breakpoint.c (update_watchpoint): Update.
9874 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9876 2018-04-06 Tom Tromey <tom@tromey.com>
9878 * value.h (free_all_values): Remove.
9879 * value.c (free_all_values): Remove.
9881 2018-04-06 Tom Tromey <tom@tromey.com>
9883 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9884 (value_history_chain, value_history_count): Remove.
9885 (value_history): New global.
9886 (record_latest_value, access_value_history, show_values)
9887 (preserve_values): Update.
9889 2018-04-06 Tom Tromey <tom@tromey.com>
9891 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9892 * varobj.c (varobj_set_display_format, varobj_set_value)
9893 (install_default_visualizer, construct_visualizer)
9894 (install_new_value, ~varobj, varobj_get_value_type)
9895 (my_value_of_variable, varobj_editable_p): Update.
9896 * c-varobj.c (c_describe_child, c_value_of_variable)
9897 (cplus_number_of_children, cplus_describe_child): Update.
9898 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9899 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9900 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9902 2018-04-06 Tom Tromey <tom@tromey.com>
9904 * printcmd.c (last_examine_address): Change type to
9906 (do_examine, x_command): Update.
9908 2018-04-06 Tom Tromey <tom@tromey.com>
9910 * value.c (release_value): Update.
9911 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9912 (struct bpstats) <val>: Now a value_ref_ptr.
9913 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9914 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9915 (~watchpoint, print_it_watchpoint, watch_command_1)
9916 (invalidate_bp_value_on_memory_change): Update.
9918 2018-04-06 Tom Tromey <tom@tromey.com>
9920 * varobj.c (varobj_clear_saved_item)
9921 (update_dynamic_varobj_children, install_new_value, ~varobj):
9923 * value.h (value_incref): Move declaration earlier.
9924 (value_decref): Rename from value_free.
9925 (struct value_ref_policy): New.
9926 (value_ref_ptr): New typedef.
9927 (struct value_deleter): Remove.
9928 (gdb_value_up): Remove typedef.
9929 (release_value): Change return type.
9930 (release_value_or_incref): Remove.
9931 * value.c (set_value_parent): Update.
9932 (value_incref): Change return type.
9933 (value_decref): Rename from value_free.
9934 (value_free_to_mark, free_all_values, free_value_chain): Update.
9935 (release_value): Return value_ref_ptr.
9936 (release_value_or_incref): Remove.
9937 (record_latest_value, set_internalvar, clear_internalvar):
9939 * stack.c (info_frame_command): Don't call value_free.
9940 * python/py-value.c (valpy_dealloc, valpy_new)
9941 (value_to_value_object): Update.
9942 * printcmd.c (do_examine): Update.
9943 * opencl-lang.c (lval_func_free_closure): Update.
9944 * mi/mi-main.c (register_changed_p): Don't call value_free.
9945 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9946 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9947 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9949 * guile/scm-value.c (vlscm_free_value_smob)
9950 (vlscm_scm_from_value): Update.
9951 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9952 (frame_unwind_register_unsigned, get_frame_register_bytes)
9953 (put_frame_register_bytes): Don't call value_free.
9954 * findvar.c (address_from_register): Don't call value_free.
9955 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9956 * dwarf2loc.c (entry_data_value_free_closure)
9957 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9958 (dwarf2_evaluate_loc_desc_full): Update.
9959 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9960 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9961 (~watchpoint, watch_command_1)
9962 (invalidate_bp_value_on_memory_change): Update.
9963 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9965 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9968 * warning.m4: Add -Wno-error=deprecated-register.
9969 * configure: Re-generate.
9971 2018-04-05 Tom Tromey <tom@tromey.com>
9973 * linespec.h: Remove include of "vec.h".
9975 2018-04-05 Tom Tromey <tom@tromey.com>
9977 * linespec.c (typep): Remove typedef.
9978 (find_methods, find_superclass_methods): Take a std::vector.
9979 (find_method): Use std::vector.
9981 2018-04-05 Tom Tromey <tom@tromey.com>
9983 * utils.c (compare_strings): Remove.
9984 * utils.h (compare_strings): Remove.
9985 * objc-lang.h (find_imps): Update.
9986 * objc-lang.c (find_methods): Take a std::vector.
9987 (uniquify_strings, find_imps): Likewise.
9988 * linespec.c (find_methods): Take a std::vector.
9989 (decode_objc): Use std::vector.
9990 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9992 (find_method, find_function_symbols): Use std::vector.
9994 2018-04-05 Tom Tromey <tom@tromey.com>
9996 * completer.c (completion_tracker::completion_tracker): Remove
9998 (completion_tracker::discard_completions): Likewise.
9999 * breakpoint.c (ambiguous_names_p): Remove cast.
10000 * ada-lang.c (_initialize_ada_language): Remove cast.
10001 * utils.h (streq): Update.
10002 (streq_hash): Add new declaration.
10003 * utils.c (streq): Return bool.
10004 (streq_hash): New function.
10006 2018-04-05 Tom Tromey <tom@tromey.com>
10008 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10009 Remove a string copy.
10011 2018-04-05 Tom Tromey <tom@tromey.com>
10013 * linespec.c (filter_results): Use std::vector.
10014 (decode_line_2, decode_line_full): Update.
10016 2018-04-05 Tom Tromey <tom@tromey.com>
10018 * linespec.c (canonical_to_fullform): Return std::string.
10019 (filter_results): Update.
10020 (struct decode_line_2_item): Add constructor.
10021 <fullform, displayform>: Now std::string.
10022 (decode_line_2_compare_items): Now a std::sort comparator.
10023 (decode_line_2): Update.
10025 2018-04-05 Tom Tromey <tom@tromey.com>
10027 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10028 (unexpected_linespec_error): Update.
10029 (linespec_parse_basic, parse_linespec): Update.
10031 2018-04-05 Tom Tromey <tom@tromey.com>
10033 * linespec.c (linespec_parse_basic): Reindent.
10035 2018-04-05 Tom Tromey <tom@tromey.com>
10037 * minsyms.h (iterate_over_minimal_symbols): Update.
10038 * minsyms.c (iterate_over_minimal_symbols): Take a
10039 gdb::function_view.
10040 * linespec.c (struct collect_minsyms): Remove.
10041 (compare_msyms): Now a std::sort comparator.
10042 (add_minsym): Add parameters.
10043 (search_minsyms_for_name): Update. Use std::vector.
10045 2018-04-03 Tom Tromey <tom@tromey.com>
10047 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10050 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10052 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10054 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10057 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10058 printing static type.
10060 2018-04-01 Tom Tromey <tom@tromey.com>
10062 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10063 (rs6000_xfer_shared_libraries): Update.
10065 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10067 * common/gdb_vecs.h (char_ptr): Remove.
10068 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10070 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10072 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10074 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10076 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10078 * tracepoint.h (struct uploaded_tp): Initialize fields.
10079 <actions, step_actions, cmd_strings>: Change type to
10080 std::vector<char *>.
10081 * tracepoint.c (get_uploaded_tp): Allocate with new.
10082 (free_uploaded_tps): Free with delete.
10083 (parse_tracepoint_definition): Adjust to std::vector change.
10084 * breakpoint.c (read_uploaded_action): Likewise.
10085 (create_tracepoint_from_upload): Likewise.
10086 * ctf.c (ctf_write_uploaded_tp): Likewise.
10087 (SET_ARRAY_FIELD): Likewise.
10088 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10090 2018-03-30 Tom Tromey <tom@tromey.com>
10092 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10094 (svr4_keep_data_in_core): Update.
10095 (svr4_read_so_list): Update.
10097 2018-03-30 Tom Tromey <tom@tromey.com>
10099 * windows-nat.c (handle_output_debug_string, handle_exception):
10101 * target.h (target_read_string): Update.
10102 * target.c (target_read_string): Change "string" to
10103 unique_xmalloc_ptr.
10104 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10106 * solib-frv.c (frv_current_sos): Update.
10107 * solib-dsbt.c (dsbt_current_sos): Update.
10108 * solib-darwin.c (darwin_current_sos): Update.
10109 * linux-thread-db.c (inferior_has_bug): Update.
10110 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10111 Update. Remove alloca.
10112 * ada-lang.c (ada_main_name): Update.
10114 2018-03-30 Tom Tromey <tom@tromey.com>
10116 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10117 (struct dwo_file_deleter): New.
10118 (dwo_file_up): New typedef.
10119 (open_and_init_dwo_file): Use dwo_file_up.
10120 (free_dwo_file_cleanup): Remove.
10122 2018-03-30 Tom Tromey <tom@tromey.com>
10124 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10125 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10127 2018-03-30 Tom Tromey <tom@tromey.com>
10129 * dwarf2read.c (class free_cached_comp_units): New class.
10130 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10131 (free_cached_comp_units): Remove function.
10133 2018-03-30 Tom Tromey <tom@tromey.com>
10135 * utils.h (make_cleanup_unpush_target): Remove.
10136 * inf-ptrace.c (struct target_unpusher): New.
10137 (target_unpush_up) New typedef.
10138 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10140 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10142 2018-03-27 Tom Tromey <tom@tromey.com>
10144 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10146 2018-03-27 Pedro Alves <palves@redhat.com>
10147 Tom Tromey <tom@tromey.com>
10149 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10150 destructor. Now a class.
10151 (gdb_readline_wrapper_cleanup): Remove function.
10152 (gdb_readline_wrapper): Remove cleanups.
10154 2018-03-27 Tom Tromey <tom@tromey.com>
10156 * typeprint.h (struct type_print_options) <local_typedefs,
10157 global_typedefs>: Remove "struct" keyword.
10158 (class typedef_hash_table): New class.
10159 (recursively_update_typedef_hash, add_template_parameters)
10160 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10161 (find_typedef_in_hash): Don't declare.
10162 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10163 (typedef_hash_table::recursively_update): Rename from
10164 recursively_update_typedef_hash. Now a member.
10165 (typedef_hash_table::add_template_parameters): Rename from
10166 add_template_parameters. Now a member.
10167 (typedef_hash_table::typedef_hash_table): Now a constructor;
10168 rename from create_typedef_hash.
10169 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10170 rename from free_typedef_hash.
10171 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10172 (do_free_global_table): Remove.
10173 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10174 from copy_type_recursive.
10175 (create_global_typedef_table): Remove.
10176 (typedef_hash_table::find_global_typedef): Now a member of
10177 typedef_hash_table.
10178 (typedef_hash_table::find_typedef): Rename from
10179 find_typedef_in_hash; now a member.
10180 (whatis_exp): Update.
10181 * extension.h (struct ext_lang_type_printers): Add constructor and
10183 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10185 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10186 Now a constructor; rename from start_ext_lang_type_printers.
10187 (ext_lang_type_printers): Now a destructor; rename from
10188 free_ext_lang_type_printers.
10189 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10191 (c_type_print_base_struct_union): Update. Remove cleanups.
10193 2018-03-27 Tom Tromey <tom@tromey.com>
10195 * dwarf-index-write.c: Include <cmath>.
10197 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10199 * NEWS: Add entry describing new "set|show varsize-limit" command.
10200 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10202 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10205 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
10207 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10208 dwarf-index-write.c
10209 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10210 * dwarf-index-common.c: New file.
10211 * dwarf-index-common.h: New file.
10212 * dwarf-index-write.c: New file.
10213 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10214 (struct dwarf2_section_info): Move from here.
10215 (dwarf2_section_info_def): Likewise.
10216 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10217 (offset_type): Likewise.
10218 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10219 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10220 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10221 (byte_swap): Likewise.
10222 (MAYBE_SWAP): Likewise.
10223 (dwarf2_per_cu_ptr): Likewise.
10224 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10225 (struct tu_stats): Likewise.
10226 (struct dwarf2_per_objfile): Likewise.
10227 (struct dwarf2_per_cu_data): Likewise.
10228 (struct signatured_type): Likewise.
10229 (sig_type_ptr): Likewise.
10230 (DEF_VEC_P (sig_type_ptr)): Likewise.
10231 (INDEX4_SUFFIX): Likewise.
10232 (INDEX5_SUFFIX): Likewise.
10233 (DEBUG_STR_SUFFIX): Likewise.
10234 (dwarf2_read_section): Make non-static.
10235 (mapped_index_string_hash): Move from here.
10236 (dwarf5_djb_hash): Likewise.
10237 (file_write): Likewise.
10238 (class data_buf): Likewise.
10239 (struct symtab_index_entry): Likewise.
10240 (struct mapped_symtab): Likewise.
10241 (find_slot): Likewise.
10242 (hash_expand): Likewise.
10243 (add_index_entry): Likewise.
10244 (uniquify_cu_indices): Likewise.
10245 (class c_str_view): Likewise.
10246 (class c_str_view_hasher): Likewise.
10247 (class vector_hasher): Likewise.
10248 (write_hash_table): Likewise.
10249 (psym_index_map): Likewise.
10250 (struct addrmap_index_data): Likewise.
10251 (add_address_entry): Likewise.
10252 (add_address_entry_worker): Likewise.
10253 (write_address_map): Likewise.
10254 (symbol_kind): Likewise.
10255 (write_psymbols): Likewise.
10256 (struct signatured_type_index_data): Likewise.
10257 (write_one_signatured_type): Likewise.
10258 (recursively_count_psymbols): Likewise.
10259 (recursively_write_psymbols): Likewise.
10260 (class debug_names): Likewise.
10261 (check_dwarf64_offsets): Likewise.
10262 (psyms_seen_size): Likewise.
10263 (write_gdbindex): Likewise.
10264 (write_debug_names): Likewise.
10265 (assert_file_size): Likewise.
10266 (write_psymtabs_to_index): Likewise.
10267 (save_gdb_index_command): Likewise.
10268 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10270 * dwarf2read.h: New file.
10272 2018-03-27 Joel Brobecker <brobecker@adacore.com>
10275 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10276 symbol name if the CU's language stores symbol names in linkage
10278 * language.h (struct language_defn)
10279 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10280 all instances of this struct.
10282 2018-03-26 Tom Tromey <tom@tromey.com>
10284 * stack.c (backtrace_command_1): Remove verbose code.
10286 2018-03-26 Tom Tromey <tom@tromey.com>
10288 * python/py-framefilter.c (py_print_type): Don't catch
10289 exceptions. Return void.
10290 (py_print_value): Likewise.
10291 (py_print_single_arg): Likewise.
10292 (enumerate_args): Don't catch exceptions.
10293 (py_print_args): Likewise.
10294 (py_print_frame): Likewise.
10295 (gdbpy_apply_frame_filter): Catch exceptions here.
10297 2018-03-26 Tom Tromey <tom@tromey.com>
10299 * stack.c (_initialize_stack): Remove trailing newlines from help
10300 text. Add "Usage" line to "backtrace" help.
10302 2018-03-26 Tom Tromey <tom@tromey.com>
10305 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10307 2018-03-26 Tom Tromey <tom@tromey.com>
10309 * python/py-framefilter.c (py_print_single_arg): Return
10310 EXT_LANG_BT_ERROR from catch.
10312 2018-03-26 Tom Tromey <tom@tromey.com>
10314 PR backtrace/15584:
10315 * stack.c (backtrace_command_1): Move some code into no-filters
10318 2018-03-26 Tom Tromey <tom@tromey.com>
10320 * python/py-framefilter.c (throw_quit_or_print_exception): New
10322 (gdbpy_apply_frame_filter): Use it.
10324 2018-03-26 Tom Tromey <tom@tromey.com>
10327 * python/py-framefilter.c (py_print_type, py_print_value)
10328 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10331 2018-03-26 Tom Tromey <tom@tromey.com>
10333 * python/py-framefilter.c (enumerate_args): Use
10334 gdb::unique_xmalloc_ptr.
10336 2018-03-26 Tom Tromey <tom@tromey.com>
10338 * python/py-framefilter.c (py_print_frame): Return
10340 (gdbpy_apply_frame_filter): Update comment.
10341 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10343 <EXT_LANG_BT_NO_FILTERS>: Change value.
10345 2018-03-26 Tom Tromey <tom@tromey.com>
10347 PR backtrace/15582:
10348 * stack.c (backtrace_command): Parse "hide" argument.
10349 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10350 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10353 2018-03-26 Tom Tromey <tom@tromey.com>
10355 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10357 (backtrace_command): Remove "fulltrace", add "flags".
10359 2018-03-26 Tom Tromey <tom@tromey.com>
10361 * stack.c (backtrace_command): Rewrite command line parsing.
10363 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10365 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10367 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10369 * filename-seen-cache.h: Add include guard.
10371 2018-03-26 Keith Seitz <keiths@redhat.com>
10373 * symfile.c (place_section): Remove "struct" from section_addr_info
10375 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10376 "struct" keyword from section_addr_info.
10378 2018-03-26 Alan Hayward <alan.hayward@arm.com>
10380 * regformats/regdef.h (reg): Add constructors.
10382 2018-03-25 Pedro Alves <palves@redhat.com>
10384 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10385 if then/else bodies in var_func_name extraction.
10387 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
10389 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10390 lookup_minimal_symbol() to find symbol entry.
10391 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10393 2018-03-23 Keith Seitz <keiths@redhat.com>
10396 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10397 nested type definitions for C++, too.
10399 2018-03-23 Tom Tromey <tom@tromey.com>
10401 * machoread.c (struct oso_el): Add a constructor. Don't define as
10403 (macho_register_oso): Remove.
10404 (macho_symtab_read): Take a std::vector.
10405 (oso_el_compare_name): Now a std::sort comparator.
10406 (macho_symfile_read_all_oso): Take a std::vector.
10407 (macho_symfile_read): Use std::vector. Remove cleanups.
10409 2018-03-22 Tom Tromey <tom@tromey.com>
10411 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10412 (record_full_goto_bookmark): Use std::string.
10414 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10417 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10420 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10422 * rs6000-tdep.c (store_insn_p): New function.
10423 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10424 and cr_reg to their unshifted values. Use store_insn_p to
10425 match LR saves using either R1 or fdata->alloca_reg. Use
10426 store_insn_p to match CR saves. Set alloca_reg_offset
10427 when alloca_reg and framep are set. Remove lr_reg shift
10428 when assigning to fdata->lr_register.
10430 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
10432 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10433 command line args instead of emitting a warning.
10435 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10437 * tracepoint.h (struct static_tracepoint_marker): Initialize
10438 fields, define default constructor, move constructor and move
10439 assignment, disable the rest.
10440 <str_id, extra>: Make std::string.
10441 (release_static_tracepoint_marker): Remove.
10442 (free_current_marker): Remove.
10443 * tracepoint.c (free_current_marker): Remove.
10444 (parse_static_tracepoint_marker_definition): Adjust to
10445 std::string, use new hex2str overload.
10446 (release_static_tracepoint_marker): Remove.
10447 (print_one_static_tracepoint_marker): Get marker by reference
10448 and adjust to std::string.
10449 (info_static_tracepoint_markers_command): Adjust to std::vector
10451 * target.h (static_tracepoint_marker_p): Remove typedef.
10452 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10453 (struct target_ops) <to_static_tracepoint_marker_at>: Return
10455 <to_static_tracepoint_markers_by_strid>: Return std::vector.
10457 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10458 (target_debug_print_std_vector_static_tracepoint_marker): New.
10459 (target_debug_print_struct_static_tracepoint_marker_p): Rename
10461 (target_debug_print_static_tracepoint_marker_p): ... this.
10462 * target-delegates.c: Re-generate.
10463 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10465 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10466 (decode_static_tracepoint_spec): Adjust to std::vector.
10467 (tracepoint_print_one_detail): Adjust to std::string.
10468 (strace_marker_decode_location): Adjust to std::string.
10469 (update_static_tracepoint): Adjust to std::string, remove call
10470 to release_static_tracepoint_marker.
10471 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10472 Adjust to std::vector.
10473 * remote.c (remote_static_tracepoint_marker_at): Return bool.
10474 (remote_static_tracepoint_markers_by_strid): Adjust to
10476 * common/rsp-low.h (hex2str): New overload with explicit count
10478 * common/rsp-low.c (hex2str): New overload with explicit count
10480 * unittests/rsp-low-selftests.c (test_hex2str): New function.
10481 (_initialize_rsp_low_selftests): Add test_hex2str test.
10482 * unittests/tracepoint-selftests.c
10483 (test_parse_static_tracepoint_marker_definition): Adjust to
10486 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10488 * tracepoint.c (parse_static_tracepoint_marker_definition):
10489 Consider case where the definition is followed by more
10491 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10492 tracepoint-selftests.c.
10493 * unittests/tracepoint-selftests.c: New.
10495 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10497 * MAINTAINERS (Write After Approval): Add Pedro Franco de
10500 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10502 * symtab.c (find_pc_sect_line): fixed indentation.
10504 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
10506 * symtab.c (find_pc_sect_line): now uses binary search.
10508 2018-03-19 Tom Tromey <tom@tromey.com>
10510 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10511 "IDENT" production.
10513 2018-03-19 Pedro Alves <palves@redhat.com>
10514 Tom Tromey <tom@tromey.com>
10516 * unittests/observable-selftests.c: New file.
10517 * common/observable.h: New file.
10518 * observable.h: New file.
10519 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10520 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10521 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10522 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10523 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10524 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10525 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10526 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10527 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10528 python/py-breakpoint.c, python/py-finishbreakpoint.c,
10529 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10530 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10531 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10532 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10533 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10534 tui/tui-interp.c, valops.c: Update all users.
10535 * tui/tui-hooks.c (tui_bp_created_observer)
10536 (tui_bp_deleted_observer, tui_bp_modified_observer)
10537 (tui_inferior_exit_observer, tui_before_prompt_observer)
10538 (tui_normal_stop_observer, tui_register_changed_observer):
10540 (tui_observers_token): New global.
10541 (attach_or_detach, tui_attach_detach_observers): New functions.
10542 (tui_install_hooks, tui_remove_hooks): Use
10543 tui_attach_detach_observers.
10544 * record-btrace.c (record_btrace_thread_observer): Remove.
10545 (record_btrace_thread_observer_token): New global.
10546 * observer.sh: Remove.
10547 * observer.c: Rename to observable.c.
10548 * observable.c (namespace gdb_observers): Define new objects.
10549 (observer_debug): Move into gdb_observers namespace.
10550 (struct observer, struct observer_list, xalloc_observer_list_node)
10551 (xfree_observer_list_node, generic_observer_attach)
10552 (generic_observer_detach, generic_observer_notify): Remove.
10553 (_initialize_observer): Update.
10554 Don't include observer.inc.
10555 * Makefile.in (generated_files): Remove observer.h, observer.inc.
10556 (clean mostlyclean): Likewise.
10557 (observer.h, observer.inc): Remove targets.
10558 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10559 (COMMON_SFILES): Use observable.c, not observer.c.
10560 * .gitignore: Remove observer.h.
10562 2018-03-18 Tom Tromey <tom@tromey.com>
10564 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10566 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10568 2018-03-17 Tom Tromey <tom@tromey.com>
10570 * auto-load.c (auto_load_objfile_script_1): Use std::string.
10572 2018-03-17 Tom Tromey <tom@tromey.com>
10574 * target.c (class scoped_target_fd): New.
10575 (target_fileio_close_cleanup): Remove.
10576 (target_fileio_read_alloc_1): Use scoped_target_fd.
10578 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
10580 * silent-rules.mk: New.
10581 * Makefile.in: Include silent-rules.mk
10582 (srcdir, VPATH, top_srcdir): Move up.
10583 (COMPILE): Add ECHO_CXX.
10584 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10585 (init.c): Add ECHO_INIT_C.
10586 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10587 (version.c): Add ECHO_GEN.
10588 (printcmd.o): Add ECHO_CXX.
10589 (target-float.o): Add ECHO_CXX.
10590 (ada-exp.o): Add ECHO_CXX.
10591 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10592 (insight$(EXEEXT)): Add ECHO_CXXLD.
10593 * gnulib/configure.ac: Add AM_SILENT_RULES.
10594 * gnulib/aclocal.m4: Re-generate.
10595 * gnulib/configure: Re-generate.
10596 * gnulib/import/Makefile.in: Re-generate.
10598 2018-03-16 Tom Tromey <tom@tromey.com>
10600 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10601 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10602 * utils.c (do_free_section_addr_info)
10603 (make_cleanup_free_section_addr_info): Remove.
10604 * symfile.h (struct other_sections): Add constructor.
10605 (struct section_addr_info): Remove.
10606 (section_addr_info): New typedef.
10607 (struct sym_fns) <sym_offsets>: Change type of parameter.
10608 (build_section_addr_info_from_objfile)
10609 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10610 (default_symfile_offsets, symbol_file_add)
10611 (symbol_file_add_from_bfd)
10612 (build_section_addr_info_from_section_table): Update.
10613 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10614 * symfile.c (alloc_section_addr_info): Remove.
10615 (build_section_addr_info_from_section_table): Change return type.
10617 (build_section_addr_info_from_bfd)
10618 (build_section_addr_info_from_objfile): Likewise.
10619 (free_section_addr_info): Remove.
10620 (relative_addr_info_to_section_offsets): Change type of "addrs".
10621 (addrs_section_compar): Now a std::sort comparator.
10622 (addrs_section_sort): Change return type.
10623 (addr_info_make_relative): Change type of "addrs". Update.
10624 (default_symfile_offsets, syms_from_objfile_1)
10625 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10626 (symbol_file_add_separate): Update.
10627 (symbol_file_add): Change type of "addrs". Update.
10628 (add_symbol_file_command): Update. Remove cleanups.
10629 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10631 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10632 * solib.c (solib_read_symbols): Update.
10633 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10634 * machoread.c (macho_symfile_offsets): Update.
10635 * jit.c (jit_bfd_try_read_symtab): Update.
10637 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10639 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10640 unittests/utils-selftests.c.
10641 * unittests/utils-selftests.c: New file.
10643 2018-03-14 Tom Tromey <tom@tromey.com>
10646 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10649 2018-03-14 Tom Tromey <tom@tromey.com>
10652 * printcmd.c (printf_pointer): Allow "-" in format.
10654 2018-03-14 Tom Tromey <tom@tromey.com>
10656 * printcmd.c (_initialize_printcmd): Add usage to printf.
10658 2018-03-14 Yao Qi <qiyao@sourceware.org>
10660 * MAINTAINERS: Update my email address.
10662 2018-03-13 Tom Tromey <tom@tromey.com>
10664 * machoread.c (macho_check_dsym): Change filenamep to a
10666 (macho_symfile_read): Update.
10667 * symfile.c (load_command): Use std::string.
10669 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10671 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10672 to error message string.
10673 (riscv_register_name): Use xsnprintf instead of sprintf.
10674 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10676 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10678 (riscv_push_dummy_call): Likewise.
10680 2018-03-12 Tom Tromey <tom@tromey.com>
10682 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10683 Use gdb::byte_vector.
10684 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10686 2018-03-12 Yao Qi <yao.qi@linaro.org>
10688 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10689 parameter type to readable_regcache.
10690 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10693 2018-03-11 Tom Tromey <tom@tromey.com>
10695 * dwarf2read.c (struct nextfield): Add initializers.
10696 (struct nextfnfield): Remove.
10697 (struct fnfieldlist): Add initializers. Remove "length" and
10698 "head", use std::vector.
10699 (struct decl_field_list): Remove.
10700 (struct field_info): Add initializers.
10701 <fields, baseclasses>: Now std::vector.
10702 <nbaseclasses, nfnfields, typedef_field_list_count,
10703 nested_types_list_count>: Remove.
10704 (dwarf2_add_field, dwarf2_add_type_defn)
10705 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10706 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10707 (process_structure_scope): Update.
10709 2018-03-11 Tom Tromey <tom@tromey.com>
10711 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10712 for use by std::sort.
10713 (build_type_psymtabs_1): Use std::vector.
10715 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10717 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10718 and LIBMPFR in the printed configuration.
10720 2018-03-08 Tom Tromey <tom@tromey.com>
10722 * source.c (get_filename_and_charpos): Use scoped_fd.
10723 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10724 (procfs_pidlist): Likewise.
10725 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10726 (iterate_over_mappings): Likewise.
10728 2018-03-08 Tom Tromey <tom@tromey.com>
10730 * infcall.c (struct call_return_meta_info)
10731 <stack_temporaries_enabled>: Remove.
10732 (get_call_return_value, call_function_by_hand_dummy): Update.
10733 * thread.c (disable_thread_stack_temporaries): Remove.
10734 (enable_thread_stack_temporaries): Remove.
10735 (thread_stack_temporaries_enabled_p): Return bool.
10736 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10737 (get_last_thread_stack_temporary): Update.
10738 * eval.c (evaluate_subexp): Update.
10739 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10740 class, not a function.
10741 (value_ptr, value_vec): Remove typedefs.
10742 (class thread_info) <stack_temporaries_enabled>: Now bool.
10743 <stack_temporaries>: Now a std::vector.
10744 (thread_stack_temporaries_enabled_p)
10745 (value_in_thread_stack_temporaries): Return bool.
10747 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10749 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10750 (getpkt_or_notif_sane_1): Likewise.
10752 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10754 * build-id.c (build_id_to_debug_bfd): Use std::string.
10756 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10758 * build-id.c (find_separate_debug_file_by_buildid): Return
10760 * build-id.h (find_separate_debug_file_by_buildid): Return
10762 * coffread.c (coff_symfile_read): Adjust to std::string.
10763 * elfread.c (elf_symfile_read): Adjust to std::string.
10764 * symfile.c (separate_debug_file_exists): Change parameter to
10766 (find_separate_debug_file): Return std::string.
10767 (find_separate_debug_file_by_debuglink): Return std::string.
10768 * symfile.h (find_separate_debug_file_by_debuglink): Return
10771 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10773 * common/xml-utils.c (xml_escape_text): Move code to...
10774 (xml_escape_text_append): ... this new function.
10775 * common/xml-utils.h (xml_escape_text_append): New declaration.
10776 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10778 (_initialize_xml_utils): register test_xml_escape_text_append as
10781 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10783 * defs.h: Remove MAX_REGISTER_SIZE.
10784 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10786 * python/py-unwind.c (pyuw_sniffer): Likewise.
10788 2018-03-07 Tom Tromey <tom@tromey.com>
10790 * linux-tdep.c (linux_info_proc): Update.
10791 * target.h (struct target_ops) <to_fileio_readlink>: Return
10793 (target_fileio_readlink): Return optional<string>.
10794 * remote.c (remote_hostio_readlink): Return optional<string>.
10795 * inf-child.c (inf_child_fileio_readlink): Return
10797 * target.c (target_fileio_readlink): Return optional<string>.
10799 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10801 * regcache.c (cooked_read_test): Add riscv to the list of
10802 architectures that have a save_reggroup.
10804 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10806 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10807 value is not a dynamic class object.
10809 2018-03-06 Tom Tromey <tom@tromey.com>
10811 * rust-exp.y: Formatting fixes.
10813 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10815 * riscv-tdep.c (riscv_register_name): Remove target description
10817 (riscv_gdbarch_init): Remove target description check.
10819 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10821 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10823 * riscv-tdep.h: Likewise.
10825 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10827 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10828 (riscv_pseudo_register_write): Delete.
10829 (riscv_gdbarch_init): Remove all use of pseudo registers.
10831 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10833 * record-btrace.c (btrace_print_lines): Replace cleanup
10834 parameter with RAII equivalents.
10835 (btrace_insn_history): Replace cleanup with RAII equivalents.
10836 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10837 make_cleanup_ui_out_tuple_begin_end): Remove.
10838 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10839 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10840 make_cleanup_ui_out_list_begin_end): Remove.
10842 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10844 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10845 parameter types to std::vector. Use bool.
10846 (record_btrace_wait): Replace VEC(tp_t) with
10847 std::vector<thread_info *>.
10848 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10850 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10852 * record-btrace.c (record_btrace_disable_callback): Remove.
10853 (struct scoped_btrace_disable): New.
10854 (record_btrace_open): Use scoped_btrace_disable.
10856 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10858 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10859 reading values from registers.
10861 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10863 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10866 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10868 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10869 change parameter type. Use GDB's print functions, and use
10870 core_addr_to_string where appropriate.
10871 (riscv_push_dummy_call): Use core_addr_to_string where
10872 appropriate, update call to riscv_print_arg_location, and reindent
10874 (riscv_return_value): Update call to riscv_print_arg_location.
10876 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10877 Tim Newsome <tim@sifive.com>
10878 Albert Ou <a0u@eecs.berkeley.edu>
10879 Darius Rad <darius@bluespec.com>
10881 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10882 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10883 (ALLDEPFILES): Add riscv-tdep.c
10884 * configure.tgt: Add riscv support.
10885 * riscv-tdep.c: New file.
10886 * riscv-tdep.h: New file.
10887 * NEWS: Mention new target.
10888 * MAINTAINERS: Add entry for riscv.
10890 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10892 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10893 fields within aggregates.
10895 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10897 * record-btrace.c (btrace_print_lines): Change type of flags to
10898 gdb_disassembly_flags.
10900 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10902 * fbsd-nat.c: Include "inf-ptrace.h".
10903 (USE_SIGTRAP_SIGINFO): Conditionally define.
10904 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10905 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10906 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10908 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10910 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10912 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10913 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10914 "supports_stopped_by_hw_breakpoint" target methods.
10916 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10918 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10919 * fbsd-nat.c (debug_fbsd_nat): New variable.
10920 (show_fbsd_nat_debug): New function.
10921 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10922 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10924 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10926 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10927 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10929 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10930 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10933 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10935 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10936 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10938 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10940 * charset.c (struct charset_vector): New.
10941 (charsets): Change type to charset_vector.
10942 (find_charset_names): Adjust.
10944 (_initialize_charset): Adjust.
10946 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10948 * progspace.h (struct program_space) <deleted_solibs>: Change
10949 type to std::vector<std::string>.
10950 * progspace.c (clear_program_space_solib_cache): Adjust.
10951 * breakpoint.c (print_solib_event): Adjust.
10952 (check_status_catch_solib): Adjust.
10953 * solib.c (update_solib_list): Adjust.
10954 * ui-out.h (class ui_out) <field_string>: New overload.
10955 * ui-out.c (ui_out::field_string): New overload.
10957 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10959 * progspace.h (struct program_space): Add constructor and
10960 destructor, initialize fields.
10961 (add_program_space): Remove.
10962 * progspace.c (add_program_space): Rename to...
10963 (program_space::program_space): ... this.
10964 (release_program_space): Rename to...
10965 (program_space::~program_space): ... this.
10966 (delete_program_space): Use delete to delete program_space.
10967 (initialize_progspace): Use new to allocate program_space.
10968 * inferior.c (add_inferior_with_spaces): Likewise.
10969 (clone_inferior_command): Likewise.
10970 * infrun.c (follow_fork_inferior): Likewise.
10971 (handle_vfork_child_exec_or_exit): Likewise.
10973 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10975 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10976 (delim_string_to_char_ptr_vec): Return std::vector of
10977 gdb::unique_xmalloc_ptr.
10978 (dirnames_to_char_ptr_vec_append): Take std::vector of
10979 gdb::unique_xmalloc_ptr.
10980 (dirnames_to_char_ptr_vec): Return std::vector of
10981 gdb::unique_xmalloc_ptr.
10982 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10983 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10984 (delim_string_to_char_ptr_vec): Return an std::vector of
10985 gdb::unique_xmalloc_ptr, adjust the code.
10986 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10987 gdb::unique_xmalloc_ptr, adjust the code.
10988 (dirnames_to_char_ptr_vec): Return an std::vector of
10989 gdb::unique_xmalloc_ptr, adjust the code.
10990 * auto-load.c (auto_load_safe_path_vec): Change type to
10991 std::vector of gdb::unique_xmalloc_ptr.
10992 (auto_load_expand_dir_vars): Return an std::vector of
10993 gdb::unique_xmalloc_ptr, adjust the code.
10994 (auto_load_safe_path_vec_update): Adjust.
10995 (filename_is_in_auto_load_safe_path_vec): Adjust.
10996 (auto_load_objfile_script_1): Adjust.
10997 * build-id.c (build_id_to_debug_bfd): Adjust.
10998 * linux-thread-db.c (thread_db_load_search): Adjust.
10999 * source.c (add_path): Adjust.
11001 * symfile.c (find_separate_debug_file): Adjust.
11002 * utils.c (do_free_char_ptr_vec): Remove.
11003 (make_cleanup_free_char_ptr_vec): Remove.
11005 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11008 * common/pathstuff.c: Conditionally include "<windows.h>".
11010 2018-03-01 Georg Sauthoff <mail@georg.so>
11013 * gcore.in: Quote variables and switch interpreter to bash.
11015 2018-03-01 Tom Tromey <tom@tromey.com>
11017 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11018 assertion. Add assertion for discriminant_index.
11019 (quirk_rust_enum): Use correct base type name in univariant case.
11021 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11023 * record.c (get_call_history_modifiers): Return a
11024 record_print_flags.
11025 (cmd_record_call_history): Adjust.
11026 * record-btrace.c (record_btrace_call_history): Adjust.
11027 (record_btrace_call_history_range): Adjust.
11028 (record_btrace_call_history_from): Adjust.
11029 * target-debug.h (target_debug_print_record_print_flags): New.
11030 * target-delegates.c: Re-generate.
11031 * target.c (target_call_history): Change flags type.
11032 (target_call_history_from): Likewise.
11033 (target_call_history_range): Likewise.
11034 * target.h (struct target_ops) <target_call_history>: Likewise.
11035 (target_call_history_from): Likewise.
11036 (target_call_history_range): Likewise.
11038 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11039 Simon Marchi <simon.marchi@polymtl.ca>
11041 * common/common-utils.c: Include "sys/stat.h".
11042 (is_regular_file): Move here from "source.c"; change return
11044 * common/common-utils.h (is_regular_file): New prototype.
11045 * common/pathstuff.c (contains_dir_separator): New function.
11046 * common/pathstuff.h (contains_dir_separator): New prototype.
11047 * source.c: Don't include "sys/stat.h".
11048 (is_regular_file): Move to "common/common-utils.c".
11050 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11052 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11053 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11054 * auto-load.c: Include "common/pathstuff.h".
11055 * common/common-def.h (current_directory): Move here.
11056 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11058 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11060 * common/pathstuff.c: New file.
11061 * common/pathstuff.h: New file.
11062 * compile/compile.c: Include "common/pathstuff.h".
11063 * defs.h (current_directory): Move to "common/common-defs.h".
11064 * dwarf2read.c: Include "common/pathstuff.h".
11065 * exec.c: Likewise.
11066 * guile/scm-safe-call.c: Likewise.
11067 * linux-thread-db.c: Likewise.
11068 * main.c: Likewise.
11069 * nto-tdep.c: Likewise.
11070 * objfiles.c: Likewise.
11071 * source.c: Likewise.
11072 * symtab.c: Likewise.
11073 * utils.c: Include "common/pathstuff.h".
11074 (gdb_realpath): Move to "common/pathstuff.c".
11075 (gdb_realpath_keepfile): Likewise.
11076 (gdb_abspath): Likewise.
11077 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11078 (gdb_realpath_keepfile): Likewise.
11079 (gdb_abspath): Likewise.
11081 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11083 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11084 wildcard process pid for super_resume for kernels with a
11087 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11089 * compile/compile.c (get_args): Add additional comments
11090 explaining function.
11092 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11093 Tom Tromey <tom@tromey.com>
11095 * target.h (memory_write_request_s): Remove typedef. Don't define
11097 (target_write_memory_blocks): Change argument to std::vector.
11098 (struct memory_write_request): Add constructor.
11099 * target-memory.c (compare_block_starting_address): Return bool.
11100 Change argument types.
11101 (claim_memory): Change arguments to use std::vector.
11102 (split_regular_and_flash_blocks, blocks_to_erase)
11103 (compute_garbled_blocks): Likewise.
11104 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11105 (target_write_memory_blocks): Change argument to std::vector.
11106 * symfile.c (struct load_section_data): Add constructor and
11107 destructor. Use std::vector for "requests".
11108 (struct load_progress_data): Add initializers.
11109 (load_section_callback): Update. Use "new".
11110 (clear_memory_write_data): Remove.
11111 (generic_load): Update.
11113 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11115 * arch/aarch64.h: Use common/tdesc.h.
11117 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11119 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11120 architecture with a 64-bit ABI.
11122 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11124 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11125 ahead of target description loading.
11127 2018-02-26 Tom Tromey <tom@tromey.com>
11129 * stack.c (backtrace_command_1): Update.
11130 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11132 * python/py-framefilter.c (py_print_frame)
11133 (gdbpy_apply_frame_filter): Change type of "flags".
11134 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11136 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11137 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11138 * extension.h (enum frame_filter_flag): Rename from
11139 frame_filter_flags.
11140 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11141 (apply_ext_lang_frame_filter): Change type of "flags".
11142 * extension.c (apply_ext_lang_frame_filter): Change type of
11144 * extension-priv.h (struct extension_language_ops)
11145 <apply_frame_filter>: Change type of "flags".
11147 2018-02-26 Tom Tromey <tom@tromey.com>
11150 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11151 off-by-one in py_end computation.
11152 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11154 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11157 2018-02-26 Tom Tromey <tom@tromey.com>
11159 * dwarf2read.c (struct variant_field): New.
11160 (struct nextfield) <variant>: New field.
11161 (dwarf2_add_field): Handle DW_TAG_variant_part.
11162 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11163 discriminated union.
11164 (read_structure_type): Handle DW_TAG_variant_part.
11165 (handle_struct_member_die): New function, extracted from
11166 process_structure_scope. Handle DW_TAG_variant.
11167 (process_structure_scope): Handle discriminated unions. Call
11168 handle_struct_member_die.
11170 2018-02-26 Tom Tromey <tom@tromey.com>
11172 * rust-lang.h (rust_last_path_segment): Declare.
11173 * rust-lang.c (rust_last_path_segment): Now public. Change
11175 (struct disr_info): Remove.
11176 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11177 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11178 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11179 (rust_enum_p, rust_enum_variant): New function.
11180 (rust_underscore_fields): Remove "offset" parameter.
11181 (rust_print_enum): New function.
11182 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11183 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11184 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11186 (rust_internal_print_type): New function, from rust_print_type.
11188 (rust_print_type): Call rust_internal_print_type.
11189 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11190 Update enum handling.
11191 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11192 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11193 (rust_union_quirks): New functions.
11194 (process_full_comp_unit, process_full_type_unit): Call
11196 (process_structure_scope): Update rust_unions if necessary.
11198 2018-02-26 Tom Tromey <tom@tromey.com>
11200 * value.h (value_union_variant): Declare.
11201 * valops.c (value_union_variant): New function.
11202 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11203 (struct discriminant_info): New.
11204 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11206 (struct main_type) <flag_discriminated_union>: New field.
11208 2018-02-26 Tom Tromey <tom@tromey.com>
11210 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11211 unittests/unpack-selftests.c.
11212 * unittests/unpack-selftests.c: New file.
11213 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11215 2018-02-26 Yao Qi <yao.qi@linaro.org>
11217 * dwarf2read.c (struct partial_die_info) <read>: New method.
11218 (read_partial_die): Remove the declaration.
11219 (load_partial_dies): Update.
11220 (partial_die_info::partial_die_info):
11221 (read_partial_die): Change it to partial_die_info::read.
11223 2018-02-26 Yao Qi <yao.qi@linaro.org>
11225 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11226 (fixup_partial_die): Remove declaration.
11227 (scan_partial_symbols): Update.
11228 (partial_die_parent_scope): Likewise.
11229 (partial_die_full_name): Likewise.
11230 (fixup_partial_die): Change it to partial_die_info::fixup.
11232 2018-02-26 Yao Qi <yao.qi@linaro.org>
11234 * dwarf2read.c (read_partial_die): Update the declaration.
11235 (load_partial_dies): Caller update.
11236 (read_partial_die): Remove one argument abbrev_len.
11238 2018-02-26 Yao Qi <yao.qi@linaro.org>
11240 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11241 assignment operator.
11242 (load_partial_dies): Use ctor and copy ctor.
11243 (read_partial_die): Update.
11244 (dwarf2_cu::find_partial_die): Use ctor.
11246 2018-02-26 Yao Qi <yao.qi@linaro.org>
11248 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11249 (find_partial_die_in_comp_unit): Change it to
11250 dwarf2_cu::find_partial_die.
11251 (find_partial_die): Update.
11253 2018-02-26 Yao Qi <yao.qi@linaro.org>
11255 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11258 2018-02-26 Yao Qi <yao.qi@linaro.org>
11260 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11262 2018-02-26 Alan Hayward <alan.hayward@arm.com>
11264 * arch/amd64.h: Use common/tdesc.h.
11265 * arch/i386.c: Likewise.
11266 * arch/i386.h: Likewise.
11267 * arch/tic6x.c: Likewise.
11268 * arch/tdesc.h: Move file from here...
11269 * common/tdesc.h: ...to here.
11270 * features/aarch64-core.c: Regenerate.
11271 * features/aarch64-fpu.c: Regenerate.
11272 * features/i386/32bit-avx.c: Regenerate.
11273 * features/i386/32bit-avx512.c: Regenerate.
11274 * features/i386/32bit-core.c: Regenerate.
11275 * features/i386/32bit-linux.c: Regenerate.
11276 * features/i386/32bit-mpx.c: Regenerate.
11277 * features/i386/32bit-pkeys.c: Regenerate.
11278 * features/i386/32bit-sse.c: Regenerate.
11279 * features/i386/64bit-avx.c: Regenerate.
11280 * features/i386/64bit-avx512.c: Regenerate.
11281 * features/i386/64bit-core.c: Regenerate.
11282 * features/i386/64bit-linux.c: Regenerate.
11283 * features/i386/64bit-mpx.c: Regenerate.
11284 * features/i386/64bit-pkeys.c: Regenerate.
11285 * features/i386/64bit-segments.c: Regenerate.
11286 * features/i386/64bit-sse.c: Regenerate.
11287 * features/i386/x32-core.c: Regenerate.
11288 * features/tic6x-c6xp.c: Regenerate.
11289 * features/tic6x-core.c: Regenerate.
11290 * features/tic6x-gp.c: Regenerate.
11291 * target-descriptions.c: Use common/tdesc.h.
11292 * target-descriptions.h: Likewise.
11294 2018-02-24 Tom Tromey <tom@tromey.com>
11296 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11297 (try_thread_db_load_from_dir, thread_db_load_search): Use
11299 (info_auto_load_libthread_db_compare): Return bool. Change
11301 (info_auto_load_libthread_db): Use std::vector, std::string.
11304 2018-02-24 Tom Tromey <tom@tromey.com>
11306 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11308 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11310 * gdbarch.c: Rebuild.
11311 * gdbarch.h: Rebuild.
11312 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11313 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11314 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11317 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
11319 * gdbtypes.h (sect_offset): Change type to uint64_t.
11320 (sect_offset_str): New function.
11321 * dwarf2read.c (create_addrmap_from_aranges): Use
11323 (error_check_comp_unit_head): Likewise.
11324 (create_debug_type_hash_table): Likewise.
11325 (read_cutu_die_from_dwo): Likewise.
11326 (init_cutu_and_read_dies): Likewise.
11327 (init_cutu_and_read_dies_no_follow): Likewise.
11328 (process_psymtab_comp_unit_reader): Likewise.
11329 (partial_die_parent_scope): Likewise.
11330 (peek_die_abbrev): Likewise.
11331 (process_queue): Likewise.
11332 (dwarf2_physname): Likewise.
11333 (read_namespace_alias): Likewise.
11334 (read_import_statement): Likewise.
11335 (create_dwo_cu_reader): Likewise.
11336 (create_cus_hash_table): Likewise.
11337 (lookup_dwo_cutu): Likewise.
11338 (inherit_abstract_dies): Likewise.
11339 (read_func_scope): Likewise.
11340 (read_call_site_scope): Likewise.
11341 (dwarf2_add_member_fn): Likewise.
11342 (read_common_block): Likewise.
11343 (read_module_type): Likewise.
11344 (read_typedef): Likewise.
11345 (read_subrange_type): Likewise.
11346 (load_partial_dies): Likewise.
11347 (read_partial_die): Likewise.
11348 (find_partial_die): Likewise.
11349 (read_str_index): Likewise.
11350 (dwarf2_string_attr): Likewise.
11351 (build_error_marker_type): Likewise.
11352 (lookup_die_type): Likewise.
11353 (dump_die_shallow): Likewise.
11354 (follow_die_ref): Likewise.
11355 (dwarf2_fetch_die_loc_sect_off): Likewise.
11356 (dwarf2_fetch_constant_bytes): Likewise.
11357 (follow_die_sig): Likewise.
11358 (get_signatured_type): Likewise.
11359 (get_DW_AT_signature_type): Likewise.
11360 (dwarf2_find_containing_comp_unit): Likewise.
11361 (set_die_type): Likewise.
11363 2018-02-21 John Baldwin <jhb@FreeBSD.org>
11365 * arch/aarch64.c: Include "common-defs.h".
11366 * arch/amd64.c: Likewise.
11367 * arch/i386.c: Likewise.
11369 2018-02-21 Tom Tromey <tom@tromey.com>
11371 * value.h: (extract_field_op): Update.
11372 * eval.c (extract_field_op): Return a const char *.
11373 * expression.h (parse_expression_for_completion): Update.
11374 * completer.c (complete_expression): Update.
11375 (add_struct_fields): Make fieldname const.
11376 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11377 (mark_completion_tag, parse_exp_in_context_1): Update.
11378 (parse_expression_for_completion): Change "name" to
11379 unique_xmalloc_ptr*.
11381 2018-02-21 Tom Tromey <tom@tromey.com>
11383 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11385 2018-02-21 Yao Qi <yao.qi@linaro.org>
11387 * avr-tdep.c (avr_read_pc): Change parameter type to
11389 * gdbarch.sh (read_pc): Likewise.
11390 * gdbarch.c: Re-generated.
11391 * gdbarch.h: Re-generated.
11392 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11394 * ia64-tdep.c (ia64_read_pc): Likewise.
11395 * mips-tdep.c (mips_read_pc): Likewise.
11396 * spu-tdep.c (spu_read_pc): Likewise.
11398 2018-02-21 Yao Qi <yao.qi@linaro.org>
11400 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11401 * regcache-dump.c: New file.
11402 * regcache.c: Move register_dump to regcache-dump.c.
11403 (maintenance_print_registers): Likewise.
11404 (maintenance_print_raw_registers): Likewise.
11405 (maintenance_print_cooked_registers): Likewise.
11406 (maintenance_print_register_groups): Likewise.
11407 (maintenance_print_remote_registers): Likewise.
11408 (_initialize_regcache): Likewise.
11409 * regcache.h (register_dump): Moved from regcache.c.
11411 2018-02-21 Yao Qi <yao.qi@linaro.org>
11413 * regcache.c (regcache::regcache): Update.
11414 (regcache::invalidate): Move it to detached_regcache::invalidate.
11415 (get_thread_arch_aspace_regcache): Update.
11416 (regcache::raw_update): Update.
11417 (regcache::cooked_read): Remove some code.
11418 (regcache::cooked_read_value): Likewise.
11419 (regcache::raw_write): Remove assert on m_readonly_p.
11420 (regcache::raw_supply_integer): Move it to
11421 detached_regcache::raw_supply_integer.
11422 (regcache::raw_supply_zeroed): Likewise.
11423 * regcache.h (detached_regcache) <raw_supply_integer>: New
11425 <raw_supply_zeroed, invalidate>: Likewise.
11426 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11427 <invalidate>: Likewise.
11428 <m_readonly_p>: Removed.
11430 2018-02-21 Yao Qi <yao.qi@linaro.org>
11432 * infcmd.c (get_return_value): Let stop_regs point to
11433 get_current_regcache.
11434 * regcache.c (regcache::regcache): Remove.
11435 (register_dump_reg_buffer): New class.
11436 (regcache_print): Adjust.
11437 * regcache.h (regcache): Remove constructors.
11439 2018-02-21 Yao Qi <yao.qi@linaro.org>
11441 * regcache.c (class register_dump): New class.
11442 (register_dump_regcache, register_dump_none): New class.
11443 (register_dump_remote, register_dump_groups): New class.
11444 (regcache_print): Update.
11445 * regcache.h (regcache_dump_what): Move it to regcache.c.
11446 (regcache) <dump>: Remove.
11448 2018-02-21 Yao Qi <yao.qi@linaro.org>
11450 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11452 (jit_unwind_reg_set_impl): Call raw_supply.
11453 (jit_frame_sniffer): Use reg_buffer_rw.
11454 * record-full.c (record_full_core_regbuf): Change its type.
11455 (record_full_core_open_1): Use reg_buffer_rw.
11456 (record_full_close): Likewise.
11457 (record_full_core_fetch_registers): Use regcache->raw_supply.
11458 (record_full_core_store_registers): Likewise.
11459 * regcache.c (regcache::get_register_status): Move it to
11461 (regcache_raw_set_cached_value): Remove.
11462 (regcache::raw_set_cached_value): Remove.
11463 (regcache::raw_write): Call raw_supply.
11464 (regcache::raw_supply): Move it to reg_buffer_rw.
11465 * regcache.h (regcache_raw_set_cached_value): Remove.
11466 (reg_buffer_rw): New class.
11468 2018-02-21 Yao Qi <yao.qi@linaro.org>
11470 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11471 readonly_detached_regcache.
11472 (dummy_frame_prev_register): Use regcache->cooked_read.
11473 * frame.c (frame_save_as_regcache): Change return type.
11474 (frame_pop): Update.
11475 * frame.h (frame_save_as_regcache): Update declaration.
11476 * inferior.h (get_infcall_suspend_state_regcache): Update
11478 * infrun.c (infcall_suspend_state) <registers>: use
11479 readonly_detached_regcache.
11480 (save_infcall_suspend_state): Don't use regcache_dup.
11481 (get_infcall_suspend_state_regcache): Change return type.
11482 * linux-fork.c (struct fork_info) <savedregs>: Change to
11483 readonly_detached_regcache.
11485 (fork_save_infrun_state): Don't use regcache_dup.
11486 (info_checkpoints_command): Adjust.
11487 * mi/mi-main.c (register_changed_p): Update declaration.
11488 (mi_cmd_data_list_changed_registers): Use
11489 readonly_detached_regcache.
11490 (register_changed_p): Change parameter type to
11491 readonly_detached_regcache.
11492 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11493 readonly_detached_regcache.
11494 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11495 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11497 (regcache::save): Move it to reg_buffer.
11498 (regcache::restore): Change parameter type.
11499 (regcache_dup): Remove.
11500 * regcache.h (reg_buffer) <save>: New method.
11501 (readonly_detached_regcache): New class.
11502 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11503 readonly_detached_regcache.
11504 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11506 2018-02-21 Yao Qi <yao.qi@linaro.org>
11508 * frame.c (frame_save_as_regcache): Use regcache method save.
11509 (frame_pop): Use regcache method restore.
11510 * infrun.c (restore_infcall_suspend_state): Likewise.
11511 * linux-fork.c (fork_load_infrun_state): Likewise.
11512 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11514 * regcache.c (regcache_save): Remove.
11515 (regcache::restore): More asserts.
11516 (regcache_cpy): Remove.
11517 * regcache.h (regcache_save): Remove the declaration.
11518 (regcache::restore): Move from private to public.
11519 Remove the friend declaration of regcache_cpy.
11520 (regcache_cpy): Remove declaration.
11522 2018-02-21 Yao Qi <yao.qi@linaro.org>
11524 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11525 parameter type to 'readable_regcache *'.
11526 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11527 * arm-tdep.c (arm_neon_quad_read): Likewise.
11528 (arm_pseudo_read): Likewise.
11529 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11530 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11531 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11532 * gdbarch.c: Re-generated.
11533 * gdbarch.h: Re-generated.
11534 * gdbarch.sh (pseudo_register_read): Change parameter type to
11535 'readable_regcache *'.
11536 (pseudo_register_read_value): Likewise.
11537 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11538 (h8300_pseudo_register_read): Likewise.
11539 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11540 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11541 (i386_pseudo_register_read_into_value): Likewise.
11542 (i386_pseudo_register_read_value): Likewise.
11543 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11545 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11546 * m32c-tdep.c (m32c_raw_read): Likewise.
11547 (m32c_read_flg): Likewise.
11548 (m32c_banked_register): Likewise.
11549 (m32c_banked_read): Likewise.
11550 (m32c_sb_read): Likewise.
11551 (m32c_part_read): Likewise.
11552 (m32c_cat_read): Likewise.
11553 (m32c_r3r2r1r0_read): Likewise.
11554 (m32c_pseudo_register_read): Likewise.
11555 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11556 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11557 (mep_pseudo_cr64_read): Likewise.
11558 (mep_pseudo_register_read): Likewise.
11559 * mips-tdep.c (mips_pseudo_register_read): Likewise.
11560 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11561 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11562 * regcache.c (regcache::raw_read): Move it to readable_regcache.
11563 (regcache::cooked_read): Likewise.
11564 (regcache::cooked_read_value): Likewise.
11565 (regcache_cooked_read_signed):
11566 (regcache::cooked_read): Likewise.
11567 * regcache.h (readable_regcache): New class.
11568 (regcache): Inherit readable_regcache. Move some methods to
11570 * rl78-tdep.c (rl78_pseudo_register_read): Change
11571 parameter type to 'readable_regcache *'.
11572 * rs6000-tdep.c (do_regcache_raw_read): Remove.
11573 (e500_pseudo_register_read): Change parameter type to
11574 'readable_regcache *'.
11575 (dfp_pseudo_register_read): Likewise.
11576 (vsx_pseudo_register_read): Likewise.
11577 (efpr_pseudo_register_read): Likewise.
11578 * s390-tdep.c (s390_pseudo_register_read): Likewise.
11579 * sh-tdep.c (sh_pseudo_register_read): Likewise.
11580 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11581 (sh64_pseudo_register_read): Likewise.
11582 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11583 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11584 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11585 (spu_pseudo_register_read): Likewise.
11586 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11587 (xtensa_pseudo_register_read): Likewise.
11589 2018-02-21 Yao Qi <yao.qi@linaro.org>
11591 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11592 (regcache::arch): Move it to reg_buffer::arch.
11593 (regcache::register_buffer): Likewise.
11594 (regcache::assert_regnum): Likewise.
11595 (regcache::num_raw_registers): Likewise.
11596 * regcache.h (reg_buffer): New class.
11597 (regcache): Inherit reg_buffer.
11599 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11601 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11602 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11604 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11606 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11608 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11610 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11611 (SFILES): Remove common/*.c files.
11612 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11613 * common/common.host: Add common reference.
11614 * configure.ac: Likewise.
11615 * configure: Regenerate.
11617 2018-02-16 Yao Qi <yao.qi@linaro.org>
11619 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11620 (block_initialize_namespace): Use new.
11621 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11622 (dwarf2_free_objfile): Use delete.
11623 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11624 (copy_type_recursive): Use new.
11625 * gdb_obstack.h (allocate_on_obstack): New.
11627 2018-02-15 Yao Qi <yao.qi@linaro.org>
11630 * inferior.c (exit_inferior_1): Reset inf->control.
11632 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11634 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11637 2018-02-14 Pedro Alves <palves@redhat.com>
11639 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11640 frame_cleanup_after_sniffer on exception.
11642 2018-02-14 Tom Tromey <tom@tromey.com>
11644 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11646 (solib_bfd_open): Make pathname const.
11647 * solib.c (solib_bfd_open): Make pathname const.
11648 * solib-spu.c (spu_bfd_fopen): Make name const.
11649 (spu_bfd_open): Make pathname const.
11650 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11651 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11653 2018-02-14 Tom Tromey <tom@tromey.com>
11655 * symfile.c (symfile_bfd_open): Update.
11656 * source.h (openp, source_full_path_of, find_and_open_source):
11657 Change argument type to unique_xmalloc_ptr.
11658 * source.c (openp): Take a unique_xmalloc_ptr.
11659 (source_full_path_of, find_and_open_source): Likewise.
11660 (open_source_file, symtab_to_fullname): Update.
11661 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11662 unique_xmalloc_ptr.
11663 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11664 (exec_file_find): Update.
11665 * psymtab.c (psymtab_to_fullname): Update.
11666 * nto-tdep.h (nto_find_and_open_solib): Update.
11667 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11668 unique_xmalloc_ptr.
11669 * exec.c (exec_file_attach): Update.
11670 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11671 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11673 2018-02-14 Tom Tromey <tom@tromey.com>
11675 * solib.c: Include source.h.
11676 * nto-tdep.c: Include source.h.
11677 * mi/mi-cmd-env.c: Include source.h.
11678 * infcmd.c: Include source.h.
11679 * exec.c: Include source.h.
11680 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11681 (add_path, directory_switch, source_path, init_source_path): Move
11683 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11684 (add_path, directory_switch, source_path, init_source_path):
11687 2018-02-14 Tom Tromey <tom@tromey.com>
11689 * solist.h (exec_file_find, solib_find): Return
11690 unique_xmalloc_ptr.
11691 (solib_bfd_fopen): Take a const char *.
11692 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11693 (exec_file_find, solib_find): Likewise.
11694 (solib_bfd_fopen): Do not take ownership of "pathname".
11695 (solib_bfd_open): Use unique_xmalloc_ptr.
11696 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11697 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11698 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11699 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11701 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11703 * ada-lang.c (name_match_type_from_name): Remove reference to
11704 ada_name_for_lookup in function's documentation.
11705 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11707 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11709 * defs.h (enum openp_flags): New enum.
11710 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11711 Move to enum openp_flags.
11712 (openp_flags): New enum flags.
11713 (openp): Change parameter type to openp_flags.
11714 * source.c (openp): Change parameter type to openp_flags.
11715 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11716 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11718 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11720 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11723 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11725 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11727 (class dwarf2_queue_guard): ...the destructor of this new class.
11728 (dw2_do_instantiate_symtab): Create instance of the new class
11729 dwarf2_queue_guard, remove cleanup.
11731 2018-02-09 Tom Tromey <tom@tromey.com>
11733 * source.c (find_source_lines): Don't reference past the end of
11736 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11738 * remote.c (remote_btrace_maybe_reopen): Change error message.
11739 * btrace.c (btrace_enable): Likewise.
11740 (parse_xml_btrace): Likewise.
11741 (parse_xml_btrace_conf): Likewise.
11743 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11745 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11746 (linux_enable_pt, linux_enable_bts): Call
11747 diagnose_perf_event_open_fail.
11749 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11751 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11752 Remove parameter and change return type. Update callers. Move it.
11753 (linux_enable_bts, linux_enable_pt): Improve error message.
11754 (linux_enable_pt): Remove zero buffer size check.
11755 (linux_enable_btrace): Improve error messages. Remove NULL return
11758 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11760 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11761 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11762 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11763 (linux_supports_pt, linux_supports_btrace): Remove.
11764 (linux_enable_bts): Call cpu_supports_bts.
11765 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11766 * remote.c (remote_supports_btrace): Remove.
11767 (init_remote_ops): Remove remote_supports_btrace.
11768 * target-delegates.c: Regenerated.
11769 * target.c (target_supports_btrace): Remove.
11770 * target.h (target_ops) <to_supports_btrace>: Remove
11771 (target_supports_btrace): Remove.
11772 * x86-linux-nat.c (x86_linux_create_target): Remove
11773 linux_supports_btrace.
11775 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11777 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11779 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11780 exception and use message in own exception.
11782 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11784 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11785 (perf_event_pt_event_type): Use gdb_file_up.
11786 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11787 scoped_fd, and scoped_mmap.
11789 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11791 * common/scoped_mmap.h: New.
11792 * unittests/scoped_mmap-selftest.c: New.
11793 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11794 unittests/scoped_mmap-selftest.c.
11796 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11798 * common/scoped_fd.h: New.
11799 * unittests/scoped_fd-selftest.c: New.
11800 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11801 unittests/scoped_fd-selftest.c.
11803 2018-02-09 Tom Tromey <tom@tromey.com>
11805 * auto-load.c (auto_load_section_scripts): Use
11806 gdb::unique_xmalloc_ptr.
11808 2018-02-09 Tom Tromey <tom@tromey.com>
11810 * auto-load.c (execute_script_contents): Use std::string.
11812 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11814 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11815 Python function, rather than a new command.
11817 2018-02-08 Tom Tromey <tom@tromey.com>
11819 * solib.c (solib_find_1): Use std::string.
11820 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11822 2018-02-08 Tom Tromey <tom@tromey.com>
11824 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11826 2018-02-08 Tom Tromey <tom@tromey.com>
11828 * source.c (find_source_lines): Use gdb::def_vector.
11830 2018-02-08 Tom Tromey <tom@tromey.com>
11832 * macrocmd.c (struct temporary_macro_definition): New.
11833 (macro_define_command): Use temporary_macro_definition. Remove
11835 (free_macro_definition_ptr): Remove.
11837 2018-02-08 Tom Tromey <tom@tromey.com>
11839 * macroexp.c (maybe_expand): Use std::string.
11841 2018-02-08 Tom Tromey <tom@tromey.com>
11843 * macroexp.c (struct macro_buffer): Add initializers for some
11845 (init_buffer, init_shared_buffer, free_buffer)
11846 (free_buffer_return_text): Remove.
11847 (macro_buffer): New constructors.
11848 (~macro_buffer): New destructor.
11849 (macro_buffer::set_shared): New method.
11850 (macro_buffer::resize_buffer, macro_buffer::appendc)
11851 (macro_buffer::appendmem): Now methods, not free functions.
11852 (set_token, append_tokens_without_splicing, stringify)
11853 (macro_stringify): Update.
11854 (gather_arguments): Change return type. Remove argc_p argument,
11855 add args_ptr argument. Use std::vector.
11856 (substitute_args): Remove argc argument. Accept std::vector.
11857 (expand): Update. Use std::vector.
11858 (scan, macro_expand, macro_expand_next): Update.
11860 2018-02-08 Tom Tromey <tom@tromey.com>
11862 * symtab.c (default_collect_symbol_completion_matches_break_on):
11863 Use unique_xmalloc_ptr.
11864 * macroscope.h: (sal_macro_scope, user_macro_scope)
11865 (default_macro_scope): Return unique_xmalloc_ptr.
11866 * macroscope.c (sal_macro_scope, user_macro_scope)
11867 (default_macro_scope): Return unique_xmalloc_ptr.
11868 * macroexp.h (macro_expand, macro_expand_once): Return
11869 unique_xmalloc_ptr.
11870 * macroexp.c (macro_expand, macro_expand_once): Return
11871 unique_xmalloc_ptr.
11872 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11873 (info_macro_command, info_macros_command): Use
11874 unique_xmalloc_ptr.
11875 * compile/compile-c-support.c (write_macro_definitions): Use
11876 unique_xmalloc_ptr.
11877 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11879 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11881 * value.c (value_static_field): Assign field type instead of
11882 containing type when returning an optimized out value.
11884 2018-02-06 Yao Qi <yao.qi@linaro.org>
11886 * ft32-tdep.c (ft32_read_pc): Remove.
11887 (ft32_write_pc): Remove.
11888 (ft32_gdbarch_init): Update.
11889 * m32r-tdep.c (m32r_read_pc): Remove.
11890 (m32r_gdbarch_init): Update.
11891 * mep-tdep.c (mep_read_pc): Remove.
11892 (mep_gdbarch_init): Update.
11893 * microblaze-tdep.c (microblaze_write_pc): Remove.
11894 (microblaze_gdbarch_init): Update.
11895 * mn10300-tdep.c (mn10300_read_pc): Remove.
11896 (mn10300_write_pc): Remove.
11897 (mn10300_gdbarch_init): Update.
11898 * moxie-tdep.c (moxie_read_pc): Remove.
11899 (moxie_write_pc): Remove.
11900 (moxie_gdbarch_init): Update.
11902 2018-02-06 Yao Qi <yao.qi@linaro.org>
11904 * expprint.c (print_subexp_standard): Handle
11905 OP_F77_UNDETERMINED_ARGLIST.
11906 (dump_subexp_body_standard): Likewise.
11908 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11910 * target-descriptions.c (tdesc_element_visitor) Add empty
11912 (tdesc_type): Move make_gdb_type from here.
11913 (tdesc_type_builtin): Likewise.
11914 (tdesc_type_vector): Likewise.
11915 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11916 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11917 (make_gdb_type_union): Likewise.
11918 (make_gdb_type_flags): Likewise.
11919 (make_gdb_type_enum): Likewise.
11920 (make_gdb_type): New function.
11921 (tdesc_register_type): Use static make_gdb_type.
11923 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11925 * infcmd.c (default_print_one_register_info): Align natural-format
11926 column values consistently one under another.
11927 (pad_to_column): New function.
11929 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11931 * dwarf2read.c (dwarf2_physname): Move commment.
11933 2018-02-01 Leszek Swirski <leszeks@google.com>
11935 * varobj.c (varobj_formatted_print_options): Allow recursive
11936 pretty printing if pretty printing is enabled.
11938 2018-02-01 Leszek Swirski <leszeks@google.com>
11940 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11941 names after a structop as a filename.
11943 2018-02-01 Yao Qi <yao.qi@linaro.org>
11945 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11946 (arm_record_coproc_data_proc): Likewise.
11948 2018-02-01 Yao Qi <yao.qi@linaro.org>
11950 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11952 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11954 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11955 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11957 2018-01-31 Pedro Alves <palves@redhat.com>
11959 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11960 * inflow.c (child_terminal_save_inferior): Wrap reference to
11961 tcgetpgrp in HAVE_TERMIOS_H.
11962 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11964 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11965 always iterate over all inferiors.
11966 (gdbsim_cntrl_c): Adjust.
11967 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11969 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11971 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11972 index type is objfile-owned if the element type is as well.
11974 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11978 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11980 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11981 "features/s390x-linux64.c".
11982 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11983 s390_linux32 and s390x_linux64.
11984 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11986 * s390-tdep.c: Include "features/s390-linux32.c" and
11987 "features/s390x-linux64.c".
11988 (s390_tdesc_valid): Add check for tdesc_has_registers.
11989 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11990 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11991 tdesc_s390x_linux64.
11992 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11993 tdesc_s390x_linux64 to...
11994 * s390-tdep.h: ...here.
11996 2018-01-30 Pedro Alves <palves@redhat.com>
11999 * config.in, configure: Regenerate.
12000 * configure.ac: Check for getpgid.
12001 * go32-nat.c (go32_pass_ctrlc): New.
12002 (go32_target): Install it.
12003 * inf-child.c (inf_child_target): Install
12004 child_terminal_save_inferior, child_pass_ctrlc and
12006 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12007 (inf_ptrace_target): No longer install it.
12008 * infcmd.c (interrupt_target_1): Adjust.
12009 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12010 (child_interrupt): Declare.
12011 (inferior::terminal_state): New.
12012 * inflow.c (struct terminal_info): Update comments.
12013 (inferior_process_group): Delete.
12014 (terminal_is_ours): Delete.
12015 (gdb_tty_state): New.
12016 (child_terminal_init): Adjust.
12017 (is_gdb_terminal, sharing_input_terminal_1)
12018 (sharing_input_terminal): New functions.
12019 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12020 Set the process's actual process group in the foreground if
12021 possible. Handle is_ours_for_output/is_ours distinction. Don't
12022 mark terminal as the inferior's if not sharing GDB's terminal.
12023 Don't check attach_flag.
12024 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12025 pass down a target_terminal_state.
12026 (child_terminal_save_inferior): New, factored out from ...
12027 (child_terminal_ours_1): ... this. Handle
12028 target_terminal_state::is_ours_for_output.
12029 (child_interrupt, child_pass_ctrlc): New.
12030 (inflow_inferior_exit): Clear the inferior's terminal_state.
12031 (copy_terminal_info): Copy the inferior's terminal state.
12032 (_initialize_inflow): Remove reference to terminal_is_ours.
12033 * inflow.h (inferior_process_group): Delete.
12034 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12035 * procfs.c (procfs_target): Don't install procfs_interrupt.
12036 (procfs_interrupt): Delete.
12037 * remote.c (remote_serial_quit_handler): Adjust.
12038 (remote_interrupt): Remove ptid parameter. Adjust.
12039 * target-delegates.c: Regenerate.
12040 * target.c: Include "terminal.h".
12041 (target_terminal::terminal_state): Rename to ...
12042 (target_terminal::m_terminal_state): ... this.
12043 (target_terminal::init): Adjust.
12044 (target_terminal::inferior): Adjust to per-inferior
12046 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12047 (target_terminal::ours, target_terminal::ours_for_output): Use
12048 target_terminal_is_ours_kind.
12049 (target_interrupt): Remove ptid parameter. Adjust.
12050 (default_target_pass_ctrlc): Adjust.
12051 * target.h (target_ops::to_terminal_save_inferior): New field.
12052 (target_ops::to_interrupt): Remove ptid_t parameter.
12053 (target_interrupt): Remove ptid_t parameter. Update comment.
12054 (target_pass_ctrlc): Update comment.
12055 * target/target.h (target_terminal_state): New scoped enum,
12056 factored out of ...
12057 (target_terminal::terminal_state): ... here.
12058 (target_terminal::inferior): Update comments.
12059 (target_terminal::restore_inferior): New.
12060 (target_terminal::is_inferior, target_terminal::is_ours)
12061 (target_terminal::is_ours_for_output): Adjust.
12062 (target_terminal::scoped_restore_terminal_state): Adjust to
12063 rename, and call restore_inferior() instead of inferior().
12064 (target_terminal::scoped_restore_terminal_state::m_state): Change
12066 (target_terminal::terminal_state): Rename to ...
12067 (target_terminal::m_terminal_state): ... this and change type.
12069 2018-01-30 Pedro Alves <palves@redhat.com>
12071 * linux-nat.c (wait_for_signal): New function.
12072 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12074 (async_terminal_is_ours)
12075 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12076 (linux_nat_add_target): Don't override
12077 to_terminal_inferior/to_terminal_ours.
12079 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12081 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12083 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12085 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12086 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12087 dwarf2_per_objfile_free here.
12088 (dwarf2_per_objfile_free): Remove.
12089 (_initialize_dwarf2_read): Don't register
12090 dwarf2_per_objfile_free as a registry cleanup.
12092 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12094 Avoid compilation errors in MinGW native builds
12096 The error is triggered by including python-internal.h, and the
12099 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12100 from build-gnulib/import/math.h:27,
12101 from d:/usr/Python26/include/pyport.h:235,
12102 from d:/usr/Python26/include/Python.h:58,
12103 from python/python-internal.h:94,
12104 from python/py-arch.c:24:
12105 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12109 This happens because Python headers define 'hypot' to expand t
12110 '_hypot' in the Windows builds.
12111 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12112 'hypoth'. This avoids a compilation error.
12114 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12116 * MAINTAINERS (Write After Approval): Fix ordering.
12118 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12120 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12122 2018-01-26 Alan Modra <amodra@gmail.com>
12124 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12125 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12126 Remove nop. Make const. Comment.
12127 (powerpc32_plt_stub_so_2): New.
12128 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12129 Correct count. Update uses.
12130 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12131 Move common code reading PLT entry word. Correct
12132 powerpc32_plt_stub PLT address calculation.
12133 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12134 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12135 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12136 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12137 (ppc64_standard_linkage8): Likewise.
12138 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12139 Correct insns description.
12140 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12142 2018-01-24 Pedro Alves <palves@redhat.com>
12144 GCC PR libstdc++/83906
12145 * gdbtypes.c (operator==(const dynamic_prop &,
12146 const dynamic_prop &)): New.
12147 (operator==(const range_bounds &, const range_bounds &)): New.
12148 (check_types_equal): Use them instead of memcmp.
12149 * gdbtypes.h (operator==(const dynamic_prop &,
12150 const dynamic_prop &)): Declare.
12151 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12152 (operator==(const range_bounds &, const range_bounds &)): Declare.
12153 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12155 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12157 * s390-linux-tdep.c (s390_record_address_mask)
12158 (s390_record_calc_disp_common, s390_record_calc_disp)
12159 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12160 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12161 (s390_process_record): Move to s390-tdep.c.
12162 (s390_linux_init_abi_any): Adjust.
12163 * s390-tdep.c (s390_record_address_mask)
12164 (s390_record_calc_disp_common, s390_record_calc_disp)
12165 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12166 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12167 (s390_process_record): Moved from s390-linux-tdep.c
12168 (s390_gdbarch_init): Adjust.
12170 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12172 * s390-linux-nat.c (s390-tdep.h): New include.
12173 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12174 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12175 (ALLDEPFILES): Add s390-tdep.c.
12176 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12177 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12178 * s390-tdep.h: ...this. New file.
12179 * s390-linux-tdep.c (s390-tdep.h): New include.
12180 (_initialize_s390_tdep): Rename to...
12181 (_initialize_s390_linux_tdep): ...this and adjust.
12182 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12183 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12185 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12186 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12187 (s390_is_partial_instruction, s390_software_single_step)
12188 (is_non_branch_ril, s390_displaced_step_copy_insn)
12189 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12190 (s390_prologue_data, s390_addr, s390_store, s390_load)
12191 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12192 (s390_register_call_saved, s390_guess_tracepoint_registers)
12193 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12194 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12195 (s390_pseudo_register_name, s390_pseudo_register_type)
12196 (s390_pseudo_register_read, s390_pseudo_register_write)
12197 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12198 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12199 (s390_addr_bits_remove, s390_address_class_type_flags)
12200 (s390_address_class_type_flags_to_name)
12201 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12202 (s390_function_arg_float, s390_function_arg_vector)
12203 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12204 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12205 (s390_frame_align, s390_register_return_value, s390_return_value)
12206 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12207 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12208 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12209 (s390_trad_frame_prev_register, s390_unwind_cache)
12210 (s390_prologue_frame_unwind_cache)
12211 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12212 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12213 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12214 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12215 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12216 (s390_frame_base_address, s390_local_base_address)
12217 (s390_frame_base, s390_gcc_target_options)
12218 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12219 (s390_validate_reg_range, s390_tdesc_valid)
12220 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12221 * s390-tdep.c: ...this. New file.
12223 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12225 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12226 (s390_process_record, s390_gdbarch_tdep_alloc)
12227 (s390_linux_init_abi_any): Use/set new hook.
12229 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12231 * s390-linux-tdep.c (osabi.h): New include.
12232 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12233 (s390_linux_init_abi_any): New functions.
12234 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12236 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12238 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12239 tdesc_has_registers check
12241 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12243 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12244 (s390_validate_reg_range): New macro.
12245 (s390_gdbarch_init): Adjust.
12247 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12249 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12250 (s390_gdbarch_tdep_alloc): Adjust.
12251 (s390_gdbarch_init): Adjust.
12253 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12255 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12256 <have_tdb>: Change type to bool.
12257 (s390_gdbarch_tdep_alloc): Adjust.
12258 (s390_gdbarch_init): Adjust.
12260 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12262 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12263 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12264 (s390_gdbarch_tdep_alloc): New function.
12265 (s390_gdbarch_init): Allocate tdep at start and use its fields
12266 instead of separate variables.
12268 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12270 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12271 when looking for cached gdbarch and add comment for remaining.
12273 2018-01-22 Pedro Alves <palves@redhat.com>
12274 Sergio Durigan Junior <sergiodj@redhat.com>
12276 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12279 2018-01-22 Maciej W. Rozycki <macro@mips.com>
12281 * MAINTAINERS: Update my company e-mail address.
12283 2018-01-22 Yao Qi <yao.qi@linaro.org>
12285 * regcache.c (cooked_write_test): New function.
12286 (_initialize_regcache): Register the test.
12288 2018-01-22 Yao Qi <yao.qi@linaro.org>
12290 * ia64-tdep.c (ia64_pseudo_register_read): Call
12291 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12292 * m32c-tdep.c (m32c_cat_read): Likewise.
12293 (m32c_r3r2r1r0_read): Likewise.
12294 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12295 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12297 2018-01-22 Yao Qi <yao.qi@linaro.org>
12299 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12300 method raw_read instead of regcache_raw_read.
12301 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12302 * arm-tdep.c (arm_neon_quad_read): Likewise.
12303 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12304 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12305 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12306 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12307 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12308 (i386_pseudo_register_read_into_value): Likewise.
12309 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12310 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12311 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12312 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12313 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12314 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12315 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12316 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12317 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12319 2018-01-22 Yao Qi <yao.qi@linaro.org>
12321 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12322 * configure.tgt: Remove target mt.
12323 * mt-tdep.c: Remove.
12324 * regcache.c (cooked_read_test): Remove the check for mt.
12326 2018-01-22 Yao Qi <yao.qi@linaro.org>
12328 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12329 instead of gdbarch_pseudo_register_read_value.
12331 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12333 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12336 2018-01-22 Joel Brobecker <brobecker@adacore.com>
12338 * linespec.c (create_sals_line_offset): Remove code that preserved
12339 the symtab_and_line's line number.
12341 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12343 * varobj.c (varobj_create): Don't set valid_block when creating a
12346 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12348 * varobj.c (varobj_create): Remove out of date comment.
12350 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12353 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12354 updating innermost block.
12355 * parse.c (innermost_block_tracker::update): Take extra type
12356 parameter, and check types match before updating innermost block.
12357 (write_dollar_variable): Update innermost block for registers.
12358 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12359 (innermost_block_tracker::innermost_block_tracker): Initialise
12361 (innermost_block_tracker::reset): Take type parameter.
12362 (innermost_block_tracker::update): Take type parameter, and pass
12363 type through as needed.
12364 (innermost_block_tracker::m_types): New member.
12365 * varobj.c (varobj_create): Pass type when reseting innermost
12368 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12370 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12371 * ada-lang.c (resolve_subexp): Likewise.
12372 * breakpoint.c (set_breakpoint_condition) Likewise.
12373 (watch_command_1) Likewise.
12374 * c-exp.y (variable): Likewise.
12375 * d-exp.y (PrimaryExpression): Likewise.
12376 * f-exp.y (variable): Likewise.
12377 * go-exp.y (variable): Likewise.
12378 * m2-exp.y (variable): Likewise.
12379 * objfiles.c (objfile::~objfile): Likewise.
12380 * p-exp.y (variable): Likewise.
12381 * parse.c (innermost_block): Change type.
12382 * parser-defs.h (class innermost_block_tracker): New.
12383 (innermost_block): Change to innermost_block_tracker.
12384 * printcmd.c (display_command): Switch to innermost_block API.
12385 (do_one_display): Likewise.
12386 * rust-exp.y (do_one_display): Likewise.
12387 * symfile.c (clear_symtab_users): Likewise.
12388 * varobj.c (varobj_create): Switch to innermost_block API, replace
12389 use of innermost_block with block stored on varobj object.
12391 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
12393 * expression.h (innermost_block): Remove declaration.
12394 * varobj.c: Add 'parser-defs.h' include.
12396 2018-01-19 Tom Tromey <tom@tromey.com>
12398 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12399 symbols in the static and global blocks.
12401 2018-01-19 James Clarke <jrtc27@jrtc27.com>
12403 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12404 gdb_ptrace.h, and move including gdb_wait.h ...
12405 * nat/linux-ptrace.h: ... to here.
12407 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12409 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12410 inf_ptrace_detach_success.
12411 (inf_ptrace_detach_success): Add inferior parameter, use it
12412 instead of inferior_ptid, pass it to detach_inferior.
12413 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12415 * inferior.c (detach_inferior): Add overload that takes an
12417 * inferior.h (detach_inferior): Likewise.
12418 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12419 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12420 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12422 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12424 * target.h (struct target_ops) <to_detach>: Add inferior
12426 (target_detach): Likewise.
12427 * target.c (dispose_inferior): Pass inferior down.
12428 (target_detach): Pass inferior down. Assert that it is equal to
12429 the current inferior.
12430 * aix-thread.c (aix_thread_detach): Pass inferior down.
12431 * corefile.c (core_file_command): Pass current_inferior() down.
12432 * corelow.c (core_detach): Add inferior parameter.
12433 * darwin-nat.c (darwin_detach): Likewise.
12434 * gnu-nat.c (gnu_detach): Likewise.
12435 * inf-ptrace.c (inf_ptrace_detach): Likewise.
12436 * infcmd.c (detach_command): Pass current_inferior() down to
12438 * infrun.c (follow_fork_inferior): Pass parent_inf to
12440 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12442 * linux-nat.c (linux_nat_detach): Add inferior parameter.
12443 * linux-thread-db.c (thread_db_detach): Likewise.
12444 * nto-procfs.c (procfs_detach): Likewise.
12445 * procfs.c (procfs_detach): Likewise.
12446 * record.c (record_detach): Likewise.
12447 * record.h (struct inferior): Forward-declare.
12448 (record_detach): Add inferior parameter.
12449 * remote-sim.c (gdbsim_detach): Likewise.
12450 * remote.c (remote_detach_1): Likewise.
12451 (remote_detach): Likewise.
12452 (extended_remote_detach): Likewise.
12453 * sol-thread.c (sol_thread_detach): Likewise.
12454 * target-debug.h (target_debug_print_inferior_p): New macro.
12455 * target-delegates.c: Re-generate.
12456 * top.c (kill_or_detach): Pass inferior down to target_detach.
12457 * windows-nat.c (windows_detach): Add inferior parameter.
12459 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
12461 * target.h (struct target_ops) <to_detach>: Remove args
12463 (target_detach): Likewise.
12464 * target.c (dispose_inferior): Adjust.
12465 (target_detach): Remove args parameter, adjust.
12466 * aix-thread.c (aix_thread_detach): Adjust.
12467 * corefile.c (core_file_command): Adjust.
12468 * corelow.c (core_detach): Adjust.
12469 * darwin-nat.c (darwin_detach): Adjust.
12470 * gnu-nat.c (gnu_detach): Adjust.
12471 * inf-ptrace.c (inf_ptrace_detach): Adjust.
12472 * infcmd.c (detach_command): Adjust
12473 * infrun.c (follow_fork_inferior): Adjust.
12474 (handle_vfork_child_exec_or_exit): Adjust.
12475 * linux-fork.c (linux_fork_detach): Remove args parameter.
12476 * linux-fork.h (linux_fork_detach): Likewise.
12477 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12478 * linux-thread-db.c (thread_db_detach): Likewise.
12479 * nto-procfs.c (procfs_detach): Likewise.
12480 * procfs.c (procfs_detach): Likewise.
12481 (do_detach): Remove signo parameter.
12482 * record.c (record_detach): Remove args parameter.
12483 * record.h (record_detach): Likewise.
12484 * remote-sim.c (gdbsim_detach): Likewise.
12485 * remote.c (remote_detach_1): Likewise.
12486 (remote_detach): Likewise.
12487 (extended_remote_detach): Likewise.
12488 * sol-thread.c (sol_thread_detach): Likewise.
12489 * target-delegates.c: Re-generate.
12490 * top.c (struct qt_args) <args>: Remove field.
12491 (kill_or_detach): Don't pass args.
12492 (quit_force): Don't set args.
12493 * windows-nat.c (windows_detach): Remove args parameter.
12495 2018-01-19 Yao Qi <yao.qi@linaro.org>
12497 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12498 (arm_linux_init_abi): Install it.
12500 2018-01-19 Yao Qi <yao.qi@linaro.org>
12502 * osabi.c (gdb_osabi_names): Extend the regexp for
12503 arm-linux-gnueabihf.
12505 2018-01-18 Yao Qi <yao.qi@linaro.org>
12507 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12509 (abbrev_table::add_abbrev): Update.
12510 (abbrev_table::lookup_abbrev): Update.
12512 2018-01-18 Yao Qi <yao.qi@linaro.org>
12514 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12516 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
12518 * compile/compile.c (compile_to_object): Convert "triplet_rx"
12521 2018-01-17 Tom Tromey <tom@tromey.com>
12523 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
12525 2018-01-17 Tom Tromey <tom@tromey.com>
12527 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12528 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12529 (create_array_type_with_stride): Update.
12530 * dwarf2read.c (set_die_type): Update.
12532 2018-01-17 Tom Tromey <tom@tromey.com>
12534 * dwarf2read.c (delayed_method_info): Remove typedef.
12535 (dwarf2_cu::method_info): Now a std::vector.
12536 (add_to_method_list): Update.
12537 (free_delayed_list): Remove.
12538 (compute_delayed_physnames): Update.
12539 (process_full_comp_unit, process_full_type_unit): Clear the method
12540 list. Remove cleanups.
12541 (psymtab_include_file_name): Add name_holder parameter. Use
12542 unique_xmalloc_ptr.
12543 (dwarf_decode_lines): Update.
12545 2018-01-17 Tom Tromey <tom@tromey.com>
12546 Simon Marchi <simon.marchi@ericsson.com>
12548 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12549 (dwarf2_per_objfile::free_cached_comp_units)
12550 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12551 (init_cutu_and_read_dies_no_follow): Update.
12552 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12553 (dwarf2_cu::~dwarf2_cu): New.
12554 (free_heap_comp_unit, free_stack_comp_unit): Remove.
12555 (age_cached_comp_units, free_one_cached_comp_unit): Update.
12557 2018-01-17 Tom Tromey <tom@tromey.com>
12558 Simon Marchi <simon.marchi@ericsson.com>
12560 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12561 (struct die_reader_specs) <abbrev_table>: New member.
12562 (struct abbrev_table): Add constructor.
12563 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12564 <abbrev_obstack>: Now an auto_obstack.
12565 (abbrev_table_up): New typedef.
12566 (init_cu_die_reader): Add abbrev_table parameter.
12567 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12568 Add result_dwo_abbrev_table.
12569 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12570 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12572 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12574 (skip_children): Update.
12575 (abbrev_table::alloc_abbrev): Rename from
12576 abbrev_table_alloc_abbrev.
12577 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12578 (abbrev_table::lookup_abbrev): Rename from
12579 abbrev_table_lookup_abbrev.
12580 (abbrev_table_read_table): Return abbrev_table_up.
12581 (abbrev_table_free, abbrev_table_free_cleanup)
12582 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12583 (load_partial_dies): Update.
12585 2018-01-17 Tom Tromey <tom@tromey.com>
12587 * dwarf2read.c (dwarf2_compute_name): Update comment.
12588 (read_func_scope, read_variable): Update.
12589 (new_symbol): Remove.
12590 (new_symbol_full): Rename to new_symbol.
12592 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12595 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12596 a warning instead of throwing an error, set section size to 0 and return
12598 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12600 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12602 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12604 (linux_ptrace_attach_fail_reason_string): Likewise.
12605 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12607 (linux_ptrace_attach_fail_reason_string): Likewise.
12608 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12610 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12612 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12614 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12617 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12618 checking for fs_base/gs_base fields in struct user_regs_struct.
12619 * configure: Regenerate.
12621 2018-01-17 Yao Qi <yao.qi@linaro.org>
12623 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12625 (aarch64_linux_init_abi): Install it to gdbarch hook
12626 gcc_target_options.
12628 2018-01-15 Pedro Alves <palves@redhat.com>
12630 * common/signals-state-save-restore.c
12631 (save_original_signals_state): Fix typos.
12633 2017-01-12 Tom Tromey <tom@tromey.com>
12634 Sergio Durigan Junior <sergiodj@redhat.com>
12636 * Makefile.in (install-only): Install gdb-add-index.
12638 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12640 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12642 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12644 * infrun.c (keep_going_pass_signal): Clear step-over info when
12645 insert_breakpoints fails.
12647 2018-01-11 Pedro Alves <palves@redhat.com>
12650 * infrun.c (resume): Rename to ...
12651 (resume_1): ... this.
12652 (resume): Reimplement as wrapper around resume_1.
12654 2018-01-11 Pedro Alves <palves@redhat.com>
12657 * remote.c (remote_parse_stop_reply): Default to the last-set
12658 general thread instead of to 'magic_null_ptid'.
12660 2018-01-10 Pedro Alves <palves@redhat.com>
12662 * language.h (language_get_symbol_name_matcher): Rename ...
12663 (get_symbol_name_matcher): ... this.
12664 * language.c (language_get_symbol_name_matcher): Ditto.
12665 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12668 2018-01-10 Pedro Alves <palves@redhat.com>
12672 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12673 Adjust to use language_get_symbol_name_matcher instead of
12674 language_defn::la_get_symbol_name_matcher.
12675 * language.c (language_get_symbol_name_matcher): If in Ada mode
12676 and the lookup name is a verbatim match, return Ada's matcher.
12677 * language.h (language_get_symbol_name_matcher): Adjust comment.
12678 (ada_lookup_name_info::verbatim_p):: New method.
12680 2018-01-10 Pedro Alves <palves@redhat.com>
12683 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12684 minsym's language is language_auto or language_cplus, pass down
12685 language_ada instead.
12686 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12688 2018-01-10 Pedro Alves <palves@redhat.com>
12691 * minsyms.c (linkage_name_str): New function.
12692 (iterate_over_minimal_symbols): Use it.
12694 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12696 * NEWS: Document that 'info proc' now works on FreeBSD.
12698 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12700 * configure.ac: Check for kinfo_getfile in libutil.
12701 * configure: Regenerate.
12702 * config.in: Regenerate.
12703 * fbsd-nat.c: Include "fbsd-tdep.h".
12704 (fbsd_fetch_cmdline): New.
12705 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12706 rather than calling error.
12707 (fbsd_info_proc): New.
12708 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12709 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12710 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12712 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12714 * fbsd-nat.c (struct free_deleter): Remove.
12715 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12717 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12719 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12720 NULL for an empty pathname.
12722 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12724 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12725 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12726 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12727 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12728 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12729 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12730 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12731 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12732 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12733 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12734 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12735 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12736 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12737 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12738 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12740 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12742 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12743 (gnu_xfer_auxv): New function.
12744 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12745 TARGET_OBJECT_AUXV.
12747 2018-01-08 Yao Qi <yao.qi@linaro.org>
12748 Simon Marchi <simon.marchi@ericsson.com>
12750 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12752 (COMMON_OBS): Remove selftest.o.
12753 * configure.ac: Append selftest-arch.c and common/selftest.c to
12754 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12755 * configure: Re-generated.
12756 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12758 (maintenance_info_selftests): Likewise.
12760 2018-01-08 Xavier Roirand <roirand@adacore.com>
12762 * ada-valprint.c (val_print_packed_array_elements): Use
12763 proper number of elements when printing an array indexed
12764 by an enumeration type.
12766 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12768 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12769 (dw2_get_file_names_reader): Adjust.
12770 (lookup_dwo_signatured_type): Adjust.
12771 (lookup_dwp_signatured_type): Adjust.
12772 (lookup_signatured_type): Adjust.
12773 (create_type_unit_group): Adjust.
12774 (get_type_unit_group): Adjust.
12775 (process_psymtab_comp_unit_reader): Adjust.
12776 (build_type_psymtabs_reader): Adjust.
12777 (scan_partial_symbols): Adjust.
12778 (add_partial_symbol): Adjust.
12779 (add_partial_subprogram): Adjust.
12780 (peek_die_abbrev): Adjust.
12781 (fixup_go_packaging): Adjust.
12782 (process_imported_unit_die): Adjust.
12783 (dwarf2_compute_name): Adjust.
12784 (dwarf2_physname): Adjust.
12785 (read_import_statement): Adjust.
12786 (handle_DW_AT_stmt_list): Adjust.
12787 (read_file_scope): Adjust.
12788 (read_func_scope): Adjust.
12789 (read_lexical_block_scope): Adjust.
12790 (read_call_site_scope): Adjust.
12791 (read_variable): Adjust.
12792 (dwarf2_rnglists_process): Adjust.
12793 (dwarf2_ranges_process): Adjust.
12794 (dwarf2_ranges_read): Adjust.
12795 (dwarf2_get_pc_bounds): Adjust.
12796 (dwarf2_record_block_ranges): Adjust.
12797 (dwarf2_add_field): Adjust.
12798 (dwarf2_add_member_fn): Adjust.
12799 (read_structure_type): Adjust.
12800 (process_structure_scope): Adjust.
12801 (read_enumeration_type): Adjust.
12802 (read_array_type): Adjust.
12803 (mark_common_block_symbol_computed): Adjust.
12804 (read_common_block): Adjust.
12805 (read_namespace_type): Adjust.
12806 (read_namespace): Adjust.
12807 (read_module_type): Adjust.
12808 (read_tag_pointer_type): Adjust.
12809 (read_tag_ptr_to_member_type): Adjust.
12810 (read_tag_string_type): Adjust.
12811 (read_subroutine_type): Adjust.
12812 (read_typedef): Adjust.
12813 (read_base_type): Adjust.
12814 (attr_to_dynamic_prop): Adjust.
12815 (read_subrange_type): Adjust.
12816 (read_unspecified_type): Adjust.
12817 (dwarf2_read_abbrevs): Adjust.
12818 (load_partial_dies): Adjust.
12819 (read_partial_die): Adjust.
12820 (find_partial_die): Adjust.
12821 (guess_partial_die_structure_name): Adjust.
12822 (fixup_partial_die): Adjust.
12823 (read_attribute_value): Adjust.
12824 (read_addr_index): Adjust.
12825 (read_addr_index_from_leb128): Adjust.
12826 (read_str_index): Adjust.
12827 (dwarf2_string_attr): Adjust.
12828 (get_debug_line_section): Adjust.
12829 (dwarf_decode_line_header): Adjust.
12830 (lnp_state_machine::check_line_address): Adjust.
12831 (dwarf_decode_lines_1): Adjust.
12832 (dwarf_decode_lines): Adjust.
12833 (dwarf2_start_symtab): Adjust.
12834 (var_decode_location): Adjust.
12835 (new_symbol_full): Adjust.
12836 (dwarf2_const_value_data): Adjust.
12837 (dwarf2_const_value_attr): Adjust.
12838 (dwarf2_const_value): Adjust.
12839 (die_type): Adjust.
12840 (die_containing_type): Adjust.
12841 (build_error_marker_type): Adjust.
12842 (lookup_die_type): Adjust.
12843 (guess_full_die_structure_name): Adjust.
12844 (anonymous_struct_prefix): Adjust.
12845 (determine_prefix): Adjust.
12846 (dwarf2_name): Adjust.
12847 (follow_die_ref_or_sig): Adjust.
12848 (follow_die_offset): Adjust.
12849 (follow_die_ref): Adjust.
12850 (follow_die_sig_1): Adjust.
12851 (follow_die_sig): Adjust.
12852 (get_signatured_type): Adjust.
12853 (get_DW_AT_signature_type): Adjust.
12854 (decode_locdesc): Adjust.
12855 (dwarf_decode_macros): Adjust.
12856 (cu_debug_loc_section): Adjust.
12857 (fill_in_loclist_baton): Adjust.
12858 (dwarf2_symbol_mark_computed): Adjust.
12859 (init_one_comp_unit): Don't assign
12860 dwarf2_cu::dwarf2_per_objfile.
12861 (set_die_type): Adjust.
12863 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12865 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12866 <dwarf2_per_objfile>: New field.
12867 (dwarf2_per_objfile): Remove global.
12868 (get_dwarf2_per_objfile): New function.
12869 (set_dwarf2_per_objfile): New function.
12870 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12871 dwarf2_per_objfile.
12872 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12873 (read_abbrev_offset): Likewise.
12874 (read_indirect_string): Likewise.
12875 (read_indirect_line_string): Likewise.
12876 (read_indirect_string_at_offset): Likewise.
12877 (read_indirect_string_from_dwz): Likewise.
12878 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12879 dwarf2_per_objfile.
12880 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12881 (create_all_comp_units): Change objfile parameter to
12882 dwarf2_per_objfile.
12883 (create_all_type_units): Likewise.
12884 (process_queue): Add dwarf2_per_objfile parameter.
12885 (read_and_check_comp_unit_head): Likewise.
12886 (lookup_dwo_unit_in_dwp): Likewise.
12887 (get_dwp_file): Likewise.
12888 (process_cu_includes): Likewise.
12889 (struct free_dwo_file_cleanup_data): New struct.
12890 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12891 set_dwarf2_per_objfile.
12892 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12893 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12894 context, adjust calls.
12895 (dw2_instantiate_symtab): Likewise.
12896 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12897 (dw2_get_cu): Likewise.
12898 (create_cu_from_index_list): Change objfile parameter to
12899 dwarf2_per_objfile.
12900 (create_cus_from_index_list): Get dwarf2_per_objfile from
12901 context, adjust calls.
12902 (create_cus_from_index): Likewise.
12903 (create_signatured_type_table_from_index): Change objfile
12904 parameter to dwarf2_per_objfile.
12905 (create_signatured_type_table_from_debug_names): Change objfile
12906 parameter to dwarf2_per_objfile.
12907 (create_addrmap_from_index): Likewise.
12908 (create_addrmap_from_aranges): Likewise.
12909 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12910 (dw2_setup): Remove.
12911 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12913 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12914 get_dwarf2_per_objfile.
12915 (dw2_forget_cached_source_info): Likewise.
12916 (dw2_map_symtabs_matching_filename): Likewise.
12917 (struct dw2_symtab_iterator) <index>: Remove.
12918 <dwarf2_per_objfile>: New field.
12919 (dw2_symtab_iter_init): Replace index parameter with
12920 dwarf2_per_objfile.
12921 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12922 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12923 (dw2_print_stats): Likewise.
12924 (dw2_dump): Likewise.
12925 (dw2_expand_symtabs_for_function): Likewise.
12926 (dw2_expand_all_symtabs): Likewise.
12927 (dw2_expand_symtabs_with_fullname): Likewise.
12928 (dw2_expand_marked_cus): Replace index and objfile parameters
12929 with dwarf2_per_objfile.
12930 (dw_expand_symtabs_matching_file_matcher): Add
12931 dwarf2_per_objfile parameter and adjust calls.
12932 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12934 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12935 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12937 (create_cus_from_debug_names_list): Replace objfile parameter
12938 with dwarf2_per_objfile and adjust calls.
12939 (create_cus_from_debug_names): Likewise.
12940 (dwarf2_read_debug_names): Likewise.
12941 (mapped_debug_names::namei_to_name): Adjust call.
12942 (dw2_debug_names_iterator::next): Likewise.
12943 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12944 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12945 (dw2_debug_names_dump): Likewise.
12946 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12947 (dw2_debug_names_expand_symtabs_matching): Likewise.
12948 (dwarf2_initialize_objfile): Likewise.
12949 (dwarf2_build_psymtabs): Likewise.
12950 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12952 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12953 (read_and_check_comp_unit_head): Likewise.
12954 (read_abbrev_offset): Likewise.
12955 (create_debug_type_hash_table): Likewise.
12956 (create_debug_types_hash_table): Likewise.
12957 (create_all_type_units): Replace objfile parameter with
12958 dwarf2_per_objfile.
12959 (add_type_unit): Add dwarf2_per_objfile parameter.
12960 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12961 with dwarf2_per_objfile.
12962 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12963 (lookup_dwp_signatured_type): Likewise.
12964 (lookup_signatured_type): Likewise.
12965 (read_cutu_die_from_dwo): Likewise.
12966 (init_tu_and_read_dwo_dies): Likewise.
12967 (init_cutu_and_read_dies): Likewise.
12968 (init_cutu_and_read_dies_no_follow): Likewise.
12969 (allocate_type_unit_groups_table): Add objfile parameter.
12970 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12971 (get_type_unit_group): Likewise.
12972 (process_psymtab_comp_unit): Update call.
12973 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12974 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12975 (print_tu_stats): Likewise.
12976 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12977 in void* parameter.
12978 (build_type_psymtabs): Change objfile parameter to
12979 dwarf2_per_objfile.
12980 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12981 passed in void* parameter.
12982 (process_skeletonless_type_units): Change objfile parameter to
12983 dwarf2_per_objfile.
12984 (set_partial_user): Likewise.
12985 (dwarf2_build_psymtabs_hard): Likewise.
12986 (read_comp_units_from_section): Likewise.
12987 (create_all_comp_units): Likewise.
12988 (scan_partial_symbols): Update calls.
12989 (add_partial_symbol): Likewise.
12990 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12991 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12992 (process_queue): Add dwarf2_per_objfile parameter.
12993 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12994 (compute_compunit_symtab_includes): Likewise.
12995 (process_cu_includes): Add dwarf2_per_objfile parameter.
12996 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12997 (process_full_type_unit): Likewise.
12998 (process_imported_unit_die): Update call.
12999 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13000 (read_file_scope): Likewise.
13001 (allocate_dwo_file_hash_table): Add objfile parameter.
13002 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13003 (create_cus_hash_table): Likewise.
13004 (create_dwp_hash_table): Likewise.
13005 (create_dwo_unit_in_dwp_v1): Likewise.
13006 (create_dwp_v2_section): Likewise.
13007 (create_dwo_unit_in_dwp_v2): Likewise.
13008 (lookup_dwo_unit_in_dwp): Likewise.
13009 (try_open_dwop_file): Likewise.
13010 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13011 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13012 cleanup to include a reference to dwarf2_per_objfile.
13013 (open_dwp_file): Add dwarf2_per_objfile parameter.
13014 (open_and_init_dwp_file): Likewise.
13015 (get_dwp_file): Likewise.
13016 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13017 (queue_and_load_all_dwo_tus): Update call.
13018 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13020 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13021 (dwarf2_ranges_process): Likewise.
13022 (dwarf2_get_pc_bounds): Likewise.
13023 (mark_common_block_symbol_computed): Likewise.
13024 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13025 (dwarf2_read_abbrevs): Update call.
13026 (read_partial_die): Use dwarf2_per_objfile from cu.
13027 (find_partial_die): Likewise.
13028 (fixup_partial_die): Likewise.
13029 (read_attribute_value): Likewise.
13030 (read_indirect_string_at_offset_from): Add objfile parameter.
13031 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13033 (read_indirect_string_from_dwz): Add objfile parameter.
13034 (read_indirect_string): Add objfile parameter.
13035 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13036 (read_addr_index): Use dwarf2_per_objfile from cu.
13037 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13039 (read_str_index): Use dwarf2_per_objfile from cu.
13040 (get_debug_line_section): Likewise.
13041 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13042 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13043 (new_symbol_full): Use dwarf2_per_objfile from cu.
13044 (build_error_marker_type): Likewise.
13045 (lookup_die_type): Likewise.
13046 (determine_prefix): Likewise.
13047 (follow_die_offset): Likewise.
13048 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13049 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13050 (dwarf2_fetch_die_type_sect_off): Likewise.
13051 (dwarf2_get_die_type): Likewise.
13052 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13053 (get_signatured_type): Likewise.
13054 (get_DW_AT_signature_type): Likewise.
13055 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13056 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13057 (cu_debug_loc_section): Likewise.
13058 (fill_in_loclist_baton): Likewise.
13059 (dwarf2_symbol_mark_computed): Likewise.
13060 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13061 dwarf2_per_objfile.
13062 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13064 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13065 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13066 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13067 (set_die_type): Use dwarf2_free_objfile from cu.
13068 (get_die_type_at_offset): Likewise.
13069 (dwarf2_per_objfile_free): Don't assign global variable.
13070 (debug_names) <constructor>: Add dwarf2_per_objfile
13071 parameter, update m_debugstrlookup construction.
13072 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13074 <m_dwarf2_per_objfile>: New field.
13075 <lookup>: Use m_dwarf2_per_objfile.
13076 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13077 (psyms_seen_size): Likewise.
13078 (write_gdbindex): Replace objfile parameter with
13079 dwarf2_per_objfile.
13080 (write_debug_names): Likewise.
13081 (write_psymtabs_to_index): Likewise.
13082 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13085 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13087 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13088 <dwarf2_per_objfile>: New field.
13089 (struct dwarf2_per_cu_data) <objfile>: Remove.
13090 <dwarf2_per_objfile>: New field.
13091 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13093 (create_signatured_type_table_from_index): Likewise.
13094 (create_debug_type_hash_table): Likewise.
13095 (fill_in_sig_entry_from_dwo_entry): Likewise.
13096 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13097 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13099 (create_partial_symtab): Access objfile through
13100 dwarf2_per_objfile.
13101 (process_psymtab_comp_unit_reader): Likewise.
13102 (read_comp_units_from_section): Likewise.
13103 (scan_partial_symbols): Likewise.
13104 (add_partial_symbol): Likewise.
13105 (add_partial_subprogram): Likewise.
13106 (peek_die_abbrev): Likewise.
13107 (fixup_go_packaging): Likewise.
13108 (process_full_comp_unit): Likewise.
13109 (process_full_type_unit): Likewise.
13110 (process_imported_unit_die): Likewise.
13111 (dwarf2_compute_name): Likewise.
13112 (dwarf2_physname): Likewise.
13113 (read_import_statement): Likewise.
13114 (create_cus_hash_table): Assign dwarf2_physname instead of
13116 (read_func_scope): Access objfile through dwarf2_per_objfile.
13117 (read_lexical_block_scope): Likewise.
13118 (read_call_site_scope): Likewise.
13119 (read_variable): Likewise.
13120 (dwarf2_rnglists_process): Likewise.
13121 (dwarf2_ranges_process): Likewise.
13122 (dwarf2_ranges_read): Likewise.
13123 (dwarf2_record_block_ranges): Likewise.
13124 (dwarf2_add_field): Likewise.
13125 (dwarf2_add_member_fn): Likewise.
13126 (read_structure_type): Likewise.
13127 (process_structure_scope): Likewise.
13128 (read_enumeration_type): Likewise.
13129 (read_array_type): Likewise.
13130 (read_common_block): Likewise.
13131 (read_namespace_type): Likewise.
13132 (read_namespace): Likewise.
13133 (read_module_type): Likewise.
13134 (read_tag_pointer_type): Likewise.
13135 (read_tag_ptr_to_member_type): Likewise.
13136 (read_tag_string_type): Likewise.
13137 (read_subroutine_type): Likewise.
13138 (read_typedef): Likewise.
13139 (read_base_type): Likewise.
13140 (attr_to_dynamic_prop): Likewise.
13141 (read_subrange_type): Likewise.
13142 (read_unspecified_type): Likewise.
13143 (load_partial_dies): Likewise.
13144 (read_partial_die): Likewise.
13145 (find_partial_die): Likewise.
13146 (guess_partial_die_structure_name): Likewise.
13147 (fixup_partial_die): Likewise.
13148 (read_attribute_value): Likewise.
13149 (read_addr_index_from_leb128): Likewise.
13150 (dwarf2_read_addr_index): Likewise.
13151 (dwarf2_string_attr): Likewise.
13152 (lnp_state_machine::check_line_address): Likewise.
13153 (dwarf_decode_lines_1): Likewise.
13154 (dwarf_decode_lines): Likewise.
13155 (dwarf2_start_symtab): Likewise.
13156 (var_decode_location): Likewise.
13157 (new_symbol_full): Likewise.
13158 (dwarf2_const_value_data): Likewise.
13159 (dwarf2_const_value_attr): Likewise.
13160 (dwarf2_const_value): Likewise.
13161 (die_type): Likewise.
13162 (die_containing_type): Likewise.
13163 (lookup_die_type): Likewise.
13164 (guess_full_die_structure_name): Likewise.
13165 (anonymous_struct_prefix): Likewise.
13166 (dwarf2_name): Likewise.
13167 (follow_die_ref_or_sig): Likewise.
13168 (follow_die_offset): Likewise.
13169 (follow_die_ref): Likewise.
13170 (dwarf2_fetch_die_loc_sect_off): Likewise.
13171 (dwarf2_fetch_constant_bytes): Likewise.
13172 (dwarf2_fetch_die_type_sect_off): Likewise.
13173 (dwarf2_get_die_type): Likewise.
13174 (follow_die_sig): Likewise.
13175 (decode_locdesc): Likewise.
13176 (dwarf2_per_cu_objfile): Likewise.
13177 (dwarf2_per_cu_text_offset): Likewise.
13178 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13180 (set_die_type): Access objfile through
13181 dwarf2_per_objfile.
13183 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13185 * valprint.c (converted_character_d): Remove typedef.
13186 (DEF_VEC_O (converted_character_d)): Remove.
13187 (count_next_character): Use std::vector.
13188 (print_converted_chars_to_obstack): Likewise.
13189 (generic_printstr): Likewise.
13191 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13193 * xml-support.h (struct gdb_xml_value): Add constructor.
13194 <value>: Change type to unique_xmalloc_ptr.
13195 (gdb_xml_value_s): Remove typedef.
13196 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13197 (gdb_xml_element_start_handler): Change parameter type to
13199 (xml_find_attribute): Likewise.
13200 * xml-support.c (xml_find_attribute): Change parameter type to
13201 std::vector and adjust.
13202 (gdb_xml_values_cleanup): Remove.
13203 (gdb_xml_parser::start_element): Adjust to std::vector.
13204 (xinclude_start_include): Change paraeter type to std::vector
13206 * btrace.c (check_xml_btrace_version): Likewise.
13207 (parse_xml_btrace_block): Likewise.
13208 (parse_xml_btrace_pt_config_cpu): Likewise.
13209 (parse_xml_btrace_pt): Likewise.
13210 (parse_xml_btrace_conf_bts): Likewise.
13211 (parse_xml_btrace_conf_pt): Likewise.
13212 * memory-map.c (memory_map_start_memory): Likewise.
13213 (memory_map_start_property): Likewise.
13214 * osdata.c (osdata_start_osdata): Likewise.
13215 (osdata_start_item): Likewise.
13216 (osdata_start_column): Likewise.
13217 * remote.c (start_thread): Likewise.
13218 * solib-aix.c (library_list_start_library): Likewise.
13219 (library_list_start_list): Likewise.
13220 * solib-svr4.c (library_list_start_library): Likewise.
13221 (svr4_library_list_start_list): Likewise.
13222 * solib-target.c (library_list_start_segment): Likewise.
13223 (library_list_start_section): Likewise.
13224 (library_list_start_library): Likewise.
13225 (library_list_start_list): Likewise.
13226 * tracepoint.c (traceframe_info_start_memory): Likewise.
13227 (traceframe_info_start_tvar): Likewise.
13228 * xml-syscall.c (syscall_start_syscall): Likewise.
13229 * xml-tdesc.c (tdesc_start_target): Likewise.
13230 (tdesc_start_feature): Likewise.
13231 (tdesc_start_reg): Likewise.
13232 (tdesc_start_union): Likewise.
13233 (tdesc_start_struct): Likewise.
13234 (tdesc_start_flags): Likewise.
13235 (tdesc_start_enum): Likewise.
13236 (tdesc_start_field): Likewise.
13237 (tdesc_start_enum_value): Likewise.
13238 (tdesc_start_vector): Likewise.
13240 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13242 * extension.h (struct xmethod_worker) <clone>: Remove.
13243 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13245 (python_xmethod_worker::clone): Remove.
13246 * valops.c (find_overload_match): Use std::move instead of
13249 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13251 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13252 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13253 <free_xmethod_worker_data>: Remove.
13254 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13255 <get_xmethod_arg_types>: Remove.
13256 <get_xmethod_result_type>: Remove.
13257 <invoke_xmethod>: Remove.
13258 * extension.c (new_xmethod_worker): Remove.
13259 (clone_xmethod_worker): Remove.
13260 (get_matching_xmethod_workers): Return void, pass std::vector by
13262 (get_xmethod_arg_types): Rename to...
13263 (xmethod_worker::get_arg_types): ... this, and adjust.
13264 (get_xmethod_result_type): Rename to...
13265 (xmethod_worker::get_result_type): ... this, and adjust.
13266 (invoke_xmethod): Remove.
13267 (free_xmethod_worker): Remove.
13268 (free_xmethod_worker_vec): Remove.
13269 * extension.h (enum ext_lang_rc): Move here from
13271 (struct xmethod_worker): Add constructor and destructor.
13274 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13275 virtual pure methods.
13276 <get_arg_types, get_result_type>: New methods.
13277 (xmethod_worker_ptr): Remove typedef.
13278 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13279 (xmethod_worker_vec): Remove typedef.
13280 (xmethod_worker_up): New typedef.
13281 (invoke_xmethod): Remove.
13282 (clone_xmethod_worker): Remove.
13283 (free_xmethod_worker): Remove.
13284 (free_xmethod_worker_vec): Remove.
13285 (get_xmethod_arg_types): Remove.
13286 (get_xmethod_result_type): Remove.
13287 * valops.c (find_method_list): Use std::vector, don't use
13288 intermediate vector.
13289 (value_find_oload_method_list): Use std::vector.
13290 (find_overload_match): Use std::vector.
13291 (find_oload_champ): Use std::vector.
13292 * value.c (value_free): Use operator delete.
13293 (value_of_xmethod): Rename to...
13294 (value_from_xmethod): ... this. Don't assign
13295 xmethod_worker::value, take rvalue-reference.
13296 (result_type_of_xmethod): Adjust.
13297 (call_xmethod): Adjust.
13298 * value.h: Include extension.h.
13299 (struct xmethod_worker): Don't forward-declare.
13300 (value_of_xmethod): Rename to...
13301 (value_from_xmethod): ... this, take rvalue-reference.
13302 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13303 (struct python_xmethod_worker): ... this, add constructor and
13305 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13306 (gdbpy_free_xmethod_worker_data): Rename to...
13307 (python_xmethod_worker::~python_xmethod_worker): ... this and
13309 (gdbpy_clone_xmethod_worker_data): Rename to...
13310 (python_xmethod_worker::clone): ... this and adjust.
13311 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13313 (gdbpy_get_xmethod_arg_types): Rename to...
13314 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13315 (gdbpy_get_xmethod_result_type): Rename to...
13316 (python_xmethod_worker::do_get_result_type): ... this and
13318 (gdbpy_invoke_xmethod): Rename to...
13319 (python_xmethod_worker::invoke): ... this and adjust.
13320 (new_python_xmethod_worker): Rename to...
13321 (python_xmethod_worker::python_xmethod_worker): ... this and
13323 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13325 (gdbpy_free_xmethod_worker_data): Remove.
13326 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13327 (gdbpy_get_xmethod_arg_types): Remove.
13328 (gdbpy_get_xmethod_result_type): Remove.
13329 (gdbpy_invoke_xmethod): Remove.
13330 * python/python.c (python_extension_ops): Remove obsolete
13333 2018-01-05 Pedro Alves <palves@redhat.com>
13336 * common/signals-state-save-restore.c
13337 (save_original_signals_state): New parameter 'quiet'. Warn if we
13338 find a custom handler preinstalled, instead of internal erroring.
13339 But only warn if !quiet.
13340 * common/signals-state-save-restore.h
13341 (save_original_signals_state): New parameter 'quiet'.
13342 * main.c (captured_main_1): Move save_original_signals_state call
13343 after option handling, and pass QUIET.
13345 2018-01-05 Pedro Alves <palves@redhat.com>
13347 * spu-tdep.c (spu_catch_start): Pass
13348 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13350 2018-01-05 Pedro Alves <palves@redhat.com>
13353 * ada-lang.c (literal_symbol_name_matcher): New function.
13354 (ada_get_symbol_name_matcher): Use it for
13355 symbol_name_match_type::SEARCH_NAME.
13356 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13357 it down instead of assuming symbol_name_match_type::FULL.
13358 * block.h (block_lookup_symbol): New parameter 'match_type'.
13359 * c-valprint.c (print_unpacked_pointer): Use
13360 lookup_symbol_search_name instead of lookup_symbol.
13361 * compile/compile-object-load.c (get_out_value_type): Pass down
13362 symbol_name_match_type::SEARCH_NAME.
13363 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13364 symbol_name_match_type::FULL.
13365 * cp-support.c (cp_get_symbol_name_matcher): Handle
13366 symbol_name_match_type::SEARCH_NAME.
13367 * infrun.c (insert_exception_resume_breakpoint): Use
13368 lookup_symbol_search_name.
13369 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13370 * psymtab.c (maintenance_check_psymtabs): Use
13371 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13372 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13373 SYMBOL_SEARCH_NAME.
13374 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13375 if symbol_name_match_type::SEARCH_NAME.
13376 (lookup_symbol_in_language): Pass down
13377 symbol_name_match_type::FULL.
13378 (lookup_symbol_search_name): New.
13379 (lookup_language_this): Pass down
13380 symbol_name_match_type::SEARCH_NAME.
13381 (lookup_symbol_aux, lookup_local_symbol): New parameter
13382 'match_type'. Pass it down.
13383 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13384 (lookup_symbol_search_name): New declaration.
13385 (lookup_symbol_in_block): New 'match_type' parameter.
13387 2018-01-05 Pedro Alves <palves@redhat.com>
13390 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13392 (ada_lookup_symbol): Reimplement in terms of
13393 ada_lookup_symbol_list, bits factored out from
13394 ada_lookup_encoded_symbol.
13396 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13398 * ada-exp.y (write_object_renaming): When subscripting an array
13399 using a symbol as the index, pass the block in call to
13400 ada_lookup_encoded_symbol when looking that symbol up.
13402 2018-01-05 Jerome Guitton <guitton@adacore.com>
13404 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13407 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13409 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13410 the case where VALUE_LVAL (val0) is not lval_memory.
13412 2018-01-05 Xavier Roirand <roirand@adacore.com>
13414 * ada-valprint.c (print_optional_low_bound): Handle
13415 character-indexed array printing like boolean-indexed array
13418 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13420 * NEWS: Create a new section for the next release branch.
13421 Rename the section of the current branch, now that it has
13424 2018-01-05 Joel Brobecker <brobecker@adacore.com>
13426 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13427 * version.in: Bump version to 8.1.50.DATE-git.
13429 2018-01-03 Xavier Roirand <roirand@adacore.com>
13431 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13433 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13435 (default_exception_support_info) <catch_handlers_sym>: Add field.
13436 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13437 (ada_exception_name_addr_1): Add "catch handlers" handling.
13438 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13439 Update all callers.
13440 (create_excep_cond_exprs) <ex>: Add parameter.
13441 (re_set_exception): Update create_excep_cond_exprs call.
13442 (print_it_exception, print_one_exception, print_mention_exception)
13443 (print_recreate_exception): Add "catch handler" handling.
13444 (allocate_location_catch_handlers, re_set_catch_handlers)
13445 (check_status_catch_handlers, print_it_catch_handlers)
13446 (print_one_catch_handlers, print_mention_catch_handlers)
13447 (print_recreate_catch_handlers): New function.
13448 (catch_handlers_breakpoint_ops): New variable.
13449 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13450 Add parameter. Add "catch handler" handling.
13451 (ada_exception_sym_name, ada_exception_breakpoint_ops):
13452 Add "catch handler" handling.
13453 (ada_exception_catchpoint_cond_string): Add "catch handler"
13455 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13457 (catch_ada_handlers_command): New function.
13458 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13459 operations structure.
13460 (_initialize_ada_language): Add "catch handlers" command entry.
13461 * NEWS: Document "catch handlers" feature.
13463 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13465 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13466 account when creating the array type of the slice.
13467 (ada_value_slice): Likewise.
13469 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13471 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13473 (create_array_type_with_stride): Add byte_stride_prop parameter.
13474 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13475 New parameter. Update all callers in this file.
13476 (array_type_has_dynamic_stride): New function.
13477 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13478 of arrays with dynamic byte strides.
13479 * dwarf2read.c (read_array_type): Add support for dynamic
13480 DW_AT_byte_stride attributes.
13482 2018-01-02 Joel Brobecker <brobecker@adacore.com>
13484 * dwarf2read.c (read_unspecified_type): Treat
13485 DW_TAG_enumeration_type DIEs from Ada units as stubs.
13487 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13489 Update copyright year range in all GDB files.
13491 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13493 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13494 and gdb/testsuite/gdb.base/step-line.c.
13496 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13498 * copyright.py (main): Dump the contents of
13499 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13500 even if BY_HAND is empty.
13502 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13504 * top.c (print_gdb_version): Update Copyright year in version
13507 2018-01-01 Joel Brobecker <brobecker@adacore.com>
13509 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13511 For older changes see ChangeLog-2017.
13517 version-control: never