3 * procfs.c (struct procinfo_deleter): New.
4 (procinfo_up): New typedef.
5 (do_destroy_procinfo_cleanup): Remove.
6 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
10 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
15 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
16 (pspy_get_objfiles): New function.
17 (progspace_object_methods): New.
18 (pspace_object_type): Add tp_methods callback.
19 * python/python-internal.h (build_objfiles_list): New
21 * python/python.c (build_objfiles_list): New function.
22 (gdbpy_objfiles): Implement using build_objfiles_list.
23 * NEWS: Mention the Progspace.objfiles method.
27 * python/py-inferior.c (infpy_get_progspace): New function.
28 (inferior_object_getset): Add progspace property.
29 * NEWS: Mention the new property.
34 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
39 * rust-lang.c (rust_enum_variant): Now static.
40 (rust_empty_enum_p): New function.
41 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
46 * python/py-inferior.c (infpy_repr): New.
47 (inferior_object_type): Register infpy_repr.
48 * python/py-objfile.c (objfpy_repr): New.
49 (objfile_object_type): Register objfpy_repr.
53 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
57 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
62 * common/common-utils.c: Don't include '<sys/stat.h>'.
63 (is_regular_file): Move to...
64 * common/filestuff.c (is_regular_file): ... here.
65 * common/common-utils.h (is_regular_file): Move to...
66 * common/filestuff.h (is_regular_file): ... here.
70 * skip.c (debug_skip): New variable.
71 (skiplist_entry::do_skip_file_p): Add debug output.
72 (skiplist_entry::do_skip_gfile_p): Likewise.
73 (skiplist_entry::skip_function_p): Likewise.
74 (_initialize_step_skip): Create debug command.
75 * NEWS: Mention set/show debug skip.
79 * darwin-nat.c (should_disable_startup_with_shell):
81 (darwin_nat_target::create_inferior): Add call.
85 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
86 inf_port, msg_state>: Initialize.
87 (struct darwin_thread_info) <signaled, single_step>: Change
89 (struct darwin_thread_info) <event>: Initialize.
95 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
105 * gnulib/aclocal.m4: Regenerate.
106 * gnulib/config.in: Regenerate.
107 * gnulib/configure: Regenerate.
108 * gnulib/import/Makefile.am: Update.
109 * gnulib/import/Makefile.in: Update.
110 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
111 * gnulib/import/_Noreturn.h: ... this.
112 * gnulib/import/alloca.in.h: Update.
113 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
114 * gnulib/import/arg-nonnull.h: ... this.
115 * gnulib/import/assure.h: Update.
116 * gnulib/import/at-func.c: Update.
117 * gnulib/import/basename-lgpl.c: Update.
118 * gnulib/import/extra/snippet/c++defs.h: Rename to...
119 * gnulib/import/c++defs.h: ... this.
120 * gnulib/import/canonicalize-lgpl.c: Update.
121 * gnulib/import/cdefs.h: Update.
122 * gnulib/import/chdir-long.c: Update.
123 * gnulib/import/chdir-long.h: Update.
124 * gnulib/import/cloexec.c: Update.
125 * gnulib/import/cloexec.h: Update.
126 * gnulib/import/close.c: Update.
127 * gnulib/import/closedir.c: Update.
128 * gnulib/import/config.charset: Update.
129 * gnulib/import/dirent-private.h: Update.
130 * gnulib/import/dirent.in.h: Update.
131 * gnulib/import/dirfd.c: Update.
132 * gnulib/import/dirname-lgpl.c: Update.
133 * gnulib/import/dirname.h: Update.
134 * gnulib/import/dosname.h: Update.
135 * gnulib/import/dup-safer-flag.c: Update.
136 * gnulib/import/dup-safer.c: Update.
137 * gnulib/import/dup.c: Update.
138 * gnulib/import/dup2.c: Update.
139 * gnulib/import/errno.in.h: Update.
140 * gnulib/import/error.c: Update.
141 * gnulib/import/error.h: Update.
142 * gnulib/import/exitfail.c: Update.
143 * gnulib/import/exitfail.h: Update.
144 * gnulib/import/extra/update-copyright: Update.
145 * gnulib/import/fchdir.c: Update.
146 * gnulib/import/fcntl.c: Update.
147 * gnulib/import/fcntl.in.h: Update.
148 * gnulib/import/fd-hook.c: Update.
149 * gnulib/import/fd-hook.h: Update.
150 * gnulib/import/fd-safer-flag.c: Update.
151 * gnulib/import/fd-safer.c: Update.
152 * gnulib/import/fdopendir.c: Update.
153 * gnulib/import/filename.h: Update.
154 * gnulib/import/filenamecat-lgpl.c: Update.
155 * gnulib/import/filenamecat.h: Update.
156 * gnulib/import/flexmember.h: Update.
157 * gnulib/import/float+.h: Update.
158 * gnulib/import/float.c: Update.
159 * gnulib/import/float.in.h: Update.
160 * gnulib/import/fnmatch.c: Update.
161 * gnulib/import/fnmatch.in.h: Update.
162 * gnulib/import/fnmatch_loop.c: Update.
163 * gnulib/import/fpucw.h: Update.
164 * gnulib/import/frexp.c: Update.
165 * gnulib/import/frexpl.c: Update.
166 * gnulib/import/fstat.c: Update.
167 * gnulib/import/fstatat.c: Update.
168 * gnulib/import/getcwd-lgpl.c: Update.
169 * gnulib/import/getcwd.c: Update.
170 * gnulib/import/getdtablesize.c: Update.
171 * gnulib/import/getlogin_r.c: Update.
172 * gnulib/import/getprogname.c: Update.
173 * gnulib/import/getprogname.h: Update.
174 * gnulib/import/gettext.h: Update.
175 * gnulib/import/gettimeofday.c: Update.
176 * gnulib/import/glob-libc.h: Update.
177 * gnulib/import/glob.c: Update.
178 * gnulib/import/glob.in.h: Update.
179 * gnulib/import/glob_internal.h: Update.
180 * gnulib/import/glob_pattern_p.c: Update.
181 * gnulib/import/globfree.c: Update.
182 * gnulib/import/hard-locale.c: Update.
183 * gnulib/import/hard-locale.h: Update.
184 * gnulib/import/intprops.h: Update.
185 * gnulib/import/inttypes.in.h: Update.
186 * gnulib/import/isnan.c: Update.
187 * gnulib/import/isnand-nolibm.h: Update.
188 * gnulib/import/isnand.c: Update.
189 * gnulib/import/isnanl-nolibm.h: Update.
190 * gnulib/import/isnanl.c: Update.
191 * gnulib/import/itold.c: Update.
192 * gnulib/import/libc-config.h: Update.
193 * gnulib/import/limits.in.h: Update.
194 * gnulib/import/localcharset.c: Update.
195 * gnulib/import/localcharset.h: Update.
196 * gnulib/import/localtime-buffer.c: Update.
197 * gnulib/import/localtime-buffer.h: Update.
198 * gnulib/import/lstat.c: Update.
199 * gnulib/import/m4/00gnulib.m4: Update.
200 * gnulib/import/m4/__inline.m4: Update.
201 * gnulib/import/m4/absolute-header.m4: Update.
202 * gnulib/import/m4/alloca.m4: Update.
203 * gnulib/import/m4/builtin-expect.m4: Update.
204 * gnulib/import/m4/canonicalize.m4: Update.
205 * gnulib/import/m4/chdir-long.m4: Update.
206 * gnulib/import/m4/close.m4: Update.
207 * gnulib/import/m4/closedir.m4: Update.
208 * gnulib/import/m4/configmake.m4: Update.
209 * gnulib/import/m4/d-ino.m4: Update.
210 * gnulib/import/m4/d-type.m4: Update.
211 * gnulib/import/m4/dirent_h.m4: Update.
212 * gnulib/import/m4/dirfd.m4: Update.
213 * gnulib/import/m4/dirname.m4: Update.
214 * gnulib/import/m4/double-slash-root.m4: Update.
215 * gnulib/import/m4/dup.m4: Update.
216 * gnulib/import/m4/dup2.m4: Update.
217 * gnulib/import/m4/eealloc.m4: Update.
218 * gnulib/import/m4/environ.m4: Update.
219 * gnulib/import/m4/errno_h.m4: Update.
220 * gnulib/import/m4/error.m4: Update.
221 * gnulib/import/m4/exponentd.m4: Update.
222 * gnulib/import/m4/exponentl.m4: Update.
223 * gnulib/import/m4/extensions.m4: Update.
224 * gnulib/import/m4/extern-inline.m4: Update.
225 * gnulib/import/m4/fchdir.m4: Update.
226 * gnulib/import/m4/fcntl-o.m4: Update.
227 * gnulib/import/m4/fcntl.m4: Update.
228 * gnulib/import/m4/fcntl_h.m4: Update.
229 * gnulib/import/m4/fdopendir.m4: Update.
230 * gnulib/import/m4/filenamecat.m4: Update.
231 * gnulib/import/m4/flexmember.m4: Update.
232 * gnulib/import/m4/float_h.m4: Update.
233 * gnulib/import/m4/fnmatch.m4: Update.
234 * gnulib/import/m4/fnmatch_h.m4: Update.
235 * gnulib/import/m4/fpieee.m4: Update.
236 * gnulib/import/m4/frexp.m4: Update.
237 * gnulib/import/m4/frexpl.m4: Update.
238 * gnulib/import/m4/fstat.m4: Update.
239 * gnulib/import/m4/fstatat.m4: Update.
240 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
241 * gnulib/import/m4/getcwd-path-max.m4: Update.
242 * gnulib/import/m4/getcwd.m4: Update.
243 * gnulib/import/m4/getdtablesize.m4: Update.
244 * gnulib/import/m4/getlogin.m4: Update.
245 * gnulib/import/m4/getlogin_r.m4: Update.
246 * gnulib/import/m4/getpagesize.m4: Update.
247 * gnulib/import/m4/getprogname.m4: Update.
248 * gnulib/import/m4/gettimeofday.m4: Update.
249 * gnulib/import/m4/glibc21.m4: Update.
250 * gnulib/import/m4/glob.m4: Update.
251 * gnulib/import/m4/glob_h.m4: Update.
252 * gnulib/import/m4/gnulib-cache.m4: Update.
253 * gnulib/import/m4/gnulib-common.m4: Update.
254 * gnulib/import/m4/gnulib-comp.m4: Update.
255 * gnulib/import/m4/gnulib-tool.m4: Update.
256 * gnulib/import/m4/hard-locale.m4: Update.
257 * gnulib/import/m4/include_next.m4: Update.
258 * gnulib/import/m4/inttypes-pri.m4: Update.
259 * gnulib/import/m4/inttypes.m4: Update.
260 * gnulib/import/m4/isnand.m4: Update.
261 * gnulib/import/m4/isnanl.m4: Update.
262 * gnulib/import/m4/largefile.m4: Update.
263 * gnulib/import/m4/limits-h.m4: Update.
264 * gnulib/import/m4/localcharset.m4: Update.
265 * gnulib/import/m4/locale-fr.m4: Update.
266 * gnulib/import/m4/locale-ja.m4: Update.
267 * gnulib/import/m4/locale-zh.m4: Update.
268 * gnulib/import/m4/localtime-buffer.m4: Update.
269 * gnulib/import/m4/longlong.m4: Update.
270 * gnulib/import/m4/lstat.m4: Update.
271 * gnulib/import/m4/malloc.m4: Update.
272 * gnulib/import/m4/malloca.m4: Update.
273 * gnulib/import/m4/math_h.m4: Update.
274 * gnulib/import/m4/mbrtowc.m4: Update.
275 * gnulib/import/m4/mbsinit.m4: Update.
276 * gnulib/import/m4/mbsrtowcs.m4: Update.
277 * gnulib/import/m4/mbstate_t.m4: Update.
278 * gnulib/import/m4/memchr.m4: Update.
279 * gnulib/import/m4/memmem.m4: Update.
280 * gnulib/import/m4/mempcpy.m4: Update.
281 * gnulib/import/m4/memrchr.m4: Update.
282 * gnulib/import/m4/mkdir.m4: Update.
283 * gnulib/import/m4/mkstemp.m4: Update.
284 * gnulib/import/m4/mmap-anon.m4: Update.
285 * gnulib/import/m4/mode_t.m4: Update.
286 * gnulib/import/m4/msvc-inval.m4: Update.
287 * gnulib/import/m4/msvc-nothrow.m4: Update.
288 * gnulib/import/m4/multiarch.m4: Update.
289 * gnulib/import/m4/nocrash.m4: Update.
290 * gnulib/import/m4/off_t.m4: Update.
291 * gnulib/import/m4/onceonly.m4: Update.
292 * gnulib/import/m4/open-cloexec.m4: Update.
293 * gnulib/import/m4/open.m4: Update.
294 * gnulib/import/m4/openat.m4: Update.
295 * gnulib/import/m4/opendir.m4: Update.
296 * gnulib/import/m4/pathmax.m4: Update.
297 * gnulib/import/m4/rawmemchr.m4: Update.
298 * gnulib/import/m4/readdir.m4: Update.
299 * gnulib/import/m4/readlink.m4: Update.
300 * gnulib/import/m4/realloc.m4: Update.
301 * gnulib/import/m4/rename.m4: Update.
302 * gnulib/import/m4/rewinddir.m4: Update.
303 * gnulib/import/m4/rmdir.m4: Update.
304 * gnulib/import/m4/save-cwd.m4: Update.
305 * gnulib/import/m4/secure_getenv.m4: Update.
306 * gnulib/import/m4/setenv.m4: Update.
307 * gnulib/import/m4/signal_h.m4: Update.
308 * gnulib/import/m4/ssize_t.m4: Update.
309 * gnulib/import/m4/stat-time.m4: Update.
310 * gnulib/import/m4/stat.m4: Update.
311 * gnulib/import/m4/std-gnu11.m4: Update.
312 * gnulib/import/m4/stdbool.m4: Update.
313 * gnulib/import/m4/stddef_h.m4: Update.
314 * gnulib/import/m4/stdint.m4: Update.
315 * gnulib/import/m4/stdio_h.m4: Update.
316 * gnulib/import/m4/stdlib_h.m4: Update.
317 * gnulib/import/m4/strchrnul.m4: Update.
318 * gnulib/import/m4/strdup.m4: Update.
319 * gnulib/import/m4/strerror.m4: Update.
320 * gnulib/import/m4/string_h.m4: Update.
321 * gnulib/import/m4/strstr.m4: Update.
322 * gnulib/import/m4/strtok_r.m4: Update.
323 * gnulib/import/m4/sys_socket_h.m4: Update.
324 * gnulib/import/m4/sys_stat_h.m4: Update.
325 * gnulib/import/m4/sys_time_h.m4: Update.
326 * gnulib/import/m4/sys_types_h.m4: Update.
327 * gnulib/import/m4/tempname.m4: Update.
328 * gnulib/import/m4/time_h.m4: Update.
329 * gnulib/import/m4/unistd-safer.m4: Update.
330 * gnulib/import/m4/unistd_h.m4: Update.
331 * gnulib/import/m4/warn-on-use.m4: Update.
332 * gnulib/import/m4/wchar_h.m4: Update.
333 * gnulib/import/m4/wchar_t.m4: Update.
334 * gnulib/import/m4/wctype_h.m4: Update.
335 * gnulib/import/m4/wint_t.m4: Update.
336 * gnulib/import/malloc.c: Update.
337 * gnulib/import/malloc/scratch_buffer.h: Update.
338 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
339 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
340 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
341 * gnulib/import/malloca.c: Update.
342 * gnulib/import/malloca.h: Update.
343 * gnulib/import/malloca.valgrind: Update.
344 * gnulib/import/math.in.h: Update.
345 * gnulib/import/mbrtowc.c: Update.
346 * gnulib/import/mbsinit.c: Update.
347 * gnulib/import/mbsrtowcs-impl.h: Update.
348 * gnulib/import/mbsrtowcs-state.c: Update.
349 * gnulib/import/mbsrtowcs.c: Update.
350 * gnulib/import/memchr.c: Update.
351 * gnulib/import/memmem.c: Update.
352 * gnulib/import/mempcpy.c: Update.
353 * gnulib/import/memrchr.c: Update.
354 * gnulib/import/mkdir.c: Update.
355 * gnulib/import/mkstemp.c: Update.
356 * gnulib/import/msvc-inval.c: Update.
357 * gnulib/import/msvc-inval.h: Update.
358 * gnulib/import/msvc-nothrow.c: Update.
359 * gnulib/import/msvc-nothrow.h: Update.
360 * gnulib/import/open.c: Update.
361 * gnulib/import/openat-die.c: Update.
362 * gnulib/import/openat-priv.h: Update.
363 * gnulib/import/openat-proc.c: Update.
364 * gnulib/import/openat.c: Update.
365 * gnulib/import/openat.h: Update.
366 * gnulib/import/opendir.c: Update.
367 * gnulib/import/pathmax.h: Update.
368 * gnulib/import/pipe-safer.c: Update.
369 * gnulib/import/rawmemchr.c: Update.
370 * gnulib/import/readdir.c: Update.
371 * gnulib/import/readlink.c: Update.
372 * gnulib/import/realloc.c: Update.
373 * gnulib/import/ref-add.sin: Update.
374 * gnulib/import/ref-del.sin: Update.
375 * gnulib/import/rename.c: Update.
376 * gnulib/import/rewinddir.c: Update.
377 * gnulib/import/rmdir.c: Update.
378 * gnulib/import/same-inode.h: Update.
379 * gnulib/import/save-cwd.c: Update.
380 * gnulib/import/save-cwd.h: Update.
381 * gnulib/import/scratch_buffer.h: Update.
382 * gnulib/import/secure_getenv.c: Update.
383 * gnulib/import/setenv.c: Update.
384 * gnulib/import/signal.in.h: Update.
385 * gnulib/import/stat-time.c: Update.
386 * gnulib/import/stat-time.h: Update.
387 * gnulib/import/stat-w32.c: Update.
388 * gnulib/import/stat-w32.h: Update.
389 * gnulib/import/stat.c: Update.
390 * gnulib/import/stdbool.in.h: Update.
391 * gnulib/import/stddef.in.h: Update.
392 * gnulib/import/stdint.in.h: Update.
393 * gnulib/import/stdio.in.h: Update.
394 * gnulib/import/stdlib.in.h: Update.
395 * gnulib/import/str-two-way.h: Update.
396 * gnulib/import/strchrnul.c: Update.
397 * gnulib/import/strdup.c: Update.
398 * gnulib/import/streq.h: Update.
399 * gnulib/import/strerror-override.c: Update.
400 * gnulib/import/strerror-override.h: Update.
401 * gnulib/import/strerror.c: Update.
402 * gnulib/import/string.in.h: Update.
403 * gnulib/import/stripslash.c: Update.
404 * gnulib/import/strnlen1.c: Update.
405 * gnulib/import/strnlen1.h: Update.
406 * gnulib/import/strstr.c: Update.
407 * gnulib/import/strtok_r.c: Update.
408 * gnulib/import/sys_stat.in.h: Update.
409 * gnulib/import/sys_time.in.h: Update.
410 * gnulib/import/sys_types.in.h: Update.
411 * gnulib/import/tempname.c: Update.
412 * gnulib/import/tempname.h: Update.
413 * gnulib/import/time.in.h: Update.
414 * gnulib/import/unistd--.h: Update.
415 * gnulib/import/unistd-safer.h: Update.
416 * gnulib/import/unistd.in.h: Update.
417 * gnulib/import/unsetenv.c: Update.
418 * gnulib/import/verify.h: Update.
419 * gnulib/import/extra/snippet/warn-on-use.h: Update.
420 * gnulib/import/wchar.in.h: Update.
421 * gnulib/import/wctype.in.h: Update.
422 * gnulib/import/xalloc-oversized.h: Update.
423 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
424 "53e2c179f26a890fa6685af4b6c1397ee370433b".
428 * record-btrace.c (get_thread_current_frame): Remove
433 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
434 with check_tag to 1 if and only if the type is tagged and the
435 component being searched cannot been found in the current
436 view. Otherwise, always call ada_to_fixed_type with
441 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
443 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
444 * ada-varobj.c (ada_varobj_get_number_of_children,
445 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
449 * ada-valprint.c (ada_value_print): Use type instead of
454 * ada-lang.c (ada_value_subscript): Handle case when parameter is
455 an array of access to unconstrained array.
459 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
460 (ada_check_typedef): Use it.
464 * ada-varobj.c (ada_varobj_describe_struct_child)
465 (ada_varobj_describe_child): Handle union case like struct one.
470 * python/python.c (_initialize_python): Make example in "python"
471 help work in Python 3.
475 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
476 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
477 $(EXEEXT) to the script, as it is not a program.
481 * python/py-prettyprint.c (pretty_print_one_value): Return
483 (print_string_repr): Adjust.
484 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
485 * python/python-internal.h (apply_varobj_pretty_printer): Return
487 * varobj.c (varobj_value_get_print_value): Adjust.
492 * python/py-prettyprint.c (pretty_print_one_value): Check for
497 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
498 replace_operator_with_call.
502 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
506 * ada-typeprint.c (print_range): Print the bounds using TYPE
507 rather than its TYPE_TARGET_TYPE.
511 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
512 call to ada_to_fixed_value_create.
516 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
520 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
525 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
526 Move update of loop variable "fi".
530 * ada-lang.c (value_assign_to_component): In the case of
531 big-endian targets, extract the bits of the given VAL
532 using an src_offset of zero if container is not a scalar.
537 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
538 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
539 * fbsd-tdep.c (fbsd_make_note_desc): New.
540 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
541 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
542 * target.h (enum target_object) Add FreeBSD-specific
543 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
547 * compile/compile-c.h (generate_c_for_variable_locations):
548 Change reference to pointer.
549 * compile/compile-c-support.c (compile_program) <compute>:
551 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
552 (generate_c_for_for_one_variable): Likewise
553 (generate_c_for_variable_locations): Likewise
554 * compile/compile-c-types.c (compile_c_instance::convert_type):
556 * compile/compile-cplus-symbols.c (convert_one_symbol):
557 std::move the scope passed to enter_scope.
558 * compile/compile-cplus-types.c
559 (compile_cplus_instance::enter_scope): Make parameter
561 (compile_cplus_instance::new_scope): Change reference to
563 (compile_cplus_instance::convert_type): Likewise
564 (compile_cplus_convert_typedef): std::move the scope passed to
566 (compile_cplus_convert_struct_or_union): Likewise.
567 (compile_cplus_convert_enum): Likewise.
568 (compile_cplus_convert_namespace): Likewise.
569 * compile/compile-cplus.h (compile_cplus_instance)
570 <enter_scope>: Make parameter rvalue-reference.
571 * compile/compile-internal.h (compile_instance)
572 <get_cached_type>: Likewise
573 * compile/compile-loc2c.c (push): Likewise
577 (print_label): Likewise
578 (pushf_register_address): Likewise
579 (pushf_register): Likewise
580 (do_compile_dwarf_expr_to_c): Likewise
581 (compile_dwarf_expr_to_c): Likewise
582 (compile_dwarf_bounds_to_c): Likewise
583 * compile/compile.c (compile_instance::get_cached_type):
585 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
586 (compile_dwarf_bounds_to_c): Likewise
587 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
588 (dwarf2_compile_property_to_c): Likewise
589 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
590 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
595 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
596 * tui/tui-data.c (init_content_element): Don't initialize it.
600 * tui/tui-data.h (struct tui_win_info)
601 <detail::opaque>: Remove.
602 * tui/tui-data.c (init_win_info): Remove assignment.
606 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
608 * target-float.c (host_float_ops<T>::to_string)
609 (host_float_ops<T>::from_string): Use
610 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
611 * configure: Rebuild.
615 * printcmd.c (printf_c_string): Use
616 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
617 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
621 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
625 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
626 with resolve_abstract_p == true.
627 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
628 defaulting to false. Propagate resolve_abstract_p to
629 dwarf2_fetch_die_loc_sect_off.
630 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
631 parameter, defaulting to false.
632 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
633 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
635 * dwarf2read.h (struct die_info): Forward-declare.
636 (die_info_ptr): New typedef.
637 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
646 * gnulib/Makefile.in (aclocal_m4_deps): Move to
647 "aclocal-m4-deps.mk". Include file here.
648 $(srcdir)/aclocal.m4: Add "configure.ac".
649 * gnulib/aclocal-m4-deps.mk: New file.
650 * gnulib/update-gnulib.sh: Automatically update
651 "aclocal-m4-deps.mk".
655 * configure: Rebuild.
656 * configure.ac: Remove multi-ice code.
660 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
665 * Makefile.in (printcmd.o, target-float.o): Remove.
666 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
670 * gnulib/Makefile.in: Remove obsolete comment.
671 * Makefile.in: Remove obsolete comment.
675 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
680 * riscv-tdep.c: Add 'prologue-value.h' include.
681 (struct riscv_unwind_cache): New struct.
682 (riscv_debug_unwinder): New global.
683 (riscv_scan_prologue): Update arguments, capture register details
685 (riscv_skip_prologue): Reformat arguments line, move end of
686 prologue calculation into riscv_scan_prologue.
687 (riscv_frame_cache): Update return type, create
688 riscv_unwind_cache, scan the prologue, and fill in remaining cache
690 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
691 (riscv_frame_prev_register): Use the trad_frame within the
693 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
698 * trad-frame.h (trad_frame_set_realreg): Declare.
699 (trad_frame_set_addr): Declare.
700 * trad-frame.c (trad_frame_set_realreg): Define new function.
701 (trad_frame_set_addr): Define new function.
702 (trad_frame_set_reg_realreg): Use new function.
703 (trad_frame_set_reg_addr): Use new function.
707 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
708 pulongest instead of "%lld".
709 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
714 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
719 * gdbarch.h: Regenerate.
723 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
724 * target.h (Hardware watchpoint interfaces): Describe
725 continuable/steppable/non-steppable watchpoints.
726 * gdbarch.h, gdbarch.c: Regenerate.
730 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
733 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
734 * target.h (target_ops::have_continuable_watchpoint): Delete.
735 (target_have_continuable_watchpoint): Delete.
736 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
737 * target-delegates.c: Regenerate.
741 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
742 the files present in "gnulib/import/m4/".
746 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
747 c.sw, c.swsp, and c.sdsp.
751 * riscv-tdep.c (struct riscv_inferior_data): Delete.
752 (riscv_read_misa_reg): Don't cache value read into inferior data.
753 (riscv_new_inferior_data): Delete.
754 (riscv_inferior_data_cleanup): Delete.
755 (riscv_inferior_data): Delete.
756 (riscv_invalidate_inferior_data): Delete.
757 (_initialize_riscv_tdep): Remove initialisation of inferior data.
761 * compile/compile-cplus-types.c
762 (compile_cplus_instance::leave_scope): Take the address of scope
764 (compile_cplus_instance::convert_qualified_base): Compare quals
769 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
770 Use "%s" and host_address_to_string instead of "%p" in printf.
774 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
775 and compile-cplus-types.c.
776 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
777 * c-lang.c (cplus_language_defn): Set C++ compile functions.
778 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
780 * compile/compile-c-support.c: Include compile-cplus.h.
781 (load_libcompile): Templatize.
782 (get_compile_context): "New" function.
783 (c_get_compile_context): Use get_compile_context.
784 (cplus_get_compile_context): New function.
785 (cplus_push_user_expression, cplus_pop_user_expression)
786 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
787 (cplus_compute_program): Define new structs/functions.
788 * compile/compile-cplus-symmbols.c: New file.
789 * compile/compile-cplus-types.c: New file.
790 * compile/compile-cplus.h: New file.
791 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
793 * compile/compile-object-load.c (get_out_value_type): Use
794 strncmp_iw when comparing symbol names.
795 (compile_object_load): Add mst_bss and mst_data.
796 * compile/compile.c (_initialize_compile): Remove
797 -Wno-implicit-function-declaration from `compile_args'.
798 * compile/gcc-cp-plugin.h: New file.
799 * NEWS: Mention C++ compile support and new debug options.
803 * linespec.c (collect_info::add_symbol): Make virtual.
804 (struct symbol_searcher_collect_info): New struct.
805 (symbol_searcher::find_all_symbols): New method.
806 * symtab.h (class symbol_searcher): New class.
810 * linespec.c (struct linespec) <function_symbols, label_symbols>:
811 Change to vector of block_symbol. Update all users.
812 (struct collect_info) <symbols>: Likewise.
813 (collect_info::add_symbol): Take block_symbol as argument.
815 (decode_compound_collector) <m_symbols>: Change type to vector
816 of block_symbol. Update all users.
817 (decode_compound_collector::operator ()): Change parameter type
819 (find_method, find_function_symbols, find_linespec_symbols)
820 (find_label_symbols_in_block, find_label_symbols): Change symbol
821 vectors to block_symbol vectors.
822 * symtab.h (symbol_found_callback_ftype): Change parameter type to
827 * linespec.c (symbolp): Remove typedef and VEC definitions.
828 (bound_minimal_symbol_d): Likewise.
832 * linespec.c (decode_compound_collector::decode_compound_collector):
833 Remove initialization for `m_symtabs'.
834 (decode_compound_collector::release_symbols): Change return type
835 to std::vector. Update all callers.
836 (class decode_compound_collector) <m_symbols>: Change type to
838 (lookup_prefix_sym): Change return type to std::vector. Update all
840 (compare_symbols): Remove.
841 (std_compare_symbols): Rename to `compare_symbols'.
842 (find_method): Change `sym_classes' parameter to std::vector.
843 Update all callers. Use std::sort to sort sym_classes.
844 (find_linespec_symbols): Remove cleanup.
848 * linespec.c (struct linespec) <minimal_symbols>: Change type to
849 std::vector. Update all users.
850 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
851 (struct collect_info) <minimal_symbols>: Likewise.
852 (compare_msymbols): Return bool. Change parameters to const
853 bound_minimal_symbol references.
854 (find_method, find_function_symbols, find_linespec_symbols): Change
855 `minsyms' parameter to std::vector. Update all callers.
859 * linespec.c (struct linespec) <label_symbols>: Change type to
860 std::vector. Update all users.
861 (find_label_symbols_in_block): Change `result' parameter to
862 std::vector. Update all callers.
863 (find_label_symbols): Return std::vector. Update all callers.
867 * linespec.c (struct linespec) <function_symbols>: Change type to
868 std::vector. Update all users.
869 (struct collect_info) <function_symbols>: Likewise.
870 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
871 (std_compare_symbols): New function.
872 (find_method, find_function_symbols, find_linespec_symbols)
873 (find_label_symbols_in_block): Change `symbols' parameter to
874 std::vector. Update all callers.
875 (find_label_symbols): Likewise for `function_symbols' and
880 * linespec.c (symtab_vector_up): Define.
881 (struct linespec) <file_symtabs>: Change type to std::vector *.
883 (struct collect_info) <file_symtabs>: Likewise.
884 (collect_symtabs_from_filename): Return symtab_vector_up.
886 (decode_objc): Remove cleanup.
887 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
888 (symtab_collector::release_symtabs): Return symtab_vector_up.
890 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
892 (collect_symtabs_from_filename, symtabs_from_filename): Return
893 symtab_vector_up. Update all callers.
897 * csky-tdep.c (csky_analyze_prologue): Use
898 core_addr_to_string_nz.
902 * windows-nat.c (struct xlate_exception) <them>: Change type to
904 (xlate): Fix formatting. Remove last entry.
905 (struct xlate_exception, xlate): Comment out.
906 (windows_nat_target::resume): Use ranged for.
910 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
911 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
913 (riscv_linux_nat_target::store_registers): Likewise.
919 * gnulib/aclocal.m4: Regenerate.
920 * gnulib/config.in: Regenerate.
921 * gnulib/configure: Regenerate.
922 * gnulib/import/Makefile.am: Update.
923 * gnulib/import/Makefile.in: Update.
924 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
925 * gnulib/import/_Noreturn.h: ... this.
926 * gnulib/import/alloca.in.h: Update.
927 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
928 * gnulib/import/arg-nonnull.h: ... this.
929 * gnulib/import/assure.h: Update.
930 * gnulib/import/at-func.c: Update.
931 * gnulib/import/basename-lgpl.c: Update.
932 * gnulib/import/extra/snippet/c++defs.h: Rename to...
933 * gnulib/import/c++defs.h: ... this.
934 * gnulib/import/canonicalize-lgpl.c: Update.
935 * gnulib/import/cdefs.h: Update.
936 * gnulib/import/chdir-long.c: Update.
937 * gnulib/import/chdir-long.h: Update.
938 * gnulib/import/cloexec.c: Update.
939 * gnulib/import/cloexec.h: Update.
940 * gnulib/import/close.c: Update.
941 * gnulib/import/closedir.c: Update.
942 * gnulib/import/config.charset: Update.
943 * gnulib/import/dirent-private.h: Update.
944 * gnulib/import/dirent.in.h: Update.
945 * gnulib/import/dirfd.c: Update.
946 * gnulib/import/dirname-lgpl.c: Update.
947 * gnulib/import/dirname.h: Update.
948 * gnulib/import/dosname.h: Update.
949 * gnulib/import/dup-safer-flag.c: Update.
950 * gnulib/import/dup-safer.c: Update.
951 * gnulib/import/dup.c: Update.
952 * gnulib/import/dup2.c: Update.
953 * gnulib/import/errno.in.h: Update.
954 * gnulib/import/error.c: Update.
955 * gnulib/import/error.h: Update.
956 * gnulib/import/exitfail.c: Update.
957 * gnulib/import/exitfail.h: Update.
958 * gnulib/import/extra/update-copyright: Update.
959 * gnulib/import/fchdir.c: Update.
960 * gnulib/import/fcntl.c: Update.
961 * gnulib/import/fcntl.in.h: Update.
962 * gnulib/import/fd-hook.c: Update.
963 * gnulib/import/fd-hook.h: Update.
964 * gnulib/import/fd-safer-flag.c: Update.
965 * gnulib/import/fd-safer.c: Update.
966 * gnulib/import/fdopendir.c: Update.
967 * gnulib/import/filename.h: Update.
968 * gnulib/import/filenamecat-lgpl.c: Update.
969 * gnulib/import/filenamecat.h: Update.
970 * gnulib/import/flexmember.h: Update.
971 * gnulib/import/float+.h: Update.
972 * gnulib/import/float.c: Update.
973 * gnulib/import/float.in.h: Update.
974 * gnulib/import/fnmatch.c: Update.
975 * gnulib/import/fnmatch.in.h: Update.
976 * gnulib/import/fnmatch_loop.c: Update.
977 * gnulib/import/fpucw.h: Update.
978 * gnulib/import/frexp.c: Update.
979 * gnulib/import/frexpl.c: Update.
980 * gnulib/import/fstat.c: Update.
981 * gnulib/import/fstatat.c: Update.
982 * gnulib/import/getcwd-lgpl.c: Update.
983 * gnulib/import/getcwd.c: Update.
984 * gnulib/import/getdtablesize.c: Update.
985 * gnulib/import/getlogin_r.c: Update.
986 * gnulib/import/getprogname.c: Update.
987 * gnulib/import/getprogname.h: Update.
988 * gnulib/import/gettext.h: Update.
989 * gnulib/import/gettimeofday.c: Update.
990 * gnulib/import/glob-libc.h: Update.
991 * gnulib/import/glob.c: Update.
992 * gnulib/import/glob.in.h: Update.
993 * gnulib/import/glob_internal.h: Update.
994 * gnulib/import/glob_pattern_p.c: Update.
995 * gnulib/import/globfree.c: Update.
996 * gnulib/import/hard-locale.c: Update.
997 * gnulib/import/hard-locale.h: Update.
998 * gnulib/import/intprops.h: Update.
999 * gnulib/import/inttypes.in.h: Update.
1000 * gnulib/import/isnan.c: Update.
1001 * gnulib/import/isnand-nolibm.h: Update.
1002 * gnulib/import/isnand.c: Update.
1003 * gnulib/import/isnanl-nolibm.h: Update.
1004 * gnulib/import/isnanl.c: Update.
1005 * gnulib/import/itold.c: Update.
1006 * gnulib/import/libc-config.h: Update.
1007 * gnulib/import/limits.in.h: Update.
1008 * gnulib/import/localcharset.c: Update.
1009 * gnulib/import/localcharset.h: Update.
1010 * gnulib/import/localtime-buffer.c: Update.
1011 * gnulib/import/localtime-buffer.h: Update.
1012 * gnulib/import/lstat.c: Update.
1013 * gnulib/import/m4/00gnulib.m4: Update.
1014 * gnulib/import/m4/__inline.m4: Update.
1015 * gnulib/import/m4/absolute-header.m4: Update.
1016 * gnulib/import/m4/alloca.m4: Update.
1017 * gnulib/import/m4/builtin-expect.m4: Update.
1018 * gnulib/import/m4/canonicalize.m4: Update.
1019 * gnulib/import/m4/chdir-long.m4: Update.
1020 * gnulib/import/m4/close.m4: Update.
1021 * gnulib/import/m4/closedir.m4: Update.
1022 * gnulib/import/m4/configmake.m4: Update.
1023 * gnulib/import/m4/d-ino.m4: Update.
1024 * gnulib/import/m4/d-type.m4: Update.
1025 * gnulib/import/m4/dirent_h.m4: Update.
1026 * gnulib/import/m4/dirfd.m4: Update.
1027 * gnulib/import/m4/dirname.m4: Update.
1028 * gnulib/import/m4/double-slash-root.m4: Update.
1029 * gnulib/import/m4/dup.m4: Update.
1030 * gnulib/import/m4/dup2.m4: Update.
1031 * gnulib/import/m4/eealloc.m4: Update.
1032 * gnulib/import/m4/environ.m4: Update.
1033 * gnulib/import/m4/errno_h.m4: Update.
1034 * gnulib/import/m4/error.m4: Update.
1035 * gnulib/import/m4/exponentd.m4: Update.
1036 * gnulib/import/m4/exponentl.m4: Update.
1037 * gnulib/import/m4/extensions.m4: Update.
1038 * gnulib/import/m4/extern-inline.m4: Update.
1039 * gnulib/import/m4/fchdir.m4: Update.
1040 * gnulib/import/m4/fcntl-o.m4: Update.
1041 * gnulib/import/m4/fcntl.m4: Update.
1042 * gnulib/import/m4/fcntl_h.m4: Update.
1043 * gnulib/import/m4/fdopendir.m4: Update.
1044 * gnulib/import/m4/filenamecat.m4: Update.
1045 * gnulib/import/m4/flexmember.m4: Update.
1046 * gnulib/import/m4/float_h.m4: Update.
1047 * gnulib/import/m4/fnmatch.m4: Update.
1048 * gnulib/import/m4/fnmatch_h.m4: Update.
1049 * gnulib/import/m4/fpieee.m4: Update.
1050 * gnulib/import/m4/frexp.m4: Update.
1051 * gnulib/import/m4/frexpl.m4: Update.
1052 * gnulib/import/m4/fstat.m4: Update.
1053 * gnulib/import/m4/fstatat.m4: Update.
1054 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1055 * gnulib/import/m4/getcwd-path-max.m4: Update.
1056 * gnulib/import/m4/getcwd.m4: Update.
1057 * gnulib/import/m4/getdtablesize.m4: Update.
1058 * gnulib/import/m4/getlogin.m4: Update.
1059 * gnulib/import/m4/getlogin_r.m4: Update.
1060 * gnulib/import/m4/getpagesize.m4: Update.
1061 * gnulib/import/m4/getprogname.m4: Update.
1062 * gnulib/import/m4/gettimeofday.m4: Update.
1063 * gnulib/import/m4/glibc21.m4: Update.
1064 * gnulib/import/m4/glob.m4: Update.
1065 * gnulib/import/m4/glob_h.m4: Update.
1066 * gnulib/import/m4/gnulib-cache.m4: Update.
1067 * gnulib/import/m4/gnulib-common.m4: Update.
1068 * gnulib/import/m4/gnulib-comp.m4: Update.
1069 * gnulib/import/m4/gnulib-tool.m4: Update.
1070 * gnulib/import/m4/hard-locale.m4: Update.
1071 * gnulib/import/m4/include_next.m4: Update.
1072 * gnulib/import/m4/inttypes-pri.m4: Update.
1073 * gnulib/import/m4/inttypes.m4: Update.
1074 * gnulib/import/m4/isnand.m4: Update.
1075 * gnulib/import/m4/isnanl.m4: Update.
1076 * gnulib/import/m4/largefile.m4: Update.
1077 * gnulib/import/m4/limits-h.m4: Update.
1078 * gnulib/import/m4/localcharset.m4: Update.
1079 * gnulib/import/m4/locale-fr.m4: Update.
1080 * gnulib/import/m4/locale-ja.m4: Update.
1081 * gnulib/import/m4/locale-zh.m4: Update.
1082 * gnulib/import/m4/localtime-buffer.m4: Update.
1083 * gnulib/import/m4/longlong.m4: Update.
1084 * gnulib/import/m4/lstat.m4: Update.
1085 * gnulib/import/m4/malloc.m4: Update.
1086 * gnulib/import/m4/malloca.m4: Update.
1087 * gnulib/import/m4/math_h.m4: Update.
1088 * gnulib/import/m4/mbrtowc.m4: Update.
1089 * gnulib/import/m4/mbsinit.m4: Update.
1090 * gnulib/import/m4/mbsrtowcs.m4: Update.
1091 * gnulib/import/m4/mbstate_t.m4: Update.
1092 * gnulib/import/m4/memchr.m4: Update.
1093 * gnulib/import/m4/memmem.m4: Update.
1094 * gnulib/import/m4/mempcpy.m4: Update.
1095 * gnulib/import/m4/memrchr.m4: Update.
1096 * gnulib/import/m4/mkdir.m4: Update.
1097 * gnulib/import/m4/mkstemp.m4: Update.
1098 * gnulib/import/m4/mmap-anon.m4: Update.
1099 * gnulib/import/m4/mode_t.m4: Update.
1100 * gnulib/import/m4/msvc-inval.m4: Update.
1101 * gnulib/import/m4/msvc-nothrow.m4: Update.
1102 * gnulib/import/m4/multiarch.m4: Update.
1103 * gnulib/import/m4/nocrash.m4: Update.
1104 * gnulib/import/m4/off_t.m4: Update.
1105 * gnulib/import/m4/onceonly.m4: Update.
1106 * gnulib/import/m4/open-cloexec.m4: Update.
1107 * gnulib/import/m4/open.m4: Update.
1108 * gnulib/import/m4/openat.m4: Update.
1109 * gnulib/import/m4/opendir.m4: Update.
1110 * gnulib/import/m4/pathmax.m4: Update.
1111 * gnulib/import/m4/rawmemchr.m4: Update.
1112 * gnulib/import/m4/readdir.m4: Update.
1113 * gnulib/import/m4/readlink.m4: Update.
1114 * gnulib/import/m4/realloc.m4: Update.
1115 * gnulib/import/m4/rename.m4: Update.
1116 * gnulib/import/m4/rewinddir.m4: Update.
1117 * gnulib/import/m4/rmdir.m4: Update.
1118 * gnulib/import/m4/save-cwd.m4: Update.
1119 * gnulib/import/m4/secure_getenv.m4: Update.
1120 * gnulib/import/m4/setenv.m4: Update.
1121 * gnulib/import/m4/signal_h.m4: Update.
1122 * gnulib/import/m4/ssize_t.m4: Update.
1123 * gnulib/import/m4/stat-time.m4: Update.
1124 * gnulib/import/m4/stat.m4: Update.
1125 * gnulib/import/m4/std-gnu11.m4: Update.
1126 * gnulib/import/m4/stdbool.m4: Update.
1127 * gnulib/import/m4/stddef_h.m4: Update.
1128 * gnulib/import/m4/stdint.m4: Update.
1129 * gnulib/import/m4/stdio_h.m4: Update.
1130 * gnulib/import/m4/stdlib_h.m4: Update.
1131 * gnulib/import/m4/strchrnul.m4: Update.
1132 * gnulib/import/m4/strdup.m4: Update.
1133 * gnulib/import/m4/strerror.m4: Update.
1134 * gnulib/import/m4/string_h.m4: Update.
1135 * gnulib/import/m4/strstr.m4: Update.
1136 * gnulib/import/m4/strtok_r.m4: Update.
1137 * gnulib/import/m4/sys_socket_h.m4: Update.
1138 * gnulib/import/m4/sys_stat_h.m4: Update.
1139 * gnulib/import/m4/sys_time_h.m4: Update.
1140 * gnulib/import/m4/sys_types_h.m4: Update.
1141 * gnulib/import/m4/tempname.m4: Update.
1142 * gnulib/import/m4/time_h.m4: Update.
1143 * gnulib/import/m4/unistd-safer.m4: Update.
1144 * gnulib/import/m4/unistd_h.m4: Update.
1145 * gnulib/import/m4/warn-on-use.m4: Update.
1146 * gnulib/import/m4/wchar_h.m4: Update.
1147 * gnulib/import/m4/wchar_t.m4: Update.
1148 * gnulib/import/m4/wctype_h.m4: Update.
1149 * gnulib/import/m4/wint_t.m4: Update.
1150 * gnulib/import/malloc.c: Update.
1151 * gnulib/import/malloc/scratch_buffer.h: Update.
1152 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1153 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1154 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1155 * gnulib/import/malloca.c: Update.
1156 * gnulib/import/malloca.h: Update.
1157 * gnulib/import/malloca.valgrind: Update.
1158 * gnulib/import/math.in.h: Update.
1159 * gnulib/import/mbrtowc.c: Update.
1160 * gnulib/import/mbsinit.c: Update.
1161 * gnulib/import/mbsrtowcs-impl.h: Update.
1162 * gnulib/import/mbsrtowcs-state.c: Update.
1163 * gnulib/import/mbsrtowcs.c: Update.
1164 * gnulib/import/memchr.c: Update.
1165 * gnulib/import/memmem.c: Update.
1166 * gnulib/import/mempcpy.c: Update.
1167 * gnulib/import/memrchr.c: Update.
1168 * gnulib/import/mkdir.c: Update.
1169 * gnulib/import/mkstemp.c: Update.
1170 * gnulib/import/msvc-inval.c: Update.
1171 * gnulib/import/msvc-inval.h: Update.
1172 * gnulib/import/msvc-nothrow.c: Update.
1173 * gnulib/import/msvc-nothrow.h: Update.
1174 * gnulib/import/open.c: Update.
1175 * gnulib/import/openat-die.c: Update.
1176 * gnulib/import/openat-priv.h: Update.
1177 * gnulib/import/openat-proc.c: Update.
1178 * gnulib/import/openat.c: Update.
1179 * gnulib/import/openat.h: Update.
1180 * gnulib/import/opendir.c: Update.
1181 * gnulib/import/pathmax.h: Update.
1182 * gnulib/import/pipe-safer.c: Update.
1183 * gnulib/import/rawmemchr.c: Update.
1184 * gnulib/import/readdir.c: Update.
1185 * gnulib/import/readlink.c: Update.
1186 * gnulib/import/realloc.c: Update.
1187 * gnulib/import/ref-add.sin: Update.
1188 * gnulib/import/ref-del.sin: Update.
1189 * gnulib/import/rename.c: Update.
1190 * gnulib/import/rewinddir.c: Update.
1191 * gnulib/import/rmdir.c: Update.
1192 * gnulib/import/same-inode.h: Update.
1193 * gnulib/import/save-cwd.c: Update.
1194 * gnulib/import/save-cwd.h: Update.
1195 * gnulib/import/scratch_buffer.h: Update.
1196 * gnulib/import/secure_getenv.c: Update.
1197 * gnulib/import/setenv.c: Update.
1198 * gnulib/import/signal.in.h: Update.
1199 * gnulib/import/stat-time.c: Update.
1200 * gnulib/import/stat-time.h: Update.
1201 * gnulib/import/stat-w32.c: Update.
1202 * gnulib/import/stat-w32.h: Update.
1203 * gnulib/import/stat.c: Update.
1204 * gnulib/import/stdbool.in.h: Update.
1205 * gnulib/import/stddef.in.h: Update.
1206 * gnulib/import/stdint.in.h: Update.
1207 * gnulib/import/stdio.in.h: Update.
1208 * gnulib/import/stdlib.in.h: Update.
1209 * gnulib/import/str-two-way.h: Update.
1210 * gnulib/import/strchrnul.c: Update.
1211 * gnulib/import/strdup.c: Update.
1212 * gnulib/import/streq.h: Update.
1213 * gnulib/import/strerror-override.c: Update.
1214 * gnulib/import/strerror-override.h: Update.
1215 * gnulib/import/strerror.c: Update.
1216 * gnulib/import/string.in.h: Update.
1217 * gnulib/import/stripslash.c: Update.
1218 * gnulib/import/strnlen1.c: Update.
1219 * gnulib/import/strnlen1.h: Update.
1220 * gnulib/import/strstr.c: Update.
1221 * gnulib/import/strtok_r.c: Update.
1222 * gnulib/import/sys_stat.in.h: Update.
1223 * gnulib/import/sys_time.in.h: Update.
1224 * gnulib/import/sys_types.in.h: Update.
1225 * gnulib/import/tempname.c: Update.
1226 * gnulib/import/tempname.h: Update.
1227 * gnulib/import/time.in.h: Update.
1228 * gnulib/import/unistd--.h: Update.
1229 * gnulib/import/unistd-safer.h: Update.
1230 * gnulib/import/unistd.in.h: Update.
1231 * gnulib/import/unsetenv.c: Update.
1232 * gnulib/import/verify.h: Update.
1233 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1234 * gnulib/import/wchar.in.h: Update.
1235 * gnulib/import/wctype.in.h: Update.
1236 * gnulib/import/xalloc-oversized.h: Update.
1237 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1238 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1243 * gdb/main.c (captured_main_1): Exit with nonzero status
1244 in batch mode if the last command to be executed failed.
1245 * NEWS: Mention the above.
1249 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1250 end of warning message.
1255 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1256 (aarch64_extract_return_value): Use
1257 aapcs_is_vfp_call_or_return_candidate.
1258 (aarch64_return_in_memory): Likewise.
1259 (aarch64_store_return_value): Likewise.
1264 (aapcs_is_vfp_call_or_return_candidate): Make static
1265 (pass_in_v_or_stack): Remove function.
1266 (pass_in_v_vfp_candidate): New function.
1267 (aarch64_push_dummy_call): Check for float register candidates.
1271 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1272 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1273 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1278 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1279 (struct ipa_sym_addresses): Rename to...
1280 (struct ipa_sym_addresses_common): ... this.
1281 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1285 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1286 (token_fifo): Now a std::vector.
1287 (yylex, c_parse): Update.
1288 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1289 (token_fifo): Now a std::vector.
1290 (yylex, d_parse): Update.
1291 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1292 (token_fifo): Now a std::vector.
1293 (yylex, go_parse): Update.
1297 * parser-defs.h (struct type_stack) <elements>: Change type to
1298 std::vector<union type_stack_elt>.
1299 <depth, size>: Remove.
1300 * parse.c (parse_exp_in_context_1): Adjust.
1301 (type_stack_reserve): Remove.
1302 (check_type_stack_depth): Remove.
1303 (insert_into_type_stack): Adjust to std::vector.
1304 (insert_type): Likewise.
1305 (push_type): Likewise.
1306 (push_type_int): Likewise.
1307 (insert_type_address_space): Likewise.
1308 (pop_type): Likewise.
1309 (pop_type_int): Likewise.
1310 (pop_typelist): Likewise.
1311 (pop_type_stack): Likewise.
1312 (append_type_stack): Likewise.
1313 (push_type_stack): Likewise.
1314 (get_type_stack): Likewise.
1315 (type_stack_cleanup): Likewise.
1316 (push_typelist): Likewise.
1317 (follow_types): Likewise.
1318 (_initialize_parse): Likewise.
1322 * NEWS: Mention csky target.
1328 * csky-linux-tdep.c: New file.
1329 * csky-tdep.c: Likewise.
1330 * csky-tdep.h: Likewise.
1331 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1333 (HFILES_NO_SRCDIR): Add csky-tdep.h.
1334 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1335 * configure.tgt: Add csky support.
1339 * python/py-framefilter.c (py_print_frame): Print frame architecture
1340 when printing on an MI output.
1345 * configure: Rebuild.
1346 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1350 * aarch64-linux-tdep.c
1351 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1356 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1358 (ppc64_standard_linkage1, ppc64_standard_linkage2)
1359 (ppc64_standard_linkage3, ppc64_standard_linkage4)
1360 (ppc64_standard_linkage5, ppc64_standard_linkage6)
1361 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1366 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1367 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1371 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1372 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1374 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1376 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1378 * sparc-linux-tdep.c (sparc32_linux_sigframe)
1379 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1380 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1382 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1383 (ppc64_linux_sigaction_tramp_frame)
1384 (ppc32_linux_sighandler_tramp_frame)
1385 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1386 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1387 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1388 * mn10300-linux-tdep.c (am33_linux_sigframe)
1389 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1390 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1391 * mips-linux-tdep.c (mips_linux_o32_sigframe)
1392 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1393 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1394 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1395 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1396 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1397 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1398 * microblaze-linux-tdep.c
1399 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1400 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1401 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1402 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1403 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1404 * common/common-types.h (ULONGEST_MAX): New define.
1405 (CORE_ADDR_MAX): Fix formatting.
1406 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1407 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1408 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1409 (arm_linux_rt_sigreturn_tramp_frame)
1410 (arm_eabi_linux_sigreturn_tramp_frame)
1411 (arm_eabi_linux_rt_sigreturn_tramp_frame)
1412 (thumb2_eabi_linux_sigreturn_tramp_frame)
1413 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1414 (arm_linux_restart_syscall_tramp_frame)
1415 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1416 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1417 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1419 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1423 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1425 * mips-tdep.c (mips_deal_with_atomic_sequence)
1426 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1427 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1428 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1429 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1431 * aarch64-tdep.c (aarch64_software_single_step): Use
1436 * linespec.c (complete_linespec_component): Add cast to "char".
1437 * completer.c (completion_tracker::build_completion_result): Add
1442 * solist.h (struct solist, struct target_so_ops): Fix
1447 * ada-tasks.c (ada_task_info_s): Remove typedef.
1448 (DEF_VEC_O(ada_task_info_s)): Remove.
1449 (struct ada_tasks_inferior_data): Initialize fields.
1450 <task_list>: Make an std::vector.
1451 (get_ada_tasks_inferior_data): Allocate with new.
1452 (ada_get_task_number): Adjust.
1453 (get_task_number_from_id): Likewise.
1454 (valid_task_id): Likewise.
1455 (ada_get_task_info_from_ptid): Likewise.
1456 (iterate_over_live_ada_tasks): Likewise.
1457 (add_ada_task): Likewise.
1458 (read_known_tasks): Likewise.
1459 (ada_build_task_list): Likewise.
1460 (print_ada_task_info): Likewise.
1461 (info_task): Likewise.
1462 (task_command_1): Likewise.
1466 * ada-lang.c (add_angle_brackets): Return std::string.
1470 * python/py-threadevent.c (py_get_event_thread): Initialize
1475 * python/py-bpevent.c (create_breakpoint_event_object): Use
1476 copy-initialization.
1477 * python/py-continueevent.c (emit_continue_event): Use
1478 copy-initialization.
1479 * python/py-exitedevent.c (create_exited_event_object): Return a
1481 (emit_exited_event): Use copy-initialization.
1482 * python/py-inferior.c (python_new_inferior)
1483 (python_inferior_deleted, add_thread_object): Use
1484 copy-initialization.
1485 * python/py-infevents.c (create_inferior_call_event_object)
1486 (create_register_changed_event_object)
1487 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1488 (emit_inferior_call_event, emit_memory_changed_event)
1489 (emit_register_changed_event): Use copy-initialization.
1490 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1491 Return a gdbpy_ref<>.
1492 (emit_new_objfile_event): Use copy-initialization.
1493 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1494 (emit_clear_objfiles_event): Use copy-initialization.
1495 * python/py-signalevent.c (create_signal_event_object): Use
1496 copy-initialization.
1497 * python/py-threadevent.c (create_thread_event_object): Use
1498 copy-initialization.
1504 * python/py-continueevent.c: Include "gdbthread.h".
1505 (create_continue_event_object): Add intro comment. Add 'ptid'
1506 parameter. Use it to find thread to pass to
1507 create_thread_event_object.
1508 (emit_continue_event): Pass PTID down to
1509 create_continue_event_object.
1510 * python/py-event.h (py_get_event_thread): Declare.
1511 (create_thread_event_object): Remove default from 'thread'
1513 * python/py-stopevent.c (create_stop_event_object): Use
1514 py_get_event_thread.
1515 * python/py-threadevent.c (get_event_thread): Rename to ...
1516 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1517 and use it to find the thread.
1518 (create_thread_event_object): Assert that THREAD isn't null.
1519 Don't find the event thread here.
1523 * block.h (blockrange, blockranges): New struct declarations.
1524 (struct block): Add new field named `ranges'.
1525 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1526 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1527 macros for accessing ranges in struct block.
1528 (make_blockranges): New declaration.
1529 block.c (make_blockranges): New function.
1530 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1532 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1533 * blockframe.c (cache_pc_function_block): New static global.
1534 (clear_pc_function_cache): Clear cache_pc_function_block.
1535 (find_pc_partial_function): Move comment to symtab.h. Add
1536 support for non-contiguous blocks.
1537 * cli/cli-cmds.c (block.h): Include.
1538 (print_disassembly): Handle printing of non-contiguous blocks.
1539 (disassemble_current_function): Likewise.
1540 (disassemble_command): Likewise.
1542 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1544 * blockframe.c (get_pc_function_start): Likewise.
1545 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1546 (gcc_symbol_address): Likewise.
1547 * compile/compile-object-run.c (compile_object_run): Likewise.
1548 * compile/compile.c (get_expr_block_and_pc): Likewise.
1549 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1550 (func_addr_to_tail_call_list): Likewise.
1551 * findvar.c (default_read_var_value): Likewise.
1552 * inline-frame.c (inline_frame_this_id): Likewise.
1553 (skip-inline_frames): Likewise.
1554 * infcmd.c (until_next_command): Likewise.
1555 * linespec.c (convert_linespec_to_sals): Likewise.
1556 * parse.c (parse_exp_in_context_1): Likewise.
1557 * printcmd.c (build_address_symbolic): likewise.
1558 (info_address_command): Likewise.
1559 symtab.c (find_function_start_sal): Likewise.
1560 (skip_prologue_sal): Likewise.
1561 (find_function_alias_target): Likewise.
1562 (find_gnu_ifunc): Likewise.
1563 * stack.c (find_frame_funname): Likewise.
1564 * symtab.c (fixup_symbol_section): Likewise.
1565 (find_function_start_sal): Likewise.
1566 (skip_prologue_sal): Likewsie.
1567 (find_function_alias_target): Likewise.
1568 (find_gnu_ifunc): Likewise.
1569 * tracepoint.c (info_scope_command): Likewise.
1570 * value.c (value_fn_field): Likewise.
1572 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1573 in place of find_pc_partial_function.
1574 * blockframe.c (find_function_entry_range_from_pc): New function.
1575 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1576 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1577 for each range in a block.
1582 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1587 * solib-svr4.c (read_program_headers_from_bfd): Return
1588 gdb::optional<gdb::byte_vector>.
1589 (svr4_exec_displacement): Adjust.
1593 * solib-svr4.c (read_program_header): Return
1594 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1595 (find_program_interpreter): Return
1596 gdb::optional<gdb::byte_vector>.
1597 (scan_dyntag_auxv): Adjust.
1598 (enable_break): Adjust.
1599 (svr4_exec_displacement): Adjust.
1603 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1604 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1608 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1610 * guile/scm-utils.c (gdbscm_printf): Likewise.
1611 * serial.c (serial_printf): Likewise.
1612 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1616 * stack.c (print_frame): Print frame architecture when printing on
1618 * NEWS: Mention new "arch" attribute in frame output.
1622 * arch/aarch64.h (aarch64_regnum): Update comment.
1626 * NEWS: Add SVE to 8.2 section.
1630 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1631 out from gdbscm_parse_function_args.
1632 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1633 gdbscm_parse_function_args_1.
1638 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1643 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1648 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1649 for PT_TLS segments.
1653 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1654 dwarf_variable_value.
1655 * dwarf2-frame.c (class dwarf_expr_executor):
1656 Add override for dwarf_variable_value.
1657 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1658 (class symbol_needs_eval_context): Likewise.
1659 (indirect_synthetic_pointer): Add forward declaration.
1660 (sect_variable_value): New function.
1661 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1662 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1663 for DW_OP_GNU_variable_value.
1667 * top.c (read_command_file): Update.
1668 (command_line_input): Remove "repeat" argument.
1669 * ada-lang.c (get_selections): Update.
1670 * linespec.c (decode_line_2): Update.
1671 * defs.h (command_line_input): Remove argument.
1672 * cli/cli-script.c (read_next_line): Update.
1673 * python/py-gdb-readline.c: Update.
1677 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1682 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1686 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1687 If used, use find_pc_partial_function to find address range
1689 * mi/mi-main.c (mi_cmd_list_features): Report
1690 "data-disassemble-a-option" feature.
1691 * NEWS: Mention new -data-disassemble option -a.
1695 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1699 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1700 (aarch64_linux_collect_sve_regset): Likewise.
1701 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1702 * regcache.h (regcache_map_entry_size): New function.
1706 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1707 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1708 (SVE_HEADER_VL_LENGTH): Likewise.
1709 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1710 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1711 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1712 (SVE_HEADER_SIZE_OFFSET): Likewise.
1713 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1714 (SVE_HEADER_VL_OFFSET): Likewise.
1715 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1716 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1717 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1718 (SVE_HEADER_SIZE): Likewise.
1719 (aarch64_linux_core_read_vq): Add function.
1720 (aarch64_linux_core_read_description): Check for SVE section.
1724 * aarch64-fbsd-tdep.c
1725 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1727 * aarch64-linux-tdep.c
1728 (aarch64_linux_iterate_over_regset_sections): Likewise.
1729 * alpha-linux-tdep.c
1730 (alpha_linux_iterate_over_regset_sections):
1732 (alphanbsd_iterate_over_regset_sections): Likewise.
1734 (amd64fbsd_iterate_over_regset_sections): Likewise.
1735 * amd64-linux-tdep.c
1736 (amd64_linux_iterate_over_regset_sections): Likewise.
1738 (armbsd_iterate_over_regset_sections): Likewise.
1740 (arm_fbsd_iterate_over_regset_sections): Likewise.
1742 (arm_linux_iterate_over_regset_sections): Likewise.
1743 * corelow.c (get_core_registers_cb): Likewise.
1744 (core_target::fetch_registers): Likewise.
1745 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1746 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1747 * gdbarch.h (void): Regenerate.
1748 * gdbarch.sh: Add supply_size and collect_size.
1749 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1750 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1751 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1752 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1753 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1754 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1755 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1756 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1757 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1758 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1759 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1760 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1761 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1762 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1763 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1764 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1765 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1766 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1767 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1768 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1769 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1770 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1771 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1772 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1773 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1774 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1775 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1776 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1777 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1778 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1782 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1787 * compile/compile-c-support.c (add_code_header, add_code_footer):
1788 Move into policy class.
1789 (c_push_user_expression, pop_user_expression_nop)
1790 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1791 (compile_program): New host class.
1792 (c_compile_program): New typedef.
1793 (c_compute_porgram): Use c_compile_program.
1797 * compile/compile-internal.h (compile_instance::~compile_instance):
1798 Remove calls to htab_delete.
1799 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1800 * compile.c (compile_instance::compile_instance): Initialize
1801 htab unique pointers.
1802 (compile_instance::get_cached_type, compile_instance::insert_type)
1803 (compile_instance::error_symbol_once): Update for unique_ptr.
1807 * compile/compile-c-symbols.c (struct symbol_error)
1808 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1809 (compile_instance::insert_symbol_error)
1810 (compile_instance::error_symbol_once): Move to ...
1811 * compile/compile.c: ... here.
1815 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1816 instead of `new_compile_instance'.
1817 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1819 If the symbol error map is not initialized, create it.
1820 (generate_c_for_for_one_symbol): Do not check/initialize
1821 the symbol error map.
1822 * compile/compile-c-types.c (compile_c_instance): Make a class.
1824 (compile_instance::compile_instance): Initialize the type cache.
1825 (get_cached_type): New function.
1826 (insert_type): Update description.
1827 (compile_c_instance::m_default_cflags): Define.
1828 (convert_type): Update description. Use get_cached_type.
1829 (delete_instance): Moved to destructor.
1830 (new_compile_instance): Moved to constructor.
1831 * compile/compile-c.h (compile_c_instance): Make class inheriting
1832 from compile_instance.
1833 <base>: Remove field.
1834 <type_map, symbol_err_map>: Move to base class.
1835 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1836 * compile/compile-internal.h (compile_instance): Make class.
1837 <type_map_t, symbol_err_map_t>: Define.
1838 <fe>: Rename to `m_gcc_fe'.
1839 <scope, block, gcc_target_options>: Add `m_' prefix.
1840 <m_type_map, m_symbol_err_map>: New fields, moved from
1843 (convert_type, new_compile_instance): Remove.
1844 * compile/compile.c (cleanup_compile_instance): Remove.
1845 (compile_to_object): Use unique_ptr to eliminate cleanups.
1846 (compile_instance::set_print_callback, compile_instance::version)
1847 (compile_instance::set_verbose)
1848 (compile_instance::set_driver_filename)
1849 (compile_instance::set_triplet_regexp)
1850 (compile_instance::set_arguments)
1851 (compile_instance::set_source_file)
1852 (compile_instance::compile): Define.
1856 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1857 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1858 gcc-c-fe.def to define C plugin.
1859 (delete_instance): Delete `c_plugin'.
1860 (new_compile_instance): Initialize `c_plugin'.
1861 * compile/compile-c.h: Include gcc_c_plugin.h.
1862 (struct compile_c_instance) <c_plugin>: New member.
1863 * gcc-c-plugin.h: New file.
1864 Update all callers with API change.
1868 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1869 (HFILES_NO_SRCDIR): ... to here.
1870 Add compile-internal.h and compile-c.h.
1871 * compile/compile-c-support.c: Include compile-c.h.
1872 * compile/compile-c-symbols.c: Include compile-c.h.
1873 (generate_c_for_variable_locations): Update comment.
1874 * compile/compile-c-types.c: Include compile-c.h.
1875 * compile/compile-c.h: New file -- moved C language declarations
1876 from other files here.
1877 * compile/compile-internal.h: Do not include hashtab.h or
1878 common/enum-flags.h.
1879 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1880 (gcc_convert_symbol, gcc_symbol_address)
1881 (generate_c_for_variable_locations, c_get_mode_for_size)
1882 (c_get_range_decl_name): Definitions moved to compile-c.h.
1883 * compile/compile-loc2c.c: Include compile-c.h.
1887 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1888 (c_symbol_substitution_name): ... this.
1893 * compile/compile-c-support.c (c_compute_program): Use
1894 unique_xmalloc_ptr to eliminate cleanup.
1895 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1896 Return a unique_xmalloc_ptr and eliminate cleanup.
1897 * compile/compile-internal.h (generate_c_for_variable_locations):
1898 Return unique_xmalloc_ptr and update description.
1902 * corelow.c (core_target::get_core_register_section): Rename
1903 min_size to section_min_size.
1907 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1908 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1909 * NEWS: Mention new GNU/Linux RISC-V target.
1910 * configure.host: Add riscv*-*-linux*.
1911 * configure.nat: Add riscv*.
1912 * configure.tgt: Add riscv*-*-linux*.
1913 * riscv-linux-nat.c: New file.
1914 * riscv-linux-tdep.c: New file.
1918 * infrun.c (resume): Make static, add forward declaration.
1919 (proceed): Update header comment.
1920 * infrun.h (resume): Delete declaration.
1924 * riscv-tdep.h: Minor formatting fixes.
1928 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1929 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1930 (test_mkdir_recursive): Likewise.
1931 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1935 * valarith.c (value_subscripted_rvalue): If an array is not in
1936 memory, and we don't know the upper bound, then we can't know that
1937 the requested element exists or not.
1941 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1942 (target_options_to_string): Add comment.
1946 * unittests/scoped_mmap-selftests.c: Check result of "write".
1950 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1951 (decode_register_index_short): New.
1952 (decode_j_type_insn, decode_cj_type_insn): New.
1953 (decode_b_type_insn, decode_cb_type_insn): New.
1954 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1955 local xlen. Check xlen when decoding ambiguous compressed insns. In
1956 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1957 is_c_sw_insn instead of is_sw_insn.
1958 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1959 (riscv_software_single_step): New.
1960 * riscv-tdep.h (riscv_software_single_step): Declare.
1962 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1963 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1968 * target.c (dispose_inferior): Don't dispose of inferiors that are
1973 * remote.c (remote_target::download_tracepoint): Change char* to
1978 * target.h (target_options_to_string): Return an std::string.
1979 * target.c (str_comma_list_concat_elem): Return void, use
1981 (do_option): Likewise.
1982 (target_options_to_string): Return an std::string.
1983 * linux-nat.c (linux_nat_target::wait): Adjust.
1984 * target-debug.h (target_debug_print_options): Adjust.
1988 * Makefile.in (CPPFLAGS): New variable.
1989 (INTERNAL_CPPFLAGS): Use it.
1993 * NEWS: Mention the index cache.
1997 * common/pathstuff.h (get_standard_cache_dir): New.
1998 * common/pathstuff.c (get_standard_cache_dir): New.
1999 * build-id.h (build_id_to_string): New.
2000 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2001 DEBUG_STR_SUFFIX): Move to here.
2002 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2003 DEBUG_STR_SUFFIX): Move from there.
2004 (write_psymtabs_to_index): Make non-static, add basename
2005 parameter. Write to temporary files, rename when done.
2006 (save_gdb_index_command): Adjust call to
2007 write_psymtabs_to_index.
2008 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2010 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2011 (get_gdb_index_contents_from_cache): New.
2012 (get_gdb_index_contents_from_cache_dwz): New.
2013 (dwarf2_initialize_objfile): Read index from cache.
2014 (dwarf2_build_psymtabs): Save to index.
2015 * dwarf-index-cache.h: New file.
2016 * dwarf-index-cache.c: New file.
2017 * dwarf-index-write.h: New file.
2021 * gnulib/aclocal.m4: Re-generate.
2022 * gnulib/config.in: Re-generate.
2023 * gnulib/configure: Re-generate.
2024 * gnulib/import/Makefile.am: Re-generate.
2025 * gnulib/import/Makefile.in: Re-generate.
2026 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2027 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2028 * gnulib/import/m4/mkdir.m4: New file.
2029 * gnulib/import/mkdir.c: New file.
2030 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2035 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2036 * common/scoped_mmap.c: New file.
2037 * common/scoped_mmap.h (destroy): New method.
2038 (~scoped_mmap, reset): Use destroy.
2039 (scoped_mmap): New move constructor.
2040 (mmap_file): New declaration.
2041 * unittests/scoped_mmap-selftests.c (test_normal,
2042 test_invalid_filename, run_tests): New functions.
2043 (_initialize_scoped_mmap_selftests): Register selftest.
2047 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2048 (read_gdb_index_from_buffer): ... this. Remove section
2049 parameter, add buffer parameter.
2050 (get_gdb_index_contents_ftype,
2051 get_gdb_index_contents_dwz_ftype): New typedefs.
2052 (dwarf2_read_gdb_index): Add callback parameters to get the
2054 (get_gdb_index_contents_from_section): New.
2055 (dwarf2_initialize_objfile): Update call to
2056 dwarf2_read_gdb_index.
2060 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2061 (gdb_open_cloexec): Likewise.
2062 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2063 (commandline_from_pid): Likewise.
2064 (linux_xfer_osdata_threads): Likewise.
2065 (linux_xfer_osdata_fds): Likewise.
2066 * ada-lang.c (is_package_name): Likewise.
2067 * auxv.c (procfs_xfer_auxv): Likewise.
2068 * breakpoint.c (print_one_breakpoint_location): Use
2070 (print_one_catch_solib): Use string_printf.
2071 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2072 (add_pe_forwarded_sym): Likewise.
2073 * dwarf2read.c (create_type_unit_group): Likewise.
2074 (build_error_marker_type): Likewise.
2075 * infcall.c (get_function_name): Likewise.
2076 * valprint.c (print_converted_chars_to_obstack): Likewise.
2077 * xtensa-tdep.c (xtensa_register_type): Likewise.
2081 * remote.c (remote_target::download_tracepoint): Fix format
2086 * tracefile.c: Include common/byte-vector.h.
2087 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2088 with trace_regblock_size if needed. Update uses of buf.
2092 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2093 std::vector<unsigned char>.
2094 * tracepoint.c (collection_list::collection_list): Remove
2095 m_regs_mask initializer from initializer list. Resize
2096 m_regs_mask using the largest remote register number.
2097 (collection_list::add_remote_register): Remove size check on
2098 m_regs_mask. Use at to access element.
2099 (collection_list::stringify): Change type of temp_buf to
2100 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2101 stringify the register mask. Use pack_hex_byte for the register
2106 * tracepoint.h (class collection_list) <add_register>: Remove.
2107 <add_remote_register, add_ax_registers, add_local_register>:
2109 <add_memrange>: Add scope parameter.
2110 * tracepoint.c (encode_actions_1): Likewise.
2111 (collection_list::add_register): Rename to ...
2112 (collection_list::add_remote_register): ... this. Update
2114 (collection_list::add_ax_registers, add_local_register): New
2116 (collection_list::add_memrange): Add scope parameter. Call
2117 add_local_register instead of add_register.
2118 (finalize_tracepoint_aexpr): New function.
2119 (collection_list::collect_symbol): Update calls to add_memrange.
2120 Call add_local_register instead of add_register. Call
2121 add_ax_registers. Call finalize_tracepoint_aexpr.
2122 (encode_actions_1): Get remote regnos for $reg action. Call
2123 add_remote_register, add_ax_registers, and add_local_register.
2124 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2125 (validate_actionline): Call finalize_tracepoint_aexpr.
2129 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2130 Replace array buf with gdb::char_vector buf, of size
2131 get_remote_packet_size (). Replace references to buf and
2132 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2133 and xsnprintf with snprintf. Raise errors if the buffer is too
2138 * remote.c (remote_target::download_tracepoint): Fix the has_more
2139 predicate in the QTDP action list iteration.
2143 * remote.c (remote_target::download_tracepoint): Fix indentation
2148 * proc-api.c (_initialize_proc_api): Remove c, unused.
2149 * procfs.c (procfs_init_inferior): Remove signals, unused.
2150 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2156 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2157 'W_STOPCODE (0)' as this could be ambiguous.
2161 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2162 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2168 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2170 (process_structure_scope): Likewise.
2175 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2180 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2181 (darwin_suspend_inferior, darwin_resume_inferior)
2182 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2183 (darwin_check_new_threads): Check result of get_darwin_inferior.
2191 * varobj.c (varobj_get_path_expr_parent): Report an error if
2192 parent is a dynamic varobj.
2196 * gnulib/aclocal.m4: Re-generate.
2197 * gnulib/config.in: Re-generate.
2198 * gnulib/configure: Re-generate.
2199 * gnulib/import/Makefile.in: Re-generate.
2200 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2201 * gnulib/import/m4/onceonly.m4: Re-generate.
2205 * target-descriptions.c (struct xml_test_tdesc): New.
2206 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2207 (record_xml_tdesc): Update.
2208 (maintenance_check_xml_descriptions): Update.
2209 * target-descriptions.h (record_xml_tdesc): Update comment.
2213 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2214 checking array bounds are defined.
2218 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2219 irreflexivity violation.
2223 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2224 * value.c (unpack_long): Remove lint code.
2225 * valops.c (value_ind): Remove lint code.
2226 * valarith.c (value_x_binop, value_x_unop, value_equal)
2227 (value_pos): Remove lint code.
2231 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2232 with undefined upper bound as <optimized out>.
2236 * gcore.in: Rename variable "name" to "prefix". Expand
2241 * windows-nat.c (windows_nat_target::create_inferior): Update to
2242 call close() in global namespace.
2246 * dwarf-index-write.c (add_address_entry): Don't add objfile
2248 * dbxread.c (find_stab_function): Rename from
2249 find_stab_function_addr. Return a bound_minimal_symbol.
2250 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2251 Don't add objfile offsets.
2252 (end_psymtab): Use raw_text_low, raw_text_high,
2253 MSYMBOL_VALUE_RAW_ADDRESS.
2254 (read_ofile_symtab): Update.
2255 (process_one_symbol): Update.
2256 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2258 (dw2_relocate): Remove.
2259 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2261 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2263 (process_psymtab_comp_unit_reader, add_partial_symbol)
2264 (add_partial_subprogram, dwarf2_ranges_read): Update.
2265 (load_partial_dies): Update.
2266 (add_address_entry): Don't add objfile offsets.
2267 (dwarf2_build_include_psymtabs): Update.
2268 (create_addrmap_from_aranges): Don't add objfile offsets.
2269 (dw2_find_pc_sect_compunit_symtab): Update.
2270 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2271 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2273 (parse_partial_symbols): Don't add objfile offsets. Use
2274 raw_text_low, raw_text_high. Update.
2275 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2276 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2277 or call 'relocate' quick function. Clear psymbol_map.
2278 * psympriv.h (struct partial_symbol) <address>: Add section
2280 <set_unrelocated_address>: Rename from set_address.
2281 <raw_text_low, raw_text_high>: New methods.
2282 <text_low, text_high>: Add objfile parameter.
2283 (add_psymbol_to_bcache): Add 'section' parameter. Call
2284 set_unrelocated_address.
2285 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2286 (find_pc_psymbol): Update.
2287 (fixup_psymbol_section, relocate_psymtabs): Remove.
2288 (dump_psymtab, psym_functions): Update.
2289 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2291 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2292 (start_psymtab_common): Update.
2293 * symfile-debug.c (debug_qf_relocate): Remove.
2294 (debug_sym_quick_functions): Update.
2295 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2296 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2301 * dbxread.c (end_psymtab): Use text_high_valid and
2303 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2304 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2305 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2307 <text_low_valid, text_high_valid>: New fields.
2308 <set_text_low, set_text_high>: Update.
2309 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2313 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2315 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2316 textlow and texthigh fields.
2317 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2319 * mdebugread.c (parse_lines, parse_partial_symbols)
2320 (psymtab_to_symtab_1): Update.
2321 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2322 Rename fields. Update comment. Now private.
2323 <text_low, text_high, set_text_low, set_text_high>: New methods.
2324 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2325 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2326 (start_psymtab_common, maintenance_info_psymtabs)
2327 (maintenance_check_psymtabs): Update.
2328 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2330 (scan_xcoff_symtab): Update.
2334 * psympriv.h (struct partial_symbol) <unrelocated_address,
2335 address, set_address>: New methods.
2336 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2337 (fixup_psymbol_section, relocate_psymtabs): Update.
2338 (print_partial_symbols): Add 'objfile' parameter. Update.
2339 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2344 * dwarf-index-write.c (write_psymbols, debug_names::insert)
2345 (debug_names::write_psymbols): Update.
2346 * psympriv.h (struct partial_symbol): Derive from
2347 general_symbol_info.
2348 <obj_section>: New method.
2349 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2350 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2351 (find_pc_sect_psymbol, fixup_psymbol_section)
2352 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2353 (print_partial_symbols, recursively_search_psymtabs)
2354 (compare_psymbols, psymbol_hash, psymbol_compare)
2355 (add_psymbol_to_bcache, maintenance_check_psymtabs)
2356 (psymbol_name_matches, psym_fill_psymbol_map): Update.
2360 * dbxread.c (end_psymtab): Remove dead code.
2364 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2365 DWARF unwinders are disabled.
2366 * dwarf2-frame.c: Add dwarf2read.h include.
2367 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2369 (dwarf2_frame_unwinders_enabled_p): Define.
2370 (show_dwarf_unwinders_enabled_p): New function.
2371 (_initialize_dwarf2_frame): Register switch to control DWARF
2373 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2374 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2375 (show_dwarf_cmdlist): Remove static keyword.
2376 * dwarf2read.h (set_dwarf_cmdlist): Declare.
2377 (show_dwarf_cmdlist): Declare.
2378 * NEWS: Document new feature.
2382 PR breakpoints/23366
2383 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2387 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2388 DW_AT_count can't be translated to a dynamic prop.
2392 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2397 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2401 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2406 * dwarf2read.c (dw2_add_symbol_to_list): New function.
2407 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2408 instead of add_symbol_to_list.
2409 (read_file_scope): Call prepare_one_comp_unit before reading
2414 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2418 * utils.c (malloc, realloc, free): Don't declare.
2419 * configure, config.in: Rebuild.
2420 * configure.ac: Don't check for declarations of free, malloc, or
2425 * aarch64-linux-nat.c
2426 (aarch64_linux_nat_target::stopped_data_address): Remove unused
2428 * arm-linux-nat.c (fetch_regs): Likewise.
2429 (store_regs): Likewise.
2430 (fetch_vfp_regs): Likewise.
2431 (store_vfp_regs): Likewise.
2432 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2433 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2434 (arm_linux_nat_target::insert_watchpoint): Likewise.
2435 (arm_linux_nat_target::remove_watchpoint): Likewise.
2436 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2438 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2440 * ppc-linux-nat.c (fetch_register): Likewise.
2441 (fetch_all_gp_regs): Likewise.
2442 (fetch_ppc_registers): Likewise.
2443 (store_all_gp_regs): Likewise.
2444 (store_ppc_registers): Likewise.
2445 (hwdebug_insert_point): Likewise.
2446 (can_use_watchpoint_cond_accel): Likewise.
2447 * remote-sim.c (gdb_os_write_stdout): Likewise.
2452 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2454 * configure: Rebuild.
2458 * regformats/regdat.sh: Define xmltarget_${name} inside
2459 #ifndef IN_PROCESS_AGENT.
2463 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2467 * symfile.c (reread_symbols): Notify iter, not objfile.
2471 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2473 (ravenscar_thread_target::prepare_to_store): Likewise.
2477 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2478 unused variable. Call value_fetch_lazy when needed.
2479 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2480 Remove unused variable. Call value_fetch_lazy when needed.
2484 * m32c-tdep.c (mark_dma): Return void.
2485 (make_regs): Remove unused declarations.
2489 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2490 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2491 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2492 bkscm_get_valid_block_smob_arg_unsafe for effect.
2496 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2501 * windows-nat.c (saved_context): Conditionally define.
2502 * remote.c (remote_target::remote_btrace_maybe_reopen):
2503 Conditionally declare "warned".
2504 * inflow.c (sigquit_ours): Conditionally define.
2505 (new_tty): Move "tty" declaration inside #if.
2506 * guile/guile.c (guile_datadir): Conditionally define.
2507 * charset.c (set_be_le_names): Move some declarations inside #if.
2508 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2510 (parse_xml_btrace_conf): Likewise.
2514 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2518 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2519 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2520 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2521 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2522 * stack.c (frame_apply_level_command): Remove unused variable.
2523 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2524 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2525 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2527 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2528 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2529 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2531 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2532 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2534 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2535 Remove unused variable.
2536 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2538 * common/tdesc.c (print_xml_feature::visit): Remove unused
2540 * compile/compile-object-load.c (store_regs): Remove unused
2542 * complaints.c (clear_complaints): Remove unused variable.
2543 * corelow.c (core_target_open): Remove unused variable.
2544 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2546 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2548 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2550 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2552 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2554 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2556 * ia64-tdep.c (examine_prologue): Remove unused variable.
2557 * infcall.c (run_inferior_call): Remove unused variable.
2558 * inferior.c (exit_inferior): Remove unused variable.
2559 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2560 * linespec.c (decode_line_2): Remove unused variable.
2561 * linux-nat.c (super_close): Remove.
2562 * linux-tdep.c (linux_info_proc): Remove unused variable.
2563 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2564 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2565 Remove unused variable.
2566 * parse.c (find_minsym_type_and_address): Remove unused variable.
2567 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2569 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2571 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2573 * record-btrace.c (record_btrace_target::store_registers): Remove
2575 (cmd_show_record_btrace_cpu): Remove unused variable.
2576 * riscv-tdep.c (riscv_register_reggroup_p)
2577 (riscv_push_dummy_call, riscv_return_value): Remove unused
2579 * rust-exp.y (literal): Remove unused variable.
2580 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2582 <STRUCTOP_ANONYMOUS>: Likewise.
2583 * s390-linux-tdep.c (s390_linux_init_abi_31)
2584 (s390_linux_init_abi_64): Remove unused variable.
2585 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2586 (file_select_thread, net_windows_open, _initialize_ser_windows):
2587 Remove unused variables.
2588 * symtab.c (find_pc_sect_line): Remove unused variable.
2589 * target-memory.c (compute_garbled_blocks): Remove unused
2591 (target_write_memory_blocks): Remove unused variable.
2592 * target.c (target_stack::unpush): Remove unused variables.
2593 * tracepoint.c (start_tracing, all_tracepoint_actions)
2594 (merge_uploaded_trace_state_variables)
2595 (print_one_static_tracepoint_marker): Remove unused variable.
2596 * unittests/basic_string_view/element_access/char/1.cc (test01):
2597 Remove unused variable.
2598 * windows-nat.c (windows_continue, windows_add_all_dlls)
2599 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2600 Remove unused variables.
2604 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2605 attr_profile in HAVE_ELF.
2606 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2611 * frame.c (frame_register_unwind): Change parameter name.
2612 (frame_unwind_register): Likewise.
2613 (frame_unwind_register_value): Likewise.
2614 (frame_unwind_register_signed): Likewise.
2615 (frame_unwind_register_unsigned): Likewise.
2616 * frame.h (frame_register_unwind): Likewise.
2617 (frame_unwind_register): Likewise.
2618 (frame_unwind_register_value): Likewise.
2619 (frame_unwind_register_signed): Likewise.
2620 (frame_unwind_register_unsigned): Likewise.
2621 (frame_unwind_arch): Likewise.
2625 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2630 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2631 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2636 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2637 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2638 m_compunit_symtab, m_language>: Add "m_" prefix.
2640 * buildsym.c: Update all uses.
2644 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2645 * buildsym.h (record_line_ftype): Remove typedef.
2649 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2650 (end_expandable_symtab): Likewise.
2651 (end_symtab_get_static_block): Likewise.
2652 (end_symtab_from_static_block): Likewise.
2653 * buildsym-legacy.c (augment_type_symtab): Remove.
2654 (end_expandable_symtab): Remove.
2655 (end_symtab_get_static_block): Remove.
2656 (end_symtab_from_static_block): Remove.
2660 * dwarf2read.c: Include buildsym.h.
2661 (struct dwarf2_cu) <builder>: New method.
2662 (fixup_go_packaging): Update.
2663 (process_full_comp_unit, process_full_type_unit): Update. Don't
2664 use scoped_free_pendings.
2665 (using_directives): Add "cu" parameter, remove "language".
2666 (read_import_statement, setup_type_unit_groups, )
2667 (read_func_scope, read_lexical_block_scope)
2668 (dwarf2_record_block_ranges, read_namespace): Update.
2669 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2670 (lnp_state_machine::handle_end_sequence): Update.
2671 (class lnp_state_machine) <m_cu>: New member.
2672 <m_record_line_callback>: Remove.
2673 <m_currently_recording_lines>: New member.
2674 (lnp_state_machine::handle_set_file): Update.
2675 (noop_record_line): Remove.
2676 (dwarf_record_line_p): Add cu parameter.
2677 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2678 (lnp_state_machine::record_line)
2679 (lnp_state_machine::lnp_state_machine)
2680 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2681 (dwarf_decode_lines): Update.
2682 (dwarf2_start_subfile): Add cu parameter.
2683 (dwarf2_start_symtab, new_symbol): Update.
2684 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2685 Remove dwarf2_per_objfile parameter.
2686 (dwarf_decode_macros): Update.
2690 * stabsread.c (define_symbol): Update.
2691 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2692 * dwarf2read.c (new_symbol): Update.
2693 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2694 * cp-namespace.c: Include buildsym.h.
2695 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2696 * buildsym-legacy.c (get_buildsym_compunit): New function.
2700 * xcoffread.c: Include buildsym-legacy.h.
2701 * windows-nat.c: Include buildsym-legacy.h.
2702 * stabsread.c: Include buildsym-legacy.h.
2703 * mdebugread.c: Include buildsym-legacy.h.
2704 * buildsym-legacy.h: New file.
2705 * buildsym-legacy.c: New file, from buildsym.c.
2706 * go32-nat.c: Include buildsym-legacy.h.
2707 * dwarf2read.c: Include buildsym-legacy.h.
2708 * dbxread.c: Include buildsym-legacy.h.
2709 * cp-namespace.c: Include buildsym-legacy.h.
2710 * coffread.c: Include buildsym-legacy.h.
2711 * buildsym.h: Move some contents to buildsym-legacy.h.
2712 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2714 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2718 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2719 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2720 (buildsym_compunit::buildsym_compunit)
2721 (buildsym_compunit::~buildsym_compunit)
2722 (buildsym_compunit::get_macro_table): Define.
2726 * buildsym.c (reset_symtab_globals): Remove.
2727 (buildsym_compunit::end_symtab_from_static_block): Update.
2728 (buildsym_compunit::augment_type_symtab): Update.
2729 (end_symtab_from_static_block): Call free_buildsym_compunit.
2730 (augment_type_symtab, end_symtab, end_expandable_symtab):
2735 * arch-utils.c: Do not include buildsym.h.
2736 * mipsread.c: Do not include buildsym.h.
2737 * machoread.c: Do not include buildsym.h.
2738 * elfread.c: Do not include buildsym.h.
2742 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2744 (buildsym_compunit): Add new constructor.
2745 (struct buildsym_compunit) <get_last_source_file, finish_block,
2746 record_block_range, start_subfile, patch_subfile_names,
2747 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2748 set_last_source_start_addr, get_last_source_start_addr,
2749 get_local_using_directives, set_local_using_directives,
2750 get_global_using_directives, outermost_context_p,
2751 get_current_context_stack, get_context_stack_depth,
2752 get_current_subfile, get_local_symbols, get_file_symbols,
2753 get_global_symbols, record_debugformat, record_producer,
2754 push_context, pop_context, end_symtab_get_static_block,
2755 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2757 <record_pending_block, finish_block_internal, make_blockvector,
2758 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2764 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2766 (finish_block_internal): Update.
2770 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2772 (finish_block_internal): Update.
2776 * buildsym.h (EXTERN): Don't define or undef.
2777 * buildsym.c (EXTERN): Don't define.
2781 * buildsym.c: Remove TODO comment.
2785 * coffread.c (coff_symtab_read): Update.
2786 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2787 (xcoff_new_init): Update.
2788 * mipsread.c (mipscoff_new_init): Update.
2789 * mdebugread.c (mdebug_build_psymtabs): Update.
2790 * elfread.c (elf_new_init): Update.
2791 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2793 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2794 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2795 (stabsect_build_psymtabs): Update.
2796 * buildsym.h (buildsym_init): Don't declare.
2797 * buildsym.c: Update comment.
2798 (prepare_for_building): Remove.
2799 (start_symtab, restart_symtab): Update.
2800 (reset_symtab_globals): Update comment.
2801 (buildsym_init): Remove.
2805 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2806 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2807 (read_enum_type, common_block_start, common_block_end)
2808 (cleanup_undefined_types_1, finish_global_stabs): Update.
2809 * mdebugread.c (psymtab_to_symtab_1): Update.
2810 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2811 (read_lexical_block_scope, new_symbol): Update.
2812 * dbxread.c (process_one_symbol): Update.
2813 * coffread.c (coff_symtab_read, process_coff_symbol)
2814 (coff_read_enum_type): Update.
2815 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2817 (get_local_symbols, get_file_symbols, get_global_symbols): New
2819 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2821 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2822 (~scoped_free_pendings): Update.
2823 (finish_block, prepare_for_building, reset_symtab_globals)
2824 (end_symtab_get_static_block, end_symtab_with_blockvector)
2825 (augment_type_symtab, push_context): Update.
2826 (get_local_symbols, get_file_symbols, get_global_symbols): New
2828 (buildsym_init): Update.
2832 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2833 (process_full_type_unit): Likewise.
2834 (dwarf2_start_symtab): Set list_in_scope.
2838 * dwarf2read.c (process_psymtab_comp_unit_reader)
2839 (build_type_psymtabs_reader): Do not set list_in_scope.
2843 * buildsym.c (free_pendings): Remove.
2844 (add_symbol_to_list, scoped_free_pendings)
2845 (finish_block_internal, buildsym_init): Update.
2849 * xcoffread.c (read_xcoff_symtab): Update.
2850 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2852 * dbxread.c (process_one_symbol): Update.
2853 * coffread.c (coff_symtab_read): Update.
2854 * buildsym.h (finish_block): Update.
2855 * buildsym.c (finish_block): Remove "listhead" argument.
2856 (end_symtab_get_static_block): Update.
2860 * buildsym.h (class scoped_free_pendings): Remove constructor.
2861 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2863 <m_pending_block_obstack, m_pending_blocks>: New members.
2864 (pending_block_obstack, pending_blocks): Remove.
2865 (scoped_free_pendings::scoped_free_pendings): Default.
2866 (~scoped_free_pendings): Update.
2867 (free_pending_blocks): Remove.
2868 (finish_block_internal, record_pending_block, make_blockvector)
2869 (end_symtab_get_static_block, augment_type_symtab, push_context)
2870 (buildsym_init): Update.
2874 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2875 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2877 (pending_addrmap, pending_addrmap_obstack)
2878 (pending_addrmap_interesting): Remove.
2879 (scoped_free_pendings, record_block_range, make_blockvector)
2880 (prepare_for_building, reset_symtab_globals, buildsym_init):
2885 * xcoffread.c (process_linenos): Update.
2886 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2887 * mdebugread.c (psymtab_to_symtab_1): Update.
2888 * dwarf2read.c (setup_type_unit_groups)
2889 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2890 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2891 * dbxread.c (process_one_symbol): Update.
2892 * coffread.c (coff_symtab_read, enter_linenos)
2893 (process_coff_symbol): Update.
2894 * buildsym.h (current_subfile): Don't declare.
2895 (get_current_subfile): Declare.
2896 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2898 (start_subfile, free_buildsym_compunit, push_subfile)
2899 (prepare_for_building, start_symtab): Update.
2900 (get_current_subfile): New function.
2904 * coffread.c (coff_symtab_read): Update.
2905 * xcoffread.c (read_xcoff_symtab): Update.
2906 * dwarf2read.c (new_symbol): Update.
2907 (read_func_scope, read_lexical_block_scope): Update.
2908 * dbxread.c (process_one_symbol): Update.
2909 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2910 (outermost_context_p): Remove macro.
2911 (outermost_context_p, get_current_context_stack)
2912 (get_context_stack_depth): Declare.
2913 (pop_context): Return struct context_stack.
2914 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2916 (context_stack_size): Remove.
2917 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2918 (prepare_for_building, end_symtab_get_static_block)
2919 (augment_type_symtab, push_context): Update.
2920 (pop_context): Return struct context_stack.
2921 (outermost_context_p, get_current_context_stack)
2922 (get_context_stack_depth): New functions.
2923 (buildsym_init): Update.
2927 * rust-exp.y: Now a pure parser. Update all rules.
2928 (%union): Move earlier.
2929 (current_parser, work_obstack): Remove globals.
2930 (rust_parser, ~rust_parser): Update.
2931 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2932 lex_character, lex_number, lex_string, lex_identifier,
2933 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2934 convert_name, convert_params_to_expression,
2935 convert_ast_to_expression, ast_basic_type, ast_operation,
2936 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2937 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2938 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2939 ast_array_type, ast_slice_type, ast_reference_type,
2940 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2941 (rust_parse): Update.
2942 (rustyyerror, rustyylex): Add parser parameter.
2943 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2944 (rust_lex_stringish_test, rust_lex_test_sequence)
2945 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2946 (rust_lex_test_push_back, rust_lex_tests): Update.
2950 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2951 gdb::unique_xmalloc_ptr.
2952 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2953 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2954 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2955 copy-initialization.
2956 * guile/scm-pretty-print.c (ppscm_print_children): Use
2957 gdb::unique_xmalloc_ptr instead of cleanups.
2958 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2959 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2960 gdb::unique_xmalloc_ptr.
2961 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2962 Adjust to use gdb::unique_xmalloc_ptr.
2963 * guile/scm-utils.c (extract_arg): Adjust.
2964 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2965 gdb::unique_xmalloc_ptr instead of a cleanup.
2969 * utils.c (do_value_free_to_mark)
2970 (make_cleanup_value_free_to_mark): Remove.
2971 * utils.h (make_cleanup_value_free_to_mark): Remove.
2975 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2976 forwarding reference.
2980 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2981 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2986 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2988 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2990 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2991 directly instead of a cleanup.
2992 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2993 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2994 (vlscm_binop_gdbthrow): New, factored out from ...
2995 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2996 (vlscm_rich_compare): Use gdbscm_wrap.
2997 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2998 instead of a cleanup.
2999 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3001 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3002 Use xfree directly instead of a cleanup.
3003 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3004 Adjust to use gdbscm_wrap and scoped_value_mark.
3005 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3006 (gdbscm_value_address, gdbscm_value_dereference)
3007 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3009 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3010 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3012 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3013 gdbscm_wrap and scoped_value_mark.
3014 (gdbscm_value_to_string): Use xfree directly instead of a
3015 cleanup. Move 'buffer' unique_ptr to TRY scope.
3016 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3017 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3019 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3020 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3022 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3027 * findvar.c (default_read_var_value): Also resolve dynamic type for
3028 LOC_OPTIMIZED_OUT vars.
3032 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3037 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3038 (compute_enum_list, pascm_set_param_value_x)
3039 (gdbscm_parameter_value): Update.
3040 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3041 (gdbscm_scm_to_host_string): Update.
3042 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3044 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3045 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3046 * guile/scm-string.c (gdbscm_scm_to_string): Return
3048 (gdbscm_scm_to_host_string): Likewise.
3052 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3053 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3054 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3055 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3060 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3061 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3063 * guile/scm-cmd.c (cmdscm_function): Update.
3064 * guile/scm-pretty-print.c
3065 (ppscm_print_exception_unless_memory_error): Update.
3066 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3067 Return unique_xmalloc_ptr.
3071 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3076 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3077 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3078 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3079 unecessary braces after EF_RISCV_RVC test. Delete call to
3080 set_gdbarch_decr_pc_after_break.
3082 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3083 RISCV_LAST_FP_REGNUM + 1.
3084 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3088 * configure.ac: Remove --disable-gdbcli.
3089 * configure: Rebuild.
3090 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3091 (SUBDIR_CLI_CFLAGS): Remove.
3092 (SFILES): Use SUBDIR_CLI_SRCS.
3093 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3098 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3102 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3106 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3108 (libunwind_frame_sniffer): Likewise.
3109 (libunwind_frame_prev_register): Likewise.
3110 (libunwind_sigtramp_frame_sniffer): Likewise.
3111 * ia64-tdep.c (ia64_access_reg): Likewise.
3112 (ia64_access_rse_reg): Likewise.
3113 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3114 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3118 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3122 * remote-sim.c (gdbsim_target::close,
3123 gdbsim_target::mourn_inferior): Remove unused variables.
3127 * ia64-tdep.c (ktab_buf): New global.
3128 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3129 (get_kernel_table): Adjust.
3133 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3134 * dwarf2read.c (using_directives, new_symbol): Use
3135 outermost_context_p.
3136 * dbxread.c (process_one_symbol): Use outermost_context_p.
3137 * coffread.c (coff_symtab_read): Use outermost_context_p.
3141 * dwarf2read.c (using_directives, read_func_scope)
3142 (read_lexical_block_scope): Update.
3143 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3144 * buildsym.h (local_using_directives, global_using_directives):
3146 (get_local_using_directives, set_local_using_directives)
3147 (get_global_using_directives): Declare.
3148 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3149 m_global_using_directives>: New members.
3150 (finish_block_internal, prepare_for_building)
3151 (reset_symtab_globals, end_symtab_get_static_block)
3152 (push_context): Update.
3153 (get_local_using_directives, set_local_using_directives)
3154 (get_global_using_directives): New functions.
3155 (buildsym_init): Update.
3159 * xcoffread.c (xcoff_initial_scan): Don't call
3160 free_pending_blocks.
3161 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3162 * buildsym.h (class scoped_free_pendings): Add constructor.
3163 (free_pending_blocks): Don't declare.
3164 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3165 (free_pending_blocks): Now static.
3169 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3170 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3172 (struct subfile_stack): Remove.
3173 (subfile_stack): Remove.
3174 (push_subfile, pop_subfile, buildsym_init): Update.
3178 * buildsym.c (push_subfile): Use gdb_assert.
3179 (pop_subfile): Use gdb_assert.
3183 * buildsym.h (merge_symbol_lists): Remove.
3184 * buildsym.c (merge_symbol_lists): Remove.
3188 * stabsread.c (scan_file_globals): Update comment.
3189 * stabsread.h (scan_file_globals): Move from buildsym.h.
3190 * buildsym.h (scan_file_globals): Move to stabsread.h.
3194 * xcoffread.c (xcoff_new_init): Update.
3195 * mipsread.c (mipscoff_new_init): Update.
3196 * mdebugread.c (mdebug_build_psymtabs): Update.
3197 * elfread.c (elf_new_init): Update.
3198 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3199 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3200 * buildsym.h (buildsym_new_init): Don't declare.
3201 * buildsym.c (buildsym_new_init): Remove.
3205 * stabsread.h (within_function): Move from buildsym.h.
3206 * stabsread.c (start_stabs): Clear within_function.
3207 * coffread.c (coff_start_symtab): Clear within_function.
3208 * buildsym.h (within_function): Move to stabsread.h.
3209 * buildsym.c (prepare_for_building): Update.
3213 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3214 * dwarf2read.c (dwarf2_start_symtab): Don't set
3215 processing_gcc_compilation.
3216 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3220 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3221 (next_symbol_text_func): Move from buildsym.h.
3222 * stabsread.c (hashname): Move from buildsym.c.
3223 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3224 (next_symbol_text_func, hashname): Move to stabsread.h.
3225 * buildsym.c: Don't include bcache.h
3226 (hashname): Move to stasbread.c.
3230 * buildsym.h (context_stack_size): Don't declare.
3231 * buildsym.c (context_stack_size): New global.
3235 * dbxread.c (processing_acc_compilation): New global.
3236 * buildsym.h (processing_acc_compilation): Don't declare.
3240 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3241 * dbxread.c (read_ofile_symtab): Update.
3242 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3243 * buildsym.h (last_source_start_addr): Remove.
3244 (set_last_source_start_addr, get_last_source_start_addr):
3246 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3248 (struct buildsym_compunit) <m_last_source_start_addr>: New
3250 (prepare_for_building): Remove start_addr parameter.
3251 (start_symtab, restart_symtab, end_symtab_get_static_block)
3252 (end_symtab_with_blockvector): Update.
3253 (set_last_source_start_addr, get_last_source_start_addr): New
3258 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3260 (have_line_numbers): Remove.
3261 (record_line, prepare_for_building, end_symtab_get_static_block)
3262 (augment_type_symtab): Update.
3266 * buildsym.c (~buildsym_compunit): Free the macro table.
3267 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3269 <m_pending_macros>: New member.
3270 (pending_macros): Remove.
3271 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3272 (reset_symtab_globals, end_symtab_get_static_block)
3273 (end_symtab_with_blockvector, augment_type_symtab)
3274 (buildsym_init): Update.
3278 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3280 (buildsym_compunit::set_last_source_file): New method.
3281 <m_last_source_file>: New member.
3282 (prepare_for_building): Remove "name" parameter.
3283 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3284 (last_source_file): Remove.
3285 (set_last_source_file, get_last_source_file): Update.
3289 * buildsym.c (prepare_for_building): Add assert.
3293 * buildsym.c (~buildsym_compunit): Update.
3294 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3295 (start_subfile, patch_subfile_names)
3296 (end_symtab_with_blockvector): Update.
3300 * buildsym.c (struct buildsym_compunit): Add constructor,
3301 destructor, initializers.
3302 (start_buildsym_compunit): Remove.
3303 (free_buildsym_compunit): Use "delete".
3304 (start_symtab, restart_symtab): Use "new".
3308 * symfile.c (set_objfile_default_section_offset): Remove struct
3313 * (Responsible Maintainers): Add myself as or1k maintainer.
3317 * symfile.c (set_objfile_default_section_offset): Use extra braces
3322 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3327 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3328 unittests/cli-utils-selftests.c
3329 * unittests/cli-utils-selftests.c: New file.
3333 * NEWS: Mention new commands. Mention change to 'thread apply'.
3337 * thread.c (thr_try_catch_cmd): New function.
3338 (thread_apply_all_command): Handle qcs flags.
3339 (thread_apply_command): Handle qcs flags.
3340 (taas_command): New function.
3341 (tfaas_command): New function.
3342 (_initialize_thread): Update to setup the new commands 'taas
3343 and 'tfaas'. Change doc string for 'thread apply'.
3347 * stack.c: (trailing_outermost_frame): New function, mostly
3348 extracted from backtrace_command_1.
3349 (leading_innermost_frame): New function.
3350 (backtrace_command_1): Update to call trailing_outermost_frame.
3351 (frame_apply_command_count): New function.
3352 (frame_apply_level_command): New function.
3353 (frame_apply_all_command): New function.
3354 (frame_apply_command): New function.
3355 (faas_command): New function.
3356 (frame_cmd_list): New variable.
3357 (_initialize_stack): Update to setup the new commands 'frame apply'
3362 * cli-utils.c (number_or_range_parser::get_number): Only handle
3363 numbers or convenience var as numbers.
3364 (parse_flags): New function.
3365 (parse_flags_qcs): New function.
3366 (number_or_range_parser::finished): Ensure parsing end is detected
3367 before end of string.
3368 * cli-utils.h (parse_flags): New function.
3369 (parse_flags_qcs): New function.
3370 (number_or_range_parser): Remove m_finished bool.
3371 (number_or_range_parser::skip_range): Set m_in_range to false.
3375 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3384 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3385 'unittests/parse-connection-spec-selftests.c'.
3386 (COMMON_SFILES): Add 'common/netstuff.c'.
3387 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3388 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3389 * common/netstuff.c: New file.
3390 * common/netstuff.h: New file.
3391 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3392 (wait_for_connect): Update comment. New parameter
3393 'gdb::optional<int> sock' instead of 'struct serial *scb'.
3394 Use 'sock' directly instead of 'scb->fd'.
3395 (try_connect): New function, with code from 'net_open'.
3396 (net_open): Rewrite main loop to deal with multiple
3397 sockets/addresses. Handle IPv6-style hostnames; implement
3398 support for IPv6 connections.
3399 * unittests/parse-connection-spec-selftests.c: New file.
3404 * remote.c (remote_target::remote_detach_pid): Call
3405 set_current_process.
3409 * h8300-tdep.c (h8300_gdbarch_init): Remove
3410 set_gdbarch_ecoff_reg_to_regnum calls.
3415 * c-typeprint.c (c_type_print_base_struct_union): Don't print
3416 offsets/sizes for static members of a class/struct.
3420 * target-descriptions.c (tdesc_register_bitsize): Rename.
3421 * target-descriptions.h (tdesc_register_bitsize): Likewise.
3422 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3423 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3427 * breakpoint.c (moribund_locations): Now static and a
3429 (breakpoint_init_inferior, moribund_breakpoint_here_p)
3430 (build_bpstat_chain, update_global_location_list)
3431 (breakpoint_retire_moribund): Update.
3432 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
3437 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3438 (riscv_register_reggroup_p): Use new function, remove unneeded
3440 (riscv_push_dummy_call): Extend assert to compare against xlen or
3441 flen based on register type.
3445 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3449 * remote.c (show_hardware_watchpoint_limit): New function.
3450 (show_hardware_watchpoint_length_limit): New function.
3451 (show_hardware_breakpoint_limit): New function.
3452 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3453 where appropriate, update help text.
3457 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3458 (CLIBS): Don't mention NAT_CLIBS.
3462 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3463 (LIBGDB_OBS, clean mostlyclean): Update.
3464 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3468 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3469 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3470 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3474 * Makefile.in (ALLDEPFILES): Remove exec.c.
3475 (COMMON_OBS): Remove exec.o.
3476 (COMMON_SFILES): Add exec.c.
3480 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3484 * Makefile.in (clean mostlyclean): Remove stamp-version.
3485 (version.c): Depend on stamp-version.
3486 (stamp-version): New rule, from version.c rule.
3490 * Makefile.in (init.c): Depend on stamp-init.
3491 (stamp-init): New rule, from init.c rule.
3492 (clean mostlyclean): Remove stamp-init.
3496 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3497 SUBDIR_GCC_COMPILE_SRCS.
3501 * Makefile.in (init.c): Remove some unused sed rules.
3505 * Makefile.in (TSOBS): Remove.
3506 (INIT_FILES): Update.
3507 (LIBGDB_OBS): Update.
3508 (COMMON_SFILES): Add inflow.c.
3509 (SFILES): Remove inflow.c.
3513 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3517 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3518 get_saveloc_name, is_signal_frame_name, step_name,
3519 init_remote_name, create_addr_space_name,
3520 destroy_addr_space_name, search_unwind_table_name,
3521 find_dyn_list_name): Constify.
3525 * darwin-nat.c (darwin_pthread_kill): New function.
3526 (darwin_resume_thread): Use darwin_pthread_kill.
3530 * macroexp.c (macro_buffer) <operator=>: New member function.
3534 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3538 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3539 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3540 * maint.c: Likewise.
3545 * NEWS: Create a new section for the next release branch.
3546 Rename the section of the current branch, now that it has
3551 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3552 * version.in: Bump version to 8.2.50.DATE-git.
3557 * linux-nat.c (linux_init_ptrace): Rename to ...
3558 (linux_init_ptrace_procfs): ... this. Call
3559 linux_proc_init_warnings.
3560 (linux_nat_target::post_attach)
3561 (linux_nat_target::post_startup_inferior): Adjust.
3562 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3563 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3567 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3569 (read_comp_unit_head): ... here.
3573 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3574 (stop_tracing, tstatus_command)
3575 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3576 (print_one_static_tracepoint_marker): Update.
3577 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3579 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3581 (all_tracepoints, static_tracepoints_here): Return std::vector.
3585 * common/ptid.c (ptid_equal): Remove.
3586 * common/ptid.h (ptid_equal): Don't declare.
3587 * ada-tasks.c: Update.
3588 * breakpoint.c: Update.
3589 * common/agent.c: Update.
3590 * corelow.c: Update.
3591 * darwin-nat-info.c: Update.
3592 * darwin-nat.c: Update.
3594 * dtrace-probe.c: Update.
3595 * dummy-frame.c: Update.
3596 * fbsd-nat.c: Update.
3598 * gdbthread.h: Update.
3599 * gnu-nat.c: Update.
3600 * go32-nat.c: Update.
3601 * inf-loop.c: Update.
3602 * inf-ptrace.c: Update.
3603 * infcall.c: Update.
3607 * linux-fork.c: Update.
3608 * linux-nat.c: Update.
3609 * linux-thread-db.c: Update.
3610 * mi/mi-cmd-var.c: Update.
3611 * mi/mi-interp.c: Update.
3612 * mi/mi-main.c: Update.
3613 * nto-procfs.c: Update.
3614 * ppc-linux-tdep.c: Update.
3616 * python/py-inferior.c: Update.
3617 * python/py-record-btrace.c: Update.
3618 * python/py-record.c: Update.
3619 * ravenscar-thread.c: Update.
3620 * regcache.c: Update.
3621 * remote-sim.c: Update.
3623 * sol-thread.c: Update.
3626 * tui/tui-stack.c: Update.
3628 * windows-nat.c: Update.
3629 * windows-tdep.c: Update.
3633 * common/ptid.c (ptid_match): Remove.
3634 * common/ptid.h (ptid_match): Don't declare.
3635 * fbsd-nat.c: Update.
3638 * linux-nat.c: Update.
3639 * record-btrace.c: Update.
3640 * regcache.c: Update.
3645 * common/ptid.c (ptid_tid_p): Remove.
3646 * common/ptid.h (ptid_tid_p): Don't declare.
3647 * sol-thread.c: Update.
3651 * common/ptid.c (ptid_lwp_p): Remove.
3652 * common/ptid.h (ptid_lwp_p): Don't declare.
3653 * fbsd-nat.c: Update.
3654 * linux-nat.c: Update.
3655 * nat/linux-procfs.c: Update.
3656 * nat/x86-linux-dregs.c: Update.
3657 * sol-thread.c: Update.
3661 * common/ptid.c (ptid_is_pid): Remove.
3662 * common/ptid.h (ptid_is_pid): Don't declare.
3664 * linux-nat.c: Update.
3665 * mi/mi-interp.c: Update.
3671 * common/ptid.c (ptid_get_tid): Remove.
3672 * common/ptid.h (ptid_get_tid): Don't declare.
3673 * ada-tasks.c: Update.
3674 * aix-thread.c: Update.
3675 * bsd-uthread.c: Update.
3676 * darwin-nat.c: Update.
3677 * fbsd-nat.c: Update.
3678 * i386-darwin-nat.c: Update.
3680 * linux-tdep.c: Update.
3681 * nto-procfs.c: Update.
3682 * ppc-ravenscar-thread.c: Update.
3683 * python/py-infthread.c: Update.
3684 * ravenscar-thread.c: Update.
3685 * sol-thread.c: Update.
3686 * sparc-ravenscar-thread.c: Update.
3687 * windows-nat.c: Update.
3691 * common/ptid.c (ptid_get_lwp): Remove.
3692 * common/ptid.h (ptid_get_lwp): Don't declare.
3693 * aarch64-linux-nat.c: Update.
3694 * ada-tasks.c: Update.
3695 * aix-thread.c: Update.
3696 * amd64-linux-nat.c: Update.
3697 * arm-linux-nat.c: Update.
3698 * corelow.c: Update.
3699 * fbsd-nat.c: Update.
3700 * fbsd-tdep.c: Update.
3701 * gnu-nat.c: Update.
3702 * i386-cygwin-tdep.c: Update.
3703 * i386-gnu-nat.c: Update.
3704 * i386-linux-nat.c: Update.
3705 * ia64-linux-nat.c: Update.
3706 * inf-ptrace.c: Update.
3708 * linux-fork.c: Update.
3709 * linux-nat.c: Update.
3710 * linux-tdep.c: Update.
3711 * linux-thread-db.c: Update.
3712 * mips-linux-nat.c: Update.
3713 * nat/aarch64-linux-hw-point.c: Update.
3714 * nat/aarch64-linux.c: Update.
3715 * nat/linux-btrace.c: Update.
3716 * nat/linux-osdata.c: Update.
3717 * nat/linux-procfs.c: Update.
3718 * nat/x86-linux-dregs.c: Update.
3719 * obsd-nat.c: Update.
3720 * ppc-fbsd-nat.c: Update.
3721 * ppc-linux-nat.c: Update.
3723 * python/py-infthread.c: Update.
3724 * ravenscar-thread.c: Update.
3726 * s390-linux-nat.c: Update.
3727 * sol-thread.c: Update.
3728 * sol2-tdep.c: Update.
3729 * spu-linux-nat.c: Update.
3730 * x86-linux-nat.c: Update.
3731 * xtensa-linux-nat.c: Update.
3735 * common/ptid.c (ptid_get_pid): Remove.
3736 * common/ptid.h (ptid_get_pid): Don't declare.
3737 * aarch64-linux-nat.c: Update.
3738 * ada-lang.c: Update.
3739 * aix-thread.c: Update.
3740 * alpha-bsd-nat.c: Update.
3741 * amd64-fbsd-nat.c: Update.
3742 * amd64-linux-nat.c: Update.
3743 * arm-linux-nat.c: Update.
3744 * arm-nbsd-nat.c: Update.
3746 * break-catch-syscall.c: Update.
3747 * breakpoint.c: Update.
3748 * bsd-uthread.c: Update.
3749 * corelow.c: Update.
3751 * darwin-nat.c: Update.
3752 * fbsd-nat.c: Update.
3753 * fbsd-tdep.c: Update.
3755 * gnu-nat.c: Update.
3756 * hppa-nbsd-nat.c: Update.
3757 * hppa-obsd-nat.c: Update.
3758 * i386-fbsd-nat.c: Update.
3759 * ia64-linux-nat.c: Update.
3760 * inf-ptrace.c: Update.
3762 * inferior.c: Update.
3763 * inferior.h: Update.
3766 * linux-fork.c: Update.
3767 * linux-nat.c: Update.
3768 * linux-tdep.c: Update.
3769 * linux-thread-db.c: Update.
3770 * m68k-bsd-nat.c: Update.
3771 * mi/mi-interp.c: Update.
3772 * mi/mi-main.c: Update.
3773 * mips-linux-nat.c: Update.
3774 * mips-nbsd-nat.c: Update.
3775 * mips64-obsd-nat.c: Update.
3776 * nat/aarch64-linux-hw-point.c: Update.
3777 * nat/aarch64-linux.c: Update.
3778 * nat/linux-btrace.c: Update.
3779 * nat/linux-osdata.c: Update.
3780 * nat/linux-procfs.c: Update.
3781 * nat/x86-linux-dregs.c: Update.
3782 * nto-procfs.c: Update.
3783 * obsd-nat.c: Update.
3784 * ppc-linux-nat.c: Update.
3785 * ppc-nbsd-nat.c: Update.
3786 * ppc-obsd-nat.c: Update.
3787 * proc-service.c: Update.
3789 * python/py-inferior.c: Update.
3790 * python/py-infthread.c: Update.
3791 * ravenscar-thread.c: Update.
3793 * remote-sim.c: Update.
3795 * rs6000-nat.c: Update.
3796 * s390-linux-nat.c: Update.
3797 * sh-nbsd-nat.c: Update.
3798 * sol-thread.c: Update.
3799 * sparc-nat.c: Update.
3800 * sparc64-tdep.c: Update.
3801 * spu-linux-nat.c: Update.
3802 * spu-tdep.c: Update.
3803 * target-debug.h: Update.
3806 * tid-parse.c: Update.
3807 * tracefile-tfile.c: Update.
3808 * vax-bsd-nat.c: Update.
3809 * windows-nat.c: Update.
3810 * x86-linux-nat.c: Update.
3811 * x86-nat.c: Update.
3815 * common/ptid.c (pid_to_ptid): Remove.
3816 * common/ptid.h (pid_to_ptid): Don't declare.
3817 * aix-thread.c: Update.
3818 * arm-linux-nat.c: Update.
3819 * common/ptid.c: Update.
3820 * common/ptid.h: Update.
3821 * corelow.c: Update.
3823 * darwin-nat.c: Update.
3824 * fbsd-nat.c: Update.
3825 * fork-child.c: Update.
3826 * gnu-nat.c: Update.
3827 * go32-nat.c: Update.
3828 * inf-ptrace.c: Update.
3830 * inferior.c: Update.
3832 * linux-fork.c: Update.
3833 * linux-nat.c: Update.
3834 * nat/aarch64-linux-hw-point.c: Update.
3835 * nat/fork-inferior.c: Update.
3836 * nat/x86-linux-dregs.c: Update.
3837 * nto-procfs.c: Update.
3838 * obsd-nat.c: Update.
3840 * progspace.c: Update.
3842 * rs6000-nat.c: Update.
3843 * s390-linux-nat.c: Update.
3844 * sol-thread.c: Update.
3845 * spu-linux-nat.c: Update.
3848 * tracefile-tfile.c: Update.
3849 * windows-nat.c: Update.
3853 * common/ptid.h (ptid_build): Don't declare.
3854 * common/ptid.c (ptid_build): Remove.
3855 * aix-thread.c: Update.
3856 * bsd-kvm.c: Update.
3857 * bsd-uthread.c: Update.
3858 * common/agent.c: Update.
3859 * common/ptid.c: Update.
3860 * common/ptid.h: Update.
3861 * corelow.c: Update.
3862 * darwin-nat.c: Update.
3863 * fbsd-nat.c: Update.
3864 * gnu-nat.c: Update.
3865 * linux-fork.c: Update.
3866 * linux-nat.c: Update.
3867 * linux-thread-db.c: Update.
3868 * nat/linux-osdata.c: Update.
3869 * nat/linux-procfs.c: Update.
3870 * nto-procfs.c: Update.
3871 * obsd-nat.c: Update.
3872 * proc-service.c: Update.
3874 * ravenscar-thread.c: Update.
3875 * remote-sim.c: Update.
3877 * sol-thread.c: Update.
3879 * windows-nat.c: Update.
3883 * infrun.c (follow_exec): Use exit_inferior_silent.
3884 * inferior.c (exit_inferior_num_silent): Remove.
3885 * inferior.h (exit_inferior_num_silent): Don't declare.
3890 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3891 inferior_ptid on error.
3897 * disasm.h (gdb_disassembler): Add
3898 `m_disassembler_options_holder'. member
3899 * disasm.c (get_all_disassembler_options): New function.
3900 (gdb_disassembler::gdb_disassembler): Use it.
3901 (gdb_buffered_insn_length_init_dis): Likewise.
3902 (gdb_buffered_insn_length): Adjust accordingly.
3903 (set_disassembler_options): Handle options with arguments.
3904 (show_disassembler_options_sfunc): Likewise. Add a leading new
3905 line if showing options with descriptions.
3906 (disassembler_options_completer): Adapt to using the
3907 `disasm_options_and_args_t' structure.
3908 * mips-tdep.c (mips_disassembler_options): New variable.
3909 (mips_disassembler_options_o32): Likewise.
3910 (mips_disassembler_options_n32): Likewise.
3911 (mips_disassembler_options_n64): Likewise.
3912 (gdb_print_insn_mips): Don't set `disassembler_options'.
3913 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3915 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3916 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3917 `gdbarch_disassembler_options_implicit' and
3918 `gdbarch_valid_disassembler_options'.
3919 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3920 `disasm_options_and_args_t' structure.
3921 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3923 (valid_disassembler_options): Switch from `disasm_options_t' to
3924 the `disasm_options_and_args_t' structure.
3925 * NEWS: Document `set disassembler-options' support for the MIPS
3927 * gdbarch.h: Regenerate.
3928 * gdbarch.c: Regenerate.
3932 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3936 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3937 parameter in call to amd64_target_description.
3938 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3939 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3940 (amd64fbsd_init_abi): Likewise.
3941 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3942 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3943 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3944 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3948 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3949 "segments" parameter.
3950 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3951 (_initialize_amd64_tdep): Update call to
3952 amd64_create_target_description.
3953 (amd64_target_description): Add "segments" parameter. Adjust
3954 the implementation to use it.
3955 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3956 call to amd64_create_target_description.
3957 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3958 * gdb/arch/amd64.h (amd64_create_target_description): Add
3959 "segments" register.
3960 * gdb/arch/amd64.c (amd64_create_target_description): Add
3961 "segments" parameter. Call create_feature_i386_64bit_segments
3962 only if SEGMENTS is true.
3963 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3964 call to amd64_create_target_description.
3968 * thread.c (thread_target_id_str): New, factored out from ...
3969 (print_thread_info_1): ... here. Use it to compute the max
3970 "Target Id" column width.
3974 * remote.c (remote_target::extra_thread_info): Delete
3975 'display_buf' and 'n' locals. from the cache, regardless of
3976 packet mechanims is in use. Use cache for qThreadExtra and qP
3981 * blockframe.c (find_pc_sect_containing_function): New function.
3982 * breakpoint.c (print_breakpoint_location): Don't call
3983 find_pc_sect_function.
3984 * linespec.c (create_sals_line_offset): Record the location's
3986 * linespec.c (convert_address_location_to_sals): Fill in sal's
3987 symbol with find_pc_sect_containing_function.
3988 * symtab.c (find_function_start_sal): Rename to ...
3989 (find_function_start_sal_1): ... this.
3990 (find_function_start_sal): Reimplement as wrapper around
3991 find_function_start_sal_1, and use
3992 find_pc_sect_containing_function to fill in the sal's symbol.
3993 (find_function_start_sal(symbol*, bool)): Adjust.
3994 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3996 (find_pc_sect_containing_function): Declare.
4000 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4001 true if the the location has no symbol.
4005 * NEWS: Mention --enable-codesign.
4006 * silent-rules.mk (ECHO_SIGN): New variable.
4007 * configure.ac: Add --enable-codesign.
4008 * configure: Rebuild.
4009 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4010 (gdb$(EXEEXT)): Optionally invoke codesign.
4014 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4016 (switch_to_thread_no_regs): Adjust comment.
4017 * infcmd.c (stop_pc): Delete.
4018 (post_create_inferior, info_program_command): Replace references
4019 to stop_pc with references to thread_info->suspend.stop_pc.
4020 * inferior.h (stop_pc): Delete declaration.
4021 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4022 (handle_inferior_event_1, handle_signal_stop)
4023 (process_event_stop_test, keep_going_stepped_thread)
4024 (handle_step_into_function, handle_step_into_function_backward)
4025 (print_stop_location): Replace references to stop_pc with
4026 references to thread_info->suspend.stop_pc.
4027 (struct infcall_suspend_state) <stop_pc>: Delete field.
4028 (save_infcall_suspend_state, restore_infcall_suspend_state):
4029 Remove references to inf_stat->stop_pc.
4030 * linux-fork.c (fork_load_infrun_state): Likewise.
4031 * record-btrace.c (record_btrace_set_replay): Likewise.
4032 * record-full.c (record_full_goto_entry): Likewise.
4033 * remote.c (print_one_stopped_thread): Likewise.
4034 * target.c (target_resume): Extend comment.
4035 * thread.c (set_executing_thread): New.
4036 (set_executing): Use it.
4037 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4038 Remove references to stop_pc.
4042 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4043 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4047 * coffread.c (coff_symfile_finish): Update.
4048 * xcoffread.c (xcoff_symfile_finish): Update.
4049 * elfread.c (elf_symfile_finish): Update.
4050 * symfile.h (dwarf2_free_objfile): Don't declare.
4051 * dwarf2read.c (_initialize_dwarf2_read): Use
4052 register_objfile_data_with_cleanup.
4053 (dwarf2_free_objfile): Now static. Change signature.
4057 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4058 option "-o" to add-symbol-file-load to add an offset to each
4059 section's load address.
4060 * symfile.c (set_objfile_default_section_offset): New function.
4064 * symfile.c (add_symbol_file_command): Make sure that sections
4065 with the same name are sorted in the same order.
4069 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4070 require the second argument. If omitted, load sections at the
4071 addresses specified in the file.
4075 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4076 (_initialize_symfile): Add option "-o" to symbol-file to add an
4077 offset to each section of the symbol file.
4081 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4085 * stack.c (_initialize_stack): Update "func" help text.
4089 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4091 (unwind_infopy_str, pyuw_create_unwind_info)
4092 (unwind_infopy_add_saved_register, pyuw_sniffer)
4093 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4095 (struct saved_reg): Add constructor.
4096 <value>: Now a gdbpy_ref<>.
4100 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4104 * gdb-gdb.py.in: Format using autopep8.
4108 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4109 (type_lookup_function): Recognize CORE_ADDR values.
4113 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4118 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4123 * gdb-gdb.py: Move to...
4124 * gdb-gdb.py.in: ... here.
4125 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4126 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4128 (distclean): Remove gdb-gdb.py when cleaning.
4129 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4130 * configure: Re-generate.
4134 * proc-service.c (get_ps_regcache): New.
4135 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4136 (ps_lsetfpregs): Use it.
4141 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4142 (dwarf_decode_lines_1): Adjust.
4146 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4148 <info_proc>: Likewise.
4152 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4153 to windows_fetch_one_register, and only handle the case of
4154 fetching one register. Move the code that reloads the context
4155 and iterates over all registers if R is negative to...
4156 (windows_nat_target::fetch_registers): ... here.
4157 (do_windows_store_inferior_registers): Rename to
4158 windows_store_one_register, and only handle the case of storing
4159 one register. Move the code that handles the case where r is
4161 (windows_nat_target::store_registers) ... here.
4166 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4167 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4169 (rust_internal_print_type): Add podata parameter.
4170 (rust_print_type): Update.
4174 * typeprint.h (struct print_offset_data) <update, finish,
4175 maybe_print_hole>: New methods.
4176 <indentation>: New constant.
4177 * typeprint.c (print_offset_data::indentation): Define.
4178 (print_offset_data::maybe_print_hole, print_offset_data::update)
4179 (print_offset_data::finish): Move from c-typeprint.c and rename.
4180 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4181 (print_spaces_filtered_with_print_options): Update.
4182 (c_print_type_union_field_offset, maybe_print_hole)
4183 (c_print_type_struct_field_offset): Move to typeprint.c and
4185 (c_type_print_base_struct_union): Update.
4189 * gdbthread.h (thread_info_ref, delete_thread)
4190 (delete_thread_silent, first_thread_of_inferior)
4191 (any_thread_of_inferior, switch_to_thread)
4192 (enable_thread_stack_temporaries)
4193 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4194 (get_last_thread_stack_temporary)
4195 (value_in_thread_stack_temporaries, can_access_registers_thread):
4196 Spell out "struct thread_info" instead of just "thread_info".
4197 * inferior.h (notice_new_inferior): Likewise.
4201 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4202 pass thread_info pointer to delete_thread.
4203 (windows_nat_target::detach): Pass inferior pointer to
4205 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4207 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4208 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4209 and pass a thread_info pointer to delete_thread.
4210 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4211 pass thread_info pointer to delete_thread.
4212 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4213 delete_thread_silent call.
4214 * procfs.c (procfs_target::detach): Pass inferior pointer to
4216 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4217 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4218 delete_thread_silent call.
4219 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4220 pass thread_info pointer to delete_thread.
4221 (windows_nat_target::detach): Pass inferior pointer to
4226 * regcache.c (readable_regcache::read_part): Fix asserts.
4227 (reg_buffer::raw_collect_part): New function.
4228 (regcache::write_part): Fix asserts.
4229 (reg_buffer::raw_supply_part): New function.
4230 (regcache::transfer_regset_register): New helper function.
4231 (regcache::transfer_regset): Call new functions.
4232 (regcache_supply_regset): Use gdb_byte*.
4233 (regcache::supply_regset): Likewise.
4234 (regcache_collect_regset): Likewise.
4235 (regcache::collect_regset): Likewise.
4236 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4237 (reg_buffer::raw_supply_part): Likewise.
4238 (regcache::transfer_regset_register): Likewise.
4239 (regcache::transfer_regset): Use gdb_byte*.
4243 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4247 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4248 instead of a ptid_t. All callers adjusted.
4249 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4251 (print_ada_task_info, display_current_task_id, task_command_1):
4253 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4255 (breakpoint_kind): Adjust.
4256 (remove_breakpoints_pid): Rename to ...
4257 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4258 pointer. All callers adjusted.
4259 (bpstat_clear_actions): Use inferior_thread.
4260 (get_bpstat_thread): New.
4261 (bpstat_do_actions): Use it.
4262 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4263 to take a thread_info pointer. All callers adjusted.
4264 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4265 (breakpoint_re_set_thread): Use inferior_thread.
4266 * breakpoint.h (struct inferior): Forward declare.
4267 (bpstat_stop_status): Update.
4268 (remove_breakpoints_pid): Delete.
4269 (remove_breakpoints_inf): New.
4270 * bsd-uthread.c (bsd_uthread_target::wait)
4271 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4272 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4273 (maint_btrace_packet_history_cmd)
4274 (maint_btrace_clear_packet_history_cmd): Adjust.
4275 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4277 * cli/cli-interp.c: Include "inferior.h".
4278 * common/refcounted-object.h (struct
4279 refcounted_object_ref_policy): New.
4280 * compile/compile-object-load.c: Include gdbthread.h.
4281 (store_regs): Use inferior_thread.
4282 * corelow.c (core_target::close): Use current_inferior.
4283 (core_target_open): Adjust to use first_thread_of_inferior and use
4284 the current inferior.
4285 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4286 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4287 <thread>: ... this new field. All references adjusted.
4288 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4289 Take a thread_info pointer instead of a ptid_t.
4290 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4291 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4292 thread_info pointer instead of a ptid_t.
4293 * elfread.c: Include "inferior.h".
4294 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4295 Use inferior_thread.
4296 * eval.c (evaluate_subexp): Likewise.
4297 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4299 * gdb_proc_service.h (struct thread_info): Forward declare.
4300 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4301 <thread>: ... this new field. All references adjusted.
4302 * gdbarch.h, gdbarch.c: Regenerate.
4303 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4304 'thread' parameter. All implementations and callers adjusted.
4305 * gdbthread.h (thread_info) <set_running>: New method.
4306 (delete_thread, delete_thread_silent): Take a thread_info pointer
4308 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4309 (first_thread_of_process): Delete, replaced by ...
4310 (first_thread_of_inferior): ... this new function. All callers
4312 (any_live_thread_of_process): Delete, replaced by ...
4313 (any_live_thread_of_inferior): ... this new function. All callers
4315 (switch_to_thread, switch_to_no_thread): Declare.
4316 (is_executing): Delete.
4317 (enable_thread_stack_temporaries): Update comment.
4318 <enable_thread_stack_temporaries>: Take a thread_info pointer
4319 instead of a ptid_t. Incref the thread.
4320 <~enable_thread_stack_temporaries>: Decref the thread.
4323 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4324 (get_last_thread_stack_temporary)
4325 (value_in_thread_stack_temporaries, can_access_registers_thread):
4326 Take a thread_info pointer instead of a ptid_t. All callers
4328 * infcall.c (get_call_return_value): Use inferior_thread.
4329 (run_inferior_call): Work with thread pointers instead of ptid_t.
4330 (call_function_by_hand_dummy): Work with thread pointers instead
4331 of ptid_t. Use thread_info_ref.
4332 * infcmd.c (proceed_thread_callback): Access thread's state
4334 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4335 access thread's state directly.
4336 (continue_command): Use inferior_thread.
4337 (info_program_command): Use find_thread_ptid and access thread
4339 (proceed_after_attach_callback): Use thread state directly.
4340 (notice_new_inferior): Take a thread_info pointer instead of a
4341 ptid_t. All callers adjusted.
4342 (exit_inferior): Take an inferior pointer instead of a pid. All
4344 (exit_inferior_silent): New.
4345 (detach_inferior): Delete.
4346 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4347 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4348 (detach_inferior_command, kill_inferior_command): Use
4349 find_inferior_id instead of valid_gdb_inferior_id and
4350 gdb_inferior_id_to_pid.
4351 (inferior_command): Use inferior and thread pointers.
4352 * inferior.h (struct thread_info): Forward declare.
4353 (notice_new_inferior): Take a thread_info pointer instead of a
4354 ptid_t. All callers adjusted.
4355 (detach_inferior): Delete declaration.
4356 (exit_inferior, exit_inferior_silent): Take an inferior pointer
4357 instead of a pid. All callers adjusted.
4358 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4359 (valid_gdb_inferior_id): Delete.
4360 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4361 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4362 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4364 <inf>: ... this new field.
4365 <step_ptid>: Delete, replaced by ...
4366 <step_thread>: ... this new field.
4367 (get_displaced_stepping_state): Take an inferior pointer instead
4368 of a pid. All callers adjusted.
4369 (displaced_step_in_progress_any_inferior): Adjust.
4370 (displaced_step_in_progress_thread): Take a thread pointer instead
4371 of a ptid_t. All callers adjusted.
4372 (displaced_step_in_progress, add_displaced_stepping_state): Take
4373 an inferior pointer instead of a pid. All callers adjusted.
4374 (get_displaced_step_closure_by_addr): Adjust.
4375 (remove_displaced_stepping_state): Take an inferior pointer
4376 instead of a pid. All callers adjusted.
4377 (displaced_step_prepare_throw, displaced_step_prepare)
4378 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4379 All callers adjusted.
4380 (start_step_over): Adjust.
4381 (infrun_thread_ptid_changed): Remove bit updating ptids in the
4382 displaced step queue.
4383 (do_target_resume): Adjust.
4384 (fetch_inferior_event): Use inferior_thread.
4385 (context_switch, get_inferior_stop_soon): Take an
4386 execution_control_state pointer instead of a ptid_t. All callers
4388 (switch_to_thread_cleanup): Delete.
4389 (stop_all_threads): Use scoped_restore_current_thread.
4390 * inline-frame.c: Include "gdbthread.h".
4391 (inline_state) <inline_state>: Take a thread pointer instead of a
4392 ptid_t. All callers adjusted.
4393 <ptid>: Delete, replaced by ...
4394 <thread>: ... this new field.
4395 (find_inline_frame_state): Take a thread pointer instead of a
4396 ptid_t. All callers adjusted.
4397 (skip_inline_frames, step_into_inline_frame)
4398 (inline_skipped_frames, inline_skipped_symbol): Take a thread
4399 pointer instead of a ptid_t. All callers adjusted.
4400 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4401 (inline_skipped_frames, inline_skipped_symbol): Likewise.
4402 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4404 * linux-nat.c (get_detach_signal): Likewise.
4405 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4406 (thread_db_notice_clone): Adjust.
4407 (thread_db_find_new_threads_silently)
4408 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4409 a thread pointer instead of a ptid_t. All callers adjusted.
4410 * mi/mi-cmd-var.c: Include "inferior.h".
4411 (mi_cmd_var_update_iter): Update to use thread pointers.
4412 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4414 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4416 (mi_output_running): ... this new function.
4417 (mi_on_resume_1): Adjust to use it.
4418 (mi_user_selected_context_changed): Adjust to use inferior_thread.
4419 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4421 (interrupt_thread_callback): : Adjust to use thread and inferior
4423 * proc-service.c: Include "gdbthread.h".
4424 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4425 * progspace-and-thread.c: Include "inferior.h".
4426 * progspace.c: Include "inferior.h".
4427 * python/py-exitedevent.c (create_exited_event_object): Adjust to
4428 hold a reference to an inferior_object.
4429 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4431 * python/py-inferior.c (struct inferior_object): Give the type a
4432 tag name instead of a typedef.
4433 (python_on_normal_stop): No need to check if the current thread is
4435 (inferior_to_inferior_object): Change return type to
4436 inferior_object. All callers adjusted.
4437 (find_thread_object): Delete, bits factored out to ...
4438 (thread_to_thread_object): ... this new function.
4439 * python/py-infthread.c (create_thread_object): Use
4440 inferior_to_inferior_object.
4441 (thpy_is_stopped): Use thread pointer directly.
4442 (gdbpy_selected_thread): Use inferior_thread.
4443 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4444 field, replaced with ...
4445 <thread>: ... this new field. All users adjusted.
4446 (btpy_insn_or_gap_new): Drop const.
4447 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
4449 * python/py-record.c: Include "gdbthread.h".
4450 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4451 a ptid_t. All callers adjusted.
4452 (gdbpy_current_recording): Use inferior_thread.
4453 * python/py-record.h (recpy_record_object) <ptid>: Delete
4454 field, replaced with ...
4455 <thread>: ... this new field. All users adjusted.
4456 (recpy_element_object) <ptid>: Delete
4457 field, replaced with ...
4458 <thread>: ... this new field. All users adjusted.
4459 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4460 a ptid_t. All callers adjusted.
4461 * python/py-threadevent.c: Include "gdbthread.h".
4462 (get_event_thread): Use thread_to_thread_object.
4463 * python/python-internal.h (struct inferior_object): Forward
4465 (find_thread_object, find_inferior_object): Delete declarations.
4466 (thread_to_thread_object, inferior_to_inferior_object): New
4468 * record-btrace.c: Include "inferior.h".
4469 (require_btrace_thread): Use inferior_thread.
4470 (record_btrace_frame_sniffer)
4471 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4472 (get_thread_current_frame): Use scoped_restore_current_thread and
4474 (get_thread_current_frame): Use thread pointer directly.
4475 (record_btrace_replay_at_breakpoint): Use thread's inferior
4477 * record-full.c: Include "inferior.h".
4478 * regcache.c: Include "gdbthread.h".
4479 (get_thread_arch_regcache): Use the inferior's address space
4481 (get_thread_regcache, registers_changed_thread): New.
4482 * regcache.h (get_thread_regcache(thread_info *thread)): New
4484 (registers_changed_thread): New.
4485 (remote_target) <remote_detach_1>: Swap order of parameters.
4486 (remote_add_thread): <remote_add_thread>: Return the new thread.
4487 (get_remote_thread_info(ptid_t)): New overload.
4488 (remote_target::remote_notice_new_inferior): Use thread pointers
4490 (remote_target::process_initial_stop_replies): Use
4491 thread_info::set_running.
4492 (remote_target::remote_detach_1, remote_target::detach)
4493 (extended_remote_target::detach): Adjust.
4494 * stack.c (frame_show_address): Use inferior_thread.
4495 * target-debug.h (target_debug_print_thread_info_pp): New.
4496 * target-delegates.c: Regenerate.
4497 * target.c (default_thread_address_space): Delete.
4498 (memory_xfer_partial_1): Use current_inferior.
4499 (target_detach): Use current_inferior.
4500 (target_thread_address_space): Delete.
4501 (generic_mourn_inferior): Use current_inferior.
4502 * target.h (struct target_ops) <thread_address_space>: Delete.
4503 (target_thread_address_space): Delete.
4504 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4506 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4507 thread pointer instead of a ptid_t. Adjust all callers.
4508 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4509 (first_thread_of_process): Delete, replaced by ...
4510 (first_thread_of_inferior): ... this new function. All callers
4512 (any_thread_of_process): Rename to ...
4513 (any_thread_of_inferior): ... this, and take an inferior pointer.
4514 (any_live_thread_of_process): Rename to ...
4515 (any_live_thread_of_inferior): ... this, and take an inferior
4517 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4518 (value_in_thread_stack_temporaries)
4519 (get_last_thread_stack_temporary): Take a thread pointer instead
4520 of a ptid_t. Adjust all callers.
4521 (thread_info::set_running): New.
4522 (validate_registers_access): Use inferior_thread.
4523 (can_access_registers_ptid): Rename to ...
4524 (can_access_registers_thread): ... this, and take a thread
4526 (print_thread_info_1): Adjust to compare thread pointers instead
4528 (switch_to_no_thread, switch_to_thread): Make extern.
4529 (scoped_restore_current_thread::~scoped_restore_current_thread):
4530 Use m_thread pointer directly.
4531 (scoped_restore_current_thread::scoped_restore_current_thread):
4532 Use inferior_thread.
4533 (thread_command): Use thread pointer directly.
4534 (thread_num_make_value_helper): Use inferior_thread.
4535 * top.c (execute_command): Use inferior_thread.
4536 * tui/tui-interp.c: Include "inferior.h".
4537 * varobj.c (varobj_create): Use inferior_thread.
4538 (value_of_root_1): Use find_thread_global_id instead of
4539 global_thread_id_to_ptid.
4543 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4545 (regcache::write_part): Likewise.
4546 (readable_regcache::cooked_read_part): Update comment.
4547 (readable_regcache::cooked_write_part): Likewise.
4548 * regcache.h: (readable_regcache::read_part): Likewise.
4549 (regcache::write_part): Likewise.
4554 * aarch64-linux-nat.c (post_attach): New.
4555 (aarch64_linux_nat_target::post_attach): Override post_attach to
4556 record the number of hardware debug registers.
4560 * python/py-param.c (add_setshow_generic): Make parameters const.
4561 (parmpy_init): Update.
4565 * regcache.h (regcache_cooked_read_ftype): Rename to...
4566 (register_read_ftype): ...this, change type to function_view.
4567 (class reg_buffer) <save>: Remove src parameter.
4568 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4569 parameter non-const in first overload. Remove src parameter in
4571 * regcache.c (do_cooked_read): Remove.
4572 (readonly_detached_regcache::readonly_detached_regcache): Make
4573 parameter non-const, adjust call to other constructor.
4574 (reg_buffer::save): Remove src parameter.
4575 * frame.c (do_frame_register_read): Remove.
4576 (frame_save_as_regcache): Use lambda function.
4577 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4578 parameter to ppu2spu_data *.
4579 (ppu2spu_sniffer): Use lambda function.
4583 * record-full.c (record_full_target::insert_breakpoint): Remove
4584 "struct" keyword, add const.
4588 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4589 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4590 * configure.ac: Remove AC_PREREQ, add missing quoting.
4591 * gnulib/configure.ac: Modernize usage of
4592 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4593 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4594 (AUTOMAKE_VERSION): Bump to 1.15.1.
4595 * configure: Re-generate.
4596 * config.in: Re-generate.
4597 * aclocal.m4: Re-generate.
4598 * gnulib/aclocal.m4: Re-generate.
4599 * gnulib/config.in: Re-generate.
4600 * gnulib/configure: Re-generate.
4601 * gnulib/import/Makefile.in: Re-generate.
4605 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4606 (lookup_minimal_symbol_by_pc_section): ... here with
4607 gdb_assert_not_reached added.
4611 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4612 parameter with a block parameter. Compare location's block symbol
4613 with the frame's block instead of addresses.
4614 (skip_inline_frames): Pass the current block instead of the
4615 frame's address. Break out as soon as we determine the frame
4616 should not be skipped.
4620 * solib-aix.c (solib_aix_get_section_offsets): Return
4622 (solib_aix_solib_create_inferior_hook): Update.
4626 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4630 * solib-frv.c (frv_relocate_main_executable): Use
4632 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4637 * objfiles.h (inhibit_section_map_updates): Update.
4638 (resume_section_map_updates, resume_section_map_updates_cleanup):
4640 * solib-svr4.c (svr4_handle_solib_event): Update.
4641 * objfiles.c (inhibit_section_map_updates): Return
4642 scoped_restore_tmpl<int>.
4643 (resume_section_map_updates, resume_section_map_updates_cleanup):
4648 * valprint.h (read_string): Update.
4649 * valprint.c (read_string): Change type of "buffer".
4650 (val_print_string): Update.
4651 * python/py-value.c (valpy_string): Update.
4652 * language.h (struct language_defn) <la_get_string>: Change
4654 (default_get_string, c_get_string): Update.
4655 * language.c (default_get_string): Change type of "buffer".
4656 * guile/scm-value.c (gdbscm_value_to_string): Update.
4657 * c-lang.c (c_get_string): Change type of "buffer".
4661 * ser-mingw.c (struct pipe_state_destroyer): New.
4662 (pipe_state_up): New typedef.
4663 (cleanup_pipe_state): Remove.
4664 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4668 * rust-lang.h (rust_yyerror): Don't declare.
4669 * rust-lang.c (rust_language_defn): Update.
4670 * rust-exp.y (yyerror): Now static.
4671 * parse.c (parse_exp_in_context_1): Update.
4672 * p-lang.h (p_yyerror): Don't declare.
4673 * p-lang.c (p_language_defn): Update.
4674 * p-exp.y (yyerror): Now static.
4675 * opencl-lang.c (opencl_language_defn): Update.
4676 * objc-lang.c (objc_language_defn): Update.
4677 * m2-lang.h (m2_yyerror): Don't declare.
4678 * m2-lang.c (m2_language_defn): Update.
4679 * m2-exp.y (yyerror): Now static.
4680 * language.h (struct language_defn) <la_error>: Remove.
4681 * language.c (unk_lang_error): Remove.
4682 (unknown_language_defn, auto_language_defn): Remove.
4683 * go-lang.h (go_yyerror): Don't declare.
4684 * go-lang.c (go_language_defn): Update.
4685 * go-exp.y (yyerror): Now static.
4686 * f-lang.h (f_yyerror): Don't declare.
4687 * f-lang.c (f_language_defn): Update.
4688 * f-exp.y (yyerror): Now static.
4689 * d-lang.h (d_yyerror): Don't declare.
4690 * d-lang.c (d_language_defn): Update.
4691 * d-exp.y (yyerror): Now static.
4692 * c-lang.h (c_yyerror): Don't declare.
4693 * c-lang.c (c_language_defn, cplus_language_defn)
4694 (asm_language_defn, minimal_language_defn): Update.
4695 * c-exp.y (yyerror): Now static.
4696 * ada-lang.h (ada_yyerror): Don't declare.
4697 * ada-lang.c (ada_language_defn): Update.
4698 * ada-exp.y (yyerror): Now static.
4702 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4703 (store_sveregs_to_thread): Likewise.
4704 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4705 (aarch64_linux_store_inferior_registers): Likewise.
4706 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4708 (aarch64_sve_regs_copy_to_regcache): Likewise.
4709 (aarch64_sve_regs_copy_from_regcache): Likewise.
4710 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4712 (aarch64_sve_regs_copy_to_regcache): Likewise.
4713 (aarch64_sve_regs_copy_from_regcache): Likewise.
4714 (sve_context): Structure from Linux headers.
4715 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4716 (SVE_SIG_ZREG_SIZE): Likewise.
4717 (SVE_SIG_PREG_SIZE): Likewise.
4718 (SVE_SIG_FFR_SIZE): Likewise.
4719 (SVE_SIG_REGS_OFFSET): Likewise.
4720 (SVE_SIG_ZREGS_OFFSET): Likewise.
4721 (SVE_SIG_ZREG_OFFSET): Likewise.
4722 (SVE_SIG_ZREGS_SIZE): Likewise.
4723 (SVE_SIG_PREGS_OFFSET): Likewise.
4724 (SVE_SIG_PREG_OFFSET): Likewise.
4725 (SVE_SIG_PREGS_SIZE): Likewise.
4726 (SVE_SIG_FFR_OFFSET): Likewise.
4727 (SVE_SIG_REGS_SIZE): Likewise.
4728 (SVE_SIG_CONTEXT_SIZE): Likewise.
4729 (SVE_PT_REGS_MASK): Likewise.
4730 (SVE_PT_REGS_FPSIMD): Likewise.
4731 (SVE_PT_REGS_SVE): Likewise.
4732 (SVE_PT_VL_INHERIT): Likewise.
4733 (SVE_PT_VL_ONEXEC): Likewise.
4734 (SVE_PT_REGS_OFFSET): Likewise.
4735 (SVE_PT_FPSIMD_OFFSET): Likewise.
4736 (SVE_PT_FPSIMD_SIZE): Likewise.
4737 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4738 (SVE_PT_SVE_PREG_SIZE): Likewise.
4739 (SVE_PT_SVE_FFR_SIZE): Likewise.
4740 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4741 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4742 (__SVE_SIG_TO_PT): Likewise.
4743 (SVE_PT_SVE_OFFSET): Likewise.
4744 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4745 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4746 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4747 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4748 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4749 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4750 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4751 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4752 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4753 (SVE_PT_SVE_SIZE): Likewise.
4754 (SVE_PT_SIZE): Likewise.
4755 (HAS_SVE_STATE): New define.
4759 * nat/aarch64-sve-linux-sigcontext.h: New file.
4760 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4762 (SVE_VQ_MIN): Likewise.
4763 (SVE_VQ_MAX): Likewise.
4764 (SVE_VL_MIN): Likewise.
4765 (SVE_VL_MAX): Likewise.
4766 (SVE_NUM_ZREGS): Likewise.
4767 (SVE_NUM_PREGS): Likewise.
4768 (sve_vl_valid): Likewise.
4769 (struct user_sve_header): Likewise.
4774 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4775 was requested by GDB.
4779 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4783 * gnulib/update-gnulib.sh: Print expected versions of
4788 * arch-utils.c (default_type_align): Use type_length_units.
4789 * gdbtypes.c (type_align): Use type_length_units.
4793 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4794 of 'define' command.
4799 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4800 get_no_prettyformat_print_options.
4804 * sparc-nat.h: Include target.h.
4805 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4806 <fetch_registers>: Remove this argument in function call.
4807 <store_registers>: Remove this argument in function call, remove
4809 <low_forget_process>: Call sparc64_forget_process instead of
4810 sparc_forget_process.
4814 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4815 (procfs_target::make_corefile_notes): Adjust to new
4816 target_read_alloc return type.
4822 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4823 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4824 Move should_notify_stop local into more inner scope.
4830 * infrun.c (resume_1): Add call to mark_async_event_handler.
4834 * infrun.c (do_target_wait): Change old version of $pc printed.
4838 * dwarf2read.c (read_index_from_section): Rename to...
4839 (read_gdb_index_from_section): ... this, update all callers.
4840 (dwarf2_read_index): Rename to...
4841 (dwarf2_read_gdb_index): ... this, update all callers.
4845 * gdb/hppa-linux-nat.c
4846 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4847 hppa_linux_nat_target::fetch_registers.
4851 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4852 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4853 (AARCH64_DWARF_SVE_FFR): Likewise.
4854 (AARCH64_DWARF_SVE_P0): Likewise.
4855 (AARCH64_DWARF_SVE_Z0): Likewise.
4859 * common/common-regcache.h (raw_compare): New function.
4860 * regcache.c (regcache::raw_compare): Likewise.
4861 * regcache.h (regcache::raw_compare): New declaration.
4865 * common/common-regcache.h (reg_buffer_common): New structure.
4866 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4867 (reg_buffer::raw_supply): Likewise.
4868 (reg_buffer::raw_supply_integer): Likewise.
4869 (reg_buffer::raw_supply_zeroed): Likewise.
4870 (reg_buffer::raw_collect): Likewise.
4871 (reg_buffer::raw_collect_integer): Likewise.
4872 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4873 (reg_buffer::raw_supply): Likewise.
4874 (reg_buffer::raw_supply_integer): Likewise.
4875 (reg_buffer::raw_supply_zeroed): Likewise.
4876 (reg_buffer::raw_collect): Likewise.
4877 (reg_buffer::raw_collect_integer): Likewise.
4881 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4882 (class remote_state) <stop_reply_queue>: Now std::vector.
4883 (remote_state::~remote_state)
4884 (remote_target::stop_reply_queue_length): Update.
4885 (struct queue_iter_param, remove_child_of_pending_fork)
4886 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4887 (check_pending_event_prevents_wildcard_vcont_callback)
4888 (remove_stop_reply_for_inferior)
4889 (remove_stop_reply_of_remote_state)
4890 (remote_notif_remove_once_on_match)
4891 (stop_reply_match_ptid_and_ws)
4892 (remote_kill_child_of_pending_fork): Remove.
4893 (remote_target::remove_new_fork_children)
4894 (remote_target::check_pending_events_prevent_wildcard_vcont)
4895 (remote_target::discard_pending_stop_replies)
4896 (remote_target::discard_pending_stop_replies_in_queue)
4897 (remote_target::remote_notif_remove_queued_reply)
4898 (remote_target::queued_stop_reply)
4899 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4900 (remote_target::wait, remote_target::kill_new_fork_children)
4901 (remote_target::async): Update.
4905 * record-full.c (record_full_arch_list_cleanups): Remove.
4906 (record_full_message): Use try/catch.
4907 (record_full_wait_cleanups): Remove.
4908 (record_full_wait_1): Use try/catch.
4909 (record_full_restore): Likewise.
4913 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4914 declare VEC. Add constructor.
4915 <in_target_beneath>: Now bool.
4916 (record_full_breakpoints): Now a std::vector, static.
4917 (record_full_sync_record_breakpoints)
4918 (record_full_init_record_breakpoints)
4919 (record_full_target::insert_breakpoint)
4920 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4924 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4925 * serial.c (serial_interface_lookup): Remove struct keyword.
4929 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4931 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4933 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4935 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4936 "beneath" as a method.
4937 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4938 Use "beneath" as a method.
4942 * tracefile.c (struct trace_file_writer_deleter): New.
4943 <operator()>: Rename from trace_file_writer_xfree.
4944 (trace_file_writer_up): New typedef.
4945 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4949 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4950 <m_registers, m_register_status>: Change type to
4952 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4957 * common/common-regcache.h (enum register_status): Add
4958 underlying type "signed char".
4959 * regcache.h (reg_buffer) <m_register_status>: Change type to
4961 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4962 register_status instead of signed char.
4963 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4964 (reg_buffer::get_register_status): Remove cast.
4965 (readable_regcache::raw_read): Remove cast.
4966 (readable_regcache::cooked_read): Remove cast.
4970 * source.c (reverse_search_command, forward_search_command): Use
4975 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4976 (serial_ops_list): Now static, std::vector.
4977 (serial_interface_lookup, serial_add_interface): Update.
4981 * dwarf2read.c (process_cu_includes): Update.
4982 (process_full_comp_unit): Update.
4983 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4990 * python/python.c (do_start_initialization):
4991 Avoid call to internal Python API.
4992 (init__gdb_module): New function.
4996 * linux-thread-db.c (valprint.h): New include.
4997 (struct check_thread_db_info): New structure.
4998 (check_thread_db_on_load, tdb_testinfo): New static globals.
4999 (check_thread_db, check_thread_db_callback): New functions.
5000 (try_thread_db_load_1): Run integrity checks if requested.
5001 (maintenance_check_libthread_db): New function.
5002 (_initialize_thread_db): Register "maint check libthread-db"
5003 and "maint set/show check-libthread-db".
5004 * NEWS: Mention the above new commands.
5008 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5013 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5017 * common/btrace-common.h (struct btrace_data): Add constructor,
5018 destructor, move assignment operator.
5019 <empty, clear, fini>: New methods.
5020 <format>: Initialize.
5021 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5022 (btrace_data_empty): Don't declare.
5023 * common/btrace-common.c (btrace_data_init): Remove.
5024 (btrace_data::fini): Rename from btrace_data_fini.
5025 (btrace_data::empty): Rename from btrace_data_empty.
5026 (btrace_data::clear): Rename from btrace_data_clear. Return
5028 * btrace.h (make_cleanup_btrace_data): Don't declare.
5029 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5030 (parse_xml_btrace): Update.
5031 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5032 (maint_btrace_clear_packet_history_cmd): Update.
5036 * target.h (target_ops) <beneath>: Now a method. All references
5038 (class target_stack): New.
5039 * target.c (g_target_stack): New.
5040 (g_current_top_target): Delete.
5041 (current_top_target): Get the top target out of g_target_stack.
5042 (target_stack::push, target_stack::unpush): New.
5043 (push_target, unpush_target): Reimplement.
5044 (target_is_pushed): Reimplement in terms of g_target_stack.
5045 (target_ops::beneath, target_stack::find_beneath): New.
5049 * target.h (find_target_beneath): Delete declaration.
5050 * target.c (find_target_beneath): Delete definition.
5051 * aix-thread.c: All callers of find_target_beneath adjusted to
5052 call target_ops::beneath instead.
5053 * bsd-uthread.c: Likewise.
5054 * linux-thread-db.c: Likewise.
5055 * ravenscar-thread.c: Likewise.
5056 * sol-thread.c: Likewise.
5057 * spu-multiarch.c: Likewise.
5061 * target.h (target_ops) <beneath>: Now a method. All references
5063 (target_ops) <m_beneath>: New.
5064 * target.c (target_ops::beneath): New.
5065 * corelow.c: Adjust all references to target_ops::beneath.
5066 * linux-thread-db.c: Likewise.
5067 * make-target-delegates: Likewise.
5068 * record-btrace.c: Likewise.
5069 * record-full.c: Likewise.
5070 * remote.c: Likewise.
5071 * target.c: Likewise.
5072 * target-delegates.c: Regenerate.
5076 * target.h (target_stack): Delete.
5077 (current_top_target): Declare function.
5078 * target.c (target_stack): Delete.
5079 (g_current_top_target): New.
5080 (current_top_target): New function.
5081 * auxv.c: Use current_top_target instead of target_stack
5083 * avr-tdep.c: Likewise.
5084 * breakpoint.c: Likewise.
5085 * corefile.c: Likewise.
5086 * elfread.c: Likewise.
5088 * exceptions.c: Likewise.
5089 * frame.c: Likewise.
5090 * gdbarch-selftests.c: Likewise.
5091 * gnu-v3-abi.c: Likewise.
5092 * ia64-tdep.c: Likewise.
5093 * ia64-vms-tdep.c: Likewise.
5094 * infcall.c: Likewise.
5095 * infcmd.c: Likewise.
5096 * infrun.c: Likewise.
5097 * linespec.c: Likewise.
5098 * linux-tdep.c: Likewise.
5099 * minsyms.c: Likewise.
5100 * ppc-linux-nat.c: Likewise.
5101 * ppc-linux-tdep.c: Likewise.
5102 * procfs.c: Likewise.
5103 * regcache.c: Likewise.
5104 * remote.c: Likewise.
5105 * rs6000-tdep.c: Likewise.
5106 * s390-linux-nat.c: Likewise.
5107 * s390-tdep.c: Likewise.
5108 * solib-aix.c: Likewise.
5109 * solib-darwin.c: Likewise.
5110 * solib-dsbt.c: Likewise.
5111 * solib-spu.c: Likewise.
5112 * solib-svr4.c: Likewise.
5113 * solib-target.c: Likewise.
5114 * sparc-tdep.c: Likewise.
5115 * sparc64-tdep.c: Likewise.
5116 * spu-tdep.c: Likewise.
5117 * symfile.c: Likewise.
5118 * symtab.c: Likewise.
5119 * target-descriptions.c: Likewise.
5120 * target-memory.c: Likewise.
5121 * target.c: Likewise.
5122 * target.h: Likewise.
5123 * tracefile-tfile.c: Likewise.
5124 * tracepoint.c: Likewise.
5125 * valops.c: Likewise.
5126 * valprint.c: Likewise.
5127 * value.c: Likewise.
5128 * windows-tdep.c: Likewise.
5129 * mi/mi-main.c: Likewise.
5133 * valprint.h (build_address_symbolic): Declare.
5134 * printcmd.c (print_address_symbolic): Update.
5135 (build_address_symbolic): Change "name" and "filename" to
5137 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5139 * defs.h (build_address_symbolic): Remove declaration.
5143 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5144 (aarch64_vnv_type): Add function.
5145 (aarch64_pseudo_register_name): Add V regs for SVE.
5146 (aarch64_pseudo_register_type): Likewise.
5147 (aarch64_pseudo_register_reggroup_p): Likewise.
5148 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5149 (aarch64_pseudo_read_value): Add V regs for SVE.
5150 (aarch64_pseudo_write_2): Use V0 offset for SVE
5151 (aarch64_pseudo_write): Add V regs for SVE.
5152 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5156 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5157 (sve_vl_from_vq): Likewise.
5161 * cli/cli-cmds.c (show_version): Update.
5162 * top.c (print_gdb_version): Add "interactive" parameter.
5164 * main.c (captured_main_1): Update.
5165 * top.h (print_gdb_version): Add "interactive" parameter and a
5170 * common/enum-flags.h: Add trailing semicolon to example in
5176 * NEWS: Add entry about pager.
5177 * utils.c (pagination_disabled_for_command): New global.
5178 (prompt_for_continue): Allow "c" response to prompt.
5179 (reinitialize_more_filter): Clear
5180 pagination_disabled_for_command.
5181 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5185 * ada-lang.h (ada_lookup_symbol_list): Update.
5186 * ada-lang.c (resolve_subexp): Update.
5187 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5189 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5190 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5191 results parameter to std::vector.
5192 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5194 * ada-exp.y (block_lookup): Update.
5195 (select_possible_type_sym): Change type of syms. Remove nsyms
5197 (write_var_or_type, write_name_assoc): Update.
5201 * windows-nat.c (windows_nat_target::xfer_partial): Return
5202 TARGET_XFER_E_IO if we need to delegate to the target beneath
5203 but BENEATH is NULL.
5207 * Makefile.in (config.status): Add configure.nat as a
5212 * cp-name-parser.y (cpname_state): Add method declarations.
5213 (HANDLE_QUAL): Update.
5214 (cpname_state::d_grab, cpname_state::fill_comp)
5215 (cpname_state::make_operator, cpname_state::make_dtor)
5216 (cpname_state::make_builtin_type, cpname_state::make_name)
5217 (cpname_state::d_qualify, cpname_state::d_int_type)
5218 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5219 (%union): Move earlier.
5223 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5227 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5228 (aarch64_pseudo_write_1): Likewise.
5229 (aarch64_pseudo_read_value): Use helper.
5230 (aarch64_pseudo_write): Likewise.
5234 * darwin-nat.c (darwin_ops): Delete.
5235 (darwin_attach_pid): Use get_native_target.
5239 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5240 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5244 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5245 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5246 (aarch64_gdbarch_init): Check for SVE.
5247 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5251 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5252 * aarch64-tdep.h (aarch64_read_description): Likewise.
5253 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5254 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5255 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5256 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5257 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5261 * value.c (value_fetch_lazy_bitfield): New.
5262 (value_fetch_lazy_memory): New.
5263 (value_fetch_lazy_register): New.
5264 (value_fetch_lazy): Factor out to smaller functions.
5268 * cp-name-parser.y (backslashable, represented): Now const.
5272 * cp-name-parser.y: Include parser-defs.h.
5273 (parser_fprintf): Remove declaration.
5277 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5279 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5280 (global_result): Remove globals.
5281 (struct cpname_state): New.
5282 (yyparse): Don't declare.
5283 (yylex, yyerror): Move declarations after %union.
5284 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5285 (make_name): Add state parameter.
5287 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5289 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5291 (yylex): Add lvalp, state parameters.
5292 (yyerror): Add state parameter.
5293 (cp_demangled_name_to_comp): Update.
5297 * cp-name-parser.y (parser_fprintf): Declare.
5298 (GDB_YY_REMAP_PREFIX): Define.
5299 Include yy-remap.h. Don't redefine yy* identifiers.
5303 * python/py-type.c (typy_legacy_template_argument): Update.
5304 * cp-support.h (cp_demangled_name_to_comp): Update.
5305 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5306 parameter to be a "std::string *".
5311 * ada-lex.l: Include "diagnostics.h" instead of
5312 "common/diagnostics.h".
5313 * unittests/environ-selftests.c: Likewise.
5314 * common/diagnostics.h: Moved to ../include.
5318 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5319 to language_mode_manual while calling breakpoint_re_set_one.
5323 * valops.c (value_cast_structs, destructor_name_p): Update.
5324 * symtab.c (gdb_mangle_name): Update.
5325 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5327 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5328 (pascal_object_print_value_fields, pascal_object_print_value):
5330 * p-typeprint.c (pascal_type_print_derivation_info): Update.
5331 * linespec.c (find_methods): Update.
5332 * gdbtypes.h (type_name_no_tag): Remove.
5333 (type_name_or_error): Rename from type_name_no_tag_or_error.
5334 * gdbtypes.c (type_name_no_tag): Remove.
5335 (type_name_or_error): Rename from type_name_no_tag_or_error.
5336 (lookup_struct_elt_type, check_typedef): Update.
5337 * expprint.c (print_subexp_standard): Update.
5338 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5339 * d-namespace.c (d_lookup_nested_symbol): Update.
5340 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5341 (cp_print_class_member): Update.
5342 * cp-namespace.c (cp_lookup_nested_symbol): Update.
5343 * completer.c (add_struct_fields): Update.
5344 * c-typeprint.c (cp_type_print_derivation_info)
5345 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5347 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5348 (ada_prefer_type, ada_is_exception_sym): Update.
5352 * valops.c (enum_constant_from_type, value_namespace_elt)
5353 (value_maybe_namespace_elt): Update.
5354 * valarith.c (find_size_for_pointer_math): Update.
5355 * target-descriptions.c (make_gdb_type): Update.
5356 * symmisc.c (print_symbol): Update.
5357 * stabsread.c (define_symbol, read_type)
5358 (complain_about_struct_wipeout, add_undefined_type)
5359 (cleanup_undefined_types_1): Update.
5360 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5361 (rust_range_type_p, val_print_struct, rust_print_struct_def)
5362 (rust_internal_print_type, rust_composite_type)
5363 (rust_evaluate_funcall, rust_evaluate_subexp)
5364 (rust_inclusive_range_type_p): Update.
5365 * python/py-type.c (typy_get_tag): Update.
5366 * p-typeprint.c (pascal_type_print_base): Update.
5367 * mdebugread.c (parse_symbol, parse_type): Update.
5368 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5370 * guile/scm-type.c (gdbscm_type_tag): Update.
5371 * go-lang.c (sixg_string_p): Update.
5372 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5374 * gdbtypes.h (struct main_type) <tag_name>: Remove.
5375 (TYPE_TAG_NAME): Remove.
5376 * gdbtypes.c (type_name_no_tag): Simplify.
5377 (check_typedef, check_types_equal, recursive_dump_type)
5378 (copy_type_recursive, arch_composite_type): Update.
5379 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
5380 in summary mode when needed.
5381 * eval.c (evaluate_funcall): Update.
5382 * dwarf2read.c (fixup_go_packaging, read_structure_type)
5383 (process_structure_scope, read_enumeration_type)
5384 (read_namespace_type, read_module_type, determine_prefix): Update.
5385 * cp-support.c (inspect_type): Update.
5386 * coffread.c (process_coff_symbol, decode_base_type): Update.
5387 * c-varobj.c (c_is_path_expr_parent): Update.
5388 * c-typeprint.c (c_type_print_base_struct_union): Update.
5389 (c_type_print_base_1): Update. Print struct/class/union/enum in
5390 summary when using C language.
5391 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5392 (gen_maybe_namespace_elt): Update.
5393 * ada-lang.c (ada_type_name): Simplify.
5394 (empty_record, ada_template_to_fixed_record_type_1)
5395 (template_to_static_fixed_type)
5396 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5400 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5402 * c-typeprint.c (c_print_type_1): Add "language" parameter.
5403 (c_print_type): Update.
5404 (c_print_type): New overload.
5405 (c_type_print_varspec_prefix, c_type_print_args)
5406 (c_type_print_varspec_suffix, c_print_type_no_offsets)
5407 (c_type_print_base_struct_union, c_type_print_base_1)
5408 (cp_type_print_method_args): Add "language" parameter.
5409 (c_type_print_base): Update.
5410 * c-lang.h (c_print_type): Add new overload.
5414 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5415 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5419 * aarch64-tdep.c (aarch64_sve_register_names): New const
5421 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5422 (AARCH64_SVE_Z_REGS_NUM): New define.
5423 (AARCH64_SVE_P_REGS_NUM): Likewise.
5424 (AARCH64_SVE_NUM_REGS): Likewise.
5428 * nat/linux-ptrace.h [__alpha__]
5429 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5434 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5435 the endianness selected.
5436 * NEWS: Document `set endian auto' mode operation update.
5440 * Makefile.in: Add new header.
5441 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5442 (sve_vl_from_vg): Likewise.
5443 (sve_vq_from_vl): Likewise.
5444 (sve_vl_from_vq): Likewise.
5445 (sve_vq_from_vg): Likewise.
5446 (sve_vg_from_vq): Likewise.
5447 * configure.nat: Add new c file.
5448 * nat/aarch64-sve-linux-ptrace.c: New file.
5449 * nat/aarch64-sve-linux-ptrace.h: New file.
5453 * aarch64-linux-nat.c (aarch64_linux_read_description):
5455 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5457 * aarch64-tdep.c (tdesc_aarch64_list): Add.
5458 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5459 (aarch64_gdbarch_init): Add parmeter zero.
5460 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5461 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5462 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5464 * doc/gdb.texinfo: Describe SVE feature
5465 * features/aarch64-sve.c: New file.
5470 * gdbarch.sh (significant_addr_bit): Default to zero when
5471 not set by target architecture.
5472 * gdbarch.c: Re-generated.
5473 * utils.c (address_significant): Update.
5477 * stack.c (func_command): Remove trailing newline in call to error.
5481 * regcache.h (regcache_raw_collect): Remove, update callers to
5482 use regcache::raw_collect.
5483 * regcache.c (regcache_raw_collect): Remove.
5487 * regcache.h (regcache_raw_supply): Remove, update callers to
5488 use detached_regcache::raw_supply.
5489 * regcache.c (regcache_raw_supply): Remove.
5493 * regcache.h (regcache_cooked_write_part): Remove, update
5494 callers to use regcache::cooked_write_part.
5495 * regcache.c (regcache_cooked_write_part): Remove.
5499 * regcache.h (regcache_cooked_read_part): Remove, update callers
5500 to use readable_regcache::cooked_read_part.
5501 * regcache.c (regcache_cooked_read_part): Remove.
5505 * regcache.h (regcache_cooked_read_value): Remove, update
5506 callers to use readable_regcache::cooked_read_value.
5507 * regcache.c (regcache_cooked_read_value): Remove.
5511 * regcache.h (regcache_cooked_write): Remove, update callers to
5512 use regcache::cooked_write.
5513 * regcache.c (regcache_cooked_write): Remove.
5517 * regcache.h (regcache_invalidate): Remove, update callers to
5518 use detached_regcache::invalidate instead.
5519 * regcache.c (regcache_invalidate): Remove.
5523 * regcache.h (regcache_raw_write_part): Remove, update callers
5524 to use regcache::raw_write_part instead.
5525 * regcache.c (regcache_raw_write_part): Remove.
5529 * regcache.h (regcache_raw_read_part): Remove, update callers to
5530 use readable_regcache::raw_read_part instead.
5531 * regcache.c (regcache_raw_read_part): Remove.
5535 * regcache.h (regcache_cooked_read): Remove, update callers to
5536 use readable_regcache::cooked_read instead.
5537 * regcache.c (regcache_cooked_read): Remove.
5541 * regcache.h (regcache_raw_write): Remove, update callers to use
5542 regcache::raw_write instead.
5543 * regcache.c (regcache_raw_write): Remove.
5547 * regcache.h (regcache_raw_read): Remove, update callers to use
5548 readable_regcache::raw_read instead.
5549 * regcache.c (regcache_raw_read): Remove.
5553 * regcache.h (regcache_raw_update): Remove, update callers to
5554 use readable_regcache::raw_update instead.
5555 * regcache.c (regcache_raw_update): Remove.
5559 * regcache.h (regcache_register_status): Remove, update callers
5560 to use reg_buffer::get_register_status directly instead.
5561 * regcache.c (regcache_register_status): Remove.
5565 * regcache.h (regcache_get_ptid): Remove, update all callers to
5566 call regcache::ptid instead.
5567 * regcache.c (regcache_get_ptid): Remove.
5571 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5575 * common/common-exceptions.h (exception_rethrow): Use
5580 * breakpoint.c (print_solib_event, check_status_catch_solib):
5581 Remove struct keyword in range-based for loops.
5582 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5583 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5585 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5587 * symfile.c (addr_info_make_relative): Likewise.
5588 * thread.c (value_in_thread_stack_temporaries): Likewise.
5593 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5594 aggregate type to get its real type before accessing it.
5598 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5599 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5600 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5601 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5602 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5603 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5604 * printcmd.c (info_address_command): Likewise.
5608 * windows-nat.c (handle_exception): Update fall-through comment.
5612 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5613 (struct program_space) <added_solibs>: Now a std::vector.
5614 * breakpoint.c (print_solib_event): Update.
5615 (check_status_catch_solib): Update.
5616 * progspace.c (clear_program_space_solib_cache): Update.
5617 * solib.c (update_solib_list): Update.
5621 * python/py-type.c (typy_richcompare): Update.
5622 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5623 * gdbtypes.h (types_deeply_equal): Return bool.
5624 (types_equal): Likewise.
5625 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5627 (check_types_equal): Change worklist to std::vector. Return
5629 (struct type_equality_entry): Add constructor.
5630 (compare_maybe_null_strings): Return bool.
5631 (check_types_worklist): Return bool. Change worklist to
5633 (types_deeply_equal): Use std::vector.
5634 (types_equal): Return bool.
5635 (compare_maybe_null_strings): Simplify.
5639 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5643 * objc-lang.h: Don't include cp-support.h.
5644 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5649 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5653 * value.c (value::location): Initialize.
5657 * dbxread.c (init_bincl_list): Remove.
5658 (bincl_list): Now a std::vector.
5659 (bincls_allocated, next_bincl): Remove.
5660 (free_bincl_list, do_free_bincl_list_cleanup)
5661 (make_cleanup_free_bincl_list): Remove.
5662 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5664 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5665 (struct header_file_location): Add constructor.
5666 (add_bincl_to_list): Remove.
5670 * tui/tui.c (tui_enable): Update.
5671 * mi/mi-interp.c (mi_interp::init): Update.
5672 * interps.h (class interp) <name>: New method.
5673 <m_name>: Rename from name.
5674 (~scoped_restore_interp): Update.
5675 * interps.c (interp::interp): Update.
5676 (interp_add, interp_set, interp_lookup_existing)
5677 (current_interp_named_p): Update.
5681 * interps.c (interp_name): Remove.
5682 * mi/mi-interp.c (mi_interp::init): Update.
5683 * interps.h (interp_name): Remove.
5684 (~scoped_restore_interp): Update.
5685 * tui/tui.c (tui_enable): Update.
5689 * utils.c (fputs_maybe_filtered): Update.
5690 * linespec.c (decode_line_full): Update.
5691 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5692 (mi_print_breakpoint_for_event, mi_solib_loaded)
5693 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5694 (mi_user_selected_context_changed): Update.
5695 * mi/mi-main.c (mi_execute_command): Update.
5696 * cli/cli-script.c (execute_control_command): Update.
5697 * python/python.c (execute_gdb_command): Update.
5698 * solib.c (info_sharedlibrary_command): Update.
5699 * interps.c (interp_ui_out): Remove.
5700 * interps.h (interp_ui_out): Remove.
5704 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5705 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5706 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5710 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5711 * interps.c (interp_exec): Use scoped_restore.
5715 * remote.c (remote_target::remote_file_get): Use
5717 (remote_target::remote_file_put): Likewise.
5721 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5723 (get_pe_section_index, add_pe_exported_sym): Update.
5724 (read_pe_exported_syms): Use gdb::def_vector.
5728 * frame.c (remove_prev_frame): Remove.
5729 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5733 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5735 * mips-linux-nat.c (supply_fpregset): Always call
5736 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5737 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5738 `mips_fill_fpregset'.
5739 * mips-linux-tdep.c (mips_supply_fpregset)
5740 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5741 (mips_fill_fpregset_wrapper): Remove functions.
5742 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5743 (mips_linux_fpregset): Remove variable.
5744 (mips_linux_iterate_over_regset_sections): Use
5745 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5746 (mips_linux_o32_sigframe_init): Remove comment.
5750 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5751 (struct readahead_cache, struct packet_reg, struct
5752 remote_arch_state, class remote_state): Move higher up in the
5754 (remote_target::m_remote_state): Now an object instead of a pointer.
5755 (remote_target::get_remote_state): Adjust.
5759 * stack.c (select_and_print_frame): Delete.
5760 (struct function_bounds): Move struct within function.
5761 (func_command): Most content moved into new function
5762 find_frame_for_function, use new function, print result, add
5764 (find_frame_for_function): New function, now returns a result.
5768 * stack.c (iterate_over_block_arg_vars): Fix comment.
5769 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5775 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5777 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5779 * frame.h (class scoped_restore_selected_frame): New class.
5780 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5781 of any exception, use scoped_restore_selected_frame to restore the
5786 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5791 * complaints.c (struct complaints): Remove.
5792 (symfile_complaint_book): Remove.
5793 (series): New global.
5794 (complaint_internal): Update.
5795 (clear_complaints): Update.
5799 * complaints.c (counters): New global.
5800 (struct complain): Remove.
5801 (struct complaints) <root>: Remove.
5802 (complaint_sentinel): Remove.
5803 (symfile_complaint_book): Update.
5804 (find_complaint) Remove.
5805 (complaint_internal, clear_complaints): Update.
5809 * complaints.c (struct complain) <file, line>: Remove.
5810 (find_complaint): Remove file, line parameters.
5811 (complaint_internal): Update.
5815 * complaints.c (vcomplaint): Remove.
5816 (complaint_internal) Merge in contents of vcomplaint.
5820 * complaints.c (struct complaints) <explanation>: Remove.
5821 (symfile_explanations): Remove.
5822 (symfile_complaint_book): Update.
5823 (vcomplaint): Update.
5824 (struct explanation): Remove.
5828 * complaints.c (symfile_complaints): Remove.
5829 (complaint_internal): Remove "complaints" parameter.
5830 (clear_complaints, vcomplaint): Remove "c" parameter.
5831 (get_complaints): Remove.
5832 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5833 (dwarf2_debug_line_missing_file_complaint)
5834 (dwarf2_debug_line_missing_end_sequence_complaint)
5835 (dwarf2_complex_location_expr_complaint)
5836 (dwarf2_const_value_length_mismatch_complaint)
5837 (dwarf2_section_buffer_overflow_complaint)
5838 (dwarf2_macro_malformed_definition_complaint)
5839 (dwarf2_invalid_attrib_class_complaint)
5840 (create_addrmap_from_index, dw2_symtab_iter_next)
5841 (dw2_expand_marked_cus)
5842 (dw2_debug_names_iterator::find_vec_in_debug_names)
5843 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5844 (create_debug_type_hash_table, init_cutu_and_read_dies)
5845 (partial_die_parent_scope, add_partial_enumeration)
5846 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5847 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5848 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5849 (create_cus_hash_table, create_dwp_hash_table)
5850 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5851 (dwarf2_rnglists_process, dwarf2_ranges_process)
5852 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5853 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5854 (handle_struct_member_die, process_structure_scope)
5855 (read_array_type, read_common_block, read_module_type)
5856 (read_tag_pointer_type, read_typedef, read_base_type)
5857 (read_subrange_type, load_partial_dies, partial_die_info::read)
5858 (partial_die_info::read, partial_die_info::read)
5859 (partial_die_info::read, read_checked_initial_length_and_offset)
5860 (dwarf2_string_attr, read_formatted_entries)
5861 (dwarf_decode_line_header)
5862 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5863 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5864 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5865 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5866 (get_signatured_type, get_DW_AT_signature_type)
5867 (decode_locdesc, file_file_name, consume_improper_spaces)
5868 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5869 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5870 (dwarf2_symbol_mark_computed, set_die_type)
5871 (read_attribute_value): Update.
5872 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5874 * dbxread.c (unknown_symtype_complaint)
5875 (lbrac_mismatch_complaint, repeated_header_complaint)
5876 (set_namestring, function_outside_compilation_unit_complaint)
5877 (read_dbx_symtab, process_one_symbol): Update.
5878 * gdbtypes.c (stub_noname_complaint): Update.
5879 * windows-nat.c (handle_unload_dll): Update.
5880 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5881 (decode_base_type): Update.
5882 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5883 (eb_complaint, record_include_begin, record_include_end)
5884 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5885 (process_xcoff_symbol, read_symbol)
5886 (function_outside_compilation_unit_complaint)
5887 (scan_xcoff_symtab): Update.
5888 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5889 * buildsym.c (finish_block_internal, make_blockvector)
5890 (end_symtab_get_static_block, augment_type_symtab): Update.
5891 * dtrace-probe.c (dtrace_process_dof)
5892 (dtrace_static_probe_ops::get_probes): Update.
5893 * complaints.h (struct complaint): Don't declare.
5894 (symfile_complaints): Remove.
5895 (complaint_internal): Remove "complaints" parameter.
5896 (complaint): Likewise.
5897 (clear_complaints): Likewise.
5898 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5899 (reread_symbols): Update.
5900 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5901 (dwarf2_frame_cache, decode_frame_entry): Update.
5902 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5903 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5904 (info_selectors_command): Update.
5905 * macrotab.c (macro_include, check_for_redefinition)
5906 (macro_undef): Update.
5907 * objfiles.c (filter_overlapping_sections): Update.
5908 * stabsread.c (invalid_cpp_abbrev_complaint)
5909 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5910 (define_symbol, error_type, read_type, rs6000_builtin_type)
5911 (stabs_method_name_from_physname, read_member_functions)
5912 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5913 (attach_fields_to_type, complain_about_struct_wipeout)
5914 (read_range_type, read_args, common_block_start)
5915 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5917 * mdebugread.c (index_complaint, unknown_ext_complaint)
5918 (basic_type_complaint, bad_tag_guess_complaint)
5919 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5920 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5921 (parse_procedure, parse_lines)
5922 (function_outside_compilation_unit_complaint)
5923 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5924 (bad_tag_guess_complaint, reg_value_complaint): Update.
5925 * cp-support.c (demangled_name_complaint): Update.
5926 * macroscope.c (sal_macro_scope): Update.
5927 * dwarf-index-write.c (class debug_names): Update.
5931 * complaints.c (clear_complaints): Remove "noisy" parameter.
5932 * complaints.h (clear_complaints): Update.
5933 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5934 (reread_symbols): Update.
5938 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5940 (vcomplaint, clear_complaints): Update.
5941 (symfile_explanations): Remove some messages.
5945 * complaints.c (internal_complaint): Remove.
5946 * complaints.h (internal_complaint): Remove.
5950 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5954 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5955 (remote_fileio_badfd, remote_fileio_return_errno)
5956 (remote_fileio_return_success, remote_fileio_func_open)
5957 (remote_fileio_func_open, remote_fileio_func_close)
5958 (remote_fileio_func_read, remote_fileio_func_write)
5959 (remote_fileio_func_lseek, remote_fileio_func_rename)
5960 (remote_fileio_func_unlink, remote_fileio_func_stat)
5961 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5962 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5963 remote_target parameter.
5964 (remote_fio_func_map) <func>: Add remote_target parameter.
5965 (do_remote_fileio_request, remote_fileio_request):
5966 * remote-fileio.h (remote_fileio_request):
5967 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5968 remote_target parameter.
5969 (remote_notif_process, handle_notification): Adjust to pass down
5971 (remote_notif_state_allocate): Add remote_target parameter. Save
5973 * remote-notif.h (struct remote_target): Forward declare.
5974 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5975 remote_target parameter.
5976 (struct remote_notif_state) <remote>: New field.
5977 (remote_notif_ack, remote_notif_parse): Add remote_target
5979 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5980 remote_target parameter.
5981 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5982 (threads_listing_context, rmt_thread_action, protocol_feature)
5983 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5984 (packet_result, struct threads_listing_context, remote_state):
5985 Move definitions and declarations higher up.
5986 (remote_target) <~remote_target>: Declare.
5987 (remote_download_command_source, remote_file_put, remote_file_get)
5988 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5989 (remote_hostio_pread_vFile, remote_hostio_send_command)
5990 (remote_hostio_set_filesystem, remote_hostio_open)
5991 (remote_hostio_close, remote_hostio_unlink, remote_state)
5992 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5993 (get_memory_write_packet_size, get_memory_read_packet_size)
5994 (append_pending_thread_resumptions, remote_detach_1)
5995 (append_resumption, remote_resume_with_vcont)
5996 (add_current_inferior_and_thread, wait_ns, wait_as)
5997 (process_stop_reply, remote_notice_new_inferior)
5998 (process_initial_stop_replies, remote_add_thread)
5999 (btrace_sync_conf, remote_btrace_maybe_reopen)
6000 (remove_new_fork_children, kill_new_fork_children)
6001 (discard_pending_stop_replies, stop_reply_queue_length)
6002 (check_pending_events_prevent_wildcard_vcont)
6003 (discard_pending_stop_replies_in_queue, stop_reply)
6004 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6005 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6006 (remote_interrupt_as, remote_interrupt_ns)
6007 (remote_get_noisy_reply, remote_query_attached)
6008 (remote_add_inferior, remote_current_thread, get_current_thread)
6009 (set_thread, set_general_thread, set_continue_thread)
6010 (set_general_process, write_ptid)
6011 (remote_unpack_thread_info_response, remote_get_threadinfo)
6012 (parse_threadlist_response, remote_get_threadlist)
6013 (remote_threadlist_iterator, remote_get_threads_with_ql)
6014 (remote_get_threads_with_qxfer)
6015 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6016 (get_offsets, remote_check_symbols, remote_supported_packet)
6017 (remote_query_supported, remote_packet_size)
6018 (remote_serial_quit_handler, remote_detach_pid)
6019 (remote_vcont_probe, remote_resume_with_hc)
6020 (send_interrupt_sequence, interrupt_query)
6021 (remote_notif_get_pending_events, fetch_register_using_p)
6022 (send_g_packet, process_g_packet, fetch_registers_using_g)
6023 (store_register_using_P, store_registers_using_G)
6024 (set_remote_traceframe, check_binary_download)
6025 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6026 (remote_xfer_live_readonly_partial, remote_read_bytes)
6027 (remote_send_printf, remote_flash_write, readchar)
6028 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6029 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6030 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6031 (extended_remote_disable_randomization, extended_remote_run)
6032 (send_environment_packet, extended_remote_environment_support)
6033 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6034 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6035 (packet_command): Now methods of ...
6036 (remote_target): ... this class.
6037 (m_remote_state) <remote_target>: New field.
6038 (struct remote_state) <stop_reply_queue,
6039 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6041 (remote_state::remote_state): Allocate stop_reply_queue.
6042 (remote_state): Delete global.
6043 (get_remote_state_raw): Delete.
6044 (remote_target::get_remote_state): Allocate m_remote_state on
6046 (get_current_remote_target): New.
6047 (remote_ops, extended_remote_ops): Delete.
6048 (wait_forever_enabled_p, remote_async_inferior_event_token):
6049 Delete, moved to struct remote_state.
6050 (remote_target::close): Delete self. Destruction bits split to
6052 (remote_target::~remote_target): ... this.
6053 (show_memory_packet_size): Adjust to use
6054 get_current_remote_target.
6055 (struct protocol_feature) <func>: Add remote_target parameter.
6056 All callers adjusted.
6057 (curr_quit_handler_target): New.
6058 (remote_serial_quit_handler): Reimplement.
6059 (remote_target::open_1): Adjust to use get_current_remote_target.
6060 Heap-allocate remote_target/extended_remote_target instances.
6061 (vcont_builder::vcont_builder): Add remote_target parameter, and
6062 save it in m_remote. All callers adjusted.
6063 (vcont_builder::m_remote): New field.
6064 (vcont_builder::restart, vcont_builder::flush)
6065 (vcont_builder::push_action): Use it.
6066 (remote_target::commit_resume): Use it.
6067 (struct queue_iter_param) <remote>: New field.
6068 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6069 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6070 (check_pending_event_prevents_wildcard_vcont_callback)
6071 (remote_target::check_pending_events_prevent_wildcard_vcont)
6072 (remote_target::discard_pending_stop_replies)
6073 (remote_target::discard_pending_stop_replies_in_queue)
6074 (remote_target::remote_notif_remove_queued_reply): Fill in
6076 (remote_notif_get_pending_events): New.
6077 (remote_target::readchar, remote_target::remote_serial_write):
6078 Save/restore curr_quit_handler_target.
6080 (kill_new_fork_children): Fill in 'remote' field.
6081 (packet_command): Use get_current_remote_target, defer to
6082 remote_target method of same name.
6083 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6084 parameter, and save it in m_remote. All callers adjusted.
6085 (scoped_remote_fd::release): Use m_remote.
6086 (scoped_remote_fd::m_remote): New field.
6087 (remote_file_put, remote_file_get, remote_file_delete): Use
6088 get_current_remote_target, defer to remote_target method of same
6090 (remote_btrace_reset): Add remote_state paremeter. Update all
6092 (remote_async_inferior_event_handler). Pass down 'data'.
6093 (remote_new_objfile): Use get_current_remote_target.
6094 (remote_target::vcont_r_supported): New.
6095 (set_range_stepping): Use get_current_remote_target and
6096 remote_target::vcont_r_supported.
6097 (_initialize_remote): Don't allocate 'remote_state' and
6098 'stop_reply_queue' globals.
6099 * remote.h (struct remote_target): Forward declare.
6100 (getpkt, putpkt, remote_notif_get_pending_events): Add
6101 'remote_target' parameter.
6105 * remote.c (vcont_builder): Now a class. Make all data members
6107 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6109 (vcont_builder_restart): Rename to ...
6110 (vcont_builder::restart): ... this.
6111 (vcont_builder_flush): Rename to ...
6112 (vcont_builder::flush): ... this.
6113 (vcont_builder_push_action): Rename to ...
6114 (vcont_builder::push_action): ... this.
6115 (remote_target::commit_resume): Adjust.
6119 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6120 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6121 (get_fixed_memory_packet_size): New.
6122 (get_memory_packet_size): Use it.
6123 (set_memory_packet_size): Don't override the config size with
6124 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6125 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6126 Don't refer to get_memory_packet_size if not connected to a remote
6127 target. Show "(default)" if configured size is 0.
6131 * remote.c (remote_target::mourn_inferior): Move
6132 discard_pending_stop_replies call here from ...
6133 (_initialize_remote): ... here.
6137 * remote.c (compare_section_command): Remove set_general_process
6142 * remote.c (struct packet_reg, struct remote_arch_state):
6143 Move higher up in the file.
6144 (remote_state) <m_arch_states>: Store remote_arch_state values
6145 instead of remote_arch_state pointers.
6146 (remote_state::get_remote_arch_state): Adjust.
6150 * remote.c: Include <unordered_map>.
6151 (remote_state): Now a class.
6152 (remote_state) <get_remote_arch_state>: Declare method.
6153 <get_remote_arch_state>: New field.
6154 (remote_arch_state) <remote_arch_state>: Declare ctor.
6155 <regs>: Now a unique_ptr.
6156 (remote_gdbarch_data_handle): Delete.
6157 (get_remote_arch_state): Delete.
6158 (remote_state::get_remote_arch_state): New.
6159 (get_remote_state): Adjust to call remote_state's
6160 get_remote_arch_state method.
6161 (init_remote_state): Delete, bits factored out to ...
6162 (remote_arch_state::remote_arch_state): ... this new method.
6163 (get_remote_packet_size, get_memory_packet_size)
6164 (process_g_packet, remote_target::fetch_registers)
6165 (remote_target::prepare_to_store, store_registers_using_G)
6166 (remote_target::store_registers, remote_target::get_trace_status):
6167 Adjust to call remote_state's method.
6168 (_initialize_remote): Remove reference to
6169 remote_gdbarch_data_handle.
6173 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6174 pread>: New method declarations.
6175 (remote_target::open_1): Adjust.
6176 (readahead_cache_invalidate): Rename to ...
6177 (readahead_cache::invalidate): ... this, and adjust to be a class
6179 (readahead_cache_invalidate_fd): Rename to ...
6180 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6182 (remote_hostio_pwrite): Adjust.
6183 (remote_hostio_pread_from_cache): Rename to ...
6184 (readahead_cache::pread): ... this, and adjust to be a class
6186 (remote_hostio_close): Adjust.
6190 * remote.c (remote_hostio_close_cleanup): Delete.
6191 (class scoped_remote_fd): New.
6192 (remote_file_put, remote_file_get): Use it.
6196 (struct vCont_action_support): Use bool and initialize all fields.
6197 (struct readahead_cache): Initialize all fields.
6198 (remote_state): Use bool and initialize all fields.
6199 (remote_state::remote_state, remote_state::~remote_state): New.
6200 (new_remote_state): Delete.
6201 (_initialize_remote): Use new to allocate remote_state.
6207 * c-exp.y: Include "c-support.h".
6208 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6209 of tolower. Use c_ident_is_alpha to scan names.
6210 * c-lang.c: Include "c-support.h".
6211 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6212 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6213 * c-support.h: New file, with bits factored out from ...
6214 * cp-name-parser.y: ... this file.
6215 Include "c-support.h".
6216 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6217 c-support.h and renamed.
6218 (symbol_end, yylex): Adjust.
6222 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6223 parameter type to CORE_ADDR.
6224 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6225 parameter type in declaration to CORE_ADDR.
6226 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6227 target_auxv_search to get AT_HWCAP and use the result to get the
6229 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6230 to CORE_ADDR. Remove the cast of the return value to unsigned
6231 long. Fix error predicate of target_auxv_search.
6232 (ppc_linux_nat_target::read_description): Change the type of the
6233 hwcap variable to CORE_ADDR.
6237 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6238 if the size of fpscr is larger than 32 bits.
6242 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6243 (ppc32_linux_vsxregmap): New global.
6244 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6245 regcache_supply_regset, and regcache_collect_regset.
6246 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6247 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6248 (fetch_vsx_register, store_vsx_register): Remove.
6249 (fetch_vsx_registers): Add regno parameter. Get regset using
6250 ppc_linux_vsxregset. Use regset to supply registers.
6251 (store_vsx_registers): Add regno parameter. Get regset using
6252 ppc_linux_vsxregset. Use regset to collect registers.
6253 (fetch_register): Call fetch_vsx_registers instead of
6255 (store_register): Call store_vsx_registers instead of
6257 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6258 new regno parameter.
6259 (store_ppc_registers): Call store_vsx_registers with -1 for the
6260 new regno parameter.
6261 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6262 (ppc_collect_vsxregset): Remove.
6266 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6268 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6269 for vector register offset fields.
6270 (ppc64_fbsd_reg_offsets): Likewise.
6271 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6272 to vector register offset fields.
6273 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6274 to vector register offset fields.
6275 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6276 vector register offset fields.
6277 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6278 initializers for vector register offset fields.
6279 (rs6000_aix64_reg_offsets): Likewise.
6280 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6281 (ppc_supply_vrregset): Remove.
6282 (ppc_collect_vrregset): Remove.
6283 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6284 (ppc_linux_vrregset) : New function.
6285 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6286 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6287 (ppc32_linux_vrregset): Remove.
6288 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6289 and use result instead of ppc32_linux_vrregset.
6290 (ppc32_linux_reg_offsets): Remove initializers for vector register
6292 (ppc64_linux_reg_offsets): Likewise.
6293 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6294 * ppc-linux-nat.c: Include regset.h.
6295 (gdb_vrregset_t): Adjust comment to account for little-endian
6297 (supply_vrregset, fill_vrregset): Remove.
6298 (fetch_altivec_register, store_altivec_register): Remove.
6299 (fetch_altivec_registers): Add regno parameter. Get regset using
6300 ppc_linux_vrregset. Use regset to supply registers.
6301 (store_altivec_registers): Add regno parameter. Get regset using
6302 ppc_linux_vrregset. Use regset to collect registers.
6303 (fetch_register): Call fetch_altivec_registers instead of
6304 fetch_altivec_register.
6305 (store_register): Call store_altivec_registers instead of
6306 store_altivec_register.
6307 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6308 the new regno parameter.
6309 (store_ppc_registers): Call store_altivec_registers with -1 for
6310 the new regno parameter.
6314 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6315 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6316 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6317 (gdb_vrregset_t): Change array type size to
6318 PPC_LINUX_SIZEOF_VRREGSET.
6319 (gdb_vsxregset_t): Change array type size to
6320 PPC_LINUX_SIZEOF_VSXREGSET.
6321 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6322 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6323 PPC_LINUX_SIZEOF_VSXREGSET.
6327 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6328 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6330 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6331 ppc_linux_target_wordsize with tid.
6332 (ppc_linux_nat_target::read_description): Call ppc_linux_target
6334 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6335 (ppc64_64bit_inferior_p): Add static and inline specifiers.
6336 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6337 tid parameter. Remove static specifier.
6338 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6339 (ppc_linux_target_wordsize): New declaration.
6343 * arch/ppc-linux-common.c: New file.
6344 * arch/ppc-linux-common.h: New file.
6345 * arch/ppc-linux-tdesc.h: New file.
6346 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6347 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6348 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6349 arch/ppc-linux-tdesc.h.
6350 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6351 arch/ppc-linux-tdesc.h.
6352 (ppc_linux_nat_target::read_description): Remove target
6353 description matching code. Fill a ppc_linux_features struct and
6354 call ppc_linux_match_description with it. Move comment about ISA
6355 2.05 to ppc-linux-common.c.
6356 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6357 arch/ppc-linux-tdesc.h.
6358 (ppc_linux_core_read_description): Remove target description
6359 matching code. Fill a ppc_linux_features struct and call
6360 ppc_linux_match_description with it.
6361 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6362 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6363 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6364 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6365 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6366 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6367 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6368 (tdesc_powerpc_e500l): Remove.
6372 * ada-lang.c (catch_assert_command): Pass empty string instead
6373 of NULL for excep_string argument.
6377 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6378 the width of the requested register exceeds the width of the
6383 * printcmd.c (output_command): Remove.
6384 (output_command_const): Rename to output_command.
6385 * valprint.h (output_command): Rename from output_command_const.
6386 * tracepoint.c (trace_dump_actions): Call output_command.
6390 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6391 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6392 * ada-lang.h (create_ada_exception_catchpoint): Update.
6393 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6395 (create_excep_cond_exprs, ~ada_catchpoint)
6396 (should_stop_exception, print_one_exception)
6397 (print_mention_exception, print_recreate_exception): Update.
6398 (ada_get_next_arg): Remove.
6399 (catch_ada_exception_command_split): Use std::string. Change type
6400 of "excep_string", "cond_string".
6401 (catch_ada_exception_command): Update.
6402 (create_ada_exception_catchpoint): Change type of excep_string.
6403 (ada_exception_sal): Remove excep_string parameter.
6404 (~ada_catchpoint): Remove.
6408 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6413 * ada-lang.c (ada_exception_message_1, ada_exception_message):
6414 Return unique_xmalloc_ptr.
6415 (print_it_exception): Update.
6419 * tracepoint.c (trace_dump_actions): Use std::string.
6423 * symfile.c (reread_symbols): Use std::string for original_name.
6427 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6428 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
6433 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6435 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6436 * objfiles.c (get_objfile_bfd_data): Allocate
6437 objfile_per_bfd_storage with obstack_new when allocating on
6442 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6444 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6445 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6446 * mdebugread.c (mdebug_build_psymtabs): Likewise.
6447 (add_pending): Likewise.
6448 (parse_symbol): Likewise.
6449 (parse_partial_symbols): Likewise.
6450 (psymtab_to_symtab_1): Likewise.
6451 (new_psymtab): Likewise.
6452 (elfmdebug_build_psymtabs): Likewise.
6453 * minsyms.c (terminate_minimal_symbol_table): Likewise.
6454 * objfiles.c (get_objfile_bfd_data): Likewise.
6455 (objfile_register_static_link): Likewise.
6456 * psymtab.c (allocate_psymtab): Likewise.
6457 * stabsread.c (read_member_functions): Likewise.
6458 * xcoffread.c (xcoff_end_psymtab): Likewise.
6462 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6463 compiler supports std::is_trivially_constructible.
6464 * common/poison.h: Include obstack.h.
6465 (IsMallocable): Define to is_trivially_constructible if the
6466 compiler supports it, define to true_type otherwise.
6470 (XOBNEWVEC): Redefine.
6471 * gdb_obstack.h (obstack_zalloc): New.
6472 (OBSTACK_ZALLOC): Redefine.
6473 (obstack_calloc): New.
6474 (OBSTACK_CALLOC): Redefine.
6476 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6477 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6479 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6480 obstack_calloc/obstack_zalloc.
6481 (gdbarch_obstack_zalloc): Remove.
6482 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6486 * stack.c (backtrace_command_1): Remove useless variable int i.
6490 * stack.c (print_frame_info): Fix comment.
6494 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6495 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6496 (~dwarf2_per_objfile): Update
6497 (dwarf2_get_dwz_file): Use new.
6498 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6503 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6505 * dwarf2read.c (struct dwp_file): Add constructor and
6507 (open_and_init_dwp_file): Return a unique_ptr.
6508 (dwarf2_per_objfile, create_dwp_hash_table)
6509 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6510 (lookup_dwo_unit_in_dwp): Update.
6511 (open_and_init_dwp_file, get_dwp_file): Update.
6515 * dwarf2read.c (dwarf2_per_objfile): Update.
6516 (struct mapped_index): Add initializers.
6517 (dwarf2_read_index): Use new.
6518 (dw2_symtab_iter_init): Update.
6519 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6524 * dwarf2read.c (mapped_index) <total_size>: Remove.
6528 * unittests/format_pieces-selftests.c (test_format_specifier):
6533 * c-typeprint.c (maybe_print_hole): New function.
6534 (c_print_type_struct_field_offset): Update.
6535 (c_type_print_base_struct_union): Call maybe_print_hole.
6539 * breakpoint.c (build_bpstat_chain): New function, moved from
6541 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6542 If no stop chain is passed, call build_bpstat_chain to build it.
6543 * breakpoint.h (build_bpstat_chain): Declare.
6544 (bpstat_stop_status): Move documentation here from breakpoint.c.
6545 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6546 build the stop chain and pass it to skip_inline_frames.
6547 Pass this stop chain to bpstat_stop_status.
6548 * inline-frame.c: Include breakpoint.h.
6549 (stopped_by_user_bp_inline_frame): New function.
6550 (skip_inline_frames): Add parameter `stop_chain'.
6551 Move documention to inline-frame.h.
6552 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6553 whether the frame should be elided.
6554 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6555 Add moved documentation and update for new parameter.
6560 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6561 unittests/format_pieces-selftests.c.
6562 * common/format.h (format_piece) <operator==>: New.
6563 (format_pieces) <operator[]>: Remove.
6564 * common/format.c (format_pieces::format_pieces): Handle \e.
6565 * unittests/format_pieces-selftests.c: New.
6570 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6571 (dw2_instantiate_symtab): Add skip_partial parameter.
6572 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6573 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6574 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6575 (dw2_expand_symtabs_matching_one)
6576 (dw2_find_pc_sect_compunit_symtab)
6577 (dw2_debug_names_lookup_symbol)
6578 (dw2_debug_names_expand_symtabs_for_function): Update.
6579 (init_cutu_and_read_dies): Add skip_partial parameter.
6580 (process_psymtab_comp_unit, build_type_psymtabs_1)
6581 (process_skeletonless_type_unit, load_partial_comp_unit)
6582 (psymtab_to_symtab_1): Update.
6583 (load_full_comp_unit): Add skip_partial parameter.
6584 (process_imported_unit_die, dwarf2_read_addr_index)
6585 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6586 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6587 (read_signatured_type): Update.
6591 * value.c (release_value): Remove unused variable.
6592 (record_latest_value): Likewise.
6593 (access_value_history): Likewise.
6594 (preserve_values): Likewise.
6598 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6604 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6605 Also handle registers whose width is not a multiple of
6607 (linux_nat_trad_target::store_register): Likewise.
6611 * gdbcore.h (core_bfd): Redefine.
6612 * corelow.c (core_target::close): Update.
6613 (core_target_open): Update.
6614 * progspace.h (struct program_space) <cbfd>: Now a
6620 * symfile-add-flags.h (enum symfile_add_flags)
6621 <SYMFILE_NOT_FILENAME>: New constant.
6622 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6623 objfile name from BFD.
6624 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6625 * minidebug.c (find_separate_debug_file_in_section): Put
6626 ".gnu_debugdata" into BFD's file name.
6630 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6636 * aarch64-tdep.c (aarch64_analyze_prologue,
6637 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6638 Indicate not interested in errors.
6642 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6643 Supply the MIPS_ZERO_REGNUM register.
6647 * mips-tdep.c (mask_address_var): Make variable static.
6651 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6655 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6656 FXSAVE_ADDR for the mxcsr register.
6660 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6664 * corelow.c (core_target) <core_target>: No longer inline.
6665 Initialize m_core_gdbarch, m_core_vec and build the section table
6667 <~core_target>: New.
6668 <core_gdbarch, get_core_register_section>: New methods.
6669 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6670 factored out from ...
6671 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6673 (sniff_core_bfd): Add gdbarch parameter.
6674 (core_close): Delete, merged into ...
6675 (core_target::close): ... here. Delete self.
6676 (core_close_cleanup): Delete.
6677 (core_target_open): Allocate a core_target on the heap. Use a
6678 unique_ptr instead of a cleanup. Bits moved into the core_target
6679 ctor. Adjust to use core_target methods instead of globals.
6680 (get_core_register_section): Rename to ...
6681 (core_target::get_core_register_section): ... this and adjust.
6682 (struct get_core_registers_cb_data): New.
6683 (get_core_registers_cb): Use it. Use bool.
6684 (core_target::fetch_registers, core_target::files_info)
6685 (core_target::xfer_partial, core_target::read_description)
6686 (core_target::pid_to, core_target::thread_name): Adjust to
6687 reference class fields instead of globals.
6688 * target.h (struct target_ops_deleter, target_ops_up): New.
6692 * corefile.c (core_file_command): Move to corelow.c.
6693 * corelow.c (the_core_target): Delete.
6694 (core_file_command): Moved from corefile.c. Check exec_bfd
6695 instead of the_core_target. Use target_detach instead of calling
6696 into the_core_target directly.
6697 (maybe_say_no_core_file_now): New.
6698 (core_target::detach): Use it.
6699 (_initialize_corelow): Remove references to the_core_target.
6700 * gdbcore.h (the_core_target): Delete.
6705 * corefile.c (core_bfd): Remove.
6706 * gdbcore.h (core_bfd): Now a macro.
6707 * progspace.h (struct program_space) <cbfd>: New field.
6711 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6716 * configure: Rebuild.
6717 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6722 * regformats/regdat.sh: Adjust script, following the addition
6723 of the new expedite_regs parameter to init_target_desc.
6728 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6729 set_gdbarch_significant_addr_bit.
6730 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6731 set_gdbarch_significant_addr_bit.
6732 * utils.c (address_significant): Update to sign extend addr.
6736 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6737 (xtensa_linux_init_abi): Limit tdep->num_regs by
6738 tdep->num_nopriv_regs.
6739 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6740 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6745 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6749 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6750 (I387_MXCSR_INIT_VAL): New constant.
6751 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6752 buffer if it was supplied by the inferior.
6753 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6754 (i387_xsave_get_clear_bv): New function.
6755 (i387_supply_xsave): Only read x87 control registers from the
6756 xsave buffer if the feature is enabled, and the state will have
6757 been written, otherwise, provide a suitable default.
6758 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6759 including x87 control registers. Update control registers if they
6760 have changed from the default value, and mark features as enabled
6762 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6766 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6770 * configure: Rebuild.
6771 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6776 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6777 bit. Use correct value for VDIV.
6781 * configure: Rebuild.
6782 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6786 * linux-record.c (record_linux_system_call) <case
6787 RECORD_SYS_RECVFROM>: Add "break".
6791 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6792 Add missing "break".
6793 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6794 Add missing "break".
6798 * rs6000-tdep.c (ppc_process_record_op4)
6799 (ppc_process_record_op63): Add fall-through comment.
6803 * i386-tdep.c (i386_process_record): Add fall-through comment.
6807 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6812 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6813 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6814 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6816 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6818 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6823 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6827 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6828 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6829 * symfile.c (section_is_mapped): Fix fall-through comment.
6830 * stabsread.c (define_symbol, read_member_functions): Fix
6831 fall-through comment.
6832 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6834 * remote.c (remote_wait_as): Fix fall-through comment.
6835 * p-exp.y (yylex): Fix fall-through comment.
6836 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6838 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6839 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6840 * jv-exp.y (yylex): Fix fall-through comment.
6841 * go-exp.y (lex_one_token): Fix fall-through comment.
6842 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6843 fall-through comment.
6844 * f-exp.y (yylex): Fix fall-through comment.
6845 * dwarf2read.c (process_die): Fix fall-through comments.
6846 * dbxread.c (process_one_symbol): Fix fall-through comment.
6847 * d-exp.y (lex_one_token): Fix fall-through comment.
6848 * cp-name-parser.y (yylex): Fix fall-through comment.
6849 * coffread.c (coff_symtab_read): Fix fall-through comment.
6850 * c-exp.y (lex_one_token): Fix fall-through comment.
6851 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6853 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6859 * NEWS: Mention gdb.execute change.
6860 * gdbcmd.h (execute_control_command): Don't declare.
6861 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6862 execute_control_commands, execute_control_commands_to_string.
6863 * cli/cli-script.h (execute_control_commands)
6864 (execute_control_commands_to_string): Declare.
6865 (execute_control_command): Add from_tty parameter.
6866 * cli/cli-script.c (execute_control_commands)
6867 (execute_control_commands_to_string): New functions.
6868 (execute_user_command): Use execute_control_commands.
6869 (execute_control_command_1): Add "from_tty" parameter. Update.
6870 (execute_control_command): Likewise.
6875 * NEWS: Mention that breakpoint commands are writable.
6876 * python/py-breakpoint.c (bppy_set_commands): New function.
6877 (breakpoint_object_getset) <"commands">: Use it.
6881 * tracepoint.c (actions_command): Update.
6882 * mi/mi-cmd-break.c (mi_command_line_array)
6883 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6884 (mi_read_next_line): Remove.
6885 (mi_cmd_break_commands): Update.
6886 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6888 * cli/cli-script.c (get_command_line): Update.
6889 (process_next_line): Use function_view. Constify.
6890 (recurse_read_control_structure, read_command_lines)
6891 (read_command_lines_1): Change argument types to function_view.
6892 (do_define_command, document_command): Update.
6893 * breakpoint.h (check_tracepoint_command): Don't declare.
6894 * breakpoint.c (check_tracepoint_command): Remove.
6895 (commands_command_1, create_tracepoint_from_upload): Update.
6900 * cli/cli-script.h (enum command_control_type) <define_control>:
6902 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6903 (build_command_line, execute_control_command_1)
6904 (process_next_line): Likewise.
6905 (do_define_command): New function, extracted from define_command.
6906 (define_command): Use it.
6910 * tracepoint.c (actions_command): Update.
6911 * cli/cli-script.h (read_command_lines): Update.
6912 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6913 (MAX_TMPBUF): Remove define.
6914 (define_command): Use string_printf.
6915 (document_command): Likewise.
6916 * breakpoint.c (commands_command_1): Update.
6920 * top.c (execute_command): Update.
6921 * cli/cli-script.h (print_command_lines): Now varargs.
6922 * cli/cli-script.c (print_command_lines): Now varargs.
6923 (execute_control_command_1) <case while_control, case if_control>:
6928 * tracepoint.c (all_tracepoint_actions): Rename from
6929 all_tracepoint_actions_and_cleanup. Change return type.
6930 (actions_command, encode_actions_1, encode_actions)
6931 (trace_dump_actions, tdump_command): Update.
6932 * remote.c (remote_download_command_source): Update.
6933 * python/python.c (gdbpy_eval_from_control_command)
6934 (python_command, python_interactive_command): Update.
6935 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6936 * guile/guile.c (guile_command)
6937 (gdbscm_eval_from_control_command, guile_command): Update.
6938 * compile/compile.c (compile_code_command)
6939 (compile_print_command, compile_to_object): Update.
6940 * cli/cli-script.h (struct command_lines_deleter): New.
6941 (counted_command_line): New typedef.
6942 (struct command_line): Add constructor, destructor.
6943 <body_list>: Remove.
6944 <body_list_0, body_list_1>: New members.
6945 (command_line_up): Remove typedef.
6946 (read_command_lines, read_command_lines_1, get_command_line):
6948 (copy_command_lines): Don't declare.
6949 * cli/cli-script.c (build_command_line): Use "new".
6950 (get_command_line): Return counted_command_line.
6951 (print_command_lines, execute_user_command)
6952 (execute_control_command_1, while_command, if_command): Update.
6953 (realloc_body_list): Remove.
6954 (process_next_line, recurse_read_control_structure): Update.
6955 (read_command_lines, read_command_lines_1): Return counted_command_line.
6956 (free_command_lines): Use "delete".
6957 (copy_command_lines): Remove.
6958 (define_command, document_command, show_user_1): Update.
6959 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6960 a counted_command_line.
6961 * breakpoint.h (counted_command_line): Remove typedef.
6962 (breakpoint_set_commands): Update.
6963 * breakpoint.c (check_no_tracepoint_commands)
6964 (validate_commands_for_breakpoint): Update.
6965 (breakpoint_set_commands): Change commands to be a
6966 counted_command_line.
6967 (commands_command_1, update_dprintf_command_list)
6968 (create_tracepoint_from_upload): Update.
6972 * cli/cli-decode.h (cmd_list_element): New constructor.
6973 (~cmd_list_element): New destructor.
6974 (struct cmd_list_element): Add initializers.
6975 * cli/cli-decode.c (do_add_cmd): Use "new".
6976 (delete_cmd): Use "delete".
6981 PR breakpoints/19806 and support for PR external/20207.
6982 * NEWS: Mention Aarch64 watchpoint improvements.
6983 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6984 watchpoints and PR external/20207 watchpoints.
6985 * nat/aarch64-linux-hw-point.c
6986 (kernel_supports_any_contiguous_range): New.
6987 (aarch64_watchpoint_offset): New.
6988 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6989 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6990 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6991 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6992 next_addr_orig_p. Support PR external/20207 watchpoints.
6993 (aarch64_downgrade_regs): New.
6994 (aarch64_dr_state_insert_one_point): New parameters offset and
6996 (aarch64_dr_state_remove_one_point): Likewise.
6997 (aarch64_handle_breakpoint): Update caller.
6998 (aarch64_handle_aligned_watchpoint): Likewise.
6999 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7001 (aarch64_linux_set_debug_regs): Remove const from state. Call
7002 aarch64_downgrade_regs.
7003 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7004 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7005 (DR_CONTROL_MASK): ... this.
7006 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7007 (unsigned int aarch64_watchpoint_offset): New prototype.
7008 (aarch64_linux_set_debug_regs): Remove const from state.
7009 * utils.c (align_up, align_down): Move to ...
7010 * common/common-utils.c (align_up, align_down): ... here.
7011 * utils.h (align_up, align_down): Move to ...
7012 * common/common-utils.h (align_up, align_down): ... here.
7016 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7017 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7018 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7019 Re-implement to match the ABI as summarized in GCC's
7020 gcc/config/sparc/sparc.c. All callers updated.
7021 (sparc32_store_arguments): Remove assertion.
7025 * printcmd.c: Don't include tui.h.
7026 (decode_format): Use skip_spaces.
7031 * printcmd.c (last_count): New global.
7032 (x_command): Use saved count when repeating.
7036 * nto-procfs.c (do_closedir_cleanup): Remove.
7037 (procfs_pidlist): Use gdb_dir_up.
7038 * procfs.c (do_closedir_cleanup): Remove.
7039 (proc_update_threads): Use gdb_dir_up.
7040 * common/filestuff.h (struct gdb_dir_deleter): New.
7041 (gdb_dir_up): New typedef.
7045 * ada-lang.c (print_mention_exception): Use std::string.
7049 * ada-lang.c (create_excep_cond_exprs): Update.
7050 (ada_exception_catchpoint_cond_string): Use std::string.
7054 * ada-lang.c (xget_renaming_scope): Return std::string.
7055 (old_renaming_is_invisible): Update.
7059 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7060 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7064 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7068 * remote.c (remote_query_supported_append): Change type.
7069 (remote_check_symbols): Update.
7074 * configure.ac: Prepend libpython.
7075 * python/python-config.py: Likewise.
7076 * configure: Regenerate.
7080 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7085 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7086 override. Write 'true' instead of '1'.
7087 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7092 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7093 add_inf_child_target.
7094 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7095 add_inf_child_target.
7096 * aix-thread.c (aix_thread_target_info): New.
7097 (aix_thread_target) <shortname, longname, doc>: Delete.
7099 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7100 add_inf_child_target.
7101 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7102 add_inf_child_target.
7103 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7104 add_inf_child_target.
7105 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7106 add_inf_child_target.
7107 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7108 add_inf_child_target.
7109 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7110 add_inf_child_target.
7111 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7112 add_inf_child_target.
7113 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7114 add_inf_child_target.
7115 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7116 add_inf_child_target.
7117 * bfd-target.c (target_bfd_target_info): New.
7118 (target_bfd) <shortname, longname, doc>: Delete.
7120 * bsd-kvm.c (bsd_kvm_target_info): New.
7121 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7123 (bsd_kvm_target::open): Rename to ...
7124 (bsd_kvm_target_open): ... this. Adjust.
7125 * bsd-uthread.c (bsd_uthread_target_info): New.
7126 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7128 * corefile.c (core_file_command): Adjust.
7129 * corelow.c (core_target_info): New.
7130 (core_target) <shortname, longname, doc>: Delete.
7132 (core_target::open): Rename to ...
7133 (core_target_open): ... this. Adjust.
7134 * ctf.c (ctf_target_info): New.
7135 (ctf_target) <shortname, longname, doc>: Delete.
7137 (ctf_target::open): Rename to ...
7138 (ctf_target_open): ... this.
7139 (_initialize_ctf): Adjust.
7140 * exec.c (exec_target_info): New.
7141 (exec_target) <shortname, longname, doc>: Delete.
7143 (exec_target::open): Rename to ...
7144 (exec_target_open): ... this.
7145 * gdbcore.h (core_target_open): Declare.
7146 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7147 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7148 add_inf_child_target.
7149 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7150 add_inf_child_target.
7151 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7152 add_inf_child_target.
7153 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7154 add_inf_child_target.
7155 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7156 add_inf_child_target.
7157 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7158 add_inf_child_target.
7159 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7160 add_inf_child_target.
7161 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7162 add_inf_child_target.
7163 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7164 add_inf_child_target.
7165 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7166 add_inf_child_target.
7167 * inf-child.c (inf_child_target_info): New.
7168 (inf_child_target::info): New.
7169 (inf_child_open_target): Remove 'target' parameter. Use
7170 get_native_target instead.
7171 (inf_child_target::open): Delete.
7172 (add_inf_child_target): New.
7173 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7176 (add_inf_child_target): Declare.
7177 (inf_child_open_target): Declare.
7178 * linux-thread-db.c (thread_db_target_info): New.
7179 (thread_db_target) <shortname, longname, doc>: Delete.
7181 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7182 add_inf_child_target.
7183 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7184 add_inf_child_target.
7185 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7186 add_inf_child_target.
7187 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7188 add_inf_child_target.
7189 * make-target-delegates (print_class): Adjust.
7190 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7191 add_inf_child_target.
7192 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7193 add_inf_child_target.
7194 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7195 add_inf_child_target.
7196 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7197 add_inf_child_target.
7198 * nto-procfs.c (nto_native_target_info): New.
7199 (nto_procfs_target_native) <shortname, longname, doc>:
7202 (nto_procfs_target_info): New.
7203 (nto_procfs_target_procfs) <shortname, longname, doc>:
7206 (init_procfs_targets): Adjust.
7207 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7208 add_inf_child_target.
7209 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7210 add_inf_child_target.
7211 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7212 add_inf_child_target.
7213 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7214 add_inf_child_target.
7215 * ravenscar-thread.c (ravenscar_target_info): New.
7216 (ravenscar_thread_target) <shortname, longname, doc>:
7219 * record-btrace.c (record_btrace_target_info):
7220 (record_btrace_target) <shortname, longname, doc>: Delete.
7222 (record_btrace_target::open): Rename to ...
7223 (record_btrace_target_open): ... this. Adjust.
7224 * record-full.c (record_longname, record_doc): New.
7225 (record_full_base_target) <shortname, longname, doc>: Delete.
7227 (record_full_target_info): New.
7228 (record_full_target): <shortname>: Delete.
7230 (record_full_core_open_1, record_full_open_1): Update comments.
7231 (record_full_base_target::open): Rename to ...
7232 (record_full_open): ... this.
7233 (cmd_record_full_restore): Update.
7234 (_initialize_record_full): Update.
7235 * remote-sim.c (remote_sim_target_info): New.
7236 (gdbsim_target) <shortname, longname, doc>: Delete.
7238 (gdbsim_target::open): Rename to ...
7239 (gdbsim_target_open): ... this.
7240 (_initialize_remote_sim): Adjust.
7241 * remote.c (remote_doc): New.
7242 (remote_target_info): New.
7243 (remote_target) <shortname, longname, doc>: Delete.
7245 (extended_remote_target_info): New.
7246 (extended_remote_target) <shortname, longname, doc>: Delete.
7248 (remote_target::open_1): Make static. Adjust.
7249 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7250 * s390-linux-nat.c (_initialize_s390_nat): Use
7251 add_inf_child_target.
7252 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7253 add_inf_child_target.
7254 * sol-thread.c (thread_db_target_info): New.
7255 (sol_thread_target) <shortname, longname, doc>: Delete.
7257 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7258 add_inf_child_target.
7259 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7260 add_inf_child_target.
7261 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7262 add_inf_child_target.
7263 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7264 add_inf_child_target.
7265 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7266 add_inf_child_target.
7267 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7268 add_inf_child_target.
7269 * spu-linux-nat.c (_initialize_spu_nat): Use
7270 add_inf_child_target.
7271 * spu-multiarch.c (spu_multiarch_target_info): New.
7272 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7274 * target-delegates.c: Regenerate.
7275 * target.c: Include <unordered_map>.
7276 (target_ops_p): Delete.
7277 (DEF_VEC_P(target_ops_p)): Delete.
7278 (target_factories): New.
7279 (test_target_info): New.
7280 (test_target_ops::info): New.
7281 (open_target): Adjust to use target_factories.
7282 (add_target_with_completer): Rename to ...
7283 (add_target): ... this. Change prototype. Register target_info
7284 and open callback in target_factories. Register target_info in
7285 command context instead of target_ops.
7286 (add_target): Delete old implementation.
7287 (add_deprecated_target_alias): Change prototype. Adjust.
7288 (the_native_target): New.
7289 (set_native_target, get_native_target): New.
7290 (find_default_run_target): Use the_native_target.
7291 (find_attach_target, find_run_target): Simplify.
7292 (target_ops::open): Delete.
7293 (dummy_target_info): New.
7294 (dummy_target::shortname, dummy_target::longname)
7295 (dummy_target::doc): Delete.
7296 (dummy_target::info): New.
7297 (debug_target::shortname, debug_target::longname)
7298 (debug_target::doc): Delete.
7299 (debug_target::info): New.
7300 * target.h (struct target_info): New.
7301 (target_ops::~target_ops): Add comment.
7302 (target_ops::info): New.
7303 (target_ops::shortname, target_ops::longname, target_ops::doc): No
7304 longer virtual. Implement in terms of target_info.
7305 (set_native_target, get_native_target): Declare.
7306 (target_open_ftype): New.
7307 (add_target, add_target_with_completer)
7308 (add_deprecated_target_alias): Change prototype.
7309 (test_target) <shortname, longname, doc>: Delete.
7311 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7312 add_inf_child_target.
7313 * tracefile-tfile.c (tfile_target_info): New.
7314 (tfile_target) <shortname, longname, doc>: Delete.
7316 (tfile_target::open): Rename to ...
7317 (tfile_target_open): ... this.
7318 (_initialize_tracefile_tfile): Adjust.
7319 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7320 add_inf_child_target.
7321 * windows-nat.c (_initialize_windows_nat): Use
7322 add_inf_child_target.
7323 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7324 add_inf_child_target.
7328 * linux-nat.h (linux_nat_target) <low_new_thread,
7329 low_delete_thread, low_new_fork, low_forget_process,
7330 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7331 New virtual methods.
7332 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7333 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7334 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7335 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7336 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7338 * linux-fork.c (delete_fork): Adjust to call low method.
7339 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7340 (linux_nat_new_fork, linux_nat_forget_process_hook)
7341 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7342 (linux_nat_status_is_event):
7343 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7344 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7346 (sigtrap_is_event): Rename to ...
7347 (linux_nat_target::low_status_is_event): ... this.
7348 (linux_nat_set_status_is_event): Delete.
7349 (save_stop_reason, linux_nat_wait_1)
7350 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7352 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7353 (linux_nat_set_new_fork, linux_nat_set_forget_process)
7354 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7355 (linux_nat_set_prepare_to_resume): Delete.
7356 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7357 low virtual methods.
7358 * amd64-linux-nat.c: Likewise.
7359 * arm-linux-nat.c: Likewise.
7360 * i386-linux-nat.c: Likewise.
7361 * ia64-linux-nat.c: Likewise.
7362 * mips-linux-nat.c: Likewise.
7363 * ppc-linux-nat.c: Likewise.
7364 * s390-linux-nat.c: Likewise.
7365 * sparc64-linux-nat.c: Likewise.
7366 * x86-linux-nat.c: Likewise.
7367 * x86-linux-nat.h: Include "nat/x86-linux.h".
7368 (x86_linux_nat_target) <low_new_fork, low_forget_process,
7369 low_prepare_to_resume, low_new_thread, low_delete_thread>:
7374 * target.h (target_ops)
7375 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7376 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7377 stopped_by_watchpoint, have_continuable_watchpoint,
7378 stopped_data_address, watchpoint_addr_within_range,
7379 can_accel_watchpoint_condition, can_run, thread_alive,
7380 has_all_memory, has_memory, has_stack, has_registers,
7381 has_execution, can_async_p, is_async_p, supports_non_stop,
7382 always_non_stop_p, can_execute_reverse, supports_multi_process,
7383 supports_enable_disable_tracepoint,
7384 supports_disable_randomization, supports_string_tracing,
7385 supports_evaluation_of_breakpoint_conditions,
7386 can_run_breakpoint_commands, filesystem_is_local,
7387 can_download_tracepoint, get_trace_state_variable_value,
7388 set_trace_notes, get_tib_address, use_agent, can_use_agent,
7389 record_is_replaying, record_will_replay,
7390 augmented_libraries_svr4_read>: Adjust to return bool.
7391 * aarch64-linux-nat.c: All implementations adjusted.
7392 * aix-thread.c: All implementations adjusted.
7393 * arm-linux-nat.c: All implementations adjusted.
7394 * breakpoint.c: All implementations adjusted.
7395 * bsd-kvm.c: All implementations adjusted.
7396 * bsd-uthread.c: All implementations adjusted.
7397 * corelow.c: All implementations adjusted.
7398 * ctf.c: All implementations adjusted.
7399 * darwin-nat.c: All implementations adjusted.
7400 * darwin-nat.h: All implementations adjusted.
7401 * exec.c: All implementations adjusted.
7402 * fbsd-nat.c: All implementations adjusted.
7403 * fbsd-nat.h: All implementations adjusted.
7404 * gnu-nat.c: All implementations adjusted.
7405 * gnu-nat.h: All implementations adjusted.
7406 * go32-nat.c: All implementations adjusted.
7407 * ia64-linux-nat.c: All implementations adjusted.
7408 * inf-child.c: All implementations adjusted.
7409 * inf-child.h: All implementations adjusted.
7410 * inf-ptrace.c: All implementations adjusted.
7411 * inf-ptrace.h: All implementations adjusted.
7412 * linux-nat.c: All implementations adjusted.
7413 * linux-nat.h: All implementations adjusted.
7414 * mips-linux-nat.c: All implementations adjusted.
7415 * nto-procfs.c: All implementations adjusted.
7416 * ppc-linux-nat.c: All implementations adjusted.
7417 * procfs.c: All implementations adjusted.
7418 * ravenscar-thread.c: All implementations adjusted.
7419 * record-btrace.c: All implementations adjusted.
7420 * record-full.c: All implementations adjusted.
7421 * remote-sim.c: All implementations adjusted.
7422 * remote.c: All implementations adjusted.
7423 * s390-linux-nat.c: All implementations adjusted.
7424 * sol-thread.c: All implementations adjusted.
7425 * spu-multiarch.c: All implementations adjusted.
7426 * target-delegates.c: All implementations adjusted.
7427 * target.c: All implementations adjusted.
7428 * target.h: All implementations adjusted.
7429 * tracefile-tfile.c: All implementations adjusted.
7430 * tracefile.c: All implementations adjusted.
7431 * tracefile.h: All implementations adjusted.
7432 * windows-nat.c: All implementations adjusted.
7433 * x86-linux-nat.h: All implementations adjusted.
7434 * x86-nat.h: All implementations adjusted.
7438 * make-target-delegates (scan_target_h): Don't trim lines here.
7439 Replace sequences of tabs and/or whitespace with a single
7441 (top level, parsing methods): Trim each line before processing it
7447 * target.h (enum strata) <debug_stratum>: New.
7448 (struct target_ops) <all delegation methods>: Replace by C++
7449 virtual methods, and drop "to_" prefix. All references updated
7451 <to_shortname, to_longname, to_doc, to_data,
7452 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7453 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7454 virtual methods. All references updated throughout.
7455 <can_attach, supports_terminal_ours, can_create_inferior,
7456 get_thread_control_capabilities, attach_no_wait>: New
7458 <insert_breakpoint, remove_breakpoint>: Now
7459 TARGET_DEFAULT_NORETURN methods.
7460 <info_proc>: Now returns bool.
7462 (OPS_MAGIC): Delete.
7463 (current_target): Delete. All references replaced by references
7465 (target_stack): ... this. New.
7466 (target_shortname, target_longname): Adjust.
7467 (target_can_run): Now a function declaration.
7468 (default_child_has_all_memory, default_child_has_memory)
7469 (default_child_has_stack, default_child_has_registers)
7470 (default_child_has_execution): Remove target_ops parameter.
7471 (complete_target_initialization): Delete.
7472 (memory_breakpoint_target): New template class.
7473 (test_target_ops): Refactor as a C++ class with virtual methods.
7474 * make-target-delegates (NAME_PART): Tighten.
7475 (POINTER_PART, CP_SYMBOL): New.
7476 (SIMPLE_RETURN_PART): Reimplement.
7477 (VEC_RETURN_PART): Expect less.
7478 (RETURN_PART, VIRTUAL_PART): New.
7479 (METHOD): Adjust to C++ virtual methods.
7480 (scan_target_h): Remove reference to C99.
7481 (dname): Output "target_ops::" prefix.
7482 (write_function_header): Adjust to output a C++ class method.
7483 (write_declaration): New.
7484 (write_delegator): Adjust to output a C++ class method.
7485 (tdname): Output "dummy_target::" prefix.
7486 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7488 (tdefault_names, debug_names): Delete.
7489 (return_types, tdefaults, styles, argtypes_array): New.
7490 (top level): All methods are delegators.
7492 (top level): Print dummy_target and debug_target classes.
7493 * target-delegates.c: Regenerate.
7494 * target-debug.h (target_debug_print_enum_info_proc_what)
7495 (target_debug_print_thread_control_capabilities)
7496 (target_debug_print_thread_info_p): New.
7497 * target.c (dummy_target): Delete.
7498 (the_dummy_target, the_debug_target): New.
7499 (target_stack): Now extern.
7500 (set_targetdebug): Push/unpush debug target.
7501 (default_child_has_all_memory, default_child_has_memory)
7502 (default_child_has_stack, default_child_has_registers)
7503 (default_child_has_execution): Remove target_ops parameter.
7504 (complete_target_initialization): Delete.
7505 (add_target_with_completer): No longer call
7506 complete_target_initialization.
7507 (target_supports_terminal_ours): Use regular delegation.
7508 (update_current_target): Delete.
7509 (push_target): No longer check magic number. Don't call
7510 update_current_target.
7511 (unpush_target): Don't call update_current_target.
7512 (target_is_pushed): No longer check magic number.
7513 (target_require_runnable): Skip for all stratums over
7515 (target_ops::info_proc): New.
7516 (target_info_proc): Use find_target_at and
7517 find_default_run_target.
7518 (target_supports_disable_randomization): Use regular delegation.
7519 (target_get_osdata): Use find_target_at.
7520 (target_ops::open, target_ops::close, target_ops::can_attach)
7521 (target_ops::attach, target_ops::can_create_inferior)
7522 (target_ops::create_inferior, target_ops::can_run)
7523 (target_can_run): New.
7524 (default_fileio_target): Use regular delegation.
7525 (target_ops::fileio_open, target_ops::fileio_pwrite)
7526 (target_ops::fileio_pread, target_ops::fileio_fstat)
7527 (target_ops::fileio_close, target_ops::fileio_unlink)
7528 (target_ops::fileio_readlink): New.
7529 (target_fileio_open_1, target_fileio_unlink)
7530 (target_fileio_readlink): Always call the target method. Handle
7532 (return_zero, return_zero_has_execution): Delete.
7533 (init_dummy_target): Delete.
7534 (dummy_target::dummy_target, dummy_target::shortname)
7535 (dummy_target::longname, dummy_target::doc)
7536 (debug_target::debug_target, debug_target::shortname)
7537 (debug_target::longname, debug_target::doc): New.
7538 (target_supports_delete_record): Use regular delegation.
7539 (setup_target_debug): Delete.
7540 (maintenance_print_target_stack): Skip debug_stratum.
7541 (initialize_targets): Instantiate the_dummy_target and
7543 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7545 (target_auxv_search, fprint_target_auxv): Adjust.
7546 (info_auxv_command): Adjust to use target_stack.
7547 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7548 * exceptions.c (print_flush): Handle a NULL target_stack.
7549 * regcache.c (target_ops_no_register): Refactor as class with
7552 * exec.c (exec_target): New class.
7553 (exec_ops): Now an exec_target.
7554 (exec_open, exec_close_1, exec_get_section_table)
7555 (exec_xfer_partial, exec_files_info, exec_has_memory)
7556 (exec_make_note_section): Refactor as exec_target methods.
7557 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7559 (exec_target::find_memory_regions): New.
7560 (_initialize_exec): Don't call init_exec_ops.
7561 * gdbcore.h (exec_file_clear): Delete.
7563 * corefile.c (core_target): Delete.
7564 (core_file_command): Adjust.
7565 * corelow.c (core_target): New class.
7566 (the_core_target): New.
7567 (core_close): Remove target_ops parameter.
7568 (core_close_cleanup): Adjust.
7569 (core_target::close): New.
7570 (core_open, core_detach, get_core_registers, core_files_info)
7571 (core_xfer_partial, core_thread_alive, core_read_description)
7572 (core_pid_to_str, core_thread_name, core_has_memory)
7573 (core_has_stack, core_has_registers, core_info_proc): Rework as
7574 core_target methods.
7575 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7576 (_initialize_corelow): Initialize the_core_target.
7577 * gdbcore.h (core_target): Delete.
7578 (the_core_target): New.
7580 * ctf.c: (ctf_target): New class.
7581 (ctf_ops): Now a ctf_target.
7582 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7583 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7584 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7586 (init_ctf_ops): Delete.
7587 (_initialize_ctf): Don't call it.
7588 * tracefile-tfile.c (tfile_target): New class.
7589 (tfile_ops): Now a tfile_target.
7590 (tfile_open, tfile_close, tfile_files_info)
7591 (tfile_get_tracepoint_status, tfile_trace_find)
7592 (tfile_fetch_registers, tfile_xfer_partial)
7593 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7594 Refactor as tfile_target methods.
7595 (tfile_xfer_partial_features): Remove target_ops parameter.
7596 (init_tfile_ops): Delete.
7597 (_initialize_tracefile_tfile): Don't call it.
7598 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7599 (tracefile_has_stack, tracefile_has_registers)
7600 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7601 tracefile_target methods.
7602 (init_tracefile_ops): Delete.
7603 (tracefile_target::tracefile_target): New.
7604 * tracefile.h: Include "target.h".
7605 (tracefile_target): New class.
7606 (init_tracefile_ops): Delete.
7608 * spu-multiarch.c (spu_multiarch_target): New class.
7609 (spu_ops): Now a spu_multiarch_target.
7610 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7611 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7612 (spu_search_memory, spu_mourn_inferior): Refactor as
7613 spu_multiarch_target methods.
7614 (init_spu_ops): Delete.
7615 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7616 complete_target_initialization.
7618 * ravenscar-thread.c (ravenscar_thread_target): New class.
7619 (ravenscar_ops): Now a ravenscar_thread_target.
7620 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7621 (ravenscar_thread_alive, ravenscar_pid_to_str)
7622 (ravenscar_fetch_registers, ravenscar_store_registers)
7623 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7624 (ravenscar_stopped_by_hw_breakpoint)
7625 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7626 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7627 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7629 (init_ravenscar_thread_ops): Delete.
7630 (_initialize_ravenscar): Remove references to
7631 init_ravenscar_thread_ops and complete_target_initialization.
7633 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7634 (bsd_uthread_target): New class.
7635 (bsd_uthread_ops): Now a bsd_uthread_target.
7636 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7637 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7638 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7639 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7640 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7641 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7642 (bsd_uthread_target): Delete function.
7643 (_initialize_bsd_uthread): Remove reference to
7644 complete_target_initialization.
7646 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7647 (target_bfd): ... this new class.
7648 (target_bfd_xfer_partial, target_bfd_get_section_table)
7649 (target_bfd_close): Refactor as target_bfd methods.
7650 (target_bfd::~target_bfd): New.
7651 (target_bfd_reopen): Adjust.
7652 (target_bfd::close): New.
7654 * record-btrace.c (record_btrace_target): New class.
7655 (record_btrace_ops): Now a record_btrace_target.
7656 (record_btrace_open, record_btrace_stop_recording)
7657 (record_btrace_disconnect, record_btrace_close)
7658 (record_btrace_async, record_btrace_info)
7659 (record_btrace_insn_history, record_btrace_insn_history_range)
7660 (record_btrace_insn_history_from, record_btrace_call_history)
7661 (record_btrace_call_history_range)
7662 (record_btrace_call_history_from, record_btrace_record_method)
7663 (record_btrace_is_replaying, record_btrace_will_replay)
7664 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7665 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7666 (record_btrace_store_registers, record_btrace_prepare_to_store)
7667 (record_btrace_to_get_unwinder)
7668 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7669 (record_btrace_commit_resume, record_btrace_wait)
7670 (record_btrace_stop, record_btrace_can_execute_reverse)
7671 (record_btrace_stopped_by_sw_breakpoint)
7672 (record_btrace_supports_stopped_by_sw_breakpoint)
7673 (record_btrace_stopped_by_hw_breakpoint)
7674 (record_btrace_supports_stopped_by_hw_breakpoint)
7675 (record_btrace_update_thread_list, record_btrace_thread_alive)
7676 (record_btrace_goto_begin, record_btrace_goto_end)
7677 (record_btrace_goto, record_btrace_stop_replaying_all)
7678 (record_btrace_execution_direction)
7679 (record_btrace_prepare_to_generate_core)
7680 (record_btrace_done_generating_core): Refactor as
7681 record_btrace_target methods.
7682 (init_record_btrace_ops): Delete.
7683 (_initialize_record_btrace): Remove reference to
7684 init_record_btrace_ops.
7685 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7686 the execution_direction global.
7687 (record_full_base_target, record_full_target)
7688 (record_full_core_target): New classes.
7689 (record_full_ops): Now a record_full_target.
7690 (record_full_core_ops): Now a record_full_core_target.
7691 (record_full_target::detach, record_full_target::disconnect)
7692 (record_full_core_target::disconnect)
7693 (record_full_target::mourn_inferior, record_full_target::kill):
7695 (record_full_open, record_full_close, record_full_async): Refactor
7696 as methods of the record_full_base_target class.
7697 (record_full_resume, record_full_commit_resume): Refactor
7698 as methods of the record_full_target class.
7699 (record_full_wait, record_full_stopped_by_watchpoint)
7700 (record_full_stopped_data_address)
7701 (record_full_stopped_by_sw_breakpoint)
7702 (record_full_supports_stopped_by_sw_breakpoint)
7703 (record_full_stopped_by_hw_breakpoint)
7704 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7705 methods of the record_full_base_target class.
7706 (record_full_store_registers, record_full_xfer_partial)
7707 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7708 Refactor as methods of the record_full_target class.
7709 (record_full_can_execute_reverse, record_full_get_bookmark)
7710 (record_full_goto_bookmark, record_full_execution_direction)
7711 (record_full_record_method, record_full_info, record_full_delete)
7712 (record_full_is_replaying, record_full_will_replay)
7713 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7714 (record_full_stop_replaying): Refactor as methods of the
7715 record_full_base_target class.
7716 (record_full_core_resume, record_full_core_kill)
7717 (record_full_core_fetch_registers)
7718 (record_full_core_prepare_to_store)
7719 (record_full_core_store_registers, record_full_core_xfer_partial)
7720 (record_full_core_insert_breakpoint)
7721 (record_full_core_remove_breakpoint)
7722 (record_full_core_has_execution): Refactor
7723 as methods of the record_full_core_target class.
7724 (record_full_base_target::supports_delete_record): New.
7725 (init_record_full_ops): Delete.
7726 (init_record_full_core_ops): Delete.
7727 (record_full_save): Refactor as method of the
7728 record_full_base_target class.
7729 (_initialize_record_full): Remove references to
7730 init_record_full_ops and init_record_full_core_ops.
7732 * remote.c (remote_target, extended_remote_target): New classes.
7733 (remote_ops): Now a remote_target.
7734 (extended_remote_ops): Now an extended_remote_target.
7735 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7736 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7737 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7738 (remote_pass_signals, remote_set_syscall_catchpoint)
7739 (remote_program_signals, )
7740 (remote_thread_always_alive): Remove target_ops parameter.
7741 (remote_thread_alive, remote_thread_name)
7742 (remote_update_thread_list, remote_threads_extra_info)
7743 (remote_static_tracepoint_marker_at)
7744 (remote_static_tracepoint_markers_by_strid)
7745 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7746 (remote_open): Refactor as methods of remote_target.
7747 (extended_remote_open, extended_remote_detach)
7748 (extended_remote_attach, extended_remote_post_attach):
7749 (extended_remote_supports_disable_randomization)
7750 (extended_remote_create_inferior): : Refactor as method of
7751 extended_remote_target.
7752 (remote_set_permissions, remote_open_1, remote_detach)
7753 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7754 (remote_resume, remote_commit_resume, remote_stop)
7755 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7756 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7757 (remote_prepare_to_store, remote_store_registers)
7758 (remote_flash_erase, remote_flash_done, remote_files_info)
7759 (remote_kill, remote_mourn, remote_insert_breakpoint)
7760 (remote_remove_breakpoint, remote_insert_watchpoint)
7761 (remote_watchpoint_addr_within_range)
7762 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7763 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7764 (remote_supports_stopped_by_sw_breakpoint)
7765 (remote_stopped_by_hw_breakpoint)
7766 (remote_supports_stopped_by_hw_breakpoint)
7767 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7768 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7769 (remote_verify_memory): Refactor as methods of remote_target.
7770 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7772 (remote_xfer_partial, remote_get_memory_xfer_limit)
7773 (remote_search_memory, remote_rcmd, remote_memory_map)
7774 (remote_pid_to_str, remote_get_thread_local_address)
7775 (remote_get_tib_address, remote_read_description): Refactor as
7776 methods of remote_target.
7777 (remote_target::fileio_open, remote_target::fileio_pwrite)
7778 (remote_target::fileio_pread, remote_target::fileio_close): New.
7779 (remote_hostio_readlink, remote_hostio_fstat)
7780 (remote_filesystem_is_local, remote_can_execute_reverse)
7781 (remote_supports_non_stop, remote_supports_disable_randomization)
7782 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7783 (remote_supports_enable_disable_tracepoint)
7784 (remote_supports_string_tracing)
7785 (remote_can_run_breakpoint_commands, remote_trace_init)
7786 (remote_download_tracepoint, remote_can_download_tracepoint)
7787 (remote_download_trace_state_variable, remote_enable_tracepoint)
7788 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7789 (remote_trace_start, remote_get_trace_status)
7790 (remote_get_tracepoint_status, remote_trace_stop)
7791 (remote_trace_find, remote_get_trace_state_variable_value)
7792 (remote_save_trace_data, remote_get_raw_trace_data)
7793 (remote_set_disconnected_tracing, remote_core_of_thread)
7794 (remote_set_circular_trace_buffer, remote_traceframe_info)
7795 (remote_get_min_fast_tracepoint_insn_len)
7796 (remote_set_trace_buffer_size, remote_set_trace_notes)
7797 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7798 (remote_disable_btrace, remote_teardown_btrace)
7799 (remote_read_btrace, remote_btrace_conf)
7800 (remote_augmented_libraries_svr4_read, remote_load)
7801 (remote_pid_to_exec_file, remote_can_do_single_step)
7802 (remote_execution_direction, remote_thread_handle_to_thread_info):
7803 Refactor as methods of remote_target.
7804 (init_remote_ops, init_extended_remote_ops): Delete.
7805 (remote_can_async_p, remote_is_async_p, remote_async)
7806 (remote_thread_events, remote_upload_tracepoints)
7807 (remote_upload_trace_state_variables): Refactor as methods of
7809 (_initialize_remote): Remove references to init_remote_ops and
7810 init_extended_remote_ops.
7812 * remote-sim.c (gdbsim_target): New class.
7813 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7814 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7815 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7816 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7817 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7818 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7819 Refactor as methods of gdbsim_target.
7820 (gdbsim_ops): Now a gdbsim_target.
7821 (init_gdbsim_ops): Delete.
7822 (gdbsim_cntrl_c): Adjust.
7823 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7825 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7826 (the_amd64_linux_nat_target): New.
7827 (amd64_linux_fetch_inferior_registers)
7828 (amd64_linux_store_inferior_registers): Refactor as methods of
7829 amd64_linux_nat_target.
7830 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7831 * i386-linux-nat.c: Don't include "linux-nat.h".
7832 (i386_linux_nat_target): New class.
7833 (the_i386_linux_nat_target): New.
7834 (i386_linux_fetch_inferior_registers)
7835 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7836 as methods of i386_linux_nat_target.
7837 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7838 * inf-child.c (inf_child_ops): Delete.
7839 (inf_child_fetch_inferior_registers)
7840 (inf_child_store_inferior_registers): Delete.
7841 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7842 methods of inf_child_target.
7843 (inf_child_target::supports_terminal_ours)
7844 (inf_child_target::terminal_init)
7845 (inf_child_target::terminal_inferior)
7846 (inf_child_target::terminal_ours_for_output)
7847 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7848 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7850 (inf_child_open, inf_child_disconnect, inf_child_close)
7851 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7852 (inf_child_post_startup_inferior, inf_child_can_run)
7853 (inf_child_pid_to_exec_file): Refactor as methods of
7855 (inf_child_follow_fork): Delete.
7856 (inf_child_target::can_create_inferior)
7857 (inf_child_target::can_attach): New.
7858 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7859 (inf_child_target::has_stack, inf_child_target::has_registers)
7860 (inf_child_target::has_execution): New.
7861 (inf_child_fileio_open, inf_child_fileio_pwrite)
7862 (inf_child_fileio_pread, inf_child_fileio_fstat)
7863 (inf_child_fileio_close, inf_child_fileio_unlink)
7864 (inf_child_fileio_readlink, inf_child_use_agent)
7865 (inf_child_can_use_agent): Refactor as methods of
7867 (return_zero, inf_child_target): Delete.
7868 (inf_child_target::inf_child_target): New.
7869 * inf-child.h: Include "target.h".
7870 (inf_child_target): Delete function prototype.
7871 (inf_child_target): New class.
7872 (inf_child_open_target, inf_child_mourn_inferior)
7873 (inf_child_maybe_unpush_target): Delete.
7874 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7875 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7876 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7877 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7878 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7879 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7880 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7881 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7882 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7883 methods of inf_ptrace_target.
7884 (inf_ptrace_target): Delete function.
7885 * inf-ptrace.h: Include "inf-child.h".
7886 (inf_ptrace_target): Delete function declaration.
7887 (inf_ptrace_target): New class.
7888 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7889 * linux-nat.c (linux_target): New.
7890 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7891 (linux_nat_target::~linux_nat_target): New.
7892 (linux_child_post_attach, linux_child_post_startup_inferior)
7893 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7894 (linux_child_remove_fork_catchpoint)
7895 (linux_child_insert_vfork_catchpoint)
7896 (linux_child_remove_vfork_catchpoint)
7897 (linux_child_insert_exec_catchpoint)
7898 (linux_child_remove_exec_catchpoint)
7899 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7900 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7901 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7902 (linux_nat_stopped_data_address)
7903 (linux_nat_stopped_by_sw_breakpoint)
7904 (linux_nat_supports_stopped_by_sw_breakpoint)
7905 (linux_nat_stopped_by_hw_breakpoint)
7906 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7907 (linux_nat_kill, linux_nat_mourn_inferior)
7908 (linux_nat_xfer_partial, linux_nat_thread_alive)
7909 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7910 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7911 (linux_child_static_tracepoint_markers_by_strid)
7912 (linux_nat_is_async_p, linux_nat_can_async_p)
7913 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7914 (linux_nat_supports_multi_process)
7915 (linux_nat_supports_disable_randomization, linux_nat_async)
7916 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7917 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7918 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7919 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7920 methods of linux_nat_target.
7921 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7922 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7924 (check_stopped_by_watchpoint): Adjust.
7925 (linux_xfer_partial): Delete.
7926 (linux_target_install_ops, linux_target, linux_nat_add_target):
7928 (linux_nat_target::linux_nat_target): New.
7929 * linux-nat.h: Include "inf-ptrace.h".
7930 (linux_nat_target): New.
7931 (linux_target, linux_target_install_ops, linux_nat_add_target):
7932 Delete function declarations.
7933 (linux_target): Declare global.
7934 * linux-thread-db.c (thread_db_target): New.
7935 (thread_db_target::thread_db_target): New.
7936 (thread_db_ops): Delete.
7937 (the_thread_db_target): New.
7938 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7939 (thread_db_update_thread_list, thread_db_pid_to_str)
7940 (thread_db_extra_thread_info)
7941 (thread_db_thread_handle_to_thread_info)
7942 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7943 (thread_db_resume): Refactor as methods of thread_db_target.
7944 (init_thread_db_ops): Delete.
7945 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7946 * x86-linux-nat.c: Don't include "linux-nat.h".
7947 (super_post_startup_inferior): Delete.
7948 (x86_linux_nat_target::~x86_linux_nat_target): New.
7949 (x86_linux_child_post_startup_inferior)
7950 (x86_linux_read_description, x86_linux_enable_btrace)
7951 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7952 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7953 methods of x86_linux_nat_target.
7954 (x86_linux_create_target): Delete. Bits folded ...
7955 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7957 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7958 (x86_linux_nat_target): New class.
7959 (x86_linux_create_target): Delete.
7960 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7961 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7962 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7963 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7964 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7965 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7967 (x86_use_watchpoints): Delete.
7968 * x86-nat.h: Include "breakpoint.h" and "target.h".
7969 (x86_use_watchpoints): Delete.
7970 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7971 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7972 (x86_insert_watchpoint, x86_remove_watchpoint)
7973 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7974 (x86_stopped_by_hw_breakpoint): New declarations.
7975 (x86_nat_target): New template class.
7977 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7978 (the_ppc_linux_nat_target): New.
7979 (ppc_linux_fetch_inferior_registers)
7980 (ppc_linux_can_use_hw_breakpoint)
7981 (ppc_linux_region_ok_for_hw_watchpoint)
7982 (ppc_linux_ranged_break_num_registers)
7983 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7984 (ppc_linux_insert_mask_watchpoint)
7985 (ppc_linux_remove_mask_watchpoint)
7986 (ppc_linux_can_accel_watchpoint_condition)
7987 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7988 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7989 (ppc_linux_watchpoint_addr_within_range)
7990 (ppc_linux_masked_watch_num_registers)
7991 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7992 (ppc_linux_read_description): Refactor as methods of
7993 ppc_linux_nat_target.
7994 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7996 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7997 (procfs_target): New class.
7998 (the_procfs_target): New.
7999 (procfs_target): Delete function.
8000 (procfs_auxv_parse, procfs_attach, procfs_detach)
8001 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8002 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8003 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8004 (procfs_create_inferior, procfs_update_thread_list)
8005 (procfs_thread_alive, procfs_pid_to_str)
8006 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8007 (procfs_stopped_data_address, procfs_insert_watchpoint)
8008 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8009 (proc_find_memory_regions, procfs_info_proc)
8010 (procfs_make_note_section): Refactor as methods of procfs_target.
8011 (_initialize_procfs): Adjust.
8012 * sol-thread.c (sol_thread_target): New class.
8013 (sol_thread_ops): Now a sol_thread_target.
8014 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8015 (sol_thread_fetch_registers, sol_thread_store_registers)
8016 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8017 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8018 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8019 (init_sol_thread_ops): Delete.
8020 (_initialize_sol_thread): Adjust. Remove references to
8021 init_sol_thread_ops and complete_target_initialization.
8023 * windows-nat.c (windows_nat_target): New class.
8024 (windows_fetch_inferior_registers)
8025 (windows_store_inferior_registers, windows_resume, windows_wait)
8026 (windows_attach, windows_detach, windows_pid_to_exec_file)
8027 (windows_files_info, windows_create_inferior)
8028 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8029 (windows_close, windows_pid_to_str, windows_xfer_partial)
8030 (windows_get_tib_address, windows_get_ada_task_ptid)
8031 (windows_thread_name, windows_thread_alive): Refactor as
8032 windows_nat_target methods.
8033 (do_initial_windows_stuff): Adjust.
8034 (windows_target): Delete function.
8035 (_initialize_windows_nat): Adjust.
8037 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8038 (darwin_mourn_inferior, darwin_kill_inferior)
8039 (darwin_create_inferior, darwin_attach, darwin_detach)
8040 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8041 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8042 (darwin_supports_multi_process): Refactor as darwin_nat_target
8044 (darwin_resume_to, darwin_files_info): Delete.
8045 (_initialize_darwin_inferior): Rename to ...
8046 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8047 * darwin-nat.h: Include "inf-child.h".
8048 (darwin_nat_target): New class.
8049 (darwin_complete_target): Delete.
8050 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8051 (darwin_target): New.
8052 (i386_darwin_fetch_inferior_registers)
8053 (i386_darwin_store_inferior_registers): Refactor as methods of
8055 (darwin_complete_target): Delete, with ...
8056 (_initialize_i386_darwin_nat): ... bits factored out here.
8058 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8059 (the_alpha_linux_nat_target): New.
8060 (alpha_linux_register_u_offset): Refactor as
8061 alpha_linux_nat_target method.
8062 (_initialize_alpha_linux_nat): Adjust.
8063 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8064 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8065 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8066 methods of linux_nat_trad_target.
8067 (linux_trad_target): Delete.
8068 * linux-nat-trad.h (linux_trad_target): Delete function.
8069 (linux_nat_trad_target): New class.
8070 * mips-linux-nat.c (mips_linux_nat_target): New class.
8071 (super_fetch_registers, super_store_registers, super_close):
8073 (the_mips_linux_nat_target): New.
8074 (mips64_linux_regsets_fetch_registers)
8075 (mips64_linux_regsets_store_registers)
8076 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8077 (mips_linux_register_u_offset, mips_linux_read_description)
8078 (mips_linux_can_use_hw_breakpoint)
8079 (mips_linux_stopped_by_watchpoint)
8080 (mips_linux_stopped_data_address)
8081 (mips_linux_region_ok_for_hw_watchpoint)
8082 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8083 (mips_linux_close): Refactor as methods of mips_linux_nat.
8084 (_initialize_mips_linux_nat): Adjust to C++ification.
8086 * aix-thread.c (aix_thread_target): New class.
8087 (aix_thread_ops): Now an aix_thread_target.
8088 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8089 (aix_thread_fetch_registers, aix_thread_store_registers)
8090 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8091 (aix_thread_thread_alive, aix_thread_pid_to_str)
8092 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8093 Refactor as methods of aix_thread_target.
8094 (init_aix_thread_ops): Delete.
8095 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8096 and complete_target_initialization.
8097 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8098 (rs6000_nat_target): New class.
8099 (the_rs6000_nat_target): New.
8100 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8101 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8102 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8103 (super_create_inferior): Delete.
8104 (_initialize_rs6000_nat): Adjust to C++ification.
8106 * arm-linux-nat.c (arm_linux_nat_target): New class.
8107 (the_arm_linux_nat_target): New.
8108 (arm_linux_fetch_inferior_registers)
8109 (arm_linux_store_inferior_registers, arm_linux_read_description)
8110 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8111 (arm_linux_remove_hw_breakpoint)
8112 (arm_linux_region_ok_for_hw_watchpoint)
8113 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8114 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8115 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8116 arm_linux_nat_target.
8117 (_initialize_arm_linux_nat): Adjust to C++ification.
8119 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8120 (the_aarch64_linux_nat_target): New.
8121 (aarch64_linux_fetch_inferior_registers)
8122 (aarch64_linux_store_inferior_registers)
8123 (aarch64_linux_child_post_startup_inferior)
8124 (aarch64_linux_read_description)
8125 (aarch64_linux_can_use_hw_breakpoint)
8126 (aarch64_linux_insert_hw_breakpoint)
8127 (aarch64_linux_remove_hw_breakpoint)
8128 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8129 (aarch64_linux_region_ok_for_hw_watchpoint)
8130 (aarch64_linux_stopped_data_address)
8131 (aarch64_linux_stopped_by_watchpoint)
8132 (aarch64_linux_watchpoint_addr_within_range)
8133 (aarch64_linux_can_do_single_step): Refactor as methods of
8134 aarch64_linux_nat_target.
8135 (super_post_startup_inferior): Delete.
8136 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8138 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8139 (the_hppa_linux_nat_target): New.
8140 (hppa_linux_fetch_inferior_registers)
8141 (hppa_linux_store_inferior_registers): Refactor as methods of
8142 hppa_linux_nat_target.
8143 (_initialize_hppa_linux_nat): Adjust to C++ification.
8145 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8146 (the_ia64_linux_nat_target): New.
8147 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8148 (ia64_linux_stopped_data_address)
8149 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8150 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8151 ia64_linux_nat_target methods.
8152 (super_xfer_partial): Delete.
8153 (_initialize_ia64_linux_nat): Adjust to C++ification.
8155 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8156 (the_m32r_linux_nat_target): New.
8157 (m32r_linux_fetch_inferior_registers)
8158 (m32r_linux_store_inferior_registers): Refactor as
8159 m32r_linux_nat_target methods.
8160 (_initialize_m32r_linux_nat): Adjust to C++ification.
8162 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8163 (the_m68k_linux_nat_target): New.
8164 (m68k_linux_fetch_inferior_registers)
8165 (m68k_linux_store_inferior_registers): Refactor as
8166 m68k_linux_nat_target methods.
8167 (_initialize_m68k_linux_nat): Adjust to C++ification.
8169 * s390-linux-nat.c (s390_linux_nat_target): New class.
8170 (the_s390_linux_nat_target): New.
8171 (s390_linux_fetch_inferior_registers)
8172 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8173 (s390_insert_watchpoint, s390_remove_watchpoint)
8174 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8175 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8176 (s390_auxv_parse, s390_read_description): Refactor as methods of
8177 s390_linux_nat_target.
8178 (_initialize_s390_nat): Adjust to C++ification.
8180 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8181 (the_sparc_linux_nat_target): New.
8182 (_initialize_sparc_linux_nat): Adjust to C++ification.
8183 * sparc-nat.c (sparc_fetch_inferior_registers)
8184 (sparc_store_inferior_registers): Remove target_ops parameter.
8185 * sparc-nat.h (sparc_fetch_inferior_registers)
8186 (sparc_store_inferior_registers): Remove target_ops parameter.
8187 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8188 (the_sparc64_linux_nat_target): New.
8189 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8191 * spu-linux-nat.c (spu_linux_nat_target): New class.
8192 (the_spu_linux_nat_target): New.
8193 (spu_child_post_startup_inferior, spu_child_post_attach)
8194 (spu_child_wait, spu_fetch_inferior_registers)
8195 (spu_store_inferior_registers, spu_xfer_partial)
8196 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8198 (_initialize_spu_nat): Adjust to C++ification.
8200 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8201 (the_tilegx_linux_nat_target): New.
8202 (fetch_inferior_registers, store_inferior_registers):
8203 Refactor as methods.
8204 (_initialize_tile_linux_nat): Adjust to C++ification.
8206 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8207 (the_xtensa_linux_nat_target): New.
8208 (xtensa_linux_fetch_inferior_registers)
8209 (xtensa_linux_store_inferior_registers): Refactor as
8210 xtensa_linux_nat_target methods.
8211 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8213 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8214 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8215 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8216 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8217 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8218 (fbsd_stopped_by_sw_breakpoint)
8219 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8220 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8221 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8222 (fbsd_post_startup_inferior, fbsd_post_attach)
8223 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8224 (fbsd_set_syscall_catchpoint)
8225 (super_xfer_partial, super_resume, super_wait)
8226 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8227 (fbsd_handle_debug_trap): Remove target_ops parameter.
8228 (fbsd_nat_add_target): Delete.
8229 * fbsd-nat.h: Include "inf-ptrace.h".
8230 (fbsd_nat_add_target): Delete.
8231 (USE_SIGTRAP_SIGINFO): Define.
8232 (fbsd_nat_target): New class.
8234 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8235 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8236 (amd64bsd_target): Delete.
8237 * amd64-bsd-nat.h: New file.
8238 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8240 (amd64_fbsd_nat_target): New class.
8241 (the_amd64_fbsd_nat_target): New.
8242 (amd64fbsd_read_description): Refactor as method of
8243 amd64_fbsd_nat_target.
8244 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8245 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8246 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8247 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8248 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8249 (i386bsd_target): Delete.
8250 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8251 (i386bsd_fetch_inferior_registers)
8252 (i386bsd_store_inferior_registers): Declare.
8253 (i386_bsd_nat_target): New class.
8254 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8255 (the_i386_fbsd_nat_target): New.
8256 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8257 i386_fbsd_nat_target methods.
8258 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8259 (_initialize_i386fbsd_nat): Adjust to C++ification.
8260 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8261 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8262 (_initialize_x86_bsd_nat): Adjust to C++ification.
8263 * x86-bsd-nat.h: Include "x86-nat.h".
8264 (x86bsd_target): Delete declaration.
8265 (x86bsd_nat_target): New class.
8267 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8268 (the_aarch64_fbsd_nat_target): New.
8269 (aarch64_fbsd_fetch_inferior_registers)
8270 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8271 aarch64_fbsd_nat_target.
8272 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8273 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8274 (the_alpha_bsd_nat_target): New.
8275 (alphabsd_fetch_inferior_registers)
8276 (alphabsd_store_inferior_registers): Refactor as
8277 alpha_bsd_nat_target methods.
8278 (_initialize_alphabsd_nat): Refactor as methods of
8279 alpha_bsd_nat_target.
8280 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8281 (the_amd64_nbsd_nat_target): New.
8282 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8283 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8284 (the_amd64_obsd_nat_target): New.
8285 (_initialize_amd64obsd_nat): Adjust to C++ification.
8286 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8287 (the_arm_fbsd_nat_target): New.
8288 (arm_fbsd_fetch_inferior_registers)
8289 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8290 (_initialize_arm_fbsd_nat): Refactor as methods of
8291 arm_fbsd_nat_target.
8292 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8293 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8294 (the_arm_netbsd_nat_target): New.
8295 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8296 arm_netbsd_nat_target.
8297 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8298 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8299 (the_hppa_nbsd_nat_target): New.
8300 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8301 hppa_nbsd_nat_target methods.
8302 (_initialize_hppanbsd_nat): Adjust to C++ification.
8303 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8304 (the_hppa_obsd_nat_target): New.
8305 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8306 methods of hppa_obsd_nat_target.
8307 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
8309 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8310 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
8312 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8313 (_initialize_i386obsd_nat): Use add_target.
8314 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8315 (the_m68k_bsd_nat_target): New.
8316 (m68kbsd_fetch_inferior_registers)
8317 (m68kbsd_store_inferior_registers): Refactor as methods of
8318 m68k_bsd_nat_target.
8319 (_initialize_m68kbsd_nat): Adjust to C++ification.
8320 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8321 (the_mips_fbsd_nat_target): New.
8322 (mips_fbsd_fetch_inferior_registers)
8323 (mips_fbsd_store_inferior_registers): Refactor as methods of
8324 mips_fbsd_nat_target.
8325 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
8327 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8328 (the_mips_nbsd_nat_target): New.
8329 (mipsnbsd_fetch_inferior_registers)
8330 (mipsnbsd_store_inferior_registers): Refactor as methods of
8331 mips_nbsd_nat_target.
8332 (_initialize_mipsnbsd_nat): Adjust to C++ification.
8333 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8334 (the_mips64_obsd_nat_target): New.
8335 (mips64obsd_fetch_inferior_registers)
8336 (mips64obsd_store_inferior_registers): Refactor as methods of
8337 mips64_obsd_nat_target.
8338 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
8340 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8342 * nbsd-nat.h: Include "inf-ptrace.h".
8343 (nbsd_nat_target): New class.
8344 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8345 (obsd_wait): Refactor as methods of obsd_nat_target.
8346 (obsd_add_target): Delete.
8347 * obsd-nat.h: Include "inf-ptrace.h".
8348 (obsd_nat_target): New class.
8349 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8350 (the_ppc_fbsd_nat_target): New.
8351 (ppcfbsd_fetch_inferior_registers)
8352 (ppcfbsd_store_inferior_registers): Refactor as methods of
8353 ppc_fbsd_nat_target.
8354 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
8356 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8357 (the_ppc_nbsd_nat_target): New.
8358 (ppcnbsd_fetch_inferior_registers)
8359 (ppcnbsd_store_inferior_registers): Refactor as methods of
8360 ppc_nbsd_nat_target.
8361 (_initialize_ppcnbsd_nat): Adjust to C++ification.
8362 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8363 (the_ppc_obsd_nat_target): New.
8364 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8365 methods of ppc_obsd_nat_target.
8366 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
8368 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8369 (the_sh_nbsd_nat_target): New.
8370 (shnbsd_fetch_inferior_registers)
8371 (shnbsd_store_inferior_registers): Refactor as methods of
8373 (_initialize_shnbsd_nat): Adjust to C++ification.
8374 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8375 (inf_ptrace_xfer_partial): Delete.
8376 (sparc_xfer_partial, sparc_target): Delete.
8377 * sparc-nat.h (sparc_fetch_inferior_registers)
8378 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8379 (sparc_target): Delete function declaration.
8380 (sparc_target): New template class.
8381 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8382 (_initialize_sparcnbsd_nat): Adjust to C++ification.
8383 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8384 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
8386 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8387 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8388 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8389 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
8391 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8392 (the_vax_bsd_nat_target): New.
8393 (vaxbsd_fetch_inferior_registers)
8394 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8396 (_initialize_vaxbsd_nat): Adjust to C++ification.
8398 * bsd-kvm.c (bsd_kvm_target): New class.
8399 (bsd_kvm_ops): Now a bsd_kvm_target.
8400 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8401 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8402 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8404 (bsd_kvm_return_one): Delete.
8405 (bsd_kvm_add_target): Adjust to C++ification.
8407 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8408 (nto_procfs_target_procfs): New classes.
8409 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8410 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8411 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8412 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8413 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8414 (procfs_remove_hw_breakpoint, procfs_resume)
8415 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8416 (procfs_kill_inferior, procfs_store_registers)
8417 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8418 as methods of nto_procfs_target.
8419 (nto_procfs_ops): Now an nto_procfs_target_procfs.
8420 (nto_native_ops): Delete.
8421 (procfs_open, procfs_native_open): Delete.
8422 (nto_native_ops): Now an nto_procfs_target_native.
8423 (init_procfs_targets): Adjust to C++ification.
8424 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8425 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8426 Refactor as methods of nto_procfs_target.
8428 * go32-nat.c (go32_nat_target): New class.
8429 (the_go32_nat_target): New.
8430 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8431 (go32_store_registers, go32_xfer_partial, go32_files_info)
8432 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8433 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8434 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8435 (go32_pid_to_str): Refactor as methods of go32_nat_target.
8436 (go32_target): Delete.
8437 (_initialize_go32_nat): Adjust to C++ification.
8439 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8440 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8441 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8442 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8444 (gnu_target): Delete.
8445 * gnu-nat.h (gnu_target): Delete.
8446 (gnu_nat_target): New class.
8447 * i386-gnu-nat.c (gnu_base_target): New.
8448 (i386_gnu_nat_target): New class.
8449 (the_i386_gnu_nat_target): New.
8450 (_initialize_i386gnu_nat): Adjust to C++ification.
8454 * bfd-target.c (target_bfd_xclose): Rename to ...
8455 (target_bfd_close): ... this.
8456 (target_bfd_reopen): Adjust.
8457 * target.c (target_close): Remove references to to_xclose.
8458 * target.h (target_ops::to_xclose): Delete.
8459 (target_ops::to_close): Update comments.
8463 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8465 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8466 * inf-ptrace.c (inf_ptrace_register_u_offset)
8467 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8468 (inf_ptrace_store_register, inf_ptrace_store_registers)
8469 (inf_ptrace_trad_target): Move to ...
8470 * linux-nat-trad.c: ... this new file.
8471 * linux-nat-trad.h: New file.
8472 * linux-nat.c (linux_target_install_ops): Make extern.
8473 (linux_trad_target): Delete.
8474 * linux-nat.h (linux_trad_target): Delete declaration.
8475 (linux_target_install_ops): Declare.
8476 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8481 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8482 procfs_target/add_target here.
8483 * procfs.c (procfs_target): Make static.
8484 (_initialize_procfs): Call add_target here.
8485 * procfs.h (struct target_ops): Remove forward declaration.
8486 (procfs_target): Remove declaration.
8487 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8491 * procfs.c (procfs_stopped_by_watchpoint)
8492 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8493 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8495 (procfs_use_watchpoints): Delete, move contents...
8496 (procfs_target): ... here.
8497 * procfs.h (procfs_use_watchpoints): Delete declaration.
8498 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8499 procfs_use_watchpoints.
8500 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8501 procfs_use_watchpoints.
8506 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8507 and var_zuinteger_unlimited.
8508 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8509 and PARAM_ZUINTEGER_UNLIMITED.
8510 (set_parameter_value): Handle var_zuinteger and
8511 var_zuinteger_unlimited.
8512 (add_setshow_generic): Likewise.
8513 (parmpy_init): Likewise.
8518 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8519 pointer is not null before dereferencing it.
8523 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8528 * breakpoint.c (mention): Remove use of is_mi_like_p.
8529 (print_mention_ranged_breakpoint): Likewise.
8530 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8535 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8539 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8540 (info_spu_event_command): Remove some uses of is_mi_like_p.
8544 * python/py-framefilter.c (py_print_single_arg)
8545 (enumerate_locals, py_print_args, py_print_frame): Remove some
8546 uses of is_mi_like_p.
8551 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8552 * ui-out.h (ui_out::is_mi_like_p): Now const.
8553 (ui_out::do_is_mi_like_p): Now const.
8554 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8558 * varobj.c (varobj_set_visualizer): Use new_reference.
8559 * python/python.c (gdbpy_decode_line): Use new_reference.
8560 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8565 * varobj.c (install_new_value): Use new_reference.
8566 * value.h (value_incref): Return void. Swap intro comment with
8568 * value.c (set_value_parent): Use new_reference.
8569 (value_incref): Return void. Update intro comment.
8570 (release_value): Use new_reference.
8571 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8575 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8576 * gdb_bfd.h (new_bfd_ref): Remove.
8577 (gdb_bfd_open): Update comment.
8578 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8579 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8580 (gdb_bfd_fdopenr): Use new_reference.
8581 * exec.c (exec_file_attach): Use new_reference.
8585 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8590 * jit.c (jit_read_code_entry): Use type_align.
8591 * i386-tdep.c (i386_gdbarch_init): Don't call
8592 set_gdbarch_long_long_align_bit.
8593 * gdbarch.sh: Remove long_long_align_bit.
8594 * gdbarch.c, gdbarch.h: Rebuild.
8595 * arc-tdep.c (arc_type_align): New function.
8596 (arc_gdbarch_init): Use arc_type_align. Don't call
8597 set_gdbarch_long_long_align_bit.
8601 * rust-lang.c (rust_type_alignment): Remove.
8602 (rust_composite_type): Use type_align.
8606 * NEWS: Mention Type.align.
8607 * python/py-type.c (typy_get_alignof): New function.
8608 (type_object_getset): Add "alignof".
8614 * std-operator.def (UNOP_ALIGNOF): New operator.
8615 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8617 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8618 * c-lang.c (c_op_print_tab): Add alignof.
8619 * c-exp.y (ALIGNOF): New token.
8620 (exp): Add "ALIGNOF" production.
8621 (ident_tokens): Add _Alignof and alignof.
8625 * i386-tdep.c (i386_type_align): New function.
8626 (i386_gdbarch_init): Update.
8627 * gdbarch.sh (type_align): New method.
8628 * gdbarch.c, gdbarch.h: Rebuild.
8629 * arch-utils.h (default_type_align): Declare.
8630 * arch-utils.c (default_type_align): New function.
8631 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8632 (struct type) <align_log2>: New field.
8633 <instance_flags>: Now a bitfield.
8634 (TYPE_RAW_ALIGN): New macro.
8635 (type_align, type_raw_align, set_type_align): Declare.
8636 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8638 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8639 (get_alignment, maybe_set_alignment): New functions.
8640 (read_structure_type, read_enumeration_type, read_array_type)
8641 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8642 (read_subrange_type, read_base_type): Set type alignment.
8646 * dwarf2read.c (read_index_from_section): Use bool.
8651 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8657 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8658 last step, and do it atomically.
8662 * compile/compile-c-types.c (convert_int, convert_float):
8668 * rust-lang.c (rust_inclusive_range_type_p): New function.
8669 (rust_range): Handle inclusive ranges.
8670 (rust_compute_range): Likewise.
8671 * rust-exp.y (struct rust_op) <inclusive>: New field.
8672 (DOTDOTEQ): New constant.
8673 (range_expr): Add "..=" productions.
8674 (operator_tokens): Add "..=" token.
8675 (ast_range): Add "inclusive" parameter.
8676 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8678 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8680 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8681 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8683 * expprint.c (print_subexp_standard): Handle new bounds values.
8684 (dump_subexp_body_standard): Likewise.
8688 * configure: Rebuild.
8689 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8690 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8692 (class symbol_needs_eval_context): Likewise.
8693 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8694 (mock_mapped_index::symbol_name_at): Use "override". Remove
8696 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8698 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8699 * aarch64-tdep.c (instruction_reader::read): Use "override".
8700 (instruction_reader_test::read): Likewise.
8701 * arm-tdep.c (instruction_reader::read): Use "override".
8702 (instruction_reader_thumb::read): Likewise.
8707 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8708 instead of remote_send.
8709 (remote_send): Remove.
8713 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8714 find_function_start_sal instead of find_pc_line.
8718 * breakpoint.c (set_breakpoint_location_function): Handle
8720 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8721 * elfread.c (elf_symtab_read): Give data symbols with
8722 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8723 (elf_rel_plt_read): Update comment.
8724 * linespec.c (convert_linespec_to_sals): Handle
8726 (minsym_found): Handle mst_data_gnu_ifunc.
8727 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8728 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8729 * parse.c (find_minsym_type_and_address): Handle
8731 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8732 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8733 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8735 <mst_data_gnu_ifunc>: New enumerator.
8739 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8740 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8741 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8743 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8744 (lookup_minimal_symbol_by_pc): Adjust.
8745 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8746 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8747 * minsyms.h (lookup_msym_prefer): New enum.
8748 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8749 parameter by a lookup_msym_prefer parameter.
8753 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8754 ends in "@plt" instead of looking at the symbol's section.
8758 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8760 (find_pc_partial_function_gnu_ifunc): Rename to ...
8761 (find_pc_partial_function): ... this, and remove references to
8763 (find_pc_partial_function): Delete old implementation.
8764 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8768 * linespec.c (struct bound_minimal_symbol_search_key): New.
8769 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8770 skip first line if we found a GNU ifunc minimal symbol by name.
8771 (compare_msymbols): Change parameters to work with a destructured
8773 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8778 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8779 ifunc targets here. Instead, if we have an ifunc minsym, use its
8781 (add_location_to_breakpoint): Store the minsym and the objfile in
8782 the breakpoint location.
8783 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8784 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8785 Record the minsym in the sal.
8786 * symtab.h (symtab_and_line) <msymbol>: New field.
8790 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8791 unless we actually resolved the ifunc.
8795 * c-exp.y (variable production): Prefer ifunc minsyms over
8796 regular function symbols.
8797 * symtab.c (find_gnu_ifunc): New function.
8798 * minsyms.h (lookup_msym_prefer): New enum.
8799 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8800 parameter by a lookup_msym_prefer parameter.
8801 * symtab.h (find_gnu_ifunc): New declaration.
8805 * blockframe.c (find_gnu_ifunc_target_type): New function.
8806 (find_function_type): New.
8807 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8808 return a value with a memory address.
8809 (eval_call): For calls to GNU ifunc functions, try to find the
8810 type of the target function from the type that the resolver
8812 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8814 * infcall.c (find_function_return_type): Delete.
8815 (find_function_addr): Add 'function_type' parameter. For calls to
8816 GNU ifunc functions, try to find the type of the target function
8817 from the type that the resolver returns, and return it via
8819 (call_function_by_hand_dummy): Adjust to use the function type
8820 returned by find_function_addr.
8821 (find_function_addr): Add 'function_type' parameter and move
8823 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8828 * c-exp.y (variable production): Skip finding an alias for ifunc
8833 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8837 * infcmd.c (kill_command): Print the pid as string, not the whole
8838 thread's ptid. Add comment. s/has been killed/killed/ in output
8840 * remote.c (remote_detach_1): Print the pid as string, not the
8841 whole thread's ptid.
8847 * infcmd.c (kill_command): Print message when inferior has
8849 * inferior.c (print_inferior_events): Remove 'static'. Set as
8851 (add_inferior): Improve message printed when
8852 'print_inferior_events' is on.
8853 (exit_inferior): Remove message printed when
8854 'print_inferior_events' is on.
8855 (detach_inferior): Improve message printed when
8856 'print_inferior_events' is on.
8857 (initialize_inferiors): Use 'add_inferior_silent' to set
8858 'current_inferior_'.
8859 * inferior.h (print_inferior_events): Declare here as
8861 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8862 '[Detaching...]' messages when 'print_inferior_events' is on.
8863 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8864 as prefix/suffix for messages. Remove periods. Fix erroneous
8865 'Detaching after fork from child...', replace it by '... from
8867 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8868 prefix/suffix when printing 'Detaching...' messages. Print
8869 them when 'print_inferior_events' is on.
8870 * remote.c (remote_detach_1): Print message when detaching
8871 from inferior and '!is_fork_parent'.
8875 * cli-out.h: Reindent.
8879 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8880 (cli_ui_out::do_field_string): Use fputs_filtered.
8881 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8885 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8886 gdb::unique_xmalloc_ptr.
8890 * configure: Rebuild.
8895 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8896 prepare_for_testing. Set normal_bp to r_debug_state if target
8902 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8903 * remote.c (extended_remote_attach): In all-stop mode, mark the
8904 thread as executing.
8908 * thread.c (thread_apply_all_command): Fix comment.
8909 (thread_command): Fix comment.
8913 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8915 * features/aarch64-core.c (create_feature_aarch64_core):
8917 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8919 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8921 * features/i386/32bit-avx512.c
8922 (create_feature_i386_32bit_avx512): Likewise.
8923 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8925 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8927 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8929 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8931 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8933 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8935 * features/i386/64bit-avx512.c
8936 (create_feature_i386_64bit_avx512): Likewise.
8937 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8939 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8941 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8943 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8945 * features/i386/64bit-segments.c
8946 (create_feature_i386_64bit_segments): Likewise.
8947 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8949 * features/i386/x32-core.c
8950 (create_feature_i386_x32_core): Likewise.
8951 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8952 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8953 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8954 * target-descriptions.c: In generated code, don't pass xml
8959 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8960 (print_xml_feature::visit_post): Likewise.
8961 (print_xml_feature::visit): Likewise.
8962 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8963 (print_xml_feature): Add new class.
8964 * regformats/regdat.sh: Null xmltarget on feature targets.
8965 * target-descriptions.c (struct target_desc): Add xmltarget.
8966 (maintenance_check_tdesc_xml_convert): Add unittest function.
8967 (tdesc_get_features_xml): Add function to get xml.
8968 (maintenance_check_xml_descriptions): Test xml generation.
8969 * xml-tdesc.c (string_read_description_xml): Add function.
8970 * xml-tdesc.h (string_read_description_xml): Add declaration.
8974 * features/Makefile: Add feature marker to targets with new style
8975 target descriptions.
8976 * regformats/aarch64.dat: Regenerate.
8977 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8978 * regformats/i386/amd64-avx-linux.dat: Likewise.
8979 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8980 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8981 * regformats/i386/amd64-linux.dat: Likewise.
8982 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8983 * regformats/i386/amd64.dat: Likewise.
8984 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8985 * regformats/i386/i386-avx-linux.dat: Likewise.
8986 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8987 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8988 * regformats/i386/i386-linux.dat: Likewise.
8989 * regformats/i386/i386-mmx-linux.dat: Likewise.
8990 * regformats/i386/i386-mpx-linux.dat: Likewise.
8991 * regformats/i386/i386.dat: Likewise.
8992 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8993 * regformats/i386/x32-avx-linux.dat: Likewise.
8994 * regformats/i386/x32-linux.dat: Likewise.
8995 * regformats/tic6x-c62x-linux.dat: Likewise.
8996 * regformats/tic6x-c64x-linux.dat: Likewise.
8997 * regformats/tic6x-c64xp-linux.dat: Likewise.
8998 * regformats/regdat.sh: Parse feature marker.
9002 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9003 (tdesc_osabi_name): Likewise.
9004 * target-descriptions.c (tdesc_architecture_name): Add new
9006 (tdesc_osabi_name): Likewise.
9010 * common/tdesc.c (tdesc_predefined_type): Move to here.
9011 (tdesc_named_type): Likewise.
9012 (tdesc_create_vector): Likewise.
9013 (tdesc_create_struct): Likewise.
9014 (tdesc_set_struct_size): Likewise.
9015 (tdesc_create_union): Likewise.
9016 (tdesc_create_flags): Likewise.
9017 (tdesc_create_enum): Likewise.
9018 (tdesc_add_field): Likewise.
9019 (tdesc_add_typed_bitfield): Likewise.
9020 (tdesc_add_bitfield): Likewise.
9021 (tdesc_add_flag): Likewise.
9022 (tdesc_add_enum_value): Likewise.
9023 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9024 (struct tdesc_type_vector): Likewise.
9025 (struct tdesc_type_field): Likewise.
9026 (struct tdesc_type_with_fields): Likewise.
9027 (tdesc_create_enum): Add declaration.
9028 (tdesc_add_typed_bitfield): Likewise.
9029 (tdesc_add_enum_value): Likewise.
9030 * target-descriptions.c (tdesc_type_field): Move from here.
9031 (tdesc_type_builtin): Likewise.
9032 (tdesc_type_vector): Likewise.
9033 (tdesc_type_with_fields): Likewise.
9034 (tdesc_predefined_types): Likewise.
9035 (tdesc_named_type): Likewise.
9036 (tdesc_create_vector): Likewise.
9037 (tdesc_create_struct): Likewise.
9038 (tdesc_set_struct_size): Likewise.
9039 (tdesc_create_union): Likewise.
9040 (tdesc_create_flags): Likewise.
9041 (tdesc_create_enum): Likewise.
9042 (tdesc_add_field): Likewise.
9043 (tdesc_add_typed_bitfield): Likewise.
9044 (tdesc_add_bitfield): Likewise.
9045 (tdesc_add_flag): Likewise.
9046 (tdesc_add_enum_value): Likewise.
9047 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9048 (tdesc_add_typed_bitfield): Likewise.
9049 (tdesc_add_enum_value): Likewise.
9053 * common/tdesc.c (tdesc_feature::accept): Move to here.
9054 (tdesc_feature::operator==): Likewise.
9055 (tdesc_create_reg): Likewise.
9056 * common/tdesc.h (tdesc_type_kind): Likewise.
9057 (struct tdesc_type): Likewise.
9058 (struct tdesc_feature): Likewise.
9059 * regformats/regdat.sh: Create a feature.
9060 * target-descriptions.c (tdesc_type_kind): Move from here.
9061 (tdesc_type): Likewise.
9062 (tdesc_type_up): Likewise.
9063 (tdesc_feature): Likewise.
9064 (tdesc_create_reg): Likewise.
9068 * Makefile.in: Add arch/tdesc.c
9069 * common/tdesc.c: New file.
9070 * common/tdesc.h (tdesc_element_visitor): Move to here.
9071 (tdesc_element): Likewise.
9072 (tdesc_reg): Likewise.
9073 (tdesc_reg_up): Likewise.
9074 * regformats/regdef.h (reg): Add offset to constructors.
9075 * target-descriptions.c (tdesc_element_visitor): Move from here.
9076 (tdesc_element): Likewise.
9077 (tdesc_reg): Likewise.
9078 (tdesc_reg_up): Likewise.
9082 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9087 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9091 * symtab.c (print_symbol_info): Skip printing filename and line
9092 number when `last' is NULL.
9093 (symtab_symbol_info): Use empty string instead of NULL for first
9094 invocation of print_symbol_info.
9095 (rbreak_command): Pass NULL to `last' parameter of
9100 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9105 * MAINTAINERS (sh): Remove.
9106 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9107 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9108 (ALLDEPFILES): Remove sh64-tdep.c.
9109 * NEWS: Mentions that support for SH-5/SH64 is removed.
9110 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9111 (sh*-*-openbsd*): Ditto.
9112 (sh64-*-elf*): Remove.
9114 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9115 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9116 * sh-tdep.c: No longer include "sh64-tdep.h".
9117 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9118 * sh64-tdep.c, sh64-tdep.h: Remove files.
9122 * MAINTAINERS: Remove m88k.
9123 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9124 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9125 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9126 * NEWS: Mention that support for m88k was removed.
9127 * configure.host (m88*-*-*): Remove support.
9128 * configure.nat (m88k-*-*): Remove support.
9129 * configure.tgt (m88*-*-openbsd*): Remove.
9130 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9134 * configure.tgt (x86_tobjs): New variable.
9135 (amd64_tobjs, i386_tobjs): Use it.
9139 * symtab.c (print_symbol_info): Precede the symbol definition by
9140 the line number when available.
9141 * NEWS: Advertise this enhancement.
9145 * NEWS (New options): announce set/show record btrace cpu.
9146 * btrace.c: Include record-btrace.h.
9147 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9148 the vendor is unknown.
9149 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9150 Maybe overwrite the btrace configuration's cpu.
9151 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9152 (btrace_fetch): Add cpu parameter. Update callers.
9153 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9154 Maybe overwrite the btrace configuration's cpu. Skip enabling
9155 errata workarounds if the vendor is unknown.
9156 * python/py-record-btrace.c: Include record-btrace.h.
9157 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9158 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9159 * record-btrace.c (record_btrace_cpu_state_kind): New.
9160 (record_btrace_cpu): New.
9161 (set_record_btrace_cpu_cmdlist): New.
9162 (record_btrace_get_cpu): New.
9163 (require_btrace_thread, record_btrace_info)
9164 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9165 (cmd_set_record_btrace_cpu_none): New.
9166 (cmd_set_record_btrace_cpu_auto): New.
9167 (cmd_set_record_btrace_cpu): New.
9168 (cmd_show_record_btrace_cpu): New.
9169 (_initialize_record_btrace): Initialize set/show record btrace cpu
9171 * record-btrace.h (record_btrace_get_cpu): New.
9175 * record.c (set_record_command): Fix typo in message.
9179 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9183 * infrun.c (process_event_stop_test): Call
9184 gdbarch_in_indirect_branch_thunk.
9185 * gdbarch.sh (in_indirect_branch_thunk): New.
9186 * gdbarch.c: Regenerated.
9187 * gdbarch.h: Regenerated.
9190 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9191 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9192 (ALLDEPFILES): Add x86-tdep.c.
9193 * arch-utils.h (default_in_indirect_branch_thunk): New.
9194 * arch-utils.c (default_in_indirect_branch_thunk): New.
9195 * i386-tdep: Include x86-tdep.h.
9196 (i386_in_indirect_branch_thunk): New.
9197 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9199 * amd64-tdep: Include x86-tdep.h.
9200 (amd64_in_indirect_branch_thunk): New.
9201 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9206 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9207 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9208 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9213 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9214 (rust_evaluate_subexp): Likewise.
9218 * procfs.c (procfs_detach): Make forward declaration's prototype
9219 match definition's protototype.
9220 (proc_get_LDT_entry): Remove stale do_cleanups call.
9224 * target.h (target_ops::to_has_exited): Delete.
9225 (target_has_exited): Delete.
9226 * target-delegates.c: Regenerate.
9230 * target.c (fileio_fh_t::t): Add comment.
9231 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9232 (target_fileio_close): Handle a NULL target.
9233 (invalidate_fileio_fh): New.
9234 (target_close): Call it.
9235 * remote.c (remote_hostio_send_command): No longer check whether
9236 remote_desc is open.
9240 * target.c (fileio_fh_t): Make it a named struct instead of a
9242 (fileio_fh_t::is_closed): New method.
9243 (DEF_VEC_O (fileio_fh_t)): Remove.
9244 (fileio_fhandles): Now a std::vector.
9245 (is_closed_fileio_fh): Delete.
9246 (acquire_fileio_fd): Adjust. Rename parameters.
9247 (release_fileio_fd): Adjust.
9248 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9249 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9250 (target_fileio_close): Adjust.
9254 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9259 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9260 (scoped_finish_thread_state): New class.
9261 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9263 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9264 (fetch_inferior_event, normal_stop): Likewise.
9265 * thread.c (finish_thread_state_cleanup): Delete.
9270 * value.c: Include "selftest.h" and "common/array-view.h".
9271 (struct range) <operator ==>: New.
9272 (test_ranges_contain): New.
9273 (check_ranges_vector): New.
9274 (test_insert_into_bit_range_vector): New.
9275 (_initialize_values): Register selftests.
9276 * common/array-view.h (operator==, operator!=): New.
9280 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9282 * inline-frame.c: Include <algorithm>.
9283 (struct inline_state): Add constructor.
9284 (inline_state_s): Remove.
9285 (DEF_VEC_O(inline_state_s)): Remove.
9286 (inline_states): Change type to std::vector.
9287 (find_inline_frame_state): Adjust to std::vector.
9288 (allocate_inline_frame_state): Remove.
9289 (clear_inline_frame_state): Adjust to std::vector.
9290 (skip_inline_frames): Adjust to std::vector.
9294 * tracepoint.h (struct trace_state_variable): Add constructor.
9295 <name>: Change type to std::string.
9296 * tracepoint.c (tsv_s): Remove.
9297 (DEF_VEC_O(tsv_s)): Remove.
9298 (tvariables): Change to std::vector.
9299 (create_trace_state_variable): Adjust to std::vector.
9300 (find_trace_state_variable): Likewise.
9301 (find_trace_state_variable_by_number): Likewise.
9302 (delete_trace_state_variable): Likewise.
9303 (trace_variable_command): Adjust to std::string.
9304 (delete_trace_variable_command): Likewise.
9305 (tvariables_info_1): Adjust to std::vector.
9306 (save_trace_state_variables): Likewise.
9307 (start_tracing): Likewise.
9308 (merge_uploaded_trace_state_variables): Adjust to std::vector
9310 * target.h (struct target_ops)
9311 <to_download_trace_state_variable>: Pass reference to
9312 trace_state_variable.
9313 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9314 * target-delegates.c: Re-generate.
9315 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9316 (mi_tsv_deleted): Likewise.
9317 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9318 * remote.c (remote_download_trace_state_variable): Change
9319 pointer to reference and adjust.
9320 * make-target-delegates (parse_argtypes): Handle references.
9321 (write_function_header): Likewise.
9322 (munge_type): Likewise.
9326 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9327 string_view-selftests.c.
9328 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9330 * unittests/basic_string_view/cons/char/1.cc: Likewise.
9331 * unittests/basic_string_view/cons/char/2.cc: Likewise.
9332 * unittests/basic_string_view/cons/char/3.cc: Likewise.
9333 * unittests/basic_string_view/element_access/char/1.cc:
9335 * unittests/basic_string_view/element_access/char/empty.cc:
9337 * unittests/basic_string_view/element_access/char/front_back.cc:
9339 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9340 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9342 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9344 * unittests/basic_string_view/modifiers/swap/char/1.cc:
9346 * unittests/basic_string_view/operations/compare/char/1.cc:
9348 * unittests/basic_string_view/operations/compare/char/13650.cc:
9350 * unittests/basic_string_view/operations/copy/char/1.cc:
9352 * unittests/basic_string_view/operations/data/char/1.cc:
9354 * unittests/basic_string_view/operations/find/char/1.cc:
9356 * unittests/basic_string_view/operations/find/char/2.cc:
9358 * unittests/basic_string_view/operations/find/char/3.cc:
9360 * unittests/basic_string_view/operations/find/char/4.cc:
9362 * unittests/basic_string_view/operations/rfind/char/1.cc:
9364 * unittests/basic_string_view/operations/rfind/char/2.cc:
9366 * unittests/basic_string_view/operations/rfind/char/3.cc:
9368 * unittests/basic_string_view/operations/substr/char/1.cc:
9370 * unittests/basic_string_view/operators/char/2.cc: Likewise.
9371 * unittests/string_view-selftests.c: New file.
9375 * unittests/basic_string_view/capacity/1.cc: New file.
9376 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9377 * unittests/basic_string_view/cons/char/1.cc: New file.
9378 * unittests/basic_string_view/cons/char/2.cc: New file.
9379 * unittests/basic_string_view/cons/char/3.cc: New file.
9380 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9381 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9382 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9383 * unittests/basic_string_view/element_access/char/1.cc: New file.
9384 * unittests/basic_string_view/element_access/char/2.cc: New file.
9385 * unittests/basic_string_view/element_access/char/empty.cc: New file.
9386 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9387 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9388 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9389 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9390 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9391 * unittests/basic_string_view/include.cc: New file.
9392 * unittests/basic_string_view/inserters/char/1.cc: New file.
9393 * unittests/basic_string_view/inserters/char/2.cc: New file.
9394 * unittests/basic_string_view/inserters/char/3.cc: New file.
9395 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9396 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9397 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9398 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9399 * unittests/basic_string_view/literals/types.cc: New file.
9400 * unittests/basic_string_view/literals/values.cc: New file.
9401 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9402 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9403 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9404 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9405 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9406 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9407 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9408 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9409 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9410 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9411 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9412 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9413 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9414 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9415 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9416 * unittests/basic_string_view/operations/data/char/1.cc: New file.
9417 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9418 * unittests/basic_string_view/operations/find/char/1.cc: New file.
9419 * unittests/basic_string_view/operations/find/char/2.cc: New file.
9420 * unittests/basic_string_view/operations/find/char/3.cc: New file.
9421 * unittests/basic_string_view/operations/find/char/4.cc: New file.
9422 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9423 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9424 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9425 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9426 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9427 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9428 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9429 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9430 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9431 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9432 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9433 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9434 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9435 * unittests/basic_string_view/operators/char/2.cc: New file.
9436 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9437 * unittests/basic_string_view/range_access/char/1.cc: New file.
9438 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9439 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9440 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9441 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9442 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9443 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9444 * unittests/basic_string_view/requirements/typedefs.cc: New file.
9445 * unittests/basic_string_view/typedefs.cc: New file.
9446 * unittests/basic_string_view/types/1.cc: New file.
9450 * common/gdb_string_view.h: Remove libstdc++ implementation
9451 details, adjust to gdb reality.
9452 * common/gdb_string_view.tcc: Likewise.
9453 * cli/cli-script.c (struct string_view): Remove.
9454 (user_args) <m_args>: Change element type to gdb::string_view.
9455 (user_args::insert_args): Adjust.
9459 * common/gdb_string_view.h: New file.
9460 * common/gdb_string_view.tcc: New file.
9464 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9465 * configure: Re-generate.
9469 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9470 (set_target_gdbarch): Call
9471 gdb::observers::architecture_changed.notify instead of
9472 observer_notify_architecture_changed.
9476 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9477 (do_restore_current_traceframe_cleanup): Remove.
9478 (restore_current_traceframe_cleanup_dtor): Remove.
9479 (make_cleanup_restore_current_traceframe): Remove.
9480 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9482 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9483 * infrun.c (fetch_inferior_event): Use
9484 scoped_restore_current_traceframe.
9488 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9490 <n_allocated_type_units>: Remove.
9491 <all_type_units>: Change to std::vector.
9492 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9493 to std::vector change.
9494 (dwarf2_per_objfile::get_cutu): Likewise.
9495 (dwarf2_per_objfile::get_tu): Likewise.
9496 (create_signatured_type_table_from_index): Likewise.
9497 (create_signatured_type_table_from_debug_names): Likewise.
9498 (dw2_symtab_iter_next): Likewise.
9499 (dw2_print_stats): Likewise.
9500 (dw2_expand_all_symtabs): Likewise.
9501 (dw2_expand_marked_cus): Likewise.
9502 (dw2_debug_names_iterator::next): Likewise.
9503 (dwarf2_initialize_objfile): Likewise.
9504 (add_signatured_type_cu_to_table): Likewise.
9505 (create_all_type_units): Likewise.
9506 (add_type_unit): Likewise.
9507 (struct tu_abbrev_offset): Add constructor.
9508 (build_type_psymtabs_1): Adjust to std::vector change.
9509 (print_tu_stats): Likewise.
9510 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9511 (write_debug_names): Likewise.
9515 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9516 Make an std::vector.
9517 <n_comp_units>: Remove.
9518 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9519 to std::vector change.
9520 (dwarf2_per_objfile::get_cutu): Likewise.
9521 (dwarf2_per_objfile::get_cu): Likewise.
9522 (create_cus_from_index): Likewise.
9523 (create_addrmap_from_index): Likewise.
9524 (create_addrmap_from_aranges): Likewise.
9525 (dwarf2_read_index): Likewise.
9526 (dw2_find_last_source_symtab): Likewise.
9527 (dw2_map_symtabs_matching_filename): Likewise.
9528 (dw2_symtab_iter_next): Likewise.
9529 (dw2_print_stats): Likewise.
9530 (dw2_expand_all_symtabs): Likewise.
9531 (dw2_expand_symtabs_with_fullname): Likewise.
9532 (dw2_expand_marked_cus): Likewise.
9533 (dw2_map_symbol_filenames): Likewise.
9534 (create_cus_from_debug_names): Likewise.
9535 (dwarf2_read_debug_names): Likewise.
9536 (dw2_debug_names_iterator::next): Likewise.
9537 (dwarf2_initialize_objfile): Likewise.
9538 (set_partial_user): Likewise.
9539 (dwarf2_build_psymtabs_hard): Likewise.
9540 (read_comp_units_from_section): Remove arguments, adjust to
9542 (create_all_comp_units): Adjust to std::vector and
9543 read_comp_units_from_section changes.
9544 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9546 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9547 (psyms_seen_size): Likewise.
9548 (write_gdbindex): Likewise.
9549 (write_debug_names): Likewise.
9553 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9554 with dwarf2_per_objfile.
9555 (create_cus_from_index): Likewise.
9556 (create_signatured_type_table_from_index): Likewise.
9557 (dwarf2_read_index): Likewise.
9558 (dwarf2_initialize_objfile): Likewise.
9559 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9560 per_cu rather than get_dwarf2_per_objfile.
9564 * dwarf2read.h (struct signatured_type): Forward declare.
9565 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9567 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9568 (dw2_get_cutu): ...this.
9569 (dwarf2_per_objfile::get_cu): Rename from...
9570 (dw2_get_cu): ...this.
9571 (dwarf2_per_objfile::get_tu): New.
9572 (create_addrmap_from_index): Adjust.
9573 (create_addrmap_from_aranges): Adjust.
9574 (dw2_find_last_source_symtab): Adjust.
9575 (dw2_map_symtabs_matching_filename): Adjust.
9576 (dw2_symtab_iter_next): Adjust.
9577 (dw2_print_stats): Adjust.
9578 (dw2_expand_all_symtabs): Adjust.
9579 (dw2_expand_symtabs_with_fullname): Adjust.
9580 (dw2_expand_marked_cus): Adjust.
9581 (dw_expand_symtabs_matching_file_matcher): Adjust.
9582 (dw2_map_symbol_filenames): Adjust.
9583 (dw2_debug_names_iterator::next): Adjust.
9584 (dwarf2_initialize_objfile): Adjust.
9585 (set_partial_user): Adjust.
9586 (dwarf2_build_psymtabs_hard): Adjust.
9590 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9591 Remove unused variables.
9592 (dw2_map_symtabs_matching_filename): Likewise.
9593 (dwarf2_record_block_ranges): Likewise.
9594 (dwarf2_read_addr_index): Likewise.
9595 (follow_die_offset): Likewise.
9599 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9600 to symbol_file_add_main.
9605 * mi/mi-console.c (do_fputc_async_safe): New.
9606 (mi_console_file::write_async_safe): New.
9607 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9608 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9610 * ui-file.c (ui_file::putstrn): Adjust call to
9611 fputstrn_unfiltered.
9612 * utils.c (printchar): Replace do_fputs and do_fprintf
9613 parameters by do_fputc.
9614 (fputstr_filtered): Adjust call to printchar.
9615 (fputstr_unfiltered): Likewise.
9616 (fputstrn_filtered): Likewise.
9617 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9619 * utils.h (do_fputc_ftype): New typedef.
9620 (fputstrn_unfiltered): Add do_fputc parameter.
9624 * regformats/i386/i386-avx.dat: Remove.
9629 * amd64-tdep.c (amd64_none_init_abi): New function.
9630 (amd64_x32_none_init_abi): New function.
9631 (_initialize_amd64_tdep): Register handlers for x86-64 and
9632 x64_32 with GDB_OSABI_NONE.
9633 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9634 GDB_OSABI_NONE osabi.
9639 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9641 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9642 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9646 * common/byte-vector.h (char_vector): New type.
9647 * target.h (target_read_alloc): Return
9648 gdb::optional<byte_vector>.
9649 (target_read_stralloc): Return gdb::optional<char_vector>.
9650 (target_get_osdata): Return gdb::optional<char_vector>.
9651 * target.c (target_read_alloc_1): Templatize. Replacement
9652 manual memory management with vector.
9653 (target_read_alloc): Change return type, adjust.
9654 (target_read_stralloc): Change return type, adjust.
9655 (target_get_osdata): Change return type, adjust.
9656 * auxv.c (struct auxv_info) <length>: Remove.
9657 <data>: Change type to gdb::optional<byte_vector>.
9658 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9659 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9660 (target_auxv_search): Adjust.
9661 (fprint_target_auxv): Adjust.
9662 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9663 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9664 (linux_make_corefile_notes): Adjust.
9665 * osdata.c (get_osdata): Adjust.
9666 * remote.c (remote_get_threads_with_qxfer): Adjust.
9667 (remote_memory_map): Adjust.
9668 (remote_traceframe_info): Adjust.
9669 (btrace_read_config): Adjust.
9670 (remote_read_btrace): Adjust.
9671 (remote_pid_to_exec_file): Adjust.
9672 * solib-aix.c (solib_aix_get_library_list): Adjust.
9673 * solib-dsbt.c (decode_loadmap): Don't free buf.
9674 (dsbt_get_initial_loadmaps): Adjust.
9675 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9676 * solib-target.c (solib_target_current_sos): Adjust.
9677 * tracepoint.c (sdata_make_value): Adjust.
9678 * xml-support.c (xinclude_start_include): Adjust.
9679 (xml_fetch_content_from_file): Adjust.
9680 * xml-support.h (xml_fetch_another): Change return type.
9681 (xml_fetch_content_from_file): Change return type.
9682 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9683 * xml-tdesc.c (file_read_description_xml): Adjust.
9684 (fetch_available_features_from_target): Change return type.
9685 (target_fetch_description_xml): Adjust.
9686 (target_read_description_xml): Adjust.
9690 * value.c (~value): Update.
9691 (struct value) <contents>: Now unique_xmalloc_ptr.
9692 (value_contents_bits_eq, allocate_value_contents)
9693 (value_contents_raw, value_contents_all_raw)
9694 (value_contents_for_printing, value_contents_for_printing_const)
9695 (set_value_enclosing_type): Update.
9699 * value.c (range_s): Remove typedef, VEC.
9700 (struct range): Add operator<.
9701 (range_lessthan): Remove.
9702 (ranges_contain): Change type.
9704 (struct value) <unavailable, optimized_out>: Now std::vector.
9705 (value_entirely_available)
9706 (value_entirely_covered_by_range_vector)
9707 (value_entirely_unavailable, value_entirely_optimized_out):
9709 (insert_into_bit_range_vector): Change argument type.
9710 (find_first_range_overlap): Likewise.
9711 (struct ranges_and_idx, value_contents_bits_eq)
9712 (require_not_optimized_out, require_available): Update.
9713 (ranges_copy_adjusted): Change argument types.
9714 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9718 * value.c (~value): Update.
9719 (struct value) <parent>: Now a value_ref_ptr.
9720 (value_parent, set_value_parent, value_address, value_copy):
9725 * value.c (struct value): Add constructor, destructor, and member
9727 (allocate_value_lazy, value_decref): Update.
9731 * value.c (struct value) <released, next>: Remove.
9732 (all_values): Now a std::vector.
9733 (allocate_value_lazy): Update.
9734 (value_next): Remove.
9735 (value_mark, value_free_to_mark, release_value)
9736 (value_release_to_mark): Update.
9740 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9741 (free_value_chain): Remove.
9742 * value.c (free_value_chain): Remove.
9743 (value_release_to_mark): Return a std::vector.
9744 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9746 (check_condition): Update.
9747 * eval.c (fetch_subexp_value): Change "val_chain" to a
9749 * breakpoint.c (update_watchpoint): Update.
9750 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9754 * value.h (free_all_values): Remove.
9755 * value.c (free_all_values): Remove.
9759 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9760 (value_history_chain, value_history_count): Remove.
9761 (value_history): New global.
9762 (record_latest_value, access_value_history, show_values)
9763 (preserve_values): Update.
9767 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9768 * varobj.c (varobj_set_display_format, varobj_set_value)
9769 (install_default_visualizer, construct_visualizer)
9770 (install_new_value, ~varobj, varobj_get_value_type)
9771 (my_value_of_variable, varobj_editable_p): Update.
9772 * c-varobj.c (c_describe_child, c_value_of_variable)
9773 (cplus_number_of_children, cplus_describe_child): Update.
9774 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9775 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9776 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9780 * printcmd.c (last_examine_address): Change type to
9782 (do_examine, x_command): Update.
9786 * value.c (release_value): Update.
9787 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9788 (struct bpstats) <val>: Now a value_ref_ptr.
9789 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9790 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9791 (~watchpoint, print_it_watchpoint, watch_command_1)
9792 (invalidate_bp_value_on_memory_change): Update.
9796 * varobj.c (varobj_clear_saved_item)
9797 (update_dynamic_varobj_children, install_new_value, ~varobj):
9799 * value.h (value_incref): Move declaration earlier.
9800 (value_decref): Rename from value_free.
9801 (struct value_ref_policy): New.
9802 (value_ref_ptr): New typedef.
9803 (struct value_deleter): Remove.
9804 (gdb_value_up): Remove typedef.
9805 (release_value): Change return type.
9806 (release_value_or_incref): Remove.
9807 * value.c (set_value_parent): Update.
9808 (value_incref): Change return type.
9809 (value_decref): Rename from value_free.
9810 (value_free_to_mark, free_all_values, free_value_chain): Update.
9811 (release_value): Return value_ref_ptr.
9812 (release_value_or_incref): Remove.
9813 (record_latest_value, set_internalvar, clear_internalvar):
9815 * stack.c (info_frame_command): Don't call value_free.
9816 * python/py-value.c (valpy_dealloc, valpy_new)
9817 (value_to_value_object): Update.
9818 * printcmd.c (do_examine): Update.
9819 * opencl-lang.c (lval_func_free_closure): Update.
9820 * mi/mi-main.c (register_changed_p): Don't call value_free.
9821 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9822 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9823 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9825 * guile/scm-value.c (vlscm_free_value_smob)
9826 (vlscm_scm_from_value): Update.
9827 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9828 (frame_unwind_register_unsigned, get_frame_register_bytes)
9829 (put_frame_register_bytes): Don't call value_free.
9830 * findvar.c (address_from_register): Don't call value_free.
9831 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9832 * dwarf2loc.c (entry_data_value_free_closure)
9833 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9834 (dwarf2_evaluate_loc_desc_full): Update.
9835 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9836 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9837 (~watchpoint, watch_command_1)
9838 (invalidate_bp_value_on_memory_change): Update.
9839 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9844 * warning.m4: Add -Wno-error=deprecated-register.
9845 * configure: Re-generate.
9849 * linespec.h: Remove include of "vec.h".
9853 * linespec.c (typep): Remove typedef.
9854 (find_methods, find_superclass_methods): Take a std::vector.
9855 (find_method): Use std::vector.
9859 * utils.c (compare_strings): Remove.
9860 * utils.h (compare_strings): Remove.
9861 * objc-lang.h (find_imps): Update.
9862 * objc-lang.c (find_methods): Take a std::vector.
9863 (uniquify_strings, find_imps): Likewise.
9864 * linespec.c (find_methods): Take a std::vector.
9865 (decode_objc): Use std::vector.
9866 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9868 (find_method, find_function_symbols): Use std::vector.
9872 * completer.c (completion_tracker::completion_tracker): Remove
9874 (completion_tracker::discard_completions): Likewise.
9875 * breakpoint.c (ambiguous_names_p): Remove cast.
9876 * ada-lang.c (_initialize_ada_language): Remove cast.
9877 * utils.h (streq): Update.
9878 (streq_hash): Add new declaration.
9879 * utils.c (streq): Return bool.
9880 (streq_hash): New function.
9884 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9885 Remove a string copy.
9889 * linespec.c (filter_results): Use std::vector.
9890 (decode_line_2, decode_line_full): Update.
9894 * linespec.c (canonical_to_fullform): Return std::string.
9895 (filter_results): Update.
9896 (struct decode_line_2_item): Add constructor.
9897 <fullform, displayform>: Now std::string.
9898 (decode_line_2_compare_items): Now a std::sort comparator.
9899 (decode_line_2): Update.
9903 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9904 (unexpected_linespec_error): Update.
9905 (linespec_parse_basic, parse_linespec): Update.
9909 * linespec.c (linespec_parse_basic): Reindent.
9913 * minsyms.h (iterate_over_minimal_symbols): Update.
9914 * minsyms.c (iterate_over_minimal_symbols): Take a
9916 * linespec.c (struct collect_minsyms): Remove.
9917 (compare_msyms): Now a std::sort comparator.
9918 (add_minsym): Add parameters.
9919 (search_minsyms_for_name): Update. Use std::vector.
9923 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9928 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9933 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9934 printing static type.
9938 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9939 (rs6000_xfer_shared_libraries): Update.
9943 * common/gdb_vecs.h (char_ptr): Remove.
9944 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9948 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9950 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9954 * tracepoint.h (struct uploaded_tp): Initialize fields.
9955 <actions, step_actions, cmd_strings>: Change type to
9956 std::vector<char *>.
9957 * tracepoint.c (get_uploaded_tp): Allocate with new.
9958 (free_uploaded_tps): Free with delete.
9959 (parse_tracepoint_definition): Adjust to std::vector change.
9960 * breakpoint.c (read_uploaded_action): Likewise.
9961 (create_tracepoint_from_upload): Likewise.
9962 * ctf.c (ctf_write_uploaded_tp): Likewise.
9963 (SET_ARRAY_FIELD): Likewise.
9964 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9968 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9970 (svr4_keep_data_in_core): Update.
9971 (svr4_read_so_list): Update.
9975 * windows-nat.c (handle_output_debug_string, handle_exception):
9977 * target.h (target_read_string): Update.
9978 * target.c (target_read_string): Change "string" to
9980 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9982 * solib-frv.c (frv_current_sos): Update.
9983 * solib-dsbt.c (dsbt_current_sos): Update.
9984 * solib-darwin.c (darwin_current_sos): Update.
9985 * linux-thread-db.c (inferior_has_bug): Update.
9986 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9987 Update. Remove alloca.
9988 * ada-lang.c (ada_main_name): Update.
9992 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9993 (struct dwo_file_deleter): New.
9994 (dwo_file_up): New typedef.
9995 (open_and_init_dwo_file): Use dwo_file_up.
9996 (free_dwo_file_cleanup): Remove.
10000 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10001 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10005 * dwarf2read.c (class free_cached_comp_units): New class.
10006 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10007 (free_cached_comp_units): Remove function.
10011 * utils.h (make_cleanup_unpush_target): Remove.
10012 * inf-ptrace.c (struct target_unpusher): New.
10013 (target_unpush_up) New typedef.
10014 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10016 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10020 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10025 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10026 destructor. Now a class.
10027 (gdb_readline_wrapper_cleanup): Remove function.
10028 (gdb_readline_wrapper): Remove cleanups.
10032 * typeprint.h (struct type_print_options) <local_typedefs,
10033 global_typedefs>: Remove "struct" keyword.
10034 (class typedef_hash_table): New class.
10035 (recursively_update_typedef_hash, add_template_parameters)
10036 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10037 (find_typedef_in_hash): Don't declare.
10038 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10039 (typedef_hash_table::recursively_update): Rename from
10040 recursively_update_typedef_hash. Now a member.
10041 (typedef_hash_table::add_template_parameters): Rename from
10042 add_template_parameters. Now a member.
10043 (typedef_hash_table::typedef_hash_table): Now a constructor;
10044 rename from create_typedef_hash.
10045 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10046 rename from free_typedef_hash.
10047 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10048 (do_free_global_table): Remove.
10049 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10050 from copy_type_recursive.
10051 (create_global_typedef_table): Remove.
10052 (typedef_hash_table::find_global_typedef): Now a member of
10053 typedef_hash_table.
10054 (typedef_hash_table::find_typedef): Rename from
10055 find_typedef_in_hash; now a member.
10056 (whatis_exp): Update.
10057 * extension.h (struct ext_lang_type_printers): Add constructor and
10059 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10061 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10062 Now a constructor; rename from start_ext_lang_type_printers.
10063 (ext_lang_type_printers): Now a destructor; rename from
10064 free_ext_lang_type_printers.
10065 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10067 (c_type_print_base_struct_union): Update. Remove cleanups.
10071 * dwarf-index-write.c: Include <cmath>.
10075 * NEWS: Add entry describing new "set|show varsize-limit" command.
10076 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10078 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10083 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10084 dwarf-index-write.c
10085 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10086 * dwarf-index-common.c: New file.
10087 * dwarf-index-common.h: New file.
10088 * dwarf-index-write.c: New file.
10089 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10090 (struct dwarf2_section_info): Move from here.
10091 (dwarf2_section_info_def): Likewise.
10092 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10093 (offset_type): Likewise.
10094 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10095 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10096 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10097 (byte_swap): Likewise.
10098 (MAYBE_SWAP): Likewise.
10099 (dwarf2_per_cu_ptr): Likewise.
10100 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10101 (struct tu_stats): Likewise.
10102 (struct dwarf2_per_objfile): Likewise.
10103 (struct dwarf2_per_cu_data): Likewise.
10104 (struct signatured_type): Likewise.
10105 (sig_type_ptr): Likewise.
10106 (DEF_VEC_P (sig_type_ptr)): Likewise.
10107 (INDEX4_SUFFIX): Likewise.
10108 (INDEX5_SUFFIX): Likewise.
10109 (DEBUG_STR_SUFFIX): Likewise.
10110 (dwarf2_read_section): Make non-static.
10111 (mapped_index_string_hash): Move from here.
10112 (dwarf5_djb_hash): Likewise.
10113 (file_write): Likewise.
10114 (class data_buf): Likewise.
10115 (struct symtab_index_entry): Likewise.
10116 (struct mapped_symtab): Likewise.
10117 (find_slot): Likewise.
10118 (hash_expand): Likewise.
10119 (add_index_entry): Likewise.
10120 (uniquify_cu_indices): Likewise.
10121 (class c_str_view): Likewise.
10122 (class c_str_view_hasher): Likewise.
10123 (class vector_hasher): Likewise.
10124 (write_hash_table): Likewise.
10125 (psym_index_map): Likewise.
10126 (struct addrmap_index_data): Likewise.
10127 (add_address_entry): Likewise.
10128 (add_address_entry_worker): Likewise.
10129 (write_address_map): Likewise.
10130 (symbol_kind): Likewise.
10131 (write_psymbols): Likewise.
10132 (struct signatured_type_index_data): Likewise.
10133 (write_one_signatured_type): Likewise.
10134 (recursively_count_psymbols): Likewise.
10135 (recursively_write_psymbols): Likewise.
10136 (class debug_names): Likewise.
10137 (check_dwarf64_offsets): Likewise.
10138 (psyms_seen_size): Likewise.
10139 (write_gdbindex): Likewise.
10140 (write_debug_names): Likewise.
10141 (assert_file_size): Likewise.
10142 (write_psymtabs_to_index): Likewise.
10143 (save_gdb_index_command): Likewise.
10144 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10146 * dwarf2read.h: New file.
10151 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10152 symbol name if the CU's language stores symbol names in linkage
10154 * language.h (struct language_defn)
10155 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10156 all instances of this struct.
10160 * stack.c (backtrace_command_1): Remove verbose code.
10164 * python/py-framefilter.c (py_print_type): Don't catch
10165 exceptions. Return void.
10166 (py_print_value): Likewise.
10167 (py_print_single_arg): Likewise.
10168 (enumerate_args): Don't catch exceptions.
10169 (py_print_args): Likewise.
10170 (py_print_frame): Likewise.
10171 (gdbpy_apply_frame_filter): Catch exceptions here.
10175 * stack.c (_initialize_stack): Remove trailing newlines from help
10176 text. Add "Usage" line to "backtrace" help.
10181 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10185 * python/py-framefilter.c (py_print_single_arg): Return
10186 EXT_LANG_BT_ERROR from catch.
10190 PR backtrace/15584:
10191 * stack.c (backtrace_command_1): Move some code into no-filters
10196 * python/py-framefilter.c (throw_quit_or_print_exception): New
10198 (gdbpy_apply_frame_filter): Use it.
10203 * python/py-framefilter.c (py_print_type, py_print_value)
10204 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10209 * python/py-framefilter.c (enumerate_args): Use
10210 gdb::unique_xmalloc_ptr.
10214 * python/py-framefilter.c (py_print_frame): Return
10216 (gdbpy_apply_frame_filter): Update comment.
10217 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10219 <EXT_LANG_BT_NO_FILTERS>: Change value.
10223 PR backtrace/15582:
10224 * stack.c (backtrace_command): Parse "hide" argument.
10225 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10226 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10231 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10233 (backtrace_command): Remove "fulltrace", add "flags".
10237 * stack.c (backtrace_command): Rewrite command line parsing.
10241 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10245 * filename-seen-cache.h: Add include guard.
10249 * symfile.c (place_section): Remove "struct" from section_addr_info
10251 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10252 "struct" keyword from section_addr_info.
10256 * regformats/regdef.h (reg): Add constructors.
10260 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10261 if then/else bodies in var_func_name extraction.
10265 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10266 lookup_minimal_symbol() to find symbol entry.
10267 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10272 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10273 nested type definitions for C++, too.
10277 * machoread.c (struct oso_el): Add a constructor. Don't define as
10279 (macho_register_oso): Remove.
10280 (macho_symtab_read): Take a std::vector.
10281 (oso_el_compare_name): Now a std::sort comparator.
10282 (macho_symfile_read_all_oso): Take a std::vector.
10283 (macho_symfile_read): Use std::vector. Remove cleanups.
10287 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10288 (record_full_goto_bookmark): Use std::string.
10293 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10298 * rs6000-tdep.c (store_insn_p): New function.
10299 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10300 and cr_reg to their unshifted values. Use store_insn_p to
10301 match LR saves using either R1 or fdata->alloca_reg. Use
10302 store_insn_p to match CR saves. Set alloca_reg_offset
10303 when alloca_reg and framep are set. Remove lr_reg shift
10304 when assigning to fdata->lr_register.
10308 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10309 command line args instead of emitting a warning.
10313 * tracepoint.h (struct static_tracepoint_marker): Initialize
10314 fields, define default constructor, move constructor and move
10315 assignment, disable the rest.
10316 <str_id, extra>: Make std::string.
10317 (release_static_tracepoint_marker): Remove.
10318 (free_current_marker): Remove.
10319 * tracepoint.c (free_current_marker): Remove.
10320 (parse_static_tracepoint_marker_definition): Adjust to
10321 std::string, use new hex2str overload.
10322 (release_static_tracepoint_marker): Remove.
10323 (print_one_static_tracepoint_marker): Get marker by reference
10324 and adjust to std::string.
10325 (info_static_tracepoint_markers_command): Adjust to std::vector
10327 * target.h (static_tracepoint_marker_p): Remove typedef.
10328 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10329 (struct target_ops) <to_static_tracepoint_marker_at>: Return
10331 <to_static_tracepoint_markers_by_strid>: Return std::vector.
10333 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10334 (target_debug_print_std_vector_static_tracepoint_marker): New.
10335 (target_debug_print_struct_static_tracepoint_marker_p): Rename
10337 (target_debug_print_static_tracepoint_marker_p): ... this.
10338 * target-delegates.c: Re-generate.
10339 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10341 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10342 (decode_static_tracepoint_spec): Adjust to std::vector.
10343 (tracepoint_print_one_detail): Adjust to std::string.
10344 (strace_marker_decode_location): Adjust to std::string.
10345 (update_static_tracepoint): Adjust to std::string, remove call
10346 to release_static_tracepoint_marker.
10347 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10348 Adjust to std::vector.
10349 * remote.c (remote_static_tracepoint_marker_at): Return bool.
10350 (remote_static_tracepoint_markers_by_strid): Adjust to
10352 * common/rsp-low.h (hex2str): New overload with explicit count
10354 * common/rsp-low.c (hex2str): New overload with explicit count
10356 * unittests/rsp-low-selftests.c (test_hex2str): New function.
10357 (_initialize_rsp_low_selftests): Add test_hex2str test.
10358 * unittests/tracepoint-selftests.c
10359 (test_parse_static_tracepoint_marker_definition): Adjust to
10364 * tracepoint.c (parse_static_tracepoint_marker_definition):
10365 Consider case where the definition is followed by more
10367 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10368 tracepoint-selftests.c.
10369 * unittests/tracepoint-selftests.c: New.
10373 * MAINTAINERS (Write After Approval): Add Pedro Franco de
10378 * symtab.c (find_pc_sect_line): fixed indentation.
10382 * symtab.c (find_pc_sect_line): now uses binary search.
10386 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10387 "IDENT" production.
10392 * unittests/observable-selftests.c: New file.
10393 * common/observable.h: New file.
10394 * observable.h: New file.
10395 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10396 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10397 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10398 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10399 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10400 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10401 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10402 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10403 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10404 python/py-breakpoint.c, python/py-finishbreakpoint.c,
10405 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10406 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10407 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10408 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10409 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10410 tui/tui-interp.c, valops.c: Update all users.
10411 * tui/tui-hooks.c (tui_bp_created_observer)
10412 (tui_bp_deleted_observer, tui_bp_modified_observer)
10413 (tui_inferior_exit_observer, tui_before_prompt_observer)
10414 (tui_normal_stop_observer, tui_register_changed_observer):
10416 (tui_observers_token): New global.
10417 (attach_or_detach, tui_attach_detach_observers): New functions.
10418 (tui_install_hooks, tui_remove_hooks): Use
10419 tui_attach_detach_observers.
10420 * record-btrace.c (record_btrace_thread_observer): Remove.
10421 (record_btrace_thread_observer_token): New global.
10422 * observer.sh: Remove.
10423 * observer.c: Rename to observable.c.
10424 * observable.c (namespace gdb_observers): Define new objects.
10425 (observer_debug): Move into gdb_observers namespace.
10426 (struct observer, struct observer_list, xalloc_observer_list_node)
10427 (xfree_observer_list_node, generic_observer_attach)
10428 (generic_observer_detach, generic_observer_notify): Remove.
10429 (_initialize_observer): Update.
10430 Don't include observer.inc.
10431 * Makefile.in (generated_files): Remove observer.h, observer.inc.
10432 (clean mostlyclean): Likewise.
10433 (observer.h, observer.inc): Remove targets.
10434 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10435 (COMMON_SFILES): Use observable.c, not observer.c.
10436 * .gitignore: Remove observer.h.
10440 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10442 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10446 * auto-load.c (auto_load_objfile_script_1): Use std::string.
10450 * target.c (class scoped_target_fd): New.
10451 (target_fileio_close_cleanup): Remove.
10452 (target_fileio_read_alloc_1): Use scoped_target_fd.
10456 * silent-rules.mk: New.
10457 * Makefile.in: Include silent-rules.mk
10458 (srcdir, VPATH, top_srcdir): Move up.
10459 (COMPILE): Add ECHO_CXX.
10460 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10461 (init.c): Add ECHO_INIT_C.
10462 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10463 (version.c): Add ECHO_GEN.
10464 (printcmd.o): Add ECHO_CXX.
10465 (target-float.o): Add ECHO_CXX.
10466 (ada-exp.o): Add ECHO_CXX.
10467 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10468 (insight$(EXEEXT)): Add ECHO_CXXLD.
10469 * gnulib/configure.ac: Add AM_SILENT_RULES.
10470 * gnulib/aclocal.m4: Re-generate.
10471 * gnulib/configure: Re-generate.
10472 * gnulib/import/Makefile.in: Re-generate.
10476 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10477 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10478 * utils.c (do_free_section_addr_info)
10479 (make_cleanup_free_section_addr_info): Remove.
10480 * symfile.h (struct other_sections): Add constructor.
10481 (struct section_addr_info): Remove.
10482 (section_addr_info): New typedef.
10483 (struct sym_fns) <sym_offsets>: Change type of parameter.
10484 (build_section_addr_info_from_objfile)
10485 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10486 (default_symfile_offsets, symbol_file_add)
10487 (symbol_file_add_from_bfd)
10488 (build_section_addr_info_from_section_table): Update.
10489 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10490 * symfile.c (alloc_section_addr_info): Remove.
10491 (build_section_addr_info_from_section_table): Change return type.
10493 (build_section_addr_info_from_bfd)
10494 (build_section_addr_info_from_objfile): Likewise.
10495 (free_section_addr_info): Remove.
10496 (relative_addr_info_to_section_offsets): Change type of "addrs".
10497 (addrs_section_compar): Now a std::sort comparator.
10498 (addrs_section_sort): Change return type.
10499 (addr_info_make_relative): Change type of "addrs". Update.
10500 (default_symfile_offsets, syms_from_objfile_1)
10501 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10502 (symbol_file_add_separate): Update.
10503 (symbol_file_add): Change type of "addrs". Update.
10504 (add_symbol_file_command): Update. Remove cleanups.
10505 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10507 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10508 * solib.c (solib_read_symbols): Update.
10509 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10510 * machoread.c (macho_symfile_offsets): Update.
10511 * jit.c (jit_bfd_try_read_symtab): Update.
10515 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10516 unittests/utils-selftests.c.
10517 * unittests/utils-selftests.c: New file.
10522 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10528 * printcmd.c (printf_pointer): Allow "-" in format.
10532 * printcmd.c (_initialize_printcmd): Add usage to printf.
10536 * MAINTAINERS: Update my email address.
10540 * machoread.c (macho_check_dsym): Change filenamep to a
10542 (macho_symfile_read): Update.
10543 * symfile.c (load_command): Use std::string.
10547 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10548 to error message string.
10549 (riscv_register_name): Use xsnprintf instead of sprintf.
10550 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10552 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10554 (riscv_push_dummy_call): Likewise.
10558 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10559 Use gdb::byte_vector.
10560 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10564 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10565 parameter type to readable_regcache.
10566 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10571 * dwarf2read.c (struct nextfield): Add initializers.
10572 (struct nextfnfield): Remove.
10573 (struct fnfieldlist): Add initializers. Remove "length" and
10574 "head", use std::vector.
10575 (struct decl_field_list): Remove.
10576 (struct field_info): Add initializers.
10577 <fields, baseclasses>: Now std::vector.
10578 <nbaseclasses, nfnfields, typedef_field_list_count,
10579 nested_types_list_count>: Remove.
10580 (dwarf2_add_field, dwarf2_add_type_defn)
10581 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10582 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10583 (process_structure_scope): Update.
10587 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10588 for use by std::sort.
10589 (build_type_psymtabs_1): Use std::vector.
10593 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10594 and LIBMPFR in the printed configuration.
10598 * source.c (get_filename_and_charpos): Use scoped_fd.
10599 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10600 (procfs_pidlist): Likewise.
10601 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10602 (iterate_over_mappings): Likewise.
10606 * infcall.c (struct call_return_meta_info)
10607 <stack_temporaries_enabled>: Remove.
10608 (get_call_return_value, call_function_by_hand_dummy): Update.
10609 * thread.c (disable_thread_stack_temporaries): Remove.
10610 (enable_thread_stack_temporaries): Remove.
10611 (thread_stack_temporaries_enabled_p): Return bool.
10612 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10613 (get_last_thread_stack_temporary): Update.
10614 * eval.c (evaluate_subexp): Update.
10615 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10616 class, not a function.
10617 (value_ptr, value_vec): Remove typedefs.
10618 (class thread_info) <stack_temporaries_enabled>: Now bool.
10619 <stack_temporaries>: Now a std::vector.
10620 (thread_stack_temporaries_enabled_p)
10621 (value_in_thread_stack_temporaries): Return bool.
10625 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10626 (getpkt_or_notif_sane_1): Likewise.
10630 * build-id.c (build_id_to_debug_bfd): Use std::string.
10634 * build-id.c (find_separate_debug_file_by_buildid): Return
10636 * build-id.h (find_separate_debug_file_by_buildid): Return
10638 * coffread.c (coff_symfile_read): Adjust to std::string.
10639 * elfread.c (elf_symfile_read): Adjust to std::string.
10640 * symfile.c (separate_debug_file_exists): Change parameter to
10642 (find_separate_debug_file): Return std::string.
10643 (find_separate_debug_file_by_debuglink): Return std::string.
10644 * symfile.h (find_separate_debug_file_by_debuglink): Return
10649 * common/xml-utils.c (xml_escape_text): Move code to...
10650 (xml_escape_text_append): ... this new function.
10651 * common/xml-utils.h (xml_escape_text_append): New declaration.
10652 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10654 (_initialize_xml_utils): register test_xml_escape_text_append as
10659 * defs.h: Remove MAX_REGISTER_SIZE.
10660 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10662 * python/py-unwind.c (pyuw_sniffer): Likewise.
10666 * linux-tdep.c (linux_info_proc): Update.
10667 * target.h (struct target_ops) <to_fileio_readlink>: Return
10669 (target_fileio_readlink): Return optional<string>.
10670 * remote.c (remote_hostio_readlink): Return optional<string>.
10671 * inf-child.c (inf_child_fileio_readlink): Return
10673 * target.c (target_fileio_readlink): Return optional<string>.
10677 * regcache.c (cooked_read_test): Add riscv to the list of
10678 architectures that have a save_reggroup.
10682 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10683 value is not a dynamic class object.
10687 * rust-exp.y: Formatting fixes.
10691 * riscv-tdep.c (riscv_register_name): Remove target description
10693 (riscv_gdbarch_init): Remove target description check.
10697 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10699 * riscv-tdep.h: Likewise.
10703 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10704 (riscv_pseudo_register_write): Delete.
10705 (riscv_gdbarch_init): Remove all use of pseudo registers.
10709 * record-btrace.c (btrace_print_lines): Replace cleanup
10710 parameter with RAII equivalents.
10711 (btrace_insn_history): Replace cleanup with RAII equivalents.
10712 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10713 make_cleanup_ui_out_tuple_begin_end): Remove.
10714 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10715 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10716 make_cleanup_ui_out_list_begin_end): Remove.
10720 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10721 parameter types to std::vector. Use bool.
10722 (record_btrace_wait): Replace VEC(tp_t) with
10723 std::vector<thread_info *>.
10724 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10728 * record-btrace.c (record_btrace_disable_callback): Remove.
10729 (struct scoped_btrace_disable): New.
10730 (record_btrace_open): Use scoped_btrace_disable.
10734 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10735 reading values from registers.
10739 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10744 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10745 change parameter type. Use GDB's print functions, and use
10746 core_addr_to_string where appropriate.
10747 (riscv_push_dummy_call): Use core_addr_to_string where
10748 appropriate, update call to riscv_print_arg_location, and reindent
10750 (riscv_return_value): Update call to riscv_print_arg_location.
10757 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10758 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10759 (ALLDEPFILES): Add riscv-tdep.c
10760 * configure.tgt: Add riscv support.
10761 * riscv-tdep.c: New file.
10762 * riscv-tdep.h: New file.
10763 * NEWS: Mention new target.
10764 * MAINTAINERS: Add entry for riscv.
10768 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10769 fields within aggregates.
10773 * record-btrace.c (btrace_print_lines): Change type of flags to
10774 gdb_disassembly_flags.
10778 * fbsd-nat.c: Include "inf-ptrace.h".
10779 (USE_SIGTRAP_SIGINFO): Conditionally define.
10780 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10781 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10782 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10784 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10786 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10788 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10789 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10790 "supports_stopped_by_hw_breakpoint" target methods.
10794 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10795 * fbsd-nat.c (debug_fbsd_nat): New variable.
10796 (show_fbsd_nat_debug): New function.
10797 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10798 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10802 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10803 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10805 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10806 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10811 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10812 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10816 * charset.c (struct charset_vector): New.
10817 (charsets): Change type to charset_vector.
10818 (find_charset_names): Adjust.
10820 (_initialize_charset): Adjust.
10824 * progspace.h (struct program_space) <deleted_solibs>: Change
10825 type to std::vector<std::string>.
10826 * progspace.c (clear_program_space_solib_cache): Adjust.
10827 * breakpoint.c (print_solib_event): Adjust.
10828 (check_status_catch_solib): Adjust.
10829 * solib.c (update_solib_list): Adjust.
10830 * ui-out.h (class ui_out) <field_string>: New overload.
10831 * ui-out.c (ui_out::field_string): New overload.
10835 * progspace.h (struct program_space): Add constructor and
10836 destructor, initialize fields.
10837 (add_program_space): Remove.
10838 * progspace.c (add_program_space): Rename to...
10839 (program_space::program_space): ... this.
10840 (release_program_space): Rename to...
10841 (program_space::~program_space): ... this.
10842 (delete_program_space): Use delete to delete program_space.
10843 (initialize_progspace): Use new to allocate program_space.
10844 * inferior.c (add_inferior_with_spaces): Likewise.
10845 (clone_inferior_command): Likewise.
10846 * infrun.c (follow_fork_inferior): Likewise.
10847 (handle_vfork_child_exec_or_exit): Likewise.
10851 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10852 (delim_string_to_char_ptr_vec): Return std::vector of
10853 gdb::unique_xmalloc_ptr.
10854 (dirnames_to_char_ptr_vec_append): Take std::vector of
10855 gdb::unique_xmalloc_ptr.
10856 (dirnames_to_char_ptr_vec): Return std::vector of
10857 gdb::unique_xmalloc_ptr.
10858 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10859 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10860 (delim_string_to_char_ptr_vec): Return an std::vector of
10861 gdb::unique_xmalloc_ptr, adjust the code.
10862 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10863 gdb::unique_xmalloc_ptr, adjust the code.
10864 (dirnames_to_char_ptr_vec): Return an std::vector of
10865 gdb::unique_xmalloc_ptr, adjust the code.
10866 * auto-load.c (auto_load_safe_path_vec): Change type to
10867 std::vector of gdb::unique_xmalloc_ptr.
10868 (auto_load_expand_dir_vars): Return an std::vector of
10869 gdb::unique_xmalloc_ptr, adjust the code.
10870 (auto_load_safe_path_vec_update): Adjust.
10871 (filename_is_in_auto_load_safe_path_vec): Adjust.
10872 (auto_load_objfile_script_1): Adjust.
10873 * build-id.c (build_id_to_debug_bfd): Adjust.
10874 * linux-thread-db.c (thread_db_load_search): Adjust.
10875 * source.c (add_path): Adjust.
10877 * symfile.c (find_separate_debug_file): Adjust.
10878 * utils.c (do_free_char_ptr_vec): Remove.
10879 (make_cleanup_free_char_ptr_vec): Remove.
10884 * common/pathstuff.c: Conditionally include "<windows.h>".
10889 * gcore.in: Quote variables and switch interpreter to bash.
10893 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10894 assertion. Add assertion for discriminant_index.
10895 (quirk_rust_enum): Use correct base type name in univariant case.
10899 * record.c (get_call_history_modifiers): Return a
10900 record_print_flags.
10901 (cmd_record_call_history): Adjust.
10902 * record-btrace.c (record_btrace_call_history): Adjust.
10903 (record_btrace_call_history_range): Adjust.
10904 (record_btrace_call_history_from): Adjust.
10905 * target-debug.h (target_debug_print_record_print_flags): New.
10906 * target-delegates.c: Re-generate.
10907 * target.c (target_call_history): Change flags type.
10908 (target_call_history_from): Likewise.
10909 (target_call_history_range): Likewise.
10910 * target.h (struct target_ops) <target_call_history>: Likewise.
10911 (target_call_history_from): Likewise.
10912 (target_call_history_range): Likewise.
10917 * common/common-utils.c: Include "sys/stat.h".
10918 (is_regular_file): Move here from "source.c"; change return
10920 * common/common-utils.h (is_regular_file): New prototype.
10921 * common/pathstuff.c (contains_dir_separator): New function.
10922 * common/pathstuff.h (contains_dir_separator): New prototype.
10923 * source.c: Don't include "sys/stat.h".
10924 (is_regular_file): Move to "common/common-utils.c".
10928 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10929 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10930 * auto-load.c: Include "common/pathstuff.h".
10931 * common/common-def.h (current_directory): Move here.
10932 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10934 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10936 * common/pathstuff.c: New file.
10937 * common/pathstuff.h: New file.
10938 * compile/compile.c: Include "common/pathstuff.h".
10939 * defs.h (current_directory): Move to "common/common-defs.h".
10940 * dwarf2read.c: Include "common/pathstuff.h".
10941 * exec.c: Likewise.
10942 * guile/scm-safe-call.c: Likewise.
10943 * linux-thread-db.c: Likewise.
10944 * main.c: Likewise.
10945 * nto-tdep.c: Likewise.
10946 * objfiles.c: Likewise.
10947 * source.c: Likewise.
10948 * symtab.c: Likewise.
10949 * utils.c: Include "common/pathstuff.h".
10950 (gdb_realpath): Move to "common/pathstuff.c".
10951 (gdb_realpath_keepfile): Likewise.
10952 (gdb_abspath): Likewise.
10953 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10954 (gdb_realpath_keepfile): Likewise.
10955 (gdb_abspath): Likewise.
10959 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10960 wildcard process pid for super_resume for kernels with a
10965 * compile/compile.c (get_args): Add additional comments
10966 explaining function.
10971 * target.h (memory_write_request_s): Remove typedef. Don't define
10973 (target_write_memory_blocks): Change argument to std::vector.
10974 (struct memory_write_request): Add constructor.
10975 * target-memory.c (compare_block_starting_address): Return bool.
10976 Change argument types.
10977 (claim_memory): Change arguments to use std::vector.
10978 (split_regular_and_flash_blocks, blocks_to_erase)
10979 (compute_garbled_blocks): Likewise.
10980 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10981 (target_write_memory_blocks): Change argument to std::vector.
10982 * symfile.c (struct load_section_data): Add constructor and
10983 destructor. Use std::vector for "requests".
10984 (struct load_progress_data): Add initializers.
10985 (load_section_callback): Update. Use "new".
10986 (clear_memory_write_data): Remove.
10987 (generic_load): Update.
10991 * arch/aarch64.h: Use common/tdesc.h.
10995 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10996 architecture with a 64-bit ABI.
11000 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11001 ahead of target description loading.
11005 * stack.c (backtrace_command_1): Update.
11006 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11008 * python/py-framefilter.c (py_print_frame)
11009 (gdbpy_apply_frame_filter): Change type of "flags".
11010 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11012 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11013 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11014 * extension.h (enum frame_filter_flag): Rename from
11015 frame_filter_flags.
11016 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11017 (apply_ext_lang_frame_filter): Change type of "flags".
11018 * extension.c (apply_ext_lang_frame_filter): Change type of
11020 * extension-priv.h (struct extension_language_ops)
11021 <apply_frame_filter>: Change type of "flags".
11026 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11027 off-by-one in py_end computation.
11028 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11030 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11035 * dwarf2read.c (struct variant_field): New.
11036 (struct nextfield) <variant>: New field.
11037 (dwarf2_add_field): Handle DW_TAG_variant_part.
11038 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11039 discriminated union.
11040 (read_structure_type): Handle DW_TAG_variant_part.
11041 (handle_struct_member_die): New function, extracted from
11042 process_structure_scope. Handle DW_TAG_variant.
11043 (process_structure_scope): Handle discriminated unions. Call
11044 handle_struct_member_die.
11048 * rust-lang.h (rust_last_path_segment): Declare.
11049 * rust-lang.c (rust_last_path_segment): Now public. Change
11051 (struct disr_info): Remove.
11052 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11053 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11054 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11055 (rust_enum_p, rust_enum_variant): New function.
11056 (rust_underscore_fields): Remove "offset" parameter.
11057 (rust_print_enum): New function.
11058 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11059 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11060 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11062 (rust_internal_print_type): New function, from rust_print_type.
11064 (rust_print_type): Call rust_internal_print_type.
11065 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11066 Update enum handling.
11067 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11068 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11069 (rust_union_quirks): New functions.
11070 (process_full_comp_unit, process_full_type_unit): Call
11072 (process_structure_scope): Update rust_unions if necessary.
11076 * value.h (value_union_variant): Declare.
11077 * valops.c (value_union_variant): New function.
11078 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11079 (struct discriminant_info): New.
11080 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11082 (struct main_type) <flag_discriminated_union>: New field.
11086 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11087 unittests/unpack-selftests.c.
11088 * unittests/unpack-selftests.c: New file.
11089 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11093 * dwarf2read.c (struct partial_die_info) <read>: New method.
11094 (read_partial_die): Remove the declaration.
11095 (load_partial_dies): Update.
11096 (partial_die_info::partial_die_info):
11097 (read_partial_die): Change it to partial_die_info::read.
11101 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11102 (fixup_partial_die): Remove declaration.
11103 (scan_partial_symbols): Update.
11104 (partial_die_parent_scope): Likewise.
11105 (partial_die_full_name): Likewise.
11106 (fixup_partial_die): Change it to partial_die_info::fixup.
11110 * dwarf2read.c (read_partial_die): Update the declaration.
11111 (load_partial_dies): Caller update.
11112 (read_partial_die): Remove one argument abbrev_len.
11116 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11117 assignment operator.
11118 (load_partial_dies): Use ctor and copy ctor.
11119 (read_partial_die): Update.
11120 (dwarf2_cu::find_partial_die): Use ctor.
11124 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11125 (find_partial_die_in_comp_unit): Change it to
11126 dwarf2_cu::find_partial_die.
11127 (find_partial_die): Update.
11131 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11136 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11140 * arch/amd64.h: Use common/tdesc.h.
11141 * arch/i386.c: Likewise.
11142 * arch/i386.h: Likewise.
11143 * arch/tic6x.c: Likewise.
11144 * arch/tdesc.h: Move file from here...
11145 * common/tdesc.h: ...to here.
11146 * features/aarch64-core.c: Regenerate.
11147 * features/aarch64-fpu.c: Regenerate.
11148 * features/i386/32bit-avx.c: Regenerate.
11149 * features/i386/32bit-avx512.c: Regenerate.
11150 * features/i386/32bit-core.c: Regenerate.
11151 * features/i386/32bit-linux.c: Regenerate.
11152 * features/i386/32bit-mpx.c: Regenerate.
11153 * features/i386/32bit-pkeys.c: Regenerate.
11154 * features/i386/32bit-sse.c: Regenerate.
11155 * features/i386/64bit-avx.c: Regenerate.
11156 * features/i386/64bit-avx512.c: Regenerate.
11157 * features/i386/64bit-core.c: Regenerate.
11158 * features/i386/64bit-linux.c: Regenerate.
11159 * features/i386/64bit-mpx.c: Regenerate.
11160 * features/i386/64bit-pkeys.c: Regenerate.
11161 * features/i386/64bit-segments.c: Regenerate.
11162 * features/i386/64bit-sse.c: Regenerate.
11163 * features/i386/x32-core.c: Regenerate.
11164 * features/tic6x-c6xp.c: Regenerate.
11165 * features/tic6x-core.c: Regenerate.
11166 * features/tic6x-gp.c: Regenerate.
11167 * target-descriptions.c: Use common/tdesc.h.
11168 * target-descriptions.h: Likewise.
11172 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11173 (try_thread_db_load_from_dir, thread_db_load_search): Use
11175 (info_auto_load_libthread_db_compare): Return bool. Change
11177 (info_auto_load_libthread_db): Use std::vector, std::string.
11182 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11184 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11186 * gdbarch.c: Rebuild.
11187 * gdbarch.h: Rebuild.
11188 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11189 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11190 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11195 * gdbtypes.h (sect_offset): Change type to uint64_t.
11196 (sect_offset_str): New function.
11197 * dwarf2read.c (create_addrmap_from_aranges): Use
11199 (error_check_comp_unit_head): Likewise.
11200 (create_debug_type_hash_table): Likewise.
11201 (read_cutu_die_from_dwo): Likewise.
11202 (init_cutu_and_read_dies): Likewise.
11203 (init_cutu_and_read_dies_no_follow): Likewise.
11204 (process_psymtab_comp_unit_reader): Likewise.
11205 (partial_die_parent_scope): Likewise.
11206 (peek_die_abbrev): Likewise.
11207 (process_queue): Likewise.
11208 (dwarf2_physname): Likewise.
11209 (read_namespace_alias): Likewise.
11210 (read_import_statement): Likewise.
11211 (create_dwo_cu_reader): Likewise.
11212 (create_cus_hash_table): Likewise.
11213 (lookup_dwo_cutu): Likewise.
11214 (inherit_abstract_dies): Likewise.
11215 (read_func_scope): Likewise.
11216 (read_call_site_scope): Likewise.
11217 (dwarf2_add_member_fn): Likewise.
11218 (read_common_block): Likewise.
11219 (read_module_type): Likewise.
11220 (read_typedef): Likewise.
11221 (read_subrange_type): Likewise.
11222 (load_partial_dies): Likewise.
11223 (read_partial_die): Likewise.
11224 (find_partial_die): Likewise.
11225 (read_str_index): Likewise.
11226 (dwarf2_string_attr): Likewise.
11227 (build_error_marker_type): Likewise.
11228 (lookup_die_type): Likewise.
11229 (dump_die_shallow): Likewise.
11230 (follow_die_ref): Likewise.
11231 (dwarf2_fetch_die_loc_sect_off): Likewise.
11232 (dwarf2_fetch_constant_bytes): Likewise.
11233 (follow_die_sig): Likewise.
11234 (get_signatured_type): Likewise.
11235 (get_DW_AT_signature_type): Likewise.
11236 (dwarf2_find_containing_comp_unit): Likewise.
11237 (set_die_type): Likewise.
11241 * arch/aarch64.c: Include "common-defs.h".
11242 * arch/amd64.c: Likewise.
11243 * arch/i386.c: Likewise.
11247 * value.h: (extract_field_op): Update.
11248 * eval.c (extract_field_op): Return a const char *.
11249 * expression.h (parse_expression_for_completion): Update.
11250 * completer.c (complete_expression): Update.
11251 (add_struct_fields): Make fieldname const.
11252 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11253 (mark_completion_tag, parse_exp_in_context_1): Update.
11254 (parse_expression_for_completion): Change "name" to
11255 unique_xmalloc_ptr*.
11259 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11263 * avr-tdep.c (avr_read_pc): Change parameter type to
11265 * gdbarch.sh (read_pc): Likewise.
11266 * gdbarch.c: Re-generated.
11267 * gdbarch.h: Re-generated.
11268 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11270 * ia64-tdep.c (ia64_read_pc): Likewise.
11271 * mips-tdep.c (mips_read_pc): Likewise.
11272 * spu-tdep.c (spu_read_pc): Likewise.
11276 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11277 * regcache-dump.c: New file.
11278 * regcache.c: Move register_dump to regcache-dump.c.
11279 (maintenance_print_registers): Likewise.
11280 (maintenance_print_raw_registers): Likewise.
11281 (maintenance_print_cooked_registers): Likewise.
11282 (maintenance_print_register_groups): Likewise.
11283 (maintenance_print_remote_registers): Likewise.
11284 (_initialize_regcache): Likewise.
11285 * regcache.h (register_dump): Moved from regcache.c.
11289 * regcache.c (regcache::regcache): Update.
11290 (regcache::invalidate): Move it to detached_regcache::invalidate.
11291 (get_thread_arch_aspace_regcache): Update.
11292 (regcache::raw_update): Update.
11293 (regcache::cooked_read): Remove some code.
11294 (regcache::cooked_read_value): Likewise.
11295 (regcache::raw_write): Remove assert on m_readonly_p.
11296 (regcache::raw_supply_integer): Move it to
11297 detached_regcache::raw_supply_integer.
11298 (regcache::raw_supply_zeroed): Likewise.
11299 * regcache.h (detached_regcache) <raw_supply_integer>: New
11301 <raw_supply_zeroed, invalidate>: Likewise.
11302 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11303 <invalidate>: Likewise.
11304 <m_readonly_p>: Removed.
11308 * infcmd.c (get_return_value): Let stop_regs point to
11309 get_current_regcache.
11310 * regcache.c (regcache::regcache): Remove.
11311 (register_dump_reg_buffer): New class.
11312 (regcache_print): Adjust.
11313 * regcache.h (regcache): Remove constructors.
11317 * regcache.c (class register_dump): New class.
11318 (register_dump_regcache, register_dump_none): New class.
11319 (register_dump_remote, register_dump_groups): New class.
11320 (regcache_print): Update.
11321 * regcache.h (regcache_dump_what): Move it to regcache.c.
11322 (regcache) <dump>: Remove.
11326 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11328 (jit_unwind_reg_set_impl): Call raw_supply.
11329 (jit_frame_sniffer): Use reg_buffer_rw.
11330 * record-full.c (record_full_core_regbuf): Change its type.
11331 (record_full_core_open_1): Use reg_buffer_rw.
11332 (record_full_close): Likewise.
11333 (record_full_core_fetch_registers): Use regcache->raw_supply.
11334 (record_full_core_store_registers): Likewise.
11335 * regcache.c (regcache::get_register_status): Move it to
11337 (regcache_raw_set_cached_value): Remove.
11338 (regcache::raw_set_cached_value): Remove.
11339 (regcache::raw_write): Call raw_supply.
11340 (regcache::raw_supply): Move it to reg_buffer_rw.
11341 * regcache.h (regcache_raw_set_cached_value): Remove.
11342 (reg_buffer_rw): New class.
11346 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11347 readonly_detached_regcache.
11348 (dummy_frame_prev_register): Use regcache->cooked_read.
11349 * frame.c (frame_save_as_regcache): Change return type.
11350 (frame_pop): Update.
11351 * frame.h (frame_save_as_regcache): Update declaration.
11352 * inferior.h (get_infcall_suspend_state_regcache): Update
11354 * infrun.c (infcall_suspend_state) <registers>: use
11355 readonly_detached_regcache.
11356 (save_infcall_suspend_state): Don't use regcache_dup.
11357 (get_infcall_suspend_state_regcache): Change return type.
11358 * linux-fork.c (struct fork_info) <savedregs>: Change to
11359 readonly_detached_regcache.
11361 (fork_save_infrun_state): Don't use regcache_dup.
11362 (info_checkpoints_command): Adjust.
11363 * mi/mi-main.c (register_changed_p): Update declaration.
11364 (mi_cmd_data_list_changed_registers): Use
11365 readonly_detached_regcache.
11366 (register_changed_p): Change parameter type to
11367 readonly_detached_regcache.
11368 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11369 readonly_detached_regcache.
11370 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11371 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11373 (regcache::save): Move it to reg_buffer.
11374 (regcache::restore): Change parameter type.
11375 (regcache_dup): Remove.
11376 * regcache.h (reg_buffer) <save>: New method.
11377 (readonly_detached_regcache): New class.
11378 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11379 readonly_detached_regcache.
11380 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11384 * frame.c (frame_save_as_regcache): Use regcache method save.
11385 (frame_pop): Use regcache method restore.
11386 * infrun.c (restore_infcall_suspend_state): Likewise.
11387 * linux-fork.c (fork_load_infrun_state): Likewise.
11388 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11390 * regcache.c (regcache_save): Remove.
11391 (regcache::restore): More asserts.
11392 (regcache_cpy): Remove.
11393 * regcache.h (regcache_save): Remove the declaration.
11394 (regcache::restore): Move from private to public.
11395 Remove the friend declaration of regcache_cpy.
11396 (regcache_cpy): Remove declaration.
11400 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11401 parameter type to 'readable_regcache *'.
11402 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11403 * arm-tdep.c (arm_neon_quad_read): Likewise.
11404 (arm_pseudo_read): Likewise.
11405 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11406 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11407 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11408 * gdbarch.c: Re-generated.
11409 * gdbarch.h: Re-generated.
11410 * gdbarch.sh (pseudo_register_read): Change parameter type to
11411 'readable_regcache *'.
11412 (pseudo_register_read_value): Likewise.
11413 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11414 (h8300_pseudo_register_read): Likewise.
11415 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11416 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11417 (i386_pseudo_register_read_into_value): Likewise.
11418 (i386_pseudo_register_read_value): Likewise.
11419 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11421 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11422 * m32c-tdep.c (m32c_raw_read): Likewise.
11423 (m32c_read_flg): Likewise.
11424 (m32c_banked_register): Likewise.
11425 (m32c_banked_read): Likewise.
11426 (m32c_sb_read): Likewise.
11427 (m32c_part_read): Likewise.
11428 (m32c_cat_read): Likewise.
11429 (m32c_r3r2r1r0_read): Likewise.
11430 (m32c_pseudo_register_read): Likewise.
11431 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11432 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11433 (mep_pseudo_cr64_read): Likewise.
11434 (mep_pseudo_register_read): Likewise.
11435 * mips-tdep.c (mips_pseudo_register_read): Likewise.
11436 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11437 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11438 * regcache.c (regcache::raw_read): Move it to readable_regcache.
11439 (regcache::cooked_read): Likewise.
11440 (regcache::cooked_read_value): Likewise.
11441 (regcache_cooked_read_signed):
11442 (regcache::cooked_read): Likewise.
11443 * regcache.h (readable_regcache): New class.
11444 (regcache): Inherit readable_regcache. Move some methods to
11446 * rl78-tdep.c (rl78_pseudo_register_read): Change
11447 parameter type to 'readable_regcache *'.
11448 * rs6000-tdep.c (do_regcache_raw_read): Remove.
11449 (e500_pseudo_register_read): Change parameter type to
11450 'readable_regcache *'.
11451 (dfp_pseudo_register_read): Likewise.
11452 (vsx_pseudo_register_read): Likewise.
11453 (efpr_pseudo_register_read): Likewise.
11454 * s390-tdep.c (s390_pseudo_register_read): Likewise.
11455 * sh-tdep.c (sh_pseudo_register_read): Likewise.
11456 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11457 (sh64_pseudo_register_read): Likewise.
11458 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11459 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11460 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11461 (spu_pseudo_register_read): Likewise.
11462 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11463 (xtensa_pseudo_register_read): Likewise.
11467 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11468 (regcache::arch): Move it to reg_buffer::arch.
11469 (regcache::register_buffer): Likewise.
11470 (regcache::assert_regnum): Likewise.
11471 (regcache::num_raw_registers): Likewise.
11472 * regcache.h (reg_buffer): New class.
11473 (regcache): Inherit reg_buffer.
11477 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11478 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11482 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11486 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11487 (SFILES): Remove common/*.c files.
11488 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11489 * common/common.host: Add common reference.
11490 * configure.ac: Likewise.
11491 * configure: Regenerate.
11495 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11496 (block_initialize_namespace): Use new.
11497 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11498 (dwarf2_free_objfile): Use delete.
11499 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11500 (copy_type_recursive): Use new.
11501 * gdb_obstack.h (allocate_on_obstack): New.
11506 * inferior.c (exit_inferior_1): Reset inf->control.
11510 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11515 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11516 frame_cleanup_after_sniffer on exception.
11520 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11522 (solib_bfd_open): Make pathname const.
11523 * solib.c (solib_bfd_open): Make pathname const.
11524 * solib-spu.c (spu_bfd_fopen): Make name const.
11525 (spu_bfd_open): Make pathname const.
11526 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11527 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11531 * symfile.c (symfile_bfd_open): Update.
11532 * source.h (openp, source_full_path_of, find_and_open_source):
11533 Change argument type to unique_xmalloc_ptr.
11534 * source.c (openp): Take a unique_xmalloc_ptr.
11535 (source_full_path_of, find_and_open_source): Likewise.
11536 (open_source_file, symtab_to_fullname): Update.
11537 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11538 unique_xmalloc_ptr.
11539 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11540 (exec_file_find): Update.
11541 * psymtab.c (psymtab_to_fullname): Update.
11542 * nto-tdep.h (nto_find_and_open_solib): Update.
11543 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11544 unique_xmalloc_ptr.
11545 * exec.c (exec_file_attach): Update.
11546 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11547 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11551 * solib.c: Include source.h.
11552 * nto-tdep.c: Include source.h.
11553 * mi/mi-cmd-env.c: Include source.h.
11554 * infcmd.c: Include source.h.
11555 * exec.c: Include source.h.
11556 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11557 (add_path, directory_switch, source_path, init_source_path): Move
11559 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11560 (add_path, directory_switch, source_path, init_source_path):
11565 * solist.h (exec_file_find, solib_find): Return
11566 unique_xmalloc_ptr.
11567 (solib_bfd_fopen): Take a const char *.
11568 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11569 (exec_file_find, solib_find): Likewise.
11570 (solib_bfd_fopen): Do not take ownership of "pathname".
11571 (solib_bfd_open): Use unique_xmalloc_ptr.
11572 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11573 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11574 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11575 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11579 * ada-lang.c (name_match_type_from_name): Remove reference to
11580 ada_name_for_lookup in function's documentation.
11581 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11585 * defs.h (enum openp_flags): New enum.
11586 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11587 Move to enum openp_flags.
11588 (openp_flags): New enum flags.
11589 (openp): Change parameter type to openp_flags.
11590 * source.c (openp): Change parameter type to openp_flags.
11591 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11592 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11596 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11601 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11603 (class dwarf2_queue_guard): ...the destructor of this new class.
11604 (dw2_do_instantiate_symtab): Create instance of the new class
11605 dwarf2_queue_guard, remove cleanup.
11609 * source.c (find_source_lines): Don't reference past the end of
11614 * remote.c (remote_btrace_maybe_reopen): Change error message.
11615 * btrace.c (btrace_enable): Likewise.
11616 (parse_xml_btrace): Likewise.
11617 (parse_xml_btrace_conf): Likewise.
11621 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11622 (linux_enable_pt, linux_enable_bts): Call
11623 diagnose_perf_event_open_fail.
11627 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11628 Remove parameter and change return type. Update callers. Move it.
11629 (linux_enable_bts, linux_enable_pt): Improve error message.
11630 (linux_enable_pt): Remove zero buffer size check.
11631 (linux_enable_btrace): Improve error messages. Remove NULL return
11636 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11637 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11638 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11639 (linux_supports_pt, linux_supports_btrace): Remove.
11640 (linux_enable_bts): Call cpu_supports_bts.
11641 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11642 * remote.c (remote_supports_btrace): Remove.
11643 (init_remote_ops): Remove remote_supports_btrace.
11644 * target-delegates.c: Regenerated.
11645 * target.c (target_supports_btrace): Remove.
11646 * target.h (target_ops) <to_supports_btrace>: Remove
11647 (target_supports_btrace): Remove.
11648 * x86-linux-nat.c (x86_linux_create_target): Remove
11649 linux_supports_btrace.
11653 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11655 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11656 exception and use message in own exception.
11660 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11661 (perf_event_pt_event_type): Use gdb_file_up.
11662 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11663 scoped_fd, and scoped_mmap.
11667 * common/scoped_mmap.h: New.
11668 * unittests/scoped_mmap-selftest.c: New.
11669 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11670 unittests/scoped_mmap-selftest.c.
11674 * common/scoped_fd.h: New.
11675 * unittests/scoped_fd-selftest.c: New.
11676 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11677 unittests/scoped_fd-selftest.c.
11681 * auto-load.c (auto_load_section_scripts): Use
11682 gdb::unique_xmalloc_ptr.
11686 * auto-load.c (execute_script_contents): Use std::string.
11690 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11691 Python function, rather than a new command.
11695 * solib.c (solib_find_1): Use std::string.
11696 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11700 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11704 * source.c (find_source_lines): Use gdb::def_vector.
11708 * macrocmd.c (struct temporary_macro_definition): New.
11709 (macro_define_command): Use temporary_macro_definition. Remove
11711 (free_macro_definition_ptr): Remove.
11715 * macroexp.c (maybe_expand): Use std::string.
11719 * macroexp.c (struct macro_buffer): Add initializers for some
11721 (init_buffer, init_shared_buffer, free_buffer)
11722 (free_buffer_return_text): Remove.
11723 (macro_buffer): New constructors.
11724 (~macro_buffer): New destructor.
11725 (macro_buffer::set_shared): New method.
11726 (macro_buffer::resize_buffer, macro_buffer::appendc)
11727 (macro_buffer::appendmem): Now methods, not free functions.
11728 (set_token, append_tokens_without_splicing, stringify)
11729 (macro_stringify): Update.
11730 (gather_arguments): Change return type. Remove argc_p argument,
11731 add args_ptr argument. Use std::vector.
11732 (substitute_args): Remove argc argument. Accept std::vector.
11733 (expand): Update. Use std::vector.
11734 (scan, macro_expand, macro_expand_next): Update.
11738 * symtab.c (default_collect_symbol_completion_matches_break_on):
11739 Use unique_xmalloc_ptr.
11740 * macroscope.h: (sal_macro_scope, user_macro_scope)
11741 (default_macro_scope): Return unique_xmalloc_ptr.
11742 * macroscope.c (sal_macro_scope, user_macro_scope)
11743 (default_macro_scope): Return unique_xmalloc_ptr.
11744 * macroexp.h (macro_expand, macro_expand_once): Return
11745 unique_xmalloc_ptr.
11746 * macroexp.c (macro_expand, macro_expand_once): Return
11747 unique_xmalloc_ptr.
11748 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11749 (info_macro_command, info_macros_command): Use
11750 unique_xmalloc_ptr.
11751 * compile/compile-c-support.c (write_macro_definitions): Use
11752 unique_xmalloc_ptr.
11753 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11757 * value.c (value_static_field): Assign field type instead of
11758 containing type when returning an optimized out value.
11762 * ft32-tdep.c (ft32_read_pc): Remove.
11763 (ft32_write_pc): Remove.
11764 (ft32_gdbarch_init): Update.
11765 * m32r-tdep.c (m32r_read_pc): Remove.
11766 (m32r_gdbarch_init): Update.
11767 * mep-tdep.c (mep_read_pc): Remove.
11768 (mep_gdbarch_init): Update.
11769 * microblaze-tdep.c (microblaze_write_pc): Remove.
11770 (microblaze_gdbarch_init): Update.
11771 * mn10300-tdep.c (mn10300_read_pc): Remove.
11772 (mn10300_write_pc): Remove.
11773 (mn10300_gdbarch_init): Update.
11774 * moxie-tdep.c (moxie_read_pc): Remove.
11775 (moxie_write_pc): Remove.
11776 (moxie_gdbarch_init): Update.
11780 * expprint.c (print_subexp_standard): Handle
11781 OP_F77_UNDETERMINED_ARGLIST.
11782 (dump_subexp_body_standard): Likewise.
11786 * target-descriptions.c (tdesc_element_visitor) Add empty
11788 (tdesc_type): Move make_gdb_type from here.
11789 (tdesc_type_builtin): Likewise.
11790 (tdesc_type_vector): Likewise.
11791 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11792 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11793 (make_gdb_type_union): Likewise.
11794 (make_gdb_type_flags): Likewise.
11795 (make_gdb_type_enum): Likewise.
11796 (make_gdb_type): New function.
11797 (tdesc_register_type): Use static make_gdb_type.
11801 * infcmd.c (default_print_one_register_info): Align natural-format
11802 column values consistently one under another.
11803 (pad_to_column): New function.
11807 * dwarf2read.c (dwarf2_physname): Move commment.
11811 * varobj.c (varobj_formatted_print_options): Allow recursive
11812 pretty printing if pretty printing is enabled.
11816 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11817 names after a structop as a filename.
11821 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11822 (arm_record_coproc_data_proc): Likewise.
11826 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11830 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11831 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11835 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11836 * inflow.c (child_terminal_save_inferior): Wrap reference to
11837 tcgetpgrp in HAVE_TERMIOS_H.
11838 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11840 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11841 always iterate over all inferiors.
11842 (gdbsim_cntrl_c): Adjust.
11843 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11847 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11848 index type is objfile-owned if the element type is as well.
11856 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11857 "features/s390x-linux64.c".
11858 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11859 s390_linux32 and s390x_linux64.
11860 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11862 * s390-tdep.c: Include "features/s390-linux32.c" and
11863 "features/s390x-linux64.c".
11864 (s390_tdesc_valid): Add check for tdesc_has_registers.
11865 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11866 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11867 tdesc_s390x_linux64.
11868 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11869 tdesc_s390x_linux64 to...
11870 * s390-tdep.h: ...here.
11875 * config.in, configure: Regenerate.
11876 * configure.ac: Check for getpgid.
11877 * go32-nat.c (go32_pass_ctrlc): New.
11878 (go32_target): Install it.
11879 * inf-child.c (inf_child_target): Install
11880 child_terminal_save_inferior, child_pass_ctrlc and
11882 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11883 (inf_ptrace_target): No longer install it.
11884 * infcmd.c (interrupt_target_1): Adjust.
11885 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11886 (child_interrupt): Declare.
11887 (inferior::terminal_state): New.
11888 * inflow.c (struct terminal_info): Update comments.
11889 (inferior_process_group): Delete.
11890 (terminal_is_ours): Delete.
11891 (gdb_tty_state): New.
11892 (child_terminal_init): Adjust.
11893 (is_gdb_terminal, sharing_input_terminal_1)
11894 (sharing_input_terminal): New functions.
11895 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11896 Set the process's actual process group in the foreground if
11897 possible. Handle is_ours_for_output/is_ours distinction. Don't
11898 mark terminal as the inferior's if not sharing GDB's terminal.
11899 Don't check attach_flag.
11900 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11901 pass down a target_terminal_state.
11902 (child_terminal_save_inferior): New, factored out from ...
11903 (child_terminal_ours_1): ... this. Handle
11904 target_terminal_state::is_ours_for_output.
11905 (child_interrupt, child_pass_ctrlc): New.
11906 (inflow_inferior_exit): Clear the inferior's terminal_state.
11907 (copy_terminal_info): Copy the inferior's terminal state.
11908 (_initialize_inflow): Remove reference to terminal_is_ours.
11909 * inflow.h (inferior_process_group): Delete.
11910 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11911 * procfs.c (procfs_target): Don't install procfs_interrupt.
11912 (procfs_interrupt): Delete.
11913 * remote.c (remote_serial_quit_handler): Adjust.
11914 (remote_interrupt): Remove ptid parameter. Adjust.
11915 * target-delegates.c: Regenerate.
11916 * target.c: Include "terminal.h".
11917 (target_terminal::terminal_state): Rename to ...
11918 (target_terminal::m_terminal_state): ... this.
11919 (target_terminal::init): Adjust.
11920 (target_terminal::inferior): Adjust to per-inferior
11922 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11923 (target_terminal::ours, target_terminal::ours_for_output): Use
11924 target_terminal_is_ours_kind.
11925 (target_interrupt): Remove ptid parameter. Adjust.
11926 (default_target_pass_ctrlc): Adjust.
11927 * target.h (target_ops::to_terminal_save_inferior): New field.
11928 (target_ops::to_interrupt): Remove ptid_t parameter.
11929 (target_interrupt): Remove ptid_t parameter. Update comment.
11930 (target_pass_ctrlc): Update comment.
11931 * target/target.h (target_terminal_state): New scoped enum,
11932 factored out of ...
11933 (target_terminal::terminal_state): ... here.
11934 (target_terminal::inferior): Update comments.
11935 (target_terminal::restore_inferior): New.
11936 (target_terminal::is_inferior, target_terminal::is_ours)
11937 (target_terminal::is_ours_for_output): Adjust.
11938 (target_terminal::scoped_restore_terminal_state): Adjust to
11939 rename, and call restore_inferior() instead of inferior().
11940 (target_terminal::scoped_restore_terminal_state::m_state): Change
11942 (target_terminal::terminal_state): Rename to ...
11943 (target_terminal::m_terminal_state): ... this and change type.
11947 * linux-nat.c (wait_for_signal): New function.
11948 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11950 (async_terminal_is_ours)
11951 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11952 (linux_nat_add_target): Don't override
11953 to_terminal_inferior/to_terminal_ours.
11957 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11961 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11962 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11963 dwarf2_per_objfile_free here.
11964 (dwarf2_per_objfile_free): Remove.
11965 (_initialize_dwarf2_read): Don't register
11966 dwarf2_per_objfile_free as a registry cleanup.
11970 Avoid compilation errors in MinGW native builds
11972 The error is triggered by including python-internal.h, and the
11975 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11976 from build-gnulib/import/math.h:27,
11977 from d:/usr/Python26/include/pyport.h:235,
11978 from d:/usr/Python26/include/Python.h:58,
11979 from python/python-internal.h:94,
11980 from python/py-arch.c:24:
11981 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11985 This happens because Python headers define 'hypot' to expand t
11986 '_hypot' in the Windows builds.
11987 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11988 'hypoth'. This avoids a compilation error.
11992 * MAINTAINERS (Write After Approval): Fix ordering.
11996 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12000 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12001 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12002 Remove nop. Make const. Comment.
12003 (powerpc32_plt_stub_so_2): New.
12004 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12005 Correct count. Update uses.
12006 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12007 Move common code reading PLT entry word. Correct
12008 powerpc32_plt_stub PLT address calculation.
12009 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12010 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12011 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12012 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12013 (ppc64_standard_linkage8): Likewise.
12014 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12015 Correct insns description.
12016 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12020 GCC PR libstdc++/83906
12021 * gdbtypes.c (operator==(const dynamic_prop &,
12022 const dynamic_prop &)): New.
12023 (operator==(const range_bounds &, const range_bounds &)): New.
12024 (check_types_equal): Use them instead of memcmp.
12025 * gdbtypes.h (operator==(const dynamic_prop &,
12026 const dynamic_prop &)): Declare.
12027 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12028 (operator==(const range_bounds &, const range_bounds &)): Declare.
12029 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12033 * s390-linux-tdep.c (s390_record_address_mask)
12034 (s390_record_calc_disp_common, s390_record_calc_disp)
12035 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12036 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12037 (s390_process_record): Move to s390-tdep.c.
12038 (s390_linux_init_abi_any): Adjust.
12039 * s390-tdep.c (s390_record_address_mask)
12040 (s390_record_calc_disp_common, s390_record_calc_disp)
12041 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12042 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12043 (s390_process_record): Moved from s390-linux-tdep.c
12044 (s390_gdbarch_init): Adjust.
12048 * s390-linux-nat.c (s390-tdep.h): New include.
12049 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12050 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12051 (ALLDEPFILES): Add s390-tdep.c.
12052 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12053 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12054 * s390-tdep.h: ...this. New file.
12055 * s390-linux-tdep.c (s390-tdep.h): New include.
12056 (_initialize_s390_tdep): Rename to...
12057 (_initialize_s390_linux_tdep): ...this and adjust.
12058 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12059 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12061 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12062 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12063 (s390_is_partial_instruction, s390_software_single_step)
12064 (is_non_branch_ril, s390_displaced_step_copy_insn)
12065 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12066 (s390_prologue_data, s390_addr, s390_store, s390_load)
12067 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12068 (s390_register_call_saved, s390_guess_tracepoint_registers)
12069 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12070 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12071 (s390_pseudo_register_name, s390_pseudo_register_type)
12072 (s390_pseudo_register_read, s390_pseudo_register_write)
12073 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12074 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12075 (s390_addr_bits_remove, s390_address_class_type_flags)
12076 (s390_address_class_type_flags_to_name)
12077 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12078 (s390_function_arg_float, s390_function_arg_vector)
12079 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12080 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12081 (s390_frame_align, s390_register_return_value, s390_return_value)
12082 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12083 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12084 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12085 (s390_trad_frame_prev_register, s390_unwind_cache)
12086 (s390_prologue_frame_unwind_cache)
12087 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12088 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12089 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12090 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12091 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12092 (s390_frame_base_address, s390_local_base_address)
12093 (s390_frame_base, s390_gcc_target_options)
12094 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12095 (s390_validate_reg_range, s390_tdesc_valid)
12096 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12097 * s390-tdep.c: ...this. New file.
12101 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12102 (s390_process_record, s390_gdbarch_tdep_alloc)
12103 (s390_linux_init_abi_any): Use/set new hook.
12107 * s390-linux-tdep.c (osabi.h): New include.
12108 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12109 (s390_linux_init_abi_any): New functions.
12110 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12114 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12115 tdesc_has_registers check
12119 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12120 (s390_validate_reg_range): New macro.
12121 (s390_gdbarch_init): Adjust.
12125 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12126 (s390_gdbarch_tdep_alloc): Adjust.
12127 (s390_gdbarch_init): Adjust.
12131 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12132 <have_tdb>: Change type to bool.
12133 (s390_gdbarch_tdep_alloc): Adjust.
12134 (s390_gdbarch_init): Adjust.
12138 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12139 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12140 (s390_gdbarch_tdep_alloc): New function.
12141 (s390_gdbarch_init): Allocate tdep at start and use its fields
12142 instead of separate variables.
12146 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12147 when looking for cached gdbarch and add comment for remaining.
12152 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12157 * MAINTAINERS: Update my company e-mail address.
12161 * regcache.c (cooked_write_test): New function.
12162 (_initialize_regcache): Register the test.
12166 * ia64-tdep.c (ia64_pseudo_register_read): Call
12167 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12168 * m32c-tdep.c (m32c_cat_read): Likewise.
12169 (m32c_r3r2r1r0_read): Likewise.
12170 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12171 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12175 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12176 method raw_read instead of regcache_raw_read.
12177 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12178 * arm-tdep.c (arm_neon_quad_read): Likewise.
12179 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12180 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12181 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12182 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12183 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12184 (i386_pseudo_register_read_into_value): Likewise.
12185 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12186 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12187 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12188 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12189 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12190 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12191 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12192 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12193 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12197 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12198 * configure.tgt: Remove target mt.
12199 * mt-tdep.c: Remove.
12200 * regcache.c (cooked_read_test): Remove the check for mt.
12204 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12205 instead of gdbarch_pseudo_register_read_value.
12209 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12214 * linespec.c (create_sals_line_offset): Remove code that preserved
12215 the symtab_and_line's line number.
12219 * varobj.c (varobj_create): Don't set valid_block when creating a
12224 * varobj.c (varobj_create): Remove out of date comment.
12229 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12230 updating innermost block.
12231 * parse.c (innermost_block_tracker::update): Take extra type
12232 parameter, and check types match before updating innermost block.
12233 (write_dollar_variable): Update innermost block for registers.
12234 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12235 (innermost_block_tracker::innermost_block_tracker): Initialise
12237 (innermost_block_tracker::reset): Take type parameter.
12238 (innermost_block_tracker::update): Take type parameter, and pass
12239 type through as needed.
12240 (innermost_block_tracker::m_types): New member.
12241 * varobj.c (varobj_create): Pass type when reseting innermost
12246 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12247 * ada-lang.c (resolve_subexp): Likewise.
12248 * breakpoint.c (set_breakpoint_condition) Likewise.
12249 (watch_command_1) Likewise.
12250 * c-exp.y (variable): Likewise.
12251 * d-exp.y (PrimaryExpression): Likewise.
12252 * f-exp.y (variable): Likewise.
12253 * go-exp.y (variable): Likewise.
12254 * m2-exp.y (variable): Likewise.
12255 * objfiles.c (objfile::~objfile): Likewise.
12256 * p-exp.y (variable): Likewise.
12257 * parse.c (innermost_block): Change type.
12258 * parser-defs.h (class innermost_block_tracker): New.
12259 (innermost_block): Change to innermost_block_tracker.
12260 * printcmd.c (display_command): Switch to innermost_block API.
12261 (do_one_display): Likewise.
12262 * rust-exp.y (do_one_display): Likewise.
12263 * symfile.c (clear_symtab_users): Likewise.
12264 * varobj.c (varobj_create): Switch to innermost_block API, replace
12265 use of innermost_block with block stored on varobj object.
12269 * expression.h (innermost_block): Remove declaration.
12270 * varobj.c: Add 'parser-defs.h' include.
12274 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12275 symbols in the static and global blocks.
12279 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12280 gdb_ptrace.h, and move including gdb_wait.h ...
12281 * nat/linux-ptrace.h: ... to here.
12285 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12286 inf_ptrace_detach_success.
12287 (inf_ptrace_detach_success): Add inferior parameter, use it
12288 instead of inferior_ptid, pass it to detach_inferior.
12289 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12291 * inferior.c (detach_inferior): Add overload that takes an
12293 * inferior.h (detach_inferior): Likewise.
12294 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12295 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12296 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12300 * target.h (struct target_ops) <to_detach>: Add inferior
12302 (target_detach): Likewise.
12303 * target.c (dispose_inferior): Pass inferior down.
12304 (target_detach): Pass inferior down. Assert that it is equal to
12305 the current inferior.
12306 * aix-thread.c (aix_thread_detach): Pass inferior down.
12307 * corefile.c (core_file_command): Pass current_inferior() down.
12308 * corelow.c (core_detach): Add inferior parameter.
12309 * darwin-nat.c (darwin_detach): Likewise.
12310 * gnu-nat.c (gnu_detach): Likewise.
12311 * inf-ptrace.c (inf_ptrace_detach): Likewise.
12312 * infcmd.c (detach_command): Pass current_inferior() down to
12314 * infrun.c (follow_fork_inferior): Pass parent_inf to
12316 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12318 * linux-nat.c (linux_nat_detach): Add inferior parameter.
12319 * linux-thread-db.c (thread_db_detach): Likewise.
12320 * nto-procfs.c (procfs_detach): Likewise.
12321 * procfs.c (procfs_detach): Likewise.
12322 * record.c (record_detach): Likewise.
12323 * record.h (struct inferior): Forward-declare.
12324 (record_detach): Add inferior parameter.
12325 * remote-sim.c (gdbsim_detach): Likewise.
12326 * remote.c (remote_detach_1): Likewise.
12327 (remote_detach): Likewise.
12328 (extended_remote_detach): Likewise.
12329 * sol-thread.c (sol_thread_detach): Likewise.
12330 * target-debug.h (target_debug_print_inferior_p): New macro.
12331 * target-delegates.c: Re-generate.
12332 * top.c (kill_or_detach): Pass inferior down to target_detach.
12333 * windows-nat.c (windows_detach): Add inferior parameter.
12337 * target.h (struct target_ops) <to_detach>: Remove args
12339 (target_detach): Likewise.
12340 * target.c (dispose_inferior): Adjust.
12341 (target_detach): Remove args parameter, adjust.
12342 * aix-thread.c (aix_thread_detach): Adjust.
12343 * corefile.c (core_file_command): Adjust.
12344 * corelow.c (core_detach): Adjust.
12345 * darwin-nat.c (darwin_detach): Adjust.
12346 * gnu-nat.c (gnu_detach): Adjust.
12347 * inf-ptrace.c (inf_ptrace_detach): Adjust.
12348 * infcmd.c (detach_command): Adjust
12349 * infrun.c (follow_fork_inferior): Adjust.
12350 (handle_vfork_child_exec_or_exit): Adjust.
12351 * linux-fork.c (linux_fork_detach): Remove args parameter.
12352 * linux-fork.h (linux_fork_detach): Likewise.
12353 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12354 * linux-thread-db.c (thread_db_detach): Likewise.
12355 * nto-procfs.c (procfs_detach): Likewise.
12356 * procfs.c (procfs_detach): Likewise.
12357 (do_detach): Remove signo parameter.
12358 * record.c (record_detach): Remove args parameter.
12359 * record.h (record_detach): Likewise.
12360 * remote-sim.c (gdbsim_detach): Likewise.
12361 * remote.c (remote_detach_1): Likewise.
12362 (remote_detach): Likewise.
12363 (extended_remote_detach): Likewise.
12364 * sol-thread.c (sol_thread_detach): Likewise.
12365 * target-delegates.c: Re-generate.
12366 * top.c (struct qt_args) <args>: Remove field.
12367 (kill_or_detach): Don't pass args.
12368 (quit_force): Don't set args.
12369 * windows-nat.c (windows_detach): Remove args parameter.
12373 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12374 (arm_linux_init_abi): Install it.
12378 * osabi.c (gdb_osabi_names): Extend the regexp for
12379 arm-linux-gnueabihf.
12383 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12385 (abbrev_table::add_abbrev): Update.
12386 (abbrev_table::lookup_abbrev): Update.
12390 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12394 * compile/compile.c (compile_to_object): Convert "triplet_rx"
12399 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
12403 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12404 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12405 (create_array_type_with_stride): Update.
12406 * dwarf2read.c (set_die_type): Update.
12410 * dwarf2read.c (delayed_method_info): Remove typedef.
12411 (dwarf2_cu::method_info): Now a std::vector.
12412 (add_to_method_list): Update.
12413 (free_delayed_list): Remove.
12414 (compute_delayed_physnames): Update.
12415 (process_full_comp_unit, process_full_type_unit): Clear the method
12416 list. Remove cleanups.
12417 (psymtab_include_file_name): Add name_holder parameter. Use
12418 unique_xmalloc_ptr.
12419 (dwarf_decode_lines): Update.
12424 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12425 (dwarf2_per_objfile::free_cached_comp_units)
12426 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12427 (init_cutu_and_read_dies_no_follow): Update.
12428 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12429 (dwarf2_cu::~dwarf2_cu): New.
12430 (free_heap_comp_unit, free_stack_comp_unit): Remove.
12431 (age_cached_comp_units, free_one_cached_comp_unit): Update.
12436 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12437 (struct die_reader_specs) <abbrev_table>: New member.
12438 (struct abbrev_table): Add constructor.
12439 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12440 <abbrev_obstack>: Now an auto_obstack.
12441 (abbrev_table_up): New typedef.
12442 (init_cu_die_reader): Add abbrev_table parameter.
12443 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12444 Add result_dwo_abbrev_table.
12445 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12446 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12448 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12450 (skip_children): Update.
12451 (abbrev_table::alloc_abbrev): Rename from
12452 abbrev_table_alloc_abbrev.
12453 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12454 (abbrev_table::lookup_abbrev): Rename from
12455 abbrev_table_lookup_abbrev.
12456 (abbrev_table_read_table): Return abbrev_table_up.
12457 (abbrev_table_free, abbrev_table_free_cleanup)
12458 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12459 (load_partial_dies): Update.
12463 * dwarf2read.c (dwarf2_compute_name): Update comment.
12464 (read_func_scope, read_variable): Update.
12465 (new_symbol): Remove.
12466 (new_symbol_full): Rename to new_symbol.
12471 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12472 a warning instead of throwing an error, set section size to 0 and return
12474 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12478 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12480 (linux_ptrace_attach_fail_reason_string): Likewise.
12481 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12483 (linux_ptrace_attach_fail_reason_string): Likewise.
12484 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12488 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12493 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12494 checking for fs_base/gs_base fields in struct user_regs_struct.
12495 * configure: Regenerate.
12499 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12501 (aarch64_linux_init_abi): Install it to gdbarch hook
12502 gcc_target_options.
12506 * common/signals-state-save-restore.c
12507 (save_original_signals_state): Fix typos.
12512 * Makefile.in (install-only): Install gdb-add-index.
12516 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12520 * infrun.c (keep_going_pass_signal): Clear step-over info when
12521 insert_breakpoints fails.
12526 * infrun.c (resume): Rename to ...
12527 (resume_1): ... this.
12528 (resume): Reimplement as wrapper around resume_1.
12533 * remote.c (remote_parse_stop_reply): Default to the last-set
12534 general thread instead of to 'magic_null_ptid'.
12538 * language.h (language_get_symbol_name_matcher): Rename ...
12539 (get_symbol_name_matcher): ... this.
12540 * language.c (language_get_symbol_name_matcher): Ditto.
12541 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12548 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12549 Adjust to use language_get_symbol_name_matcher instead of
12550 language_defn::la_get_symbol_name_matcher.
12551 * language.c (language_get_symbol_name_matcher): If in Ada mode
12552 and the lookup name is a verbatim match, return Ada's matcher.
12553 * language.h (language_get_symbol_name_matcher): Adjust comment.
12554 (ada_lookup_name_info::verbatim_p):: New method.
12559 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12560 minsym's language is language_auto or language_cplus, pass down
12561 language_ada instead.
12562 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12567 * minsyms.c (linkage_name_str): New function.
12568 (iterate_over_minimal_symbols): Use it.
12572 * NEWS: Document that 'info proc' now works on FreeBSD.
12576 * configure.ac: Check for kinfo_getfile in libutil.
12577 * configure: Regenerate.
12578 * config.in: Regenerate.
12579 * fbsd-nat.c: Include "fbsd-tdep.h".
12580 (fbsd_fetch_cmdline): New.
12581 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12582 rather than calling error.
12583 (fbsd_info_proc): New.
12584 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12585 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12586 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12590 * fbsd-nat.c (struct free_deleter): Remove.
12591 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12595 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12596 NULL for an empty pathname.
12600 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12601 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12602 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12603 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12604 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12605 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12606 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12607 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12608 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12609 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12610 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12611 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12612 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12613 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12614 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12618 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12619 (gnu_xfer_auxv): New function.
12620 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12621 TARGET_OBJECT_AUXV.
12626 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12628 (COMMON_OBS): Remove selftest.o.
12629 * configure.ac: Append selftest-arch.c and common/selftest.c to
12630 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12631 * configure: Re-generated.
12632 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12634 (maintenance_info_selftests): Likewise.
12638 * ada-valprint.c (val_print_packed_array_elements): Use
12639 proper number of elements when printing an array indexed
12640 by an enumeration type.
12644 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12645 (dw2_get_file_names_reader): Adjust.
12646 (lookup_dwo_signatured_type): Adjust.
12647 (lookup_dwp_signatured_type): Adjust.
12648 (lookup_signatured_type): Adjust.
12649 (create_type_unit_group): Adjust.
12650 (get_type_unit_group): Adjust.
12651 (process_psymtab_comp_unit_reader): Adjust.
12652 (build_type_psymtabs_reader): Adjust.
12653 (scan_partial_symbols): Adjust.
12654 (add_partial_symbol): Adjust.
12655 (add_partial_subprogram): Adjust.
12656 (peek_die_abbrev): Adjust.
12657 (fixup_go_packaging): Adjust.
12658 (process_imported_unit_die): Adjust.
12659 (dwarf2_compute_name): Adjust.
12660 (dwarf2_physname): Adjust.
12661 (read_import_statement): Adjust.
12662 (handle_DW_AT_stmt_list): Adjust.
12663 (read_file_scope): Adjust.
12664 (read_func_scope): Adjust.
12665 (read_lexical_block_scope): Adjust.
12666 (read_call_site_scope): Adjust.
12667 (read_variable): Adjust.
12668 (dwarf2_rnglists_process): Adjust.
12669 (dwarf2_ranges_process): Adjust.
12670 (dwarf2_ranges_read): Adjust.
12671 (dwarf2_get_pc_bounds): Adjust.
12672 (dwarf2_record_block_ranges): Adjust.
12673 (dwarf2_add_field): Adjust.
12674 (dwarf2_add_member_fn): Adjust.
12675 (read_structure_type): Adjust.
12676 (process_structure_scope): Adjust.
12677 (read_enumeration_type): Adjust.
12678 (read_array_type): Adjust.
12679 (mark_common_block_symbol_computed): Adjust.
12680 (read_common_block): Adjust.
12681 (read_namespace_type): Adjust.
12682 (read_namespace): Adjust.
12683 (read_module_type): Adjust.
12684 (read_tag_pointer_type): Adjust.
12685 (read_tag_ptr_to_member_type): Adjust.
12686 (read_tag_string_type): Adjust.
12687 (read_subroutine_type): Adjust.
12688 (read_typedef): Adjust.
12689 (read_base_type): Adjust.
12690 (attr_to_dynamic_prop): Adjust.
12691 (read_subrange_type): Adjust.
12692 (read_unspecified_type): Adjust.
12693 (dwarf2_read_abbrevs): Adjust.
12694 (load_partial_dies): Adjust.
12695 (read_partial_die): Adjust.
12696 (find_partial_die): Adjust.
12697 (guess_partial_die_structure_name): Adjust.
12698 (fixup_partial_die): Adjust.
12699 (read_attribute_value): Adjust.
12700 (read_addr_index): Adjust.
12701 (read_addr_index_from_leb128): Adjust.
12702 (read_str_index): Adjust.
12703 (dwarf2_string_attr): Adjust.
12704 (get_debug_line_section): Adjust.
12705 (dwarf_decode_line_header): Adjust.
12706 (lnp_state_machine::check_line_address): Adjust.
12707 (dwarf_decode_lines_1): Adjust.
12708 (dwarf_decode_lines): Adjust.
12709 (dwarf2_start_symtab): Adjust.
12710 (var_decode_location): Adjust.
12711 (new_symbol_full): Adjust.
12712 (dwarf2_const_value_data): Adjust.
12713 (dwarf2_const_value_attr): Adjust.
12714 (dwarf2_const_value): Adjust.
12715 (die_type): Adjust.
12716 (die_containing_type): Adjust.
12717 (build_error_marker_type): Adjust.
12718 (lookup_die_type): Adjust.
12719 (guess_full_die_structure_name): Adjust.
12720 (anonymous_struct_prefix): Adjust.
12721 (determine_prefix): Adjust.
12722 (dwarf2_name): Adjust.
12723 (follow_die_ref_or_sig): Adjust.
12724 (follow_die_offset): Adjust.
12725 (follow_die_ref): Adjust.
12726 (follow_die_sig_1): Adjust.
12727 (follow_die_sig): Adjust.
12728 (get_signatured_type): Adjust.
12729 (get_DW_AT_signature_type): Adjust.
12730 (decode_locdesc): Adjust.
12731 (dwarf_decode_macros): Adjust.
12732 (cu_debug_loc_section): Adjust.
12733 (fill_in_loclist_baton): Adjust.
12734 (dwarf2_symbol_mark_computed): Adjust.
12735 (init_one_comp_unit): Don't assign
12736 dwarf2_cu::dwarf2_per_objfile.
12737 (set_die_type): Adjust.
12741 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12742 <dwarf2_per_objfile>: New field.
12743 (dwarf2_per_objfile): Remove global.
12744 (get_dwarf2_per_objfile): New function.
12745 (set_dwarf2_per_objfile): New function.
12746 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12747 dwarf2_per_objfile.
12748 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12749 (read_abbrev_offset): Likewise.
12750 (read_indirect_string): Likewise.
12751 (read_indirect_line_string): Likewise.
12752 (read_indirect_string_at_offset): Likewise.
12753 (read_indirect_string_from_dwz): Likewise.
12754 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12755 dwarf2_per_objfile.
12756 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12757 (create_all_comp_units): Change objfile parameter to
12758 dwarf2_per_objfile.
12759 (create_all_type_units): Likewise.
12760 (process_queue): Add dwarf2_per_objfile parameter.
12761 (read_and_check_comp_unit_head): Likewise.
12762 (lookup_dwo_unit_in_dwp): Likewise.
12763 (get_dwp_file): Likewise.
12764 (process_cu_includes): Likewise.
12765 (struct free_dwo_file_cleanup_data): New struct.
12766 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12767 set_dwarf2_per_objfile.
12768 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12769 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12770 context, adjust calls.
12771 (dw2_instantiate_symtab): Likewise.
12772 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12773 (dw2_get_cu): Likewise.
12774 (create_cu_from_index_list): Change objfile parameter to
12775 dwarf2_per_objfile.
12776 (create_cus_from_index_list): Get dwarf2_per_objfile from
12777 context, adjust calls.
12778 (create_cus_from_index): Likewise.
12779 (create_signatured_type_table_from_index): Change objfile
12780 parameter to dwarf2_per_objfile.
12781 (create_signatured_type_table_from_debug_names): Change objfile
12782 parameter to dwarf2_per_objfile.
12783 (create_addrmap_from_index): Likewise.
12784 (create_addrmap_from_aranges): Likewise.
12785 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12786 (dw2_setup): Remove.
12787 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12789 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12790 get_dwarf2_per_objfile.
12791 (dw2_forget_cached_source_info): Likewise.
12792 (dw2_map_symtabs_matching_filename): Likewise.
12793 (struct dw2_symtab_iterator) <index>: Remove.
12794 <dwarf2_per_objfile>: New field.
12795 (dw2_symtab_iter_init): Replace index parameter with
12796 dwarf2_per_objfile.
12797 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12798 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12799 (dw2_print_stats): Likewise.
12800 (dw2_dump): Likewise.
12801 (dw2_expand_symtabs_for_function): Likewise.
12802 (dw2_expand_all_symtabs): Likewise.
12803 (dw2_expand_symtabs_with_fullname): Likewise.
12804 (dw2_expand_marked_cus): Replace index and objfile parameters
12805 with dwarf2_per_objfile.
12806 (dw_expand_symtabs_matching_file_matcher): Add
12807 dwarf2_per_objfile parameter and adjust calls.
12808 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12810 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12811 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12813 (create_cus_from_debug_names_list): Replace objfile parameter
12814 with dwarf2_per_objfile and adjust calls.
12815 (create_cus_from_debug_names): Likewise.
12816 (dwarf2_read_debug_names): Likewise.
12817 (mapped_debug_names::namei_to_name): Adjust call.
12818 (dw2_debug_names_iterator::next): Likewise.
12819 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12820 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12821 (dw2_debug_names_dump): Likewise.
12822 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12823 (dw2_debug_names_expand_symtabs_matching): Likewise.
12824 (dwarf2_initialize_objfile): Likewise.
12825 (dwarf2_build_psymtabs): Likewise.
12826 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12828 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12829 (read_and_check_comp_unit_head): Likewise.
12830 (read_abbrev_offset): Likewise.
12831 (create_debug_type_hash_table): Likewise.
12832 (create_debug_types_hash_table): Likewise.
12833 (create_all_type_units): Replace objfile parameter with
12834 dwarf2_per_objfile.
12835 (add_type_unit): Add dwarf2_per_objfile parameter.
12836 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12837 with dwarf2_per_objfile.
12838 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12839 (lookup_dwp_signatured_type): Likewise.
12840 (lookup_signatured_type): Likewise.
12841 (read_cutu_die_from_dwo): Likewise.
12842 (init_tu_and_read_dwo_dies): Likewise.
12843 (init_cutu_and_read_dies): Likewise.
12844 (init_cutu_and_read_dies_no_follow): Likewise.
12845 (allocate_type_unit_groups_table): Add objfile parameter.
12846 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12847 (get_type_unit_group): Likewise.
12848 (process_psymtab_comp_unit): Update call.
12849 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12850 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12851 (print_tu_stats): Likewise.
12852 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12853 in void* parameter.
12854 (build_type_psymtabs): Change objfile parameter to
12855 dwarf2_per_objfile.
12856 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12857 passed in void* parameter.
12858 (process_skeletonless_type_units): Change objfile parameter to
12859 dwarf2_per_objfile.
12860 (set_partial_user): Likewise.
12861 (dwarf2_build_psymtabs_hard): Likewise.
12862 (read_comp_units_from_section): Likewise.
12863 (create_all_comp_units): Likewise.
12864 (scan_partial_symbols): Update calls.
12865 (add_partial_symbol): Likewise.
12866 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12867 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12868 (process_queue): Add dwarf2_per_objfile parameter.
12869 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12870 (compute_compunit_symtab_includes): Likewise.
12871 (process_cu_includes): Add dwarf2_per_objfile parameter.
12872 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12873 (process_full_type_unit): Likewise.
12874 (process_imported_unit_die): Update call.
12875 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12876 (read_file_scope): Likewise.
12877 (allocate_dwo_file_hash_table): Add objfile parameter.
12878 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12879 (create_cus_hash_table): Likewise.
12880 (create_dwp_hash_table): Likewise.
12881 (create_dwo_unit_in_dwp_v1): Likewise.
12882 (create_dwp_v2_section): Likewise.
12883 (create_dwo_unit_in_dwp_v2): Likewise.
12884 (lookup_dwo_unit_in_dwp): Likewise.
12885 (try_open_dwop_file): Likewise.
12886 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12887 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12888 cleanup to include a reference to dwarf2_per_objfile.
12889 (open_dwp_file): Add dwarf2_per_objfile parameter.
12890 (open_and_init_dwp_file): Likewise.
12891 (get_dwp_file): Likewise.
12892 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12893 (queue_and_load_all_dwo_tus): Update call.
12894 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12896 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12897 (dwarf2_ranges_process): Likewise.
12898 (dwarf2_get_pc_bounds): Likewise.
12899 (mark_common_block_symbol_computed): Likewise.
12900 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12901 (dwarf2_read_abbrevs): Update call.
12902 (read_partial_die): Use dwarf2_per_objfile from cu.
12903 (find_partial_die): Likewise.
12904 (fixup_partial_die): Likewise.
12905 (read_attribute_value): Likewise.
12906 (read_indirect_string_at_offset_from): Add objfile parameter.
12907 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12909 (read_indirect_string_from_dwz): Add objfile parameter.
12910 (read_indirect_string): Add objfile parameter.
12911 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12912 (read_addr_index): Use dwarf2_per_objfile from cu.
12913 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12915 (read_str_index): Use dwarf2_per_objfile from cu.
12916 (get_debug_line_section): Likewise.
12917 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12918 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12919 (new_symbol_full): Use dwarf2_per_objfile from cu.
12920 (build_error_marker_type): Likewise.
12921 (lookup_die_type): Likewise.
12922 (determine_prefix): Likewise.
12923 (follow_die_offset): Likewise.
12924 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12925 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12926 (dwarf2_fetch_die_type_sect_off): Likewise.
12927 (dwarf2_get_die_type): Likewise.
12928 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12929 (get_signatured_type): Likewise.
12930 (get_DW_AT_signature_type): Likewise.
12931 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12932 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12933 (cu_debug_loc_section): Likewise.
12934 (fill_in_loclist_baton): Likewise.
12935 (dwarf2_symbol_mark_computed): Likewise.
12936 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12937 dwarf2_per_objfile.
12938 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12940 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12941 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12942 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12943 (set_die_type): Use dwarf2_free_objfile from cu.
12944 (get_die_type_at_offset): Likewise.
12945 (dwarf2_per_objfile_free): Don't assign global variable.
12946 (debug_names) <constructor>: Add dwarf2_per_objfile
12947 parameter, update m_debugstrlookup construction.
12948 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12950 <m_dwarf2_per_objfile>: New field.
12951 <lookup>: Use m_dwarf2_per_objfile.
12952 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12953 (psyms_seen_size): Likewise.
12954 (write_gdbindex): Replace objfile parameter with
12955 dwarf2_per_objfile.
12956 (write_debug_names): Likewise.
12957 (write_psymtabs_to_index): Likewise.
12958 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12963 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12964 <dwarf2_per_objfile>: New field.
12965 (struct dwarf2_per_cu_data) <objfile>: Remove.
12966 <dwarf2_per_objfile>: New field.
12967 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12969 (create_signatured_type_table_from_index): Likewise.
12970 (create_debug_type_hash_table): Likewise.
12971 (fill_in_sig_entry_from_dwo_entry): Likewise.
12972 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12973 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12975 (create_partial_symtab): Access objfile through
12976 dwarf2_per_objfile.
12977 (process_psymtab_comp_unit_reader): Likewise.
12978 (read_comp_units_from_section): Likewise.
12979 (scan_partial_symbols): Likewise.
12980 (add_partial_symbol): Likewise.
12981 (add_partial_subprogram): Likewise.
12982 (peek_die_abbrev): Likewise.
12983 (fixup_go_packaging): Likewise.
12984 (process_full_comp_unit): Likewise.
12985 (process_full_type_unit): Likewise.
12986 (process_imported_unit_die): Likewise.
12987 (dwarf2_compute_name): Likewise.
12988 (dwarf2_physname): Likewise.
12989 (read_import_statement): Likewise.
12990 (create_cus_hash_table): Assign dwarf2_physname instead of
12992 (read_func_scope): Access objfile through dwarf2_per_objfile.
12993 (read_lexical_block_scope): Likewise.
12994 (read_call_site_scope): Likewise.
12995 (read_variable): Likewise.
12996 (dwarf2_rnglists_process): Likewise.
12997 (dwarf2_ranges_process): Likewise.
12998 (dwarf2_ranges_read): Likewise.
12999 (dwarf2_record_block_ranges): Likewise.
13000 (dwarf2_add_field): Likewise.
13001 (dwarf2_add_member_fn): Likewise.
13002 (read_structure_type): Likewise.
13003 (process_structure_scope): Likewise.
13004 (read_enumeration_type): Likewise.
13005 (read_array_type): Likewise.
13006 (read_common_block): Likewise.
13007 (read_namespace_type): Likewise.
13008 (read_namespace): Likewise.
13009 (read_module_type): Likewise.
13010 (read_tag_pointer_type): Likewise.
13011 (read_tag_ptr_to_member_type): Likewise.
13012 (read_tag_string_type): Likewise.
13013 (read_subroutine_type): Likewise.
13014 (read_typedef): Likewise.
13015 (read_base_type): Likewise.
13016 (attr_to_dynamic_prop): Likewise.
13017 (read_subrange_type): Likewise.
13018 (read_unspecified_type): Likewise.
13019 (load_partial_dies): Likewise.
13020 (read_partial_die): Likewise.
13021 (find_partial_die): Likewise.
13022 (guess_partial_die_structure_name): Likewise.
13023 (fixup_partial_die): Likewise.
13024 (read_attribute_value): Likewise.
13025 (read_addr_index_from_leb128): Likewise.
13026 (dwarf2_read_addr_index): Likewise.
13027 (dwarf2_string_attr): Likewise.
13028 (lnp_state_machine::check_line_address): Likewise.
13029 (dwarf_decode_lines_1): Likewise.
13030 (dwarf_decode_lines): Likewise.
13031 (dwarf2_start_symtab): Likewise.
13032 (var_decode_location): Likewise.
13033 (new_symbol_full): Likewise.
13034 (dwarf2_const_value_data): Likewise.
13035 (dwarf2_const_value_attr): Likewise.
13036 (dwarf2_const_value): Likewise.
13037 (die_type): Likewise.
13038 (die_containing_type): Likewise.
13039 (lookup_die_type): Likewise.
13040 (guess_full_die_structure_name): Likewise.
13041 (anonymous_struct_prefix): Likewise.
13042 (dwarf2_name): Likewise.
13043 (follow_die_ref_or_sig): Likewise.
13044 (follow_die_offset): Likewise.
13045 (follow_die_ref): Likewise.
13046 (dwarf2_fetch_die_loc_sect_off): Likewise.
13047 (dwarf2_fetch_constant_bytes): Likewise.
13048 (dwarf2_fetch_die_type_sect_off): Likewise.
13049 (dwarf2_get_die_type): Likewise.
13050 (follow_die_sig): Likewise.
13051 (decode_locdesc): Likewise.
13052 (dwarf2_per_cu_objfile): Likewise.
13053 (dwarf2_per_cu_text_offset): Likewise.
13054 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13056 (set_die_type): Access objfile through
13057 dwarf2_per_objfile.
13061 * valprint.c (converted_character_d): Remove typedef.
13062 (DEF_VEC_O (converted_character_d)): Remove.
13063 (count_next_character): Use std::vector.
13064 (print_converted_chars_to_obstack): Likewise.
13065 (generic_printstr): Likewise.
13069 * xml-support.h (struct gdb_xml_value): Add constructor.
13070 <value>: Change type to unique_xmalloc_ptr.
13071 (gdb_xml_value_s): Remove typedef.
13072 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13073 (gdb_xml_element_start_handler): Change parameter type to
13075 (xml_find_attribute): Likewise.
13076 * xml-support.c (xml_find_attribute): Change parameter type to
13077 std::vector and adjust.
13078 (gdb_xml_values_cleanup): Remove.
13079 (gdb_xml_parser::start_element): Adjust to std::vector.
13080 (xinclude_start_include): Change paraeter type to std::vector
13082 * btrace.c (check_xml_btrace_version): Likewise.
13083 (parse_xml_btrace_block): Likewise.
13084 (parse_xml_btrace_pt_config_cpu): Likewise.
13085 (parse_xml_btrace_pt): Likewise.
13086 (parse_xml_btrace_conf_bts): Likewise.
13087 (parse_xml_btrace_conf_pt): Likewise.
13088 * memory-map.c (memory_map_start_memory): Likewise.
13089 (memory_map_start_property): Likewise.
13090 * osdata.c (osdata_start_osdata): Likewise.
13091 (osdata_start_item): Likewise.
13092 (osdata_start_column): Likewise.
13093 * remote.c (start_thread): Likewise.
13094 * solib-aix.c (library_list_start_library): Likewise.
13095 (library_list_start_list): Likewise.
13096 * solib-svr4.c (library_list_start_library): Likewise.
13097 (svr4_library_list_start_list): Likewise.
13098 * solib-target.c (library_list_start_segment): Likewise.
13099 (library_list_start_section): Likewise.
13100 (library_list_start_library): Likewise.
13101 (library_list_start_list): Likewise.
13102 * tracepoint.c (traceframe_info_start_memory): Likewise.
13103 (traceframe_info_start_tvar): Likewise.
13104 * xml-syscall.c (syscall_start_syscall): Likewise.
13105 * xml-tdesc.c (tdesc_start_target): Likewise.
13106 (tdesc_start_feature): Likewise.
13107 (tdesc_start_reg): Likewise.
13108 (tdesc_start_union): Likewise.
13109 (tdesc_start_struct): Likewise.
13110 (tdesc_start_flags): Likewise.
13111 (tdesc_start_enum): Likewise.
13112 (tdesc_start_field): Likewise.
13113 (tdesc_start_enum_value): Likewise.
13114 (tdesc_start_vector): Likewise.
13118 * extension.h (struct xmethod_worker) <clone>: Remove.
13119 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13121 (python_xmethod_worker::clone): Remove.
13122 * valops.c (find_overload_match): Use std::move instead of
13127 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13128 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13129 <free_xmethod_worker_data>: Remove.
13130 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13131 <get_xmethod_arg_types>: Remove.
13132 <get_xmethod_result_type>: Remove.
13133 <invoke_xmethod>: Remove.
13134 * extension.c (new_xmethod_worker): Remove.
13135 (clone_xmethod_worker): Remove.
13136 (get_matching_xmethod_workers): Return void, pass std::vector by
13138 (get_xmethod_arg_types): Rename to...
13139 (xmethod_worker::get_arg_types): ... this, and adjust.
13140 (get_xmethod_result_type): Rename to...
13141 (xmethod_worker::get_result_type): ... this, and adjust.
13142 (invoke_xmethod): Remove.
13143 (free_xmethod_worker): Remove.
13144 (free_xmethod_worker_vec): Remove.
13145 * extension.h (enum ext_lang_rc): Move here from
13147 (struct xmethod_worker): Add constructor and destructor.
13150 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13151 virtual pure methods.
13152 <get_arg_types, get_result_type>: New methods.
13153 (xmethod_worker_ptr): Remove typedef.
13154 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13155 (xmethod_worker_vec): Remove typedef.
13156 (xmethod_worker_up): New typedef.
13157 (invoke_xmethod): Remove.
13158 (clone_xmethod_worker): Remove.
13159 (free_xmethod_worker): Remove.
13160 (free_xmethod_worker_vec): Remove.
13161 (get_xmethod_arg_types): Remove.
13162 (get_xmethod_result_type): Remove.
13163 * valops.c (find_method_list): Use std::vector, don't use
13164 intermediate vector.
13165 (value_find_oload_method_list): Use std::vector.
13166 (find_overload_match): Use std::vector.
13167 (find_oload_champ): Use std::vector.
13168 * value.c (value_free): Use operator delete.
13169 (value_of_xmethod): Rename to...
13170 (value_from_xmethod): ... this. Don't assign
13171 xmethod_worker::value, take rvalue-reference.
13172 (result_type_of_xmethod): Adjust.
13173 (call_xmethod): Adjust.
13174 * value.h: Include extension.h.
13175 (struct xmethod_worker): Don't forward-declare.
13176 (value_of_xmethod): Rename to...
13177 (value_from_xmethod): ... this, take rvalue-reference.
13178 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13179 (struct python_xmethod_worker): ... this, add constructor and
13181 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13182 (gdbpy_free_xmethod_worker_data): Rename to...
13183 (python_xmethod_worker::~python_xmethod_worker): ... this and
13185 (gdbpy_clone_xmethod_worker_data): Rename to...
13186 (python_xmethod_worker::clone): ... this and adjust.
13187 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13189 (gdbpy_get_xmethod_arg_types): Rename to...
13190 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13191 (gdbpy_get_xmethod_result_type): Rename to...
13192 (python_xmethod_worker::do_get_result_type): ... this and
13194 (gdbpy_invoke_xmethod): Rename to...
13195 (python_xmethod_worker::invoke): ... this and adjust.
13196 (new_python_xmethod_worker): Rename to...
13197 (python_xmethod_worker::python_xmethod_worker): ... this and
13199 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13201 (gdbpy_free_xmethod_worker_data): Remove.
13202 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13203 (gdbpy_get_xmethod_arg_types): Remove.
13204 (gdbpy_get_xmethod_result_type): Remove.
13205 (gdbpy_invoke_xmethod): Remove.
13206 * python/python.c (python_extension_ops): Remove obsolete
13212 * common/signals-state-save-restore.c
13213 (save_original_signals_state): New parameter 'quiet'. Warn if we
13214 find a custom handler preinstalled, instead of internal erroring.
13215 But only warn if !quiet.
13216 * common/signals-state-save-restore.h
13217 (save_original_signals_state): New parameter 'quiet'.
13218 * main.c (captured_main_1): Move save_original_signals_state call
13219 after option handling, and pass QUIET.
13223 * spu-tdep.c (spu_catch_start): Pass
13224 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13229 * ada-lang.c (literal_symbol_name_matcher): New function.
13230 (ada_get_symbol_name_matcher): Use it for
13231 symbol_name_match_type::SEARCH_NAME.
13232 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13233 it down instead of assuming symbol_name_match_type::FULL.
13234 * block.h (block_lookup_symbol): New parameter 'match_type'.
13235 * c-valprint.c (print_unpacked_pointer): Use
13236 lookup_symbol_search_name instead of lookup_symbol.
13237 * compile/compile-object-load.c (get_out_value_type): Pass down
13238 symbol_name_match_type::SEARCH_NAME.
13239 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13240 symbol_name_match_type::FULL.
13241 * cp-support.c (cp_get_symbol_name_matcher): Handle
13242 symbol_name_match_type::SEARCH_NAME.
13243 * infrun.c (insert_exception_resume_breakpoint): Use
13244 lookup_symbol_search_name.
13245 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13246 * psymtab.c (maintenance_check_psymtabs): Use
13247 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13248 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13249 SYMBOL_SEARCH_NAME.
13250 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13251 if symbol_name_match_type::SEARCH_NAME.
13252 (lookup_symbol_in_language): Pass down
13253 symbol_name_match_type::FULL.
13254 (lookup_symbol_search_name): New.
13255 (lookup_language_this): Pass down
13256 symbol_name_match_type::SEARCH_NAME.
13257 (lookup_symbol_aux, lookup_local_symbol): New parameter
13258 'match_type'. Pass it down.
13259 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13260 (lookup_symbol_search_name): New declaration.
13261 (lookup_symbol_in_block): New 'match_type' parameter.
13266 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13268 (ada_lookup_symbol): Reimplement in terms of
13269 ada_lookup_symbol_list, bits factored out from
13270 ada_lookup_encoded_symbol.
13274 * ada-exp.y (write_object_renaming): When subscripting an array
13275 using a symbol as the index, pass the block in call to
13276 ada_lookup_encoded_symbol when looking that symbol up.
13280 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13285 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13286 the case where VALUE_LVAL (val0) is not lval_memory.
13290 * ada-valprint.c (print_optional_low_bound): Handle
13291 character-indexed array printing like boolean-indexed array
13296 * NEWS: Create a new section for the next release branch.
13297 Rename the section of the current branch, now that it has
13302 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13303 * version.in: Bump version to 8.1.50.DATE-git.
13307 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13309 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13311 (default_exception_support_info) <catch_handlers_sym>: Add field.
13312 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13313 (ada_exception_name_addr_1): Add "catch handlers" handling.
13314 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13315 Update all callers.
13316 (create_excep_cond_exprs) <ex>: Add parameter.
13317 (re_set_exception): Update create_excep_cond_exprs call.
13318 (print_it_exception, print_one_exception, print_mention_exception)
13319 (print_recreate_exception): Add "catch handler" handling.
13320 (allocate_location_catch_handlers, re_set_catch_handlers)
13321 (check_status_catch_handlers, print_it_catch_handlers)
13322 (print_one_catch_handlers, print_mention_catch_handlers)
13323 (print_recreate_catch_handlers): New function.
13324 (catch_handlers_breakpoint_ops): New variable.
13325 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13326 Add parameter. Add "catch handler" handling.
13327 (ada_exception_sym_name, ada_exception_breakpoint_ops):
13328 Add "catch handler" handling.
13329 (ada_exception_catchpoint_cond_string): Add "catch handler"
13331 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13333 (catch_ada_handlers_command): New function.
13334 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13335 operations structure.
13336 (_initialize_ada_language): Add "catch handlers" command entry.
13337 * NEWS: Document "catch handlers" feature.
13341 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13342 account when creating the array type of the slice.
13343 (ada_value_slice): Likewise.
13347 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13349 (create_array_type_with_stride): Add byte_stride_prop parameter.
13350 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13351 New parameter. Update all callers in this file.
13352 (array_type_has_dynamic_stride): New function.
13353 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13354 of arrays with dynamic byte strides.
13355 * dwarf2read.c (read_array_type): Add support for dynamic
13356 DW_AT_byte_stride attributes.
13360 * dwarf2read.c (read_unspecified_type): Treat
13361 DW_TAG_enumeration_type DIEs from Ada units as stubs.
13365 Update copyright year range in all GDB files.
13369 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13370 and gdb/testsuite/gdb.base/step-line.c.
13374 * copyright.py (main): Dump the contents of
13375 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13376 even if BY_HAND is empty.
13380 * top.c (print_gdb_version): Update Copyright year in version
13385 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13387 For older changes see ChangeLog-2017.
13393 version-control: never