3 * linespec.c (struct linespec) <function_symbols>: Change type to
4 std::vector. Update all users.
5 (struct collect_info) <function_symbols>: Likewise.
6 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
7 (std_compare_symbols): New function.
8 (find_method, find_function_symbols, find_linespec_symbols)
9 (find_label_symbols_in_block): Change `symbols' parameter to
10 std::vector. Update all callers.
11 (find_label_symbols): Likewise for `function_symbols' and
16 * linespec.c (symtab_vector_up): Define.
17 (struct linespec) <file_symtabs>: Change type to std::vector *.
19 (struct collect_info) <file_symtabs>: Likewise.
20 (collect_symtabs_from_filename): Return symtab_vector_up.
22 (decode_objc): Remove cleanup.
23 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
24 (symtab_collector::release_symtabs): Return symtab_vector_up.
26 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
28 (collect_symtabs_from_filename, symtabs_from_filename): Return
29 symtab_vector_up. Update all callers.
33 * csky-tdep.c (csky_analyze_prologue): Use
34 core_addr_to_string_nz.
38 * windows-nat.c (struct xlate_exception) <them>: Change type to
40 (xlate): Fix formatting. Remove last entry.
41 (struct xlate_exception, xlate): Comment out.
42 (windows_nat_target::resume): Use ranged for.
46 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
47 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
49 (riscv_linux_nat_target::store_registers): Likewise.
55 * gnulib/aclocal.m4: Regenerate.
56 * gnulib/config.in: Regenerate.
57 * gnulib/configure: Regenerate.
58 * gnulib/import/Makefile.am: Update.
59 * gnulib/import/Makefile.in: Update.
60 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
61 * gnulib/import/_Noreturn.h: ... this.
62 * gnulib/import/alloca.in.h: Update.
63 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
64 * gnulib/import/arg-nonnull.h: ... this.
65 * gnulib/import/assure.h: Update.
66 * gnulib/import/at-func.c: Update.
67 * gnulib/import/basename-lgpl.c: Update.
68 * gnulib/import/extra/snippet/c++defs.h: Rename to...
69 * gnulib/import/c++defs.h: ... this.
70 * gnulib/import/canonicalize-lgpl.c: Update.
71 * gnulib/import/cdefs.h: Update.
72 * gnulib/import/chdir-long.c: Update.
73 * gnulib/import/chdir-long.h: Update.
74 * gnulib/import/cloexec.c: Update.
75 * gnulib/import/cloexec.h: Update.
76 * gnulib/import/close.c: Update.
77 * gnulib/import/closedir.c: Update.
78 * gnulib/import/config.charset: Update.
79 * gnulib/import/dirent-private.h: Update.
80 * gnulib/import/dirent.in.h: Update.
81 * gnulib/import/dirfd.c: Update.
82 * gnulib/import/dirname-lgpl.c: Update.
83 * gnulib/import/dirname.h: Update.
84 * gnulib/import/dosname.h: Update.
85 * gnulib/import/dup-safer-flag.c: Update.
86 * gnulib/import/dup-safer.c: Update.
87 * gnulib/import/dup.c: Update.
88 * gnulib/import/dup2.c: Update.
89 * gnulib/import/errno.in.h: Update.
90 * gnulib/import/error.c: Update.
91 * gnulib/import/error.h: Update.
92 * gnulib/import/exitfail.c: Update.
93 * gnulib/import/exitfail.h: Update.
94 * gnulib/import/extra/update-copyright: Update.
95 * gnulib/import/fchdir.c: Update.
96 * gnulib/import/fcntl.c: Update.
97 * gnulib/import/fcntl.in.h: Update.
98 * gnulib/import/fd-hook.c: Update.
99 * gnulib/import/fd-hook.h: Update.
100 * gnulib/import/fd-safer-flag.c: Update.
101 * gnulib/import/fd-safer.c: Update.
102 * gnulib/import/fdopendir.c: Update.
103 * gnulib/import/filename.h: Update.
104 * gnulib/import/filenamecat-lgpl.c: Update.
105 * gnulib/import/filenamecat.h: Update.
106 * gnulib/import/flexmember.h: Update.
107 * gnulib/import/float+.h: Update.
108 * gnulib/import/float.c: Update.
109 * gnulib/import/float.in.h: Update.
110 * gnulib/import/fnmatch.c: Update.
111 * gnulib/import/fnmatch.in.h: Update.
112 * gnulib/import/fnmatch_loop.c: Update.
113 * gnulib/import/fpucw.h: Update.
114 * gnulib/import/frexp.c: Update.
115 * gnulib/import/frexpl.c: Update.
116 * gnulib/import/fstat.c: Update.
117 * gnulib/import/fstatat.c: Update.
118 * gnulib/import/getcwd-lgpl.c: Update.
119 * gnulib/import/getcwd.c: Update.
120 * gnulib/import/getdtablesize.c: Update.
121 * gnulib/import/getlogin_r.c: Update.
122 * gnulib/import/getprogname.c: Update.
123 * gnulib/import/getprogname.h: Update.
124 * gnulib/import/gettext.h: Update.
125 * gnulib/import/gettimeofday.c: Update.
126 * gnulib/import/glob-libc.h: Update.
127 * gnulib/import/glob.c: Update.
128 * gnulib/import/glob.in.h: Update.
129 * gnulib/import/glob_internal.h: Update.
130 * gnulib/import/glob_pattern_p.c: Update.
131 * gnulib/import/globfree.c: Update.
132 * gnulib/import/hard-locale.c: Update.
133 * gnulib/import/hard-locale.h: Update.
134 * gnulib/import/intprops.h: Update.
135 * gnulib/import/inttypes.in.h: Update.
136 * gnulib/import/isnan.c: Update.
137 * gnulib/import/isnand-nolibm.h: Update.
138 * gnulib/import/isnand.c: Update.
139 * gnulib/import/isnanl-nolibm.h: Update.
140 * gnulib/import/isnanl.c: Update.
141 * gnulib/import/itold.c: Update.
142 * gnulib/import/libc-config.h: Update.
143 * gnulib/import/limits.in.h: Update.
144 * gnulib/import/localcharset.c: Update.
145 * gnulib/import/localcharset.h: Update.
146 * gnulib/import/localtime-buffer.c: Update.
147 * gnulib/import/localtime-buffer.h: Update.
148 * gnulib/import/lstat.c: Update.
149 * gnulib/import/m4/00gnulib.m4: Update.
150 * gnulib/import/m4/__inline.m4: Update.
151 * gnulib/import/m4/absolute-header.m4: Update.
152 * gnulib/import/m4/alloca.m4: Update.
153 * gnulib/import/m4/builtin-expect.m4: Update.
154 * gnulib/import/m4/canonicalize.m4: Update.
155 * gnulib/import/m4/chdir-long.m4: Update.
156 * gnulib/import/m4/close.m4: Update.
157 * gnulib/import/m4/closedir.m4: Update.
158 * gnulib/import/m4/configmake.m4: Update.
159 * gnulib/import/m4/d-ino.m4: Update.
160 * gnulib/import/m4/d-type.m4: Update.
161 * gnulib/import/m4/dirent_h.m4: Update.
162 * gnulib/import/m4/dirfd.m4: Update.
163 * gnulib/import/m4/dirname.m4: Update.
164 * gnulib/import/m4/double-slash-root.m4: Update.
165 * gnulib/import/m4/dup.m4: Update.
166 * gnulib/import/m4/dup2.m4: Update.
167 * gnulib/import/m4/eealloc.m4: Update.
168 * gnulib/import/m4/environ.m4: Update.
169 * gnulib/import/m4/errno_h.m4: Update.
170 * gnulib/import/m4/error.m4: Update.
171 * gnulib/import/m4/exponentd.m4: Update.
172 * gnulib/import/m4/exponentl.m4: Update.
173 * gnulib/import/m4/extensions.m4: Update.
174 * gnulib/import/m4/extern-inline.m4: Update.
175 * gnulib/import/m4/fchdir.m4: Update.
176 * gnulib/import/m4/fcntl-o.m4: Update.
177 * gnulib/import/m4/fcntl.m4: Update.
178 * gnulib/import/m4/fcntl_h.m4: Update.
179 * gnulib/import/m4/fdopendir.m4: Update.
180 * gnulib/import/m4/filenamecat.m4: Update.
181 * gnulib/import/m4/flexmember.m4: Update.
182 * gnulib/import/m4/float_h.m4: Update.
183 * gnulib/import/m4/fnmatch.m4: Update.
184 * gnulib/import/m4/fnmatch_h.m4: Update.
185 * gnulib/import/m4/fpieee.m4: Update.
186 * gnulib/import/m4/frexp.m4: Update.
187 * gnulib/import/m4/frexpl.m4: Update.
188 * gnulib/import/m4/fstat.m4: Update.
189 * gnulib/import/m4/fstatat.m4: Update.
190 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
191 * gnulib/import/m4/getcwd-path-max.m4: Update.
192 * gnulib/import/m4/getcwd.m4: Update.
193 * gnulib/import/m4/getdtablesize.m4: Update.
194 * gnulib/import/m4/getlogin.m4: Update.
195 * gnulib/import/m4/getlogin_r.m4: Update.
196 * gnulib/import/m4/getpagesize.m4: Update.
197 * gnulib/import/m4/getprogname.m4: Update.
198 * gnulib/import/m4/gettimeofday.m4: Update.
199 * gnulib/import/m4/glibc21.m4: Update.
200 * gnulib/import/m4/glob.m4: Update.
201 * gnulib/import/m4/glob_h.m4: Update.
202 * gnulib/import/m4/gnulib-cache.m4: Update.
203 * gnulib/import/m4/gnulib-common.m4: Update.
204 * gnulib/import/m4/gnulib-comp.m4: Update.
205 * gnulib/import/m4/gnulib-tool.m4: Update.
206 * gnulib/import/m4/hard-locale.m4: Update.
207 * gnulib/import/m4/include_next.m4: Update.
208 * gnulib/import/m4/inttypes-pri.m4: Update.
209 * gnulib/import/m4/inttypes.m4: Update.
210 * gnulib/import/m4/isnand.m4: Update.
211 * gnulib/import/m4/isnanl.m4: Update.
212 * gnulib/import/m4/largefile.m4: Update.
213 * gnulib/import/m4/limits-h.m4: Update.
214 * gnulib/import/m4/localcharset.m4: Update.
215 * gnulib/import/m4/locale-fr.m4: Update.
216 * gnulib/import/m4/locale-ja.m4: Update.
217 * gnulib/import/m4/locale-zh.m4: Update.
218 * gnulib/import/m4/localtime-buffer.m4: Update.
219 * gnulib/import/m4/longlong.m4: Update.
220 * gnulib/import/m4/lstat.m4: Update.
221 * gnulib/import/m4/malloc.m4: Update.
222 * gnulib/import/m4/malloca.m4: Update.
223 * gnulib/import/m4/math_h.m4: Update.
224 * gnulib/import/m4/mbrtowc.m4: Update.
225 * gnulib/import/m4/mbsinit.m4: Update.
226 * gnulib/import/m4/mbsrtowcs.m4: Update.
227 * gnulib/import/m4/mbstate_t.m4: Update.
228 * gnulib/import/m4/memchr.m4: Update.
229 * gnulib/import/m4/memmem.m4: Update.
230 * gnulib/import/m4/mempcpy.m4: Update.
231 * gnulib/import/m4/memrchr.m4: Update.
232 * gnulib/import/m4/mkdir.m4: Update.
233 * gnulib/import/m4/mkstemp.m4: Update.
234 * gnulib/import/m4/mmap-anon.m4: Update.
235 * gnulib/import/m4/mode_t.m4: Update.
236 * gnulib/import/m4/msvc-inval.m4: Update.
237 * gnulib/import/m4/msvc-nothrow.m4: Update.
238 * gnulib/import/m4/multiarch.m4: Update.
239 * gnulib/import/m4/nocrash.m4: Update.
240 * gnulib/import/m4/off_t.m4: Update.
241 * gnulib/import/m4/onceonly.m4: Update.
242 * gnulib/import/m4/open-cloexec.m4: Update.
243 * gnulib/import/m4/open.m4: Update.
244 * gnulib/import/m4/openat.m4: Update.
245 * gnulib/import/m4/opendir.m4: Update.
246 * gnulib/import/m4/pathmax.m4: Update.
247 * gnulib/import/m4/rawmemchr.m4: Update.
248 * gnulib/import/m4/readdir.m4: Update.
249 * gnulib/import/m4/readlink.m4: Update.
250 * gnulib/import/m4/realloc.m4: Update.
251 * gnulib/import/m4/rename.m4: Update.
252 * gnulib/import/m4/rewinddir.m4: Update.
253 * gnulib/import/m4/rmdir.m4: Update.
254 * gnulib/import/m4/save-cwd.m4: Update.
255 * gnulib/import/m4/secure_getenv.m4: Update.
256 * gnulib/import/m4/setenv.m4: Update.
257 * gnulib/import/m4/signal_h.m4: Update.
258 * gnulib/import/m4/ssize_t.m4: Update.
259 * gnulib/import/m4/stat-time.m4: Update.
260 * gnulib/import/m4/stat.m4: Update.
261 * gnulib/import/m4/std-gnu11.m4: Update.
262 * gnulib/import/m4/stdbool.m4: Update.
263 * gnulib/import/m4/stddef_h.m4: Update.
264 * gnulib/import/m4/stdint.m4: Update.
265 * gnulib/import/m4/stdio_h.m4: Update.
266 * gnulib/import/m4/stdlib_h.m4: Update.
267 * gnulib/import/m4/strchrnul.m4: Update.
268 * gnulib/import/m4/strdup.m4: Update.
269 * gnulib/import/m4/strerror.m4: Update.
270 * gnulib/import/m4/string_h.m4: Update.
271 * gnulib/import/m4/strstr.m4: Update.
272 * gnulib/import/m4/strtok_r.m4: Update.
273 * gnulib/import/m4/sys_socket_h.m4: Update.
274 * gnulib/import/m4/sys_stat_h.m4: Update.
275 * gnulib/import/m4/sys_time_h.m4: Update.
276 * gnulib/import/m4/sys_types_h.m4: Update.
277 * gnulib/import/m4/tempname.m4: Update.
278 * gnulib/import/m4/time_h.m4: Update.
279 * gnulib/import/m4/unistd-safer.m4: Update.
280 * gnulib/import/m4/unistd_h.m4: Update.
281 * gnulib/import/m4/warn-on-use.m4: Update.
282 * gnulib/import/m4/wchar_h.m4: Update.
283 * gnulib/import/m4/wchar_t.m4: Update.
284 * gnulib/import/m4/wctype_h.m4: Update.
285 * gnulib/import/m4/wint_t.m4: Update.
286 * gnulib/import/malloc.c: Update.
287 * gnulib/import/malloc/scratch_buffer.h: Update.
288 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
289 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
290 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
291 * gnulib/import/malloca.c: Update.
292 * gnulib/import/malloca.h: Update.
293 * gnulib/import/malloca.valgrind: Update.
294 * gnulib/import/math.in.h: Update.
295 * gnulib/import/mbrtowc.c: Update.
296 * gnulib/import/mbsinit.c: Update.
297 * gnulib/import/mbsrtowcs-impl.h: Update.
298 * gnulib/import/mbsrtowcs-state.c: Update.
299 * gnulib/import/mbsrtowcs.c: Update.
300 * gnulib/import/memchr.c: Update.
301 * gnulib/import/memmem.c: Update.
302 * gnulib/import/mempcpy.c: Update.
303 * gnulib/import/memrchr.c: Update.
304 * gnulib/import/mkdir.c: Update.
305 * gnulib/import/mkstemp.c: Update.
306 * gnulib/import/msvc-inval.c: Update.
307 * gnulib/import/msvc-inval.h: Update.
308 * gnulib/import/msvc-nothrow.c: Update.
309 * gnulib/import/msvc-nothrow.h: Update.
310 * gnulib/import/open.c: Update.
311 * gnulib/import/openat-die.c: Update.
312 * gnulib/import/openat-priv.h: Update.
313 * gnulib/import/openat-proc.c: Update.
314 * gnulib/import/openat.c: Update.
315 * gnulib/import/openat.h: Update.
316 * gnulib/import/opendir.c: Update.
317 * gnulib/import/pathmax.h: Update.
318 * gnulib/import/pipe-safer.c: Update.
319 * gnulib/import/rawmemchr.c: Update.
320 * gnulib/import/readdir.c: Update.
321 * gnulib/import/readlink.c: Update.
322 * gnulib/import/realloc.c: Update.
323 * gnulib/import/ref-add.sin: Update.
324 * gnulib/import/ref-del.sin: Update.
325 * gnulib/import/rename.c: Update.
326 * gnulib/import/rewinddir.c: Update.
327 * gnulib/import/rmdir.c: Update.
328 * gnulib/import/same-inode.h: Update.
329 * gnulib/import/save-cwd.c: Update.
330 * gnulib/import/save-cwd.h: Update.
331 * gnulib/import/scratch_buffer.h: Update.
332 * gnulib/import/secure_getenv.c: Update.
333 * gnulib/import/setenv.c: Update.
334 * gnulib/import/signal.in.h: Update.
335 * gnulib/import/stat-time.c: Update.
336 * gnulib/import/stat-time.h: Update.
337 * gnulib/import/stat-w32.c: Update.
338 * gnulib/import/stat-w32.h: Update.
339 * gnulib/import/stat.c: Update.
340 * gnulib/import/stdbool.in.h: Update.
341 * gnulib/import/stddef.in.h: Update.
342 * gnulib/import/stdint.in.h: Update.
343 * gnulib/import/stdio.in.h: Update.
344 * gnulib/import/stdlib.in.h: Update.
345 * gnulib/import/str-two-way.h: Update.
346 * gnulib/import/strchrnul.c: Update.
347 * gnulib/import/strdup.c: Update.
348 * gnulib/import/streq.h: Update.
349 * gnulib/import/strerror-override.c: Update.
350 * gnulib/import/strerror-override.h: Update.
351 * gnulib/import/strerror.c: Update.
352 * gnulib/import/string.in.h: Update.
353 * gnulib/import/stripslash.c: Update.
354 * gnulib/import/strnlen1.c: Update.
355 * gnulib/import/strnlen1.h: Update.
356 * gnulib/import/strstr.c: Update.
357 * gnulib/import/strtok_r.c: Update.
358 * gnulib/import/sys_stat.in.h: Update.
359 * gnulib/import/sys_time.in.h: Update.
360 * gnulib/import/sys_types.in.h: Update.
361 * gnulib/import/tempname.c: Update.
362 * gnulib/import/tempname.h: Update.
363 * gnulib/import/time.in.h: Update.
364 * gnulib/import/unistd--.h: Update.
365 * gnulib/import/unistd-safer.h: Update.
366 * gnulib/import/unistd.in.h: Update.
367 * gnulib/import/unsetenv.c: Update.
368 * gnulib/import/verify.h: Update.
369 * gnulib/import/extra/snippet/warn-on-use.h: Update.
370 * gnulib/import/wchar.in.h: Update.
371 * gnulib/import/wctype.in.h: Update.
372 * gnulib/import/xalloc-oversized.h: Update.
373 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
374 "53e2c179f26a890fa6685af4b6c1397ee370433b".
379 * gdb/main.c (captured_main_1): Exit with nonzero status
380 in batch mode if the last command to be executed failed.
381 * NEWS: Mention the above.
385 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
386 end of warning message.
391 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
392 (aarch64_extract_return_value): Use
393 aapcs_is_vfp_call_or_return_candidate.
394 (aarch64_return_in_memory): Likewise.
395 (aarch64_store_return_value): Likewise.
400 (aapcs_is_vfp_call_or_return_candidate): Make static
401 (pass_in_v_or_stack): Remove function.
402 (pass_in_v_vfp_candidate): New function.
403 (aarch64_push_dummy_call): Check for float register candidates.
407 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
408 (aapcs_is_vfp_call_or_return_candidate_1): New function.
409 (aapcs_is_vfp_call_or_return_candidate): Likewise.
414 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
415 (struct ipa_sym_addresses): Rename to...
416 (struct ipa_sym_addresses_common): ... this.
417 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
421 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
422 (token_fifo): Now a std::vector.
423 (yylex, c_parse): Update.
424 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
425 (token_fifo): Now a std::vector.
426 (yylex, d_parse): Update.
427 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
428 (token_fifo): Now a std::vector.
429 (yylex, go_parse): Update.
433 * parser-defs.h (struct type_stack) <elements>: Change type to
434 std::vector<union type_stack_elt>.
435 <depth, size>: Remove.
436 * parse.c (parse_exp_in_context_1): Adjust.
437 (type_stack_reserve): Remove.
438 (check_type_stack_depth): Remove.
439 (insert_into_type_stack): Adjust to std::vector.
440 (insert_type): Likewise.
441 (push_type): Likewise.
442 (push_type_int): Likewise.
443 (insert_type_address_space): Likewise.
444 (pop_type): Likewise.
445 (pop_type_int): Likewise.
446 (pop_typelist): Likewise.
447 (pop_type_stack): Likewise.
448 (append_type_stack): Likewise.
449 (push_type_stack): Likewise.
450 (get_type_stack): Likewise.
451 (type_stack_cleanup): Likewise.
452 (push_typelist): Likewise.
453 (follow_types): Likewise.
454 (_initialize_parse): Likewise.
458 * NEWS: Mention csky target.
464 * csky-linux-tdep.c: New file.
465 * csky-tdep.c: Likewise.
466 * csky-tdep.h: Likewise.
467 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
469 (HFILES_NO_SRCDIR): Add csky-tdep.h.
470 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
471 * configure.tgt: Add csky support.
475 * python/py-framefilter.c (py_print_frame): Print frame architecture
476 when printing on an MI output.
481 * configure: Rebuild.
482 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
486 * aarch64-linux-tdep.c
487 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
492 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
494 (ppc64_standard_linkage1, ppc64_standard_linkage2)
495 (ppc64_standard_linkage3, ppc64_standard_linkage4)
496 (ppc64_standard_linkage5, ppc64_standard_linkage6)
497 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
502 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
503 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
507 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
508 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
510 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
512 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
514 * sparc-linux-tdep.c (sparc32_linux_sigframe)
515 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
516 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
518 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
519 (ppc64_linux_sigaction_tramp_frame)
520 (ppc32_linux_sighandler_tramp_frame)
521 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
522 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
523 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
524 * mn10300-linux-tdep.c (am33_linux_sigframe)
525 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
526 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
527 * mips-linux-tdep.c (mips_linux_o32_sigframe)
528 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
529 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
530 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
531 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
532 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
533 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
534 * microblaze-linux-tdep.c
535 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
536 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
537 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
538 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
539 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
540 * common/common-types.h (ULONGEST_MAX): New define.
541 (CORE_ADDR_MAX): Fix formatting.
542 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
543 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
544 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
545 (arm_linux_rt_sigreturn_tramp_frame)
546 (arm_eabi_linux_sigreturn_tramp_frame)
547 (arm_eabi_linux_rt_sigreturn_tramp_frame)
548 (thumb2_eabi_linux_sigreturn_tramp_frame)
549 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
550 (arm_linux_restart_syscall_tramp_frame)
551 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
552 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
553 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
555 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
559 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
561 * mips-tdep.c (mips_deal_with_atomic_sequence)
562 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
563 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
564 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
565 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
567 * aarch64-tdep.c (aarch64_software_single_step): Use
572 * linespec.c (complete_linespec_component): Add cast to "char".
573 * completer.c (completion_tracker::build_completion_result): Add
578 * solist.h (struct solist, struct target_so_ops): Fix
583 * ada-tasks.c (ada_task_info_s): Remove typedef.
584 (DEF_VEC_O(ada_task_info_s)): Remove.
585 (struct ada_tasks_inferior_data): Initialize fields.
586 <task_list>: Make an std::vector.
587 (get_ada_tasks_inferior_data): Allocate with new.
588 (ada_get_task_number): Adjust.
589 (get_task_number_from_id): Likewise.
590 (valid_task_id): Likewise.
591 (ada_get_task_info_from_ptid): Likewise.
592 (iterate_over_live_ada_tasks): Likewise.
593 (add_ada_task): Likewise.
594 (read_known_tasks): Likewise.
595 (ada_build_task_list): Likewise.
596 (print_ada_task_info): Likewise.
597 (info_task): Likewise.
598 (task_command_1): Likewise.
602 * ada-lang.c (add_angle_brackets): Return std::string.
606 * python/py-threadevent.c (py_get_event_thread): Initialize
611 * python/py-bpevent.c (create_breakpoint_event_object): Use
613 * python/py-continueevent.c (emit_continue_event): Use
615 * python/py-exitedevent.c (create_exited_event_object): Return a
617 (emit_exited_event): Use copy-initialization.
618 * python/py-inferior.c (python_new_inferior)
619 (python_inferior_deleted, add_thread_object): Use
621 * python/py-infevents.c (create_inferior_call_event_object)
622 (create_register_changed_event_object)
623 (create_memory_changed_event_object): Return a gdbpy_ref<>.
624 (emit_inferior_call_event, emit_memory_changed_event)
625 (emit_register_changed_event): Use copy-initialization.
626 * python/py-newobjfileevent.c (create_new_objfile_event_object):
627 Return a gdbpy_ref<>.
628 (emit_new_objfile_event): Use copy-initialization.
629 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
630 (emit_clear_objfiles_event): Use copy-initialization.
631 * python/py-signalevent.c (create_signal_event_object): Use
633 * python/py-threadevent.c (create_thread_event_object): Use
640 * python/py-continueevent.c: Include "gdbthread.h".
641 (create_continue_event_object): Add intro comment. Add 'ptid'
642 parameter. Use it to find thread to pass to
643 create_thread_event_object.
644 (emit_continue_event): Pass PTID down to
645 create_continue_event_object.
646 * python/py-event.h (py_get_event_thread): Declare.
647 (create_thread_event_object): Remove default from 'thread'
649 * python/py-stopevent.c (create_stop_event_object): Use
651 * python/py-threadevent.c (get_event_thread): Rename to ...
652 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
653 and use it to find the thread.
654 (create_thread_event_object): Assert that THREAD isn't null.
655 Don't find the event thread here.
659 * block.h (blockrange, blockranges): New struct declarations.
660 (struct block): Add new field named `ranges'.
661 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
662 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
663 macros for accessing ranges in struct block.
664 (make_blockranges): New declaration.
665 block.c (make_blockranges): New function.
666 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
668 * symtab.h (find_pc_partial_function): Add new parameter `block'.
669 * blockframe.c (cache_pc_function_block): New static global.
670 (clear_pc_function_cache): Clear cache_pc_function_block.
671 (find_pc_partial_function): Move comment to symtab.h. Add
672 support for non-contiguous blocks.
673 * cli/cli-cmds.c (block.h): Include.
674 (print_disassembly): Handle printing of non-contiguous blocks.
675 (disassemble_current_function): Likewise.
676 (disassemble_command): Likewise.
678 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
680 * blockframe.c (get_pc_function_start): Likewise.
681 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
682 (gcc_symbol_address): Likewise.
683 * compile/compile-object-run.c (compile_object_run): Likewise.
684 * compile/compile.c (get_expr_block_and_pc): Likewise.
685 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
686 (func_addr_to_tail_call_list): Likewise.
687 * findvar.c (default_read_var_value): Likewise.
688 * inline-frame.c (inline_frame_this_id): Likewise.
689 (skip-inline_frames): Likewise.
690 * infcmd.c (until_next_command): Likewise.
691 * linespec.c (convert_linespec_to_sals): Likewise.
692 * parse.c (parse_exp_in_context_1): Likewise.
693 * printcmd.c (build_address_symbolic): likewise.
694 (info_address_command): Likewise.
695 symtab.c (find_function_start_sal): Likewise.
696 (skip_prologue_sal): Likewise.
697 (find_function_alias_target): Likewise.
698 (find_gnu_ifunc): Likewise.
699 * stack.c (find_frame_funname): Likewise.
700 * symtab.c (fixup_symbol_section): Likewise.
701 (find_function_start_sal): Likewise.
702 (skip_prologue_sal): Likewsie.
703 (find_function_alias_target): Likewise.
704 (find_gnu_ifunc): Likewise.
705 * tracepoint.c (info_scope_command): Likewise.
706 * value.c (value_fn_field): Likewise.
708 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
709 in place of find_pc_partial_function.
710 * blockframe.c (find_function_entry_range_from_pc): New function.
711 * symtab.h (find_function_entry_range_from_pc): Declare and document.
712 * objfiles.c (objfile_relocate1): Relocate start and end addresses
713 for each range in a block.
718 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
723 * solib-svr4.c (read_program_headers_from_bfd): Return
724 gdb::optional<gdb::byte_vector>.
725 (svr4_exec_displacement): Adjust.
729 * solib-svr4.c (read_program_header): Return
730 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
731 (find_program_interpreter): Return
732 gdb::optional<gdb::byte_vector>.
733 (scan_dyntag_auxv): Adjust.
734 (enable_break): Adjust.
735 (svr4_exec_displacement): Adjust.
739 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
740 * inf-child.c (inf_child_target::terminal_save_inferior): New.
744 * guile/scm-string.c (gdbscm_scm_from_printf): Use
746 * guile/scm-utils.c (gdbscm_printf): Likewise.
747 * serial.c (serial_printf): Likewise.
748 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
752 * stack.c (print_frame): Print frame architecture when printing on
754 * NEWS: Mention new "arch" attribute in frame output.
758 * arch/aarch64.h (aarch64_regnum): Update comment.
762 * NEWS: Add SVE to 8.2 section.
766 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
767 out from gdbscm_parse_function_args.
768 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
769 gdbscm_parse_function_args_1.
774 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
779 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
784 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
789 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
790 dwarf_variable_value.
791 * dwarf2-frame.c (class dwarf_expr_executor):
792 Add override for dwarf_variable_value.
793 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
794 (class symbol_needs_eval_context): Likewise.
795 (indirect_synthetic_pointer): Add forward declaration.
796 (sect_variable_value): New function.
797 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
798 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
799 for DW_OP_GNU_variable_value.
803 * top.c (read_command_file): Update.
804 (command_line_input): Remove "repeat" argument.
805 * ada-lang.c (get_selections): Update.
806 * linespec.c (decode_line_2): Update.
807 * defs.h (command_line_input): Remove argument.
808 * cli/cli-script.c (read_next_line): Update.
809 * python/py-gdb-readline.c: Update.
813 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
818 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
822 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
823 If used, use find_pc_partial_function to find address range
825 * mi/mi-main.c (mi_cmd_list_features): Report
826 "data-disassemble-a-option" feature.
827 * NEWS: Mention new -data-disassemble option -a.
831 * common/common-defs.h (_FORTIFY_SOURCE): Define.
835 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
836 (aarch64_linux_collect_sve_regset): Likewise.
837 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
838 * regcache.h (regcache_map_entry_size): New function.
842 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
843 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
844 (SVE_HEADER_VL_LENGTH): Likewise.
845 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
846 (SVE_HEADER_FLAGS_LENGTH): Likewise.
847 (SVE_HEADER_RESERVED_LENGTH): Likewise.
848 (SVE_HEADER_SIZE_OFFSET): Likewise.
849 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
850 (SVE_HEADER_VL_OFFSET): Likewise.
851 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
852 (SVE_HEADER_FLAGS_OFFSET): Likewise.
853 (SVE_HEADER_RESERVED_OFFSET): Likewise.
854 (SVE_HEADER_SIZE): Likewise.
855 (aarch64_linux_core_read_vq): Add function.
856 (aarch64_linux_core_read_description): Check for SVE section.
860 * aarch64-fbsd-tdep.c
861 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
863 * aarch64-linux-tdep.c
864 (aarch64_linux_iterate_over_regset_sections): Likewise.
866 (alpha_linux_iterate_over_regset_sections):
868 (alphanbsd_iterate_over_regset_sections): Likewise.
870 (amd64fbsd_iterate_over_regset_sections): Likewise.
872 (amd64_linux_iterate_over_regset_sections): Likewise.
874 (armbsd_iterate_over_regset_sections): Likewise.
876 (arm_fbsd_iterate_over_regset_sections): Likewise.
878 (arm_linux_iterate_over_regset_sections): Likewise.
879 * corelow.c (get_core_registers_cb): Likewise.
880 (core_target::fetch_registers): Likewise.
881 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
882 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
883 * gdbarch.h (void): Regenerate.
884 * gdbarch.sh: Add supply_size and collect_size.
885 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
886 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
887 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
888 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
889 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
890 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
891 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
892 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
893 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
894 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
895 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
896 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
897 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
898 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
899 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
900 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
901 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
902 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
903 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
904 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
905 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
906 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
907 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
908 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
909 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
910 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
911 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
912 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
913 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
914 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
918 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
923 * compile/compile-c-support.c (add_code_header, add_code_footer):
924 Move into policy class.
925 (c_push_user_expression, pop_user_expression_nop)
926 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
927 (compile_program): New host class.
928 (c_compile_program): New typedef.
929 (c_compute_porgram): Use c_compile_program.
933 * compile/compile-internal.h (compile_instance::~compile_instance):
934 Remove calls to htab_delete.
935 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
936 * compile.c (compile_instance::compile_instance): Initialize
937 htab unique pointers.
938 (compile_instance::get_cached_type, compile_instance::insert_type)
939 (compile_instance::error_symbol_once): Update for unique_ptr.
943 * compile/compile-c-symbols.c (struct symbol_error)
944 (hash_symbol_error, eq_symbol_error, del_symbol_error)
945 (compile_instance::insert_symbol_error)
946 (compile_instance::error_symbol_once): Move to ...
947 * compile/compile.c: ... here.
951 * compile/compile-c-support.c (c_get_compile_context): Use `new'
952 instead of `new_compile_instance'.
953 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
955 If the symbol error map is not initialized, create it.
956 (generate_c_for_for_one_symbol): Do not check/initialize
957 the symbol error map.
958 * compile/compile-c-types.c (compile_c_instance): Make a class.
960 (compile_instance::compile_instance): Initialize the type cache.
961 (get_cached_type): New function.
962 (insert_type): Update description.
963 (compile_c_instance::m_default_cflags): Define.
964 (convert_type): Update description. Use get_cached_type.
965 (delete_instance): Moved to destructor.
966 (new_compile_instance): Moved to constructor.
967 * compile/compile-c.h (compile_c_instance): Make class inheriting
968 from compile_instance.
969 <base>: Remove field.
970 <type_map, symbol_err_map>: Move to base class.
971 <c_plugin>: Rename to `m_plugin' and remove pointer type.
972 * compile/compile-internal.h (compile_instance): Make class.
973 <type_map_t, symbol_err_map_t>: Define.
974 <fe>: Rename to `m_gcc_fe'.
975 <scope, block, gcc_target_options>: Add `m_' prefix.
976 <m_type_map, m_symbol_err_map>: New fields, moved from
979 (convert_type, new_compile_instance): Remove.
980 * compile/compile.c (cleanup_compile_instance): Remove.
981 (compile_to_object): Use unique_ptr to eliminate cleanups.
982 (compile_instance::set_print_callback, compile_instance::version)
983 (compile_instance::set_verbose)
984 (compile_instance::set_driver_filename)
985 (compile_instance::set_triplet_regexp)
986 (compile_instance::set_arguments)
987 (compile_instance::set_source_file)
988 (compile_instance::compile): Define.
992 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
993 * compile/compile-c-types.c: Define GCC_METHODN macros and include
994 gcc-c-fe.def to define C plugin.
995 (delete_instance): Delete `c_plugin'.
996 (new_compile_instance): Initialize `c_plugin'.
997 * compile/compile-c.h: Include gcc_c_plugin.h.
998 (struct compile_c_instance) <c_plugin>: New member.
999 * gcc-c-plugin.h: New file.
1000 Update all callers with API change.
1004 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1005 (HFILES_NO_SRCDIR): ... to here.
1006 Add compile-internal.h and compile-c.h.
1007 * compile/compile-c-support.c: Include compile-c.h.
1008 * compile/compile-c-symbols.c: Include compile-c.h.
1009 (generate_c_for_variable_locations): Update comment.
1010 * compile/compile-c-types.c: Include compile-c.h.
1011 * compile/compile-c.h: New file -- moved C language declarations
1012 from other files here.
1013 * compile/compile-internal.h: Do not include hashtab.h or
1014 common/enum-flags.h.
1015 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1016 (gcc_convert_symbol, gcc_symbol_address)
1017 (generate_c_for_variable_locations, c_get_mode_for_size)
1018 (c_get_range_decl_name): Definitions moved to compile-c.h.
1019 * compile/compile-loc2c.c: Include compile-c.h.
1023 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1024 (c_symbol_substitution_name): ... this.
1029 * compile/compile-c-support.c (c_compute_program): Use
1030 unique_xmalloc_ptr to eliminate cleanup.
1031 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1032 Return a unique_xmalloc_ptr and eliminate cleanup.
1033 * compile/compile-internal.h (generate_c_for_variable_locations):
1034 Return unique_xmalloc_ptr and update description.
1038 * corelow.c (core_target::get_core_register_section): Rename
1039 min_size to section_min_size.
1043 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1044 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1045 * NEWS: Mention new GNU/Linux RISC-V target.
1046 * configure.host: Add riscv*-*-linux*.
1047 * configure.nat: Add riscv*.
1048 * configure.tgt: Add riscv*-*-linux*.
1049 * riscv-linux-nat.c: New file.
1050 * riscv-linux-tdep.c: New file.
1054 * infrun.c (resume): Make static, add forward declaration.
1055 (proceed): Update header comment.
1056 * infrun.h (resume): Delete declaration.
1060 * riscv-tdep.h: Minor formatting fixes.
1064 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1065 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1066 (test_mkdir_recursive): Likewise.
1067 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1071 * valarith.c (value_subscripted_rvalue): If an array is not in
1072 memory, and we don't know the upper bound, then we can't know that
1073 the requested element exists or not.
1077 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1078 (target_options_to_string): Add comment.
1082 * unittests/scoped_mmap-selftests.c: Check result of "write".
1086 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1087 (decode_register_index_short): New.
1088 (decode_j_type_insn, decode_cj_type_insn): New.
1089 (decode_b_type_insn, decode_cb_type_insn): New.
1090 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1091 local xlen. Check xlen when decoding ambiguous compressed insns. In
1092 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1093 is_c_sw_insn instead of is_sw_insn.
1094 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1095 (riscv_software_single_step): New.
1096 * riscv-tdep.h (riscv_software_single_step): Declare.
1098 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1099 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1104 * target.c (dispose_inferior): Don't dispose of inferiors that are
1109 * remote.c (remote_target::download_tracepoint): Change char* to
1114 * target.h (target_options_to_string): Return an std::string.
1115 * target.c (str_comma_list_concat_elem): Return void, use
1117 (do_option): Likewise.
1118 (target_options_to_string): Return an std::string.
1119 * linux-nat.c (linux_nat_target::wait): Adjust.
1120 * target-debug.h (target_debug_print_options): Adjust.
1124 * Makefile.in (CPPFLAGS): New variable.
1125 (INTERNAL_CPPFLAGS): Use it.
1129 * NEWS: Mention the index cache.
1133 * common/pathstuff.h (get_standard_cache_dir): New.
1134 * common/pathstuff.c (get_standard_cache_dir): New.
1135 * build-id.h (build_id_to_string): New.
1136 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1137 DEBUG_STR_SUFFIX): Move to here.
1138 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1139 DEBUG_STR_SUFFIX): Move from there.
1140 (write_psymtabs_to_index): Make non-static, add basename
1141 parameter. Write to temporary files, rename when done.
1142 (save_gdb_index_command): Adjust call to
1143 write_psymtabs_to_index.
1144 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1146 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1147 (get_gdb_index_contents_from_cache): New.
1148 (get_gdb_index_contents_from_cache_dwz): New.
1149 (dwarf2_initialize_objfile): Read index from cache.
1150 (dwarf2_build_psymtabs): Save to index.
1151 * dwarf-index-cache.h: New file.
1152 * dwarf-index-cache.c: New file.
1153 * dwarf-index-write.h: New file.
1157 * gnulib/aclocal.m4: Re-generate.
1158 * gnulib/config.in: Re-generate.
1159 * gnulib/configure: Re-generate.
1160 * gnulib/import/Makefile.am: Re-generate.
1161 * gnulib/import/Makefile.in: Re-generate.
1162 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1163 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1164 * gnulib/import/m4/mkdir.m4: New file.
1165 * gnulib/import/mkdir.c: New file.
1166 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1171 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1172 * common/scoped_mmap.c: New file.
1173 * common/scoped_mmap.h (destroy): New method.
1174 (~scoped_mmap, reset): Use destroy.
1175 (scoped_mmap): New move constructor.
1176 (mmap_file): New declaration.
1177 * unittests/scoped_mmap-selftests.c (test_normal,
1178 test_invalid_filename, run_tests): New functions.
1179 (_initialize_scoped_mmap_selftests): Register selftest.
1183 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1184 (read_gdb_index_from_buffer): ... this. Remove section
1185 parameter, add buffer parameter.
1186 (get_gdb_index_contents_ftype,
1187 get_gdb_index_contents_dwz_ftype): New typedefs.
1188 (dwarf2_read_gdb_index): Add callback parameters to get the
1190 (get_gdb_index_contents_from_section): New.
1191 (dwarf2_initialize_objfile): Update call to
1192 dwarf2_read_gdb_index.
1196 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1197 (gdb_open_cloexec): Likewise.
1198 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1199 (commandline_from_pid): Likewise.
1200 (linux_xfer_osdata_threads): Likewise.
1201 (linux_xfer_osdata_fds): Likewise.
1202 * ada-lang.c (is_package_name): Likewise.
1203 * auxv.c (procfs_xfer_auxv): Likewise.
1204 * breakpoint.c (print_one_breakpoint_location): Use
1206 (print_one_catch_solib): Use string_printf.
1207 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1208 (add_pe_forwarded_sym): Likewise.
1209 * dwarf2read.c (create_type_unit_group): Likewise.
1210 (build_error_marker_type): Likewise.
1211 * infcall.c (get_function_name): Likewise.
1212 * valprint.c (print_converted_chars_to_obstack): Likewise.
1213 * xtensa-tdep.c (xtensa_register_type): Likewise.
1217 * remote.c (remote_target::download_tracepoint): Fix format
1222 * tracefile.c: Include common/byte-vector.h.
1223 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1224 with trace_regblock_size if needed. Update uses of buf.
1228 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1229 std::vector<unsigned char>.
1230 * tracepoint.c (collection_list::collection_list): Remove
1231 m_regs_mask initializer from initializer list. Resize
1232 m_regs_mask using the largest remote register number.
1233 (collection_list::add_remote_register): Remove size check on
1234 m_regs_mask. Use at to access element.
1235 (collection_list::stringify): Change type of temp_buf to
1236 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1237 stringify the register mask. Use pack_hex_byte for the register
1242 * tracepoint.h (class collection_list) <add_register>: Remove.
1243 <add_remote_register, add_ax_registers, add_local_register>:
1245 <add_memrange>: Add scope parameter.
1246 * tracepoint.c (encode_actions_1): Likewise.
1247 (collection_list::add_register): Rename to ...
1248 (collection_list::add_remote_register): ... this. Update
1250 (collection_list::add_ax_registers, add_local_register): New
1252 (collection_list::add_memrange): Add scope parameter. Call
1253 add_local_register instead of add_register.
1254 (finalize_tracepoint_aexpr): New function.
1255 (collection_list::collect_symbol): Update calls to add_memrange.
1256 Call add_local_register instead of add_register. Call
1257 add_ax_registers. Call finalize_tracepoint_aexpr.
1258 (encode_actions_1): Get remote regnos for $reg action. Call
1259 add_remote_register, add_ax_registers, and add_local_register.
1260 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1261 (validate_actionline): Call finalize_tracepoint_aexpr.
1265 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1266 Replace array buf with gdb::char_vector buf, of size
1267 get_remote_packet_size (). Replace references to buf and
1268 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1269 and xsnprintf with snprintf. Raise errors if the buffer is too
1274 * remote.c (remote_target::download_tracepoint): Fix the has_more
1275 predicate in the QTDP action list iteration.
1279 * remote.c (remote_target::download_tracepoint): Fix indentation
1284 * proc-api.c (_initialize_proc_api): Remove c, unused.
1285 * procfs.c (procfs_init_inferior): Remove signals, unused.
1286 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1292 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1293 'W_STOPCODE (0)' as this could be ambiguous.
1297 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1298 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1304 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1306 (process_structure_scope): Likewise.
1311 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1316 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1317 (darwin_suspend_inferior, darwin_resume_inferior)
1318 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1319 (darwin_check_new_threads): Check result of get_darwin_inferior.
1327 * varobj.c (varobj_get_path_expr_parent): Report an error if
1328 parent is a dynamic varobj.
1332 * gnulib/aclocal.m4: Re-generate.
1333 * gnulib/config.in: Re-generate.
1334 * gnulib/configure: Re-generate.
1335 * gnulib/import/Makefile.in: Re-generate.
1336 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1337 * gnulib/import/m4/onceonly.m4: Re-generate.
1341 * target-descriptions.c (struct xml_test_tdesc): New.
1342 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1343 (record_xml_tdesc): Update.
1344 (maintenance_check_xml_descriptions): Update.
1345 * target-descriptions.h (record_xml_tdesc): Update comment.
1349 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1350 checking array bounds are defined.
1354 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1355 irreflexivity violation.
1359 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1360 * value.c (unpack_long): Remove lint code.
1361 * valops.c (value_ind): Remove lint code.
1362 * valarith.c (value_x_binop, value_x_unop, value_equal)
1363 (value_pos): Remove lint code.
1367 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1368 with undefined upper bound as <optimized out>.
1372 * gcore.in: Rename variable "name" to "prefix". Expand
1377 * windows-nat.c (windows_nat_target::create_inferior): Update to
1378 call close() in global namespace.
1382 * dwarf-index-write.c (add_address_entry): Don't add objfile
1384 * dbxread.c (find_stab_function): Rename from
1385 find_stab_function_addr. Return a bound_minimal_symbol.
1386 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1387 Don't add objfile offsets.
1388 (end_psymtab): Use raw_text_low, raw_text_high,
1389 MSYMBOL_VALUE_RAW_ADDRESS.
1390 (read_ofile_symtab): Update.
1391 (process_one_symbol): Update.
1392 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1394 (dw2_relocate): Remove.
1395 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1397 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1399 (process_psymtab_comp_unit_reader, add_partial_symbol)
1400 (add_partial_subprogram, dwarf2_ranges_read): Update.
1401 (load_partial_dies): Update.
1402 (add_address_entry): Don't add objfile offsets.
1403 (dwarf2_build_include_psymtabs): Update.
1404 (create_addrmap_from_aranges): Don't add objfile offsets.
1405 (dw2_find_pc_sect_compunit_symtab): Update.
1406 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1407 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1409 (parse_partial_symbols): Don't add objfile offsets. Use
1410 raw_text_low, raw_text_high. Update.
1411 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1412 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1413 or call 'relocate' quick function. Clear psymbol_map.
1414 * psympriv.h (struct partial_symbol) <address>: Add section
1416 <set_unrelocated_address>: Rename from set_address.
1417 <raw_text_low, raw_text_high>: New methods.
1418 <text_low, text_high>: Add objfile parameter.
1419 (add_psymbol_to_bcache): Add 'section' parameter. Call
1420 set_unrelocated_address.
1421 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1422 (find_pc_psymbol): Update.
1423 (fixup_psymbol_section, relocate_psymtabs): Remove.
1424 (dump_psymtab, psym_functions): Update.
1425 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1427 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1428 (start_psymtab_common): Update.
1429 * symfile-debug.c (debug_qf_relocate): Remove.
1430 (debug_sym_quick_functions): Update.
1431 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1432 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1437 * dbxread.c (end_psymtab): Use text_high_valid and
1439 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1440 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1441 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1443 <text_low_valid, text_high_valid>: New fields.
1444 <set_text_low, set_text_high>: Update.
1445 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1449 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1451 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1452 textlow and texthigh fields.
1453 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1455 * mdebugread.c (parse_lines, parse_partial_symbols)
1456 (psymtab_to_symtab_1): Update.
1457 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1458 Rename fields. Update comment. Now private.
1459 <text_low, text_high, set_text_low, set_text_high>: New methods.
1460 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1461 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1462 (start_psymtab_common, maintenance_info_psymtabs)
1463 (maintenance_check_psymtabs): Update.
1464 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1466 (scan_xcoff_symtab): Update.
1470 * psympriv.h (struct partial_symbol) <unrelocated_address,
1471 address, set_address>: New methods.
1472 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1473 (fixup_psymbol_section, relocate_psymtabs): Update.
1474 (print_partial_symbols): Add 'objfile' parameter. Update.
1475 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1480 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1481 (debug_names::write_psymbols): Update.
1482 * psympriv.h (struct partial_symbol): Derive from
1483 general_symbol_info.
1484 <obj_section>: New method.
1485 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1486 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1487 (find_pc_sect_psymbol, fixup_psymbol_section)
1488 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1489 (print_partial_symbols, recursively_search_psymtabs)
1490 (compare_psymbols, psymbol_hash, psymbol_compare)
1491 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1492 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1496 * dbxread.c (end_psymtab): Remove dead code.
1500 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1501 DWARF unwinders are disabled.
1502 * dwarf2-frame.c: Add dwarf2read.h include.
1503 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1505 (dwarf2_frame_unwinders_enabled_p): Define.
1506 (show_dwarf_unwinders_enabled_p): New function.
1507 (_initialize_dwarf2_frame): Register switch to control DWARF
1509 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1510 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1511 (show_dwarf_cmdlist): Remove static keyword.
1512 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1513 (show_dwarf_cmdlist): Declare.
1514 * NEWS: Document new feature.
1518 PR breakpoints/23366
1519 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1523 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1524 DW_AT_count can't be translated to a dynamic prop.
1528 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1533 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1537 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1542 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1543 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1544 instead of add_symbol_to_list.
1545 (read_file_scope): Call prepare_one_comp_unit before reading
1550 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1554 * utils.c (malloc, realloc, free): Don't declare.
1555 * configure, config.in: Rebuild.
1556 * configure.ac: Don't check for declarations of free, malloc, or
1561 * aarch64-linux-nat.c
1562 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1564 * arm-linux-nat.c (fetch_regs): Likewise.
1565 (store_regs): Likewise.
1566 (fetch_vfp_regs): Likewise.
1567 (store_vfp_regs): Likewise.
1568 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1569 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1570 (arm_linux_nat_target::insert_watchpoint): Likewise.
1571 (arm_linux_nat_target::remove_watchpoint): Likewise.
1572 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1574 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1576 * ppc-linux-nat.c (fetch_register): Likewise.
1577 (fetch_all_gp_regs): Likewise.
1578 (fetch_ppc_registers): Likewise.
1579 (store_all_gp_regs): Likewise.
1580 (store_ppc_registers): Likewise.
1581 (hwdebug_insert_point): Likewise.
1582 (can_use_watchpoint_cond_accel): Likewise.
1583 * remote-sim.c (gdb_os_write_stdout): Likewise.
1588 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1590 * configure: Rebuild.
1594 * regformats/regdat.sh: Define xmltarget_${name} inside
1595 #ifndef IN_PROCESS_AGENT.
1599 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1603 * symfile.c (reread_symbols): Notify iter, not objfile.
1607 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1609 (ravenscar_thread_target::prepare_to_store): Likewise.
1613 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1614 unused variable. Call value_fetch_lazy when needed.
1615 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1616 Remove unused variable. Call value_fetch_lazy when needed.
1620 * m32c-tdep.c (mark_dma): Return void.
1621 (make_regs): Remove unused declarations.
1625 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1626 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1627 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1628 bkscm_get_valid_block_smob_arg_unsafe for effect.
1632 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1637 * windows-nat.c (saved_context): Conditionally define.
1638 * remote.c (remote_target::remote_btrace_maybe_reopen):
1639 Conditionally declare "warned".
1640 * inflow.c (sigquit_ours): Conditionally define.
1641 (new_tty): Move "tty" declaration inside #if.
1642 * guile/guile.c (guile_datadir): Conditionally define.
1643 * charset.c (set_be_le_names): Move some declarations inside #if.
1644 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1646 (parse_xml_btrace_conf): Likewise.
1650 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1654 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1655 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1656 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1657 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1658 * stack.c (frame_apply_level_command): Remove unused variable.
1659 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1660 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1661 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1663 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1664 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1665 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1667 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1668 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1670 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1671 Remove unused variable.
1672 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1674 * common/tdesc.c (print_xml_feature::visit): Remove unused
1676 * compile/compile-object-load.c (store_regs): Remove unused
1678 * complaints.c (clear_complaints): Remove unused variable.
1679 * corelow.c (core_target_open): Remove unused variable.
1680 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1682 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1684 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1686 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1688 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1690 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1692 * ia64-tdep.c (examine_prologue): Remove unused variable.
1693 * infcall.c (run_inferior_call): Remove unused variable.
1694 * inferior.c (exit_inferior): Remove unused variable.
1695 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1696 * linespec.c (decode_line_2): Remove unused variable.
1697 * linux-nat.c (super_close): Remove.
1698 * linux-tdep.c (linux_info_proc): Remove unused variable.
1699 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1700 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1701 Remove unused variable.
1702 * parse.c (find_minsym_type_and_address): Remove unused variable.
1703 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1705 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1707 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1709 * record-btrace.c (record_btrace_target::store_registers): Remove
1711 (cmd_show_record_btrace_cpu): Remove unused variable.
1712 * riscv-tdep.c (riscv_register_reggroup_p)
1713 (riscv_push_dummy_call, riscv_return_value): Remove unused
1715 * rust-exp.y (literal): Remove unused variable.
1716 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1718 <STRUCTOP_ANONYMOUS>: Likewise.
1719 * s390-linux-tdep.c (s390_linux_init_abi_31)
1720 (s390_linux_init_abi_64): Remove unused variable.
1721 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1722 (file_select_thread, net_windows_open, _initialize_ser_windows):
1723 Remove unused variables.
1724 * symtab.c (find_pc_sect_line): Remove unused variable.
1725 * target-memory.c (compute_garbled_blocks): Remove unused
1727 (target_write_memory_blocks): Remove unused variable.
1728 * target.c (target_stack::unpush): Remove unused variables.
1729 * tracepoint.c (start_tracing, all_tracepoint_actions)
1730 (merge_uploaded_trace_state_variables)
1731 (print_one_static_tracepoint_marker): Remove unused variable.
1732 * unittests/basic_string_view/element_access/char/1.cc (test01):
1733 Remove unused variable.
1734 * windows-nat.c (windows_continue, windows_add_all_dlls)
1735 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1736 Remove unused variables.
1740 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1741 attr_profile in HAVE_ELF.
1742 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1747 * frame.c (frame_register_unwind): Change parameter name.
1748 (frame_unwind_register): Likewise.
1749 (frame_unwind_register_value): Likewise.
1750 (frame_unwind_register_signed): Likewise.
1751 (frame_unwind_register_unsigned): Likewise.
1752 * frame.h (frame_register_unwind): Likewise.
1753 (frame_unwind_register): Likewise.
1754 (frame_unwind_register_value): Likewise.
1755 (frame_unwind_register_signed): Likewise.
1756 (frame_unwind_register_unsigned): Likewise.
1757 (frame_unwind_arch): Likewise.
1761 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1766 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1767 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1772 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1773 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1774 m_compunit_symtab, m_language>: Add "m_" prefix.
1776 * buildsym.c: Update all uses.
1780 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1781 * buildsym.h (record_line_ftype): Remove typedef.
1785 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1786 (end_expandable_symtab): Likewise.
1787 (end_symtab_get_static_block): Likewise.
1788 (end_symtab_from_static_block): Likewise.
1789 * buildsym-legacy.c (augment_type_symtab): Remove.
1790 (end_expandable_symtab): Remove.
1791 (end_symtab_get_static_block): Remove.
1792 (end_symtab_from_static_block): Remove.
1796 * dwarf2read.c: Include buildsym.h.
1797 (struct dwarf2_cu) <builder>: New method.
1798 (fixup_go_packaging): Update.
1799 (process_full_comp_unit, process_full_type_unit): Update. Don't
1800 use scoped_free_pendings.
1801 (using_directives): Add "cu" parameter, remove "language".
1802 (read_import_statement, setup_type_unit_groups, )
1803 (read_func_scope, read_lexical_block_scope)
1804 (dwarf2_record_block_ranges, read_namespace): Update.
1805 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1806 (lnp_state_machine::handle_end_sequence): Update.
1807 (class lnp_state_machine) <m_cu>: New member.
1808 <m_record_line_callback>: Remove.
1809 <m_currently_recording_lines>: New member.
1810 (lnp_state_machine::handle_set_file): Update.
1811 (noop_record_line): Remove.
1812 (dwarf_record_line_p): Add cu parameter.
1813 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1814 (lnp_state_machine::record_line)
1815 (lnp_state_machine::lnp_state_machine)
1816 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1817 (dwarf_decode_lines): Update.
1818 (dwarf2_start_subfile): Add cu parameter.
1819 (dwarf2_start_symtab, new_symbol): Update.
1820 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1821 Remove dwarf2_per_objfile parameter.
1822 (dwarf_decode_macros): Update.
1826 * stabsread.c (define_symbol): Update.
1827 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1828 * dwarf2read.c (new_symbol): Update.
1829 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1830 * cp-namespace.c: Include buildsym.h.
1831 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1832 * buildsym-legacy.c (get_buildsym_compunit): New function.
1836 * xcoffread.c: Include buildsym-legacy.h.
1837 * windows-nat.c: Include buildsym-legacy.h.
1838 * stabsread.c: Include buildsym-legacy.h.
1839 * mdebugread.c: Include buildsym-legacy.h.
1840 * buildsym-legacy.h: New file.
1841 * buildsym-legacy.c: New file, from buildsym.c.
1842 * go32-nat.c: Include buildsym-legacy.h.
1843 * dwarf2read.c: Include buildsym-legacy.h.
1844 * dbxread.c: Include buildsym-legacy.h.
1845 * cp-namespace.c: Include buildsym-legacy.h.
1846 * coffread.c: Include buildsym-legacy.h.
1847 * buildsym.h: Move some contents to buildsym-legacy.h.
1848 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1850 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1854 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1855 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1856 (buildsym_compunit::buildsym_compunit)
1857 (buildsym_compunit::~buildsym_compunit)
1858 (buildsym_compunit::get_macro_table): Define.
1862 * buildsym.c (reset_symtab_globals): Remove.
1863 (buildsym_compunit::end_symtab_from_static_block): Update.
1864 (buildsym_compunit::augment_type_symtab): Update.
1865 (end_symtab_from_static_block): Call free_buildsym_compunit.
1866 (augment_type_symtab, end_symtab, end_expandable_symtab):
1871 * arch-utils.c: Do not include buildsym.h.
1872 * mipsread.c: Do not include buildsym.h.
1873 * machoread.c: Do not include buildsym.h.
1874 * elfread.c: Do not include buildsym.h.
1878 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1880 (buildsym_compunit): Add new constructor.
1881 (struct buildsym_compunit) <get_last_source_file, finish_block,
1882 record_block_range, start_subfile, patch_subfile_names,
1883 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1884 set_last_source_start_addr, get_last_source_start_addr,
1885 get_local_using_directives, set_local_using_directives,
1886 get_global_using_directives, outermost_context_p,
1887 get_current_context_stack, get_context_stack_depth,
1888 get_current_subfile, get_local_symbols, get_file_symbols,
1889 get_global_symbols, record_debugformat, record_producer,
1890 push_context, pop_context, end_symtab_get_static_block,
1891 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1893 <record_pending_block, finish_block_internal, make_blockvector,
1894 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1900 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1902 (finish_block_internal): Update.
1906 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1908 (finish_block_internal): Update.
1912 * buildsym.h (EXTERN): Don't define or undef.
1913 * buildsym.c (EXTERN): Don't define.
1917 * buildsym.c: Remove TODO comment.
1921 * coffread.c (coff_symtab_read): Update.
1922 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1923 (xcoff_new_init): Update.
1924 * mipsread.c (mipscoff_new_init): Update.
1925 * mdebugread.c (mdebug_build_psymtabs): Update.
1926 * elfread.c (elf_new_init): Update.
1927 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1929 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1930 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1931 (stabsect_build_psymtabs): Update.
1932 * buildsym.h (buildsym_init): Don't declare.
1933 * buildsym.c: Update comment.
1934 (prepare_for_building): Remove.
1935 (start_symtab, restart_symtab): Update.
1936 (reset_symtab_globals): Update comment.
1937 (buildsym_init): Remove.
1941 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1942 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1943 (read_enum_type, common_block_start, common_block_end)
1944 (cleanup_undefined_types_1, finish_global_stabs): Update.
1945 * mdebugread.c (psymtab_to_symtab_1): Update.
1946 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1947 (read_lexical_block_scope, new_symbol): Update.
1948 * dbxread.c (process_one_symbol): Update.
1949 * coffread.c (coff_symtab_read, process_coff_symbol)
1950 (coff_read_enum_type): Update.
1951 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1953 (get_local_symbols, get_file_symbols, get_global_symbols): New
1955 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1957 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1958 (~scoped_free_pendings): Update.
1959 (finish_block, prepare_for_building, reset_symtab_globals)
1960 (end_symtab_get_static_block, end_symtab_with_blockvector)
1961 (augment_type_symtab, push_context): Update.
1962 (get_local_symbols, get_file_symbols, get_global_symbols): New
1964 (buildsym_init): Update.
1968 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1969 (process_full_type_unit): Likewise.
1970 (dwarf2_start_symtab): Set list_in_scope.
1974 * dwarf2read.c (process_psymtab_comp_unit_reader)
1975 (build_type_psymtabs_reader): Do not set list_in_scope.
1979 * buildsym.c (free_pendings): Remove.
1980 (add_symbol_to_list, scoped_free_pendings)
1981 (finish_block_internal, buildsym_init): Update.
1985 * xcoffread.c (read_xcoff_symtab): Update.
1986 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1988 * dbxread.c (process_one_symbol): Update.
1989 * coffread.c (coff_symtab_read): Update.
1990 * buildsym.h (finish_block): Update.
1991 * buildsym.c (finish_block): Remove "listhead" argument.
1992 (end_symtab_get_static_block): Update.
1996 * buildsym.h (class scoped_free_pendings): Remove constructor.
1997 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1999 <m_pending_block_obstack, m_pending_blocks>: New members.
2000 (pending_block_obstack, pending_blocks): Remove.
2001 (scoped_free_pendings::scoped_free_pendings): Default.
2002 (~scoped_free_pendings): Update.
2003 (free_pending_blocks): Remove.
2004 (finish_block_internal, record_pending_block, make_blockvector)
2005 (end_symtab_get_static_block, augment_type_symtab, push_context)
2006 (buildsym_init): Update.
2010 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2011 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2013 (pending_addrmap, pending_addrmap_obstack)
2014 (pending_addrmap_interesting): Remove.
2015 (scoped_free_pendings, record_block_range, make_blockvector)
2016 (prepare_for_building, reset_symtab_globals, buildsym_init):
2021 * xcoffread.c (process_linenos): Update.
2022 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2023 * mdebugread.c (psymtab_to_symtab_1): Update.
2024 * dwarf2read.c (setup_type_unit_groups)
2025 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2026 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2027 * dbxread.c (process_one_symbol): Update.
2028 * coffread.c (coff_symtab_read, enter_linenos)
2029 (process_coff_symbol): Update.
2030 * buildsym.h (current_subfile): Don't declare.
2031 (get_current_subfile): Declare.
2032 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2034 (start_subfile, free_buildsym_compunit, push_subfile)
2035 (prepare_for_building, start_symtab): Update.
2036 (get_current_subfile): New function.
2040 * coffread.c (coff_symtab_read): Update.
2041 * xcoffread.c (read_xcoff_symtab): Update.
2042 * dwarf2read.c (new_symbol): Update.
2043 (read_func_scope, read_lexical_block_scope): Update.
2044 * dbxread.c (process_one_symbol): Update.
2045 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2046 (outermost_context_p): Remove macro.
2047 (outermost_context_p, get_current_context_stack)
2048 (get_context_stack_depth): Declare.
2049 (pop_context): Return struct context_stack.
2050 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2052 (context_stack_size): Remove.
2053 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2054 (prepare_for_building, end_symtab_get_static_block)
2055 (augment_type_symtab, push_context): Update.
2056 (pop_context): Return struct context_stack.
2057 (outermost_context_p, get_current_context_stack)
2058 (get_context_stack_depth): New functions.
2059 (buildsym_init): Update.
2063 * rust-exp.y: Now a pure parser. Update all rules.
2064 (%union): Move earlier.
2065 (current_parser, work_obstack): Remove globals.
2066 (rust_parser, ~rust_parser): Update.
2067 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2068 lex_character, lex_number, lex_string, lex_identifier,
2069 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2070 convert_name, convert_params_to_expression,
2071 convert_ast_to_expression, ast_basic_type, ast_operation,
2072 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2073 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2074 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2075 ast_array_type, ast_slice_type, ast_reference_type,
2076 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2077 (rust_parse): Update.
2078 (rustyyerror, rustyylex): Add parser parameter.
2079 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2080 (rust_lex_stringish_test, rust_lex_test_sequence)
2081 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2082 (rust_lex_test_push_back, rust_lex_tests): Update.
2086 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2087 gdb::unique_xmalloc_ptr.
2088 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2089 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2090 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2091 copy-initialization.
2092 * guile/scm-pretty-print.c (ppscm_print_children): Use
2093 gdb::unique_xmalloc_ptr instead of cleanups.
2094 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2095 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2096 gdb::unique_xmalloc_ptr.
2097 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2098 Adjust to use gdb::unique_xmalloc_ptr.
2099 * guile/scm-utils.c (extract_arg): Adjust.
2100 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2101 gdb::unique_xmalloc_ptr instead of a cleanup.
2105 * utils.c (do_value_free_to_mark)
2106 (make_cleanup_value_free_to_mark): Remove.
2107 * utils.h (make_cleanup_value_free_to_mark): Remove.
2111 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2112 forwarding reference.
2116 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2117 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2122 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2124 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2126 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2127 directly instead of a cleanup.
2128 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2129 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2130 (vlscm_binop_gdbthrow): New, factored out from ...
2131 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2132 (vlscm_rich_compare): Use gdbscm_wrap.
2133 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2134 instead of a cleanup.
2135 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2137 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2138 Use xfree directly instead of a cleanup.
2139 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2140 Adjust to use gdbscm_wrap and scoped_value_mark.
2141 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2142 (gdbscm_value_address, gdbscm_value_dereference)
2143 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2145 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2146 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2148 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2149 gdbscm_wrap and scoped_value_mark.
2150 (gdbscm_value_to_string): Use xfree directly instead of a
2151 cleanup. Move 'buffer' unique_ptr to TRY scope.
2152 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2153 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2155 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2156 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2158 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2163 * findvar.c (default_read_var_value): Also resolve dynamic type for
2164 LOC_OPTIMIZED_OUT vars.
2168 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2173 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2174 (compute_enum_list, pascm_set_param_value_x)
2175 (gdbscm_parameter_value): Update.
2176 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2177 (gdbscm_scm_to_host_string): Update.
2178 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2180 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2181 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2182 * guile/scm-string.c (gdbscm_scm_to_string): Return
2184 (gdbscm_scm_to_host_string): Likewise.
2188 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2189 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2190 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2191 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2196 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2197 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2199 * guile/scm-cmd.c (cmdscm_function): Update.
2200 * guile/scm-pretty-print.c
2201 (ppscm_print_exception_unless_memory_error): Update.
2202 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2203 Return unique_xmalloc_ptr.
2207 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2212 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2213 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2214 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2215 unecessary braces after EF_RISCV_RVC test. Delete call to
2216 set_gdbarch_decr_pc_after_break.
2218 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2219 RISCV_LAST_FP_REGNUM + 1.
2220 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2224 * configure.ac: Remove --disable-gdbcli.
2225 * configure: Rebuild.
2226 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2227 (SUBDIR_CLI_CFLAGS): Remove.
2228 (SFILES): Use SUBDIR_CLI_SRCS.
2229 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2234 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2238 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2242 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2244 (libunwind_frame_sniffer): Likewise.
2245 (libunwind_frame_prev_register): Likewise.
2246 (libunwind_sigtramp_frame_sniffer): Likewise.
2247 * ia64-tdep.c (ia64_access_reg): Likewise.
2248 (ia64_access_rse_reg): Likewise.
2249 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2250 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2254 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2258 * remote-sim.c (gdbsim_target::close,
2259 gdbsim_target::mourn_inferior): Remove unused variables.
2263 * ia64-tdep.c (ktab_buf): New global.
2264 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2265 (get_kernel_table): Adjust.
2269 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2270 * dwarf2read.c (using_directives, new_symbol): Use
2271 outermost_context_p.
2272 * dbxread.c (process_one_symbol): Use outermost_context_p.
2273 * coffread.c (coff_symtab_read): Use outermost_context_p.
2277 * dwarf2read.c (using_directives, read_func_scope)
2278 (read_lexical_block_scope): Update.
2279 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2280 * buildsym.h (local_using_directives, global_using_directives):
2282 (get_local_using_directives, set_local_using_directives)
2283 (get_global_using_directives): Declare.
2284 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2285 m_global_using_directives>: New members.
2286 (finish_block_internal, prepare_for_building)
2287 (reset_symtab_globals, end_symtab_get_static_block)
2288 (push_context): Update.
2289 (get_local_using_directives, set_local_using_directives)
2290 (get_global_using_directives): New functions.
2291 (buildsym_init): Update.
2295 * xcoffread.c (xcoff_initial_scan): Don't call
2296 free_pending_blocks.
2297 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2298 * buildsym.h (class scoped_free_pendings): Add constructor.
2299 (free_pending_blocks): Don't declare.
2300 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2301 (free_pending_blocks): Now static.
2305 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2306 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2308 (struct subfile_stack): Remove.
2309 (subfile_stack): Remove.
2310 (push_subfile, pop_subfile, buildsym_init): Update.
2314 * buildsym.c (push_subfile): Use gdb_assert.
2315 (pop_subfile): Use gdb_assert.
2319 * buildsym.h (merge_symbol_lists): Remove.
2320 * buildsym.c (merge_symbol_lists): Remove.
2324 * stabsread.c (scan_file_globals): Update comment.
2325 * stabsread.h (scan_file_globals): Move from buildsym.h.
2326 * buildsym.h (scan_file_globals): Move to stabsread.h.
2330 * xcoffread.c (xcoff_new_init): Update.
2331 * mipsread.c (mipscoff_new_init): Update.
2332 * mdebugread.c (mdebug_build_psymtabs): Update.
2333 * elfread.c (elf_new_init): Update.
2334 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2335 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2336 * buildsym.h (buildsym_new_init): Don't declare.
2337 * buildsym.c (buildsym_new_init): Remove.
2341 * stabsread.h (within_function): Move from buildsym.h.
2342 * stabsread.c (start_stabs): Clear within_function.
2343 * coffread.c (coff_start_symtab): Clear within_function.
2344 * buildsym.h (within_function): Move to stabsread.h.
2345 * buildsym.c (prepare_for_building): Update.
2349 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2350 * dwarf2read.c (dwarf2_start_symtab): Don't set
2351 processing_gcc_compilation.
2352 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2356 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2357 (next_symbol_text_func): Move from buildsym.h.
2358 * stabsread.c (hashname): Move from buildsym.c.
2359 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2360 (next_symbol_text_func, hashname): Move to stabsread.h.
2361 * buildsym.c: Don't include bcache.h
2362 (hashname): Move to stasbread.c.
2366 * buildsym.h (context_stack_size): Don't declare.
2367 * buildsym.c (context_stack_size): New global.
2371 * dbxread.c (processing_acc_compilation): New global.
2372 * buildsym.h (processing_acc_compilation): Don't declare.
2376 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2377 * dbxread.c (read_ofile_symtab): Update.
2378 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2379 * buildsym.h (last_source_start_addr): Remove.
2380 (set_last_source_start_addr, get_last_source_start_addr):
2382 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2384 (struct buildsym_compunit) <m_last_source_start_addr>: New
2386 (prepare_for_building): Remove start_addr parameter.
2387 (start_symtab, restart_symtab, end_symtab_get_static_block)
2388 (end_symtab_with_blockvector): Update.
2389 (set_last_source_start_addr, get_last_source_start_addr): New
2394 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2396 (have_line_numbers): Remove.
2397 (record_line, prepare_for_building, end_symtab_get_static_block)
2398 (augment_type_symtab): Update.
2402 * buildsym.c (~buildsym_compunit): Free the macro table.
2403 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2405 <m_pending_macros>: New member.
2406 (pending_macros): Remove.
2407 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2408 (reset_symtab_globals, end_symtab_get_static_block)
2409 (end_symtab_with_blockvector, augment_type_symtab)
2410 (buildsym_init): Update.
2414 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2416 (buildsym_compunit::set_last_source_file): New method.
2417 <m_last_source_file>: New member.
2418 (prepare_for_building): Remove "name" parameter.
2419 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2420 (last_source_file): Remove.
2421 (set_last_source_file, get_last_source_file): Update.
2425 * buildsym.c (prepare_for_building): Add assert.
2429 * buildsym.c (~buildsym_compunit): Update.
2430 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2431 (start_subfile, patch_subfile_names)
2432 (end_symtab_with_blockvector): Update.
2436 * buildsym.c (struct buildsym_compunit): Add constructor,
2437 destructor, initializers.
2438 (start_buildsym_compunit): Remove.
2439 (free_buildsym_compunit): Use "delete".
2440 (start_symtab, restart_symtab): Use "new".
2444 * symfile.c (set_objfile_default_section_offset): Remove struct
2449 * (Responsible Maintainers): Add myself as or1k maintainer.
2453 * symfile.c (set_objfile_default_section_offset): Use extra braces
2458 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2463 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2464 unittests/cli-utils-selftests.c
2465 * unittests/cli-utils-selftests.c: New file.
2469 * NEWS: Mention new commands. Mention change to 'thread apply'.
2473 * thread.c (thr_try_catch_cmd): New function.
2474 (thread_apply_all_command): Handle qcs flags.
2475 (thread_apply_command): Handle qcs flags.
2476 (taas_command): New function.
2477 (tfaas_command): New function.
2478 (_initialize_thread): Update to setup the new commands 'taas
2479 and 'tfaas'. Change doc string for 'thread apply'.
2483 * stack.c: (trailing_outermost_frame): New function, mostly
2484 extracted from backtrace_command_1.
2485 (leading_innermost_frame): New function.
2486 (backtrace_command_1): Update to call trailing_outermost_frame.
2487 (frame_apply_command_count): New function.
2488 (frame_apply_level_command): New function.
2489 (frame_apply_all_command): New function.
2490 (frame_apply_command): New function.
2491 (faas_command): New function.
2492 (frame_cmd_list): New variable.
2493 (_initialize_stack): Update to setup the new commands 'frame apply'
2498 * cli-utils.c (number_or_range_parser::get_number): Only handle
2499 numbers or convenience var as numbers.
2500 (parse_flags): New function.
2501 (parse_flags_qcs): New function.
2502 (number_or_range_parser::finished): Ensure parsing end is detected
2503 before end of string.
2504 * cli-utils.h (parse_flags): New function.
2505 (parse_flags_qcs): New function.
2506 (number_or_range_parser): Remove m_finished bool.
2507 (number_or_range_parser::skip_range): Set m_in_range to false.
2511 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2520 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2521 'unittests/parse-connection-spec-selftests.c'.
2522 (COMMON_SFILES): Add 'common/netstuff.c'.
2523 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2524 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2525 * common/netstuff.c: New file.
2526 * common/netstuff.h: New file.
2527 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2528 (wait_for_connect): Update comment. New parameter
2529 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2530 Use 'sock' directly instead of 'scb->fd'.
2531 (try_connect): New function, with code from 'net_open'.
2532 (net_open): Rewrite main loop to deal with multiple
2533 sockets/addresses. Handle IPv6-style hostnames; implement
2534 support for IPv6 connections.
2535 * unittests/parse-connection-spec-selftests.c: New file.
2540 * remote.c (remote_target::remote_detach_pid): Call
2541 set_current_process.
2545 * h8300-tdep.c (h8300_gdbarch_init): Remove
2546 set_gdbarch_ecoff_reg_to_regnum calls.
2551 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2552 offsets/sizes for static members of a class/struct.
2556 * target-descriptions.c (tdesc_register_bitsize): Rename.
2557 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2558 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2559 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2563 * breakpoint.c (moribund_locations): Now static and a
2565 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2566 (build_bpstat_chain, update_global_location_list)
2567 (breakpoint_retire_moribund): Update.
2568 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2573 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2574 (riscv_register_reggroup_p): Use new function, remove unneeded
2576 (riscv_push_dummy_call): Extend assert to compare against xlen or
2577 flen based on register type.
2581 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2585 * remote.c (show_hardware_watchpoint_limit): New function.
2586 (show_hardware_watchpoint_length_limit): New function.
2587 (show_hardware_breakpoint_limit): New function.
2588 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2589 where appropriate, update help text.
2593 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2594 (CLIBS): Don't mention NAT_CLIBS.
2598 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2599 (LIBGDB_OBS, clean mostlyclean): Update.
2600 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2604 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2605 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2606 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2610 * Makefile.in (ALLDEPFILES): Remove exec.c.
2611 (COMMON_OBS): Remove exec.o.
2612 (COMMON_SFILES): Add exec.c.
2616 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2620 * Makefile.in (clean mostlyclean): Remove stamp-version.
2621 (version.c): Depend on stamp-version.
2622 (stamp-version): New rule, from version.c rule.
2626 * Makefile.in (init.c): Depend on stamp-init.
2627 (stamp-init): New rule, from init.c rule.
2628 (clean mostlyclean): Remove stamp-init.
2632 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2633 SUBDIR_GCC_COMPILE_SRCS.
2637 * Makefile.in (init.c): Remove some unused sed rules.
2641 * Makefile.in (TSOBS): Remove.
2642 (INIT_FILES): Update.
2643 (LIBGDB_OBS): Update.
2644 (COMMON_SFILES): Add inflow.c.
2645 (SFILES): Remove inflow.c.
2649 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2653 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2654 get_saveloc_name, is_signal_frame_name, step_name,
2655 init_remote_name, create_addr_space_name,
2656 destroy_addr_space_name, search_unwind_table_name,
2657 find_dyn_list_name): Constify.
2661 * darwin-nat.c (darwin_pthread_kill): New function.
2662 (darwin_resume_thread): Use darwin_pthread_kill.
2666 * macroexp.c (macro_buffer) <operator=>: New member function.
2670 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2674 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2675 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2676 * maint.c: Likewise.
2681 * NEWS: Create a new section for the next release branch.
2682 Rename the section of the current branch, now that it has
2687 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2688 * version.in: Bump version to 8.2.50.DATE-git.
2693 * linux-nat.c (linux_init_ptrace): Rename to ...
2694 (linux_init_ptrace_procfs): ... this. Call
2695 linux_proc_init_warnings.
2696 (linux_nat_target::post_attach)
2697 (linux_nat_target::post_startup_inferior): Adjust.
2698 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2699 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2703 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2705 (read_comp_unit_head): ... here.
2709 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2710 (stop_tracing, tstatus_command)
2711 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2712 (print_one_static_tracepoint_marker): Update.
2713 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2715 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2717 (all_tracepoints, static_tracepoints_here): Return std::vector.
2721 * common/ptid.c (ptid_equal): Remove.
2722 * common/ptid.h (ptid_equal): Don't declare.
2723 * ada-tasks.c: Update.
2724 * breakpoint.c: Update.
2725 * common/agent.c: Update.
2726 * corelow.c: Update.
2727 * darwin-nat-info.c: Update.
2728 * darwin-nat.c: Update.
2730 * dtrace-probe.c: Update.
2731 * dummy-frame.c: Update.
2732 * fbsd-nat.c: Update.
2734 * gdbthread.h: Update.
2735 * gnu-nat.c: Update.
2736 * go32-nat.c: Update.
2737 * inf-loop.c: Update.
2738 * inf-ptrace.c: Update.
2739 * infcall.c: Update.
2743 * linux-fork.c: Update.
2744 * linux-nat.c: Update.
2745 * linux-thread-db.c: Update.
2746 * mi/mi-cmd-var.c: Update.
2747 * mi/mi-interp.c: Update.
2748 * mi/mi-main.c: Update.
2749 * nto-procfs.c: Update.
2750 * ppc-linux-tdep.c: Update.
2752 * python/py-inferior.c: Update.
2753 * python/py-record-btrace.c: Update.
2754 * python/py-record.c: Update.
2755 * ravenscar-thread.c: Update.
2756 * regcache.c: Update.
2757 * remote-sim.c: Update.
2759 * sol-thread.c: Update.
2762 * tui/tui-stack.c: Update.
2764 * windows-nat.c: Update.
2765 * windows-tdep.c: Update.
2769 * common/ptid.c (ptid_match): Remove.
2770 * common/ptid.h (ptid_match): Don't declare.
2771 * fbsd-nat.c: Update.
2774 * linux-nat.c: Update.
2775 * record-btrace.c: Update.
2776 * regcache.c: Update.
2781 * common/ptid.c (ptid_tid_p): Remove.
2782 * common/ptid.h (ptid_tid_p): Don't declare.
2783 * sol-thread.c: Update.
2787 * common/ptid.c (ptid_lwp_p): Remove.
2788 * common/ptid.h (ptid_lwp_p): Don't declare.
2789 * fbsd-nat.c: Update.
2790 * linux-nat.c: Update.
2791 * nat/linux-procfs.c: Update.
2792 * nat/x86-linux-dregs.c: Update.
2793 * sol-thread.c: Update.
2797 * common/ptid.c (ptid_is_pid): Remove.
2798 * common/ptid.h (ptid_is_pid): Don't declare.
2800 * linux-nat.c: Update.
2801 * mi/mi-interp.c: Update.
2807 * common/ptid.c (ptid_get_tid): Remove.
2808 * common/ptid.h (ptid_get_tid): Don't declare.
2809 * ada-tasks.c: Update.
2810 * aix-thread.c: Update.
2811 * bsd-uthread.c: Update.
2812 * darwin-nat.c: Update.
2813 * fbsd-nat.c: Update.
2814 * i386-darwin-nat.c: Update.
2816 * linux-tdep.c: Update.
2817 * nto-procfs.c: Update.
2818 * ppc-ravenscar-thread.c: Update.
2819 * python/py-infthread.c: Update.
2820 * ravenscar-thread.c: Update.
2821 * sol-thread.c: Update.
2822 * sparc-ravenscar-thread.c: Update.
2823 * windows-nat.c: Update.
2827 * common/ptid.c (ptid_get_lwp): Remove.
2828 * common/ptid.h (ptid_get_lwp): Don't declare.
2829 * aarch64-linux-nat.c: Update.
2830 * ada-tasks.c: Update.
2831 * aix-thread.c: Update.
2832 * amd64-linux-nat.c: Update.
2833 * arm-linux-nat.c: Update.
2834 * corelow.c: Update.
2835 * fbsd-nat.c: Update.
2836 * fbsd-tdep.c: Update.
2837 * gnu-nat.c: Update.
2838 * i386-cygwin-tdep.c: Update.
2839 * i386-gnu-nat.c: Update.
2840 * i386-linux-nat.c: Update.
2841 * ia64-linux-nat.c: Update.
2842 * inf-ptrace.c: Update.
2844 * linux-fork.c: Update.
2845 * linux-nat.c: Update.
2846 * linux-tdep.c: Update.
2847 * linux-thread-db.c: Update.
2848 * mips-linux-nat.c: Update.
2849 * nat/aarch64-linux-hw-point.c: Update.
2850 * nat/aarch64-linux.c: Update.
2851 * nat/linux-btrace.c: Update.
2852 * nat/linux-osdata.c: Update.
2853 * nat/linux-procfs.c: Update.
2854 * nat/x86-linux-dregs.c: Update.
2855 * obsd-nat.c: Update.
2856 * ppc-fbsd-nat.c: Update.
2857 * ppc-linux-nat.c: Update.
2859 * python/py-infthread.c: Update.
2860 * ravenscar-thread.c: Update.
2862 * s390-linux-nat.c: Update.
2863 * sol-thread.c: Update.
2864 * sol2-tdep.c: Update.
2865 * spu-linux-nat.c: Update.
2866 * x86-linux-nat.c: Update.
2867 * xtensa-linux-nat.c: Update.
2871 * common/ptid.c (ptid_get_pid): Remove.
2872 * common/ptid.h (ptid_get_pid): Don't declare.
2873 * aarch64-linux-nat.c: Update.
2874 * ada-lang.c: Update.
2875 * aix-thread.c: Update.
2876 * alpha-bsd-nat.c: Update.
2877 * amd64-fbsd-nat.c: Update.
2878 * amd64-linux-nat.c: Update.
2879 * arm-linux-nat.c: Update.
2880 * arm-nbsd-nat.c: Update.
2882 * break-catch-syscall.c: Update.
2883 * breakpoint.c: Update.
2884 * bsd-uthread.c: Update.
2885 * corelow.c: Update.
2887 * darwin-nat.c: Update.
2888 * fbsd-nat.c: Update.
2889 * fbsd-tdep.c: Update.
2891 * gnu-nat.c: Update.
2892 * hppa-nbsd-nat.c: Update.
2893 * hppa-obsd-nat.c: Update.
2894 * i386-fbsd-nat.c: Update.
2895 * ia64-linux-nat.c: Update.
2896 * inf-ptrace.c: Update.
2898 * inferior.c: Update.
2899 * inferior.h: Update.
2902 * linux-fork.c: Update.
2903 * linux-nat.c: Update.
2904 * linux-tdep.c: Update.
2905 * linux-thread-db.c: Update.
2906 * m68k-bsd-nat.c: Update.
2907 * mi/mi-interp.c: Update.
2908 * mi/mi-main.c: Update.
2909 * mips-linux-nat.c: Update.
2910 * mips-nbsd-nat.c: Update.
2911 * mips64-obsd-nat.c: Update.
2912 * nat/aarch64-linux-hw-point.c: Update.
2913 * nat/aarch64-linux.c: Update.
2914 * nat/linux-btrace.c: Update.
2915 * nat/linux-osdata.c: Update.
2916 * nat/linux-procfs.c: Update.
2917 * nat/x86-linux-dregs.c: Update.
2918 * nto-procfs.c: Update.
2919 * obsd-nat.c: Update.
2920 * ppc-linux-nat.c: Update.
2921 * ppc-nbsd-nat.c: Update.
2922 * ppc-obsd-nat.c: Update.
2923 * proc-service.c: Update.
2925 * python/py-inferior.c: Update.
2926 * python/py-infthread.c: Update.
2927 * ravenscar-thread.c: Update.
2929 * remote-sim.c: Update.
2931 * rs6000-nat.c: Update.
2932 * s390-linux-nat.c: Update.
2933 * sh-nbsd-nat.c: Update.
2934 * sol-thread.c: Update.
2935 * sparc-nat.c: Update.
2936 * sparc64-tdep.c: Update.
2937 * spu-linux-nat.c: Update.
2938 * spu-tdep.c: Update.
2939 * target-debug.h: Update.
2942 * tid-parse.c: Update.
2943 * tracefile-tfile.c: Update.
2944 * vax-bsd-nat.c: Update.
2945 * windows-nat.c: Update.
2946 * x86-linux-nat.c: Update.
2947 * x86-nat.c: Update.
2951 * common/ptid.c (pid_to_ptid): Remove.
2952 * common/ptid.h (pid_to_ptid): Don't declare.
2953 * aix-thread.c: Update.
2954 * arm-linux-nat.c: Update.
2955 * common/ptid.c: Update.
2956 * common/ptid.h: Update.
2957 * corelow.c: Update.
2959 * darwin-nat.c: Update.
2960 * fbsd-nat.c: Update.
2961 * fork-child.c: Update.
2962 * gnu-nat.c: Update.
2963 * go32-nat.c: Update.
2964 * inf-ptrace.c: Update.
2966 * inferior.c: Update.
2968 * linux-fork.c: Update.
2969 * linux-nat.c: Update.
2970 * nat/aarch64-linux-hw-point.c: Update.
2971 * nat/fork-inferior.c: Update.
2972 * nat/x86-linux-dregs.c: Update.
2973 * nto-procfs.c: Update.
2974 * obsd-nat.c: Update.
2976 * progspace.c: Update.
2978 * rs6000-nat.c: Update.
2979 * s390-linux-nat.c: Update.
2980 * sol-thread.c: Update.
2981 * spu-linux-nat.c: Update.
2984 * tracefile-tfile.c: Update.
2985 * windows-nat.c: Update.
2989 * common/ptid.h (ptid_build): Don't declare.
2990 * common/ptid.c (ptid_build): Remove.
2991 * aix-thread.c: Update.
2992 * bsd-kvm.c: Update.
2993 * bsd-uthread.c: Update.
2994 * common/agent.c: Update.
2995 * common/ptid.c: Update.
2996 * common/ptid.h: Update.
2997 * corelow.c: Update.
2998 * darwin-nat.c: Update.
2999 * fbsd-nat.c: Update.
3000 * gnu-nat.c: Update.
3001 * linux-fork.c: Update.
3002 * linux-nat.c: Update.
3003 * linux-thread-db.c: Update.
3004 * nat/linux-osdata.c: Update.
3005 * nat/linux-procfs.c: Update.
3006 * nto-procfs.c: Update.
3007 * obsd-nat.c: Update.
3008 * proc-service.c: Update.
3010 * ravenscar-thread.c: Update.
3011 * remote-sim.c: Update.
3013 * sol-thread.c: Update.
3015 * windows-nat.c: Update.
3019 * infrun.c (follow_exec): Use exit_inferior_silent.
3020 * inferior.c (exit_inferior_num_silent): Remove.
3021 * inferior.h (exit_inferior_num_silent): Don't declare.
3026 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3027 inferior_ptid on error.
3033 * disasm.h (gdb_disassembler): Add
3034 `m_disassembler_options_holder'. member
3035 * disasm.c (get_all_disassembler_options): New function.
3036 (gdb_disassembler::gdb_disassembler): Use it.
3037 (gdb_buffered_insn_length_init_dis): Likewise.
3038 (gdb_buffered_insn_length): Adjust accordingly.
3039 (set_disassembler_options): Handle options with arguments.
3040 (show_disassembler_options_sfunc): Likewise. Add a leading new
3041 line if showing options with descriptions.
3042 (disassembler_options_completer): Adapt to using the
3043 `disasm_options_and_args_t' structure.
3044 * mips-tdep.c (mips_disassembler_options): New variable.
3045 (mips_disassembler_options_o32): Likewise.
3046 (mips_disassembler_options_n32): Likewise.
3047 (mips_disassembler_options_n64): Likewise.
3048 (gdb_print_insn_mips): Don't set `disassembler_options'.
3049 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3051 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3052 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3053 `gdbarch_disassembler_options_implicit' and
3054 `gdbarch_valid_disassembler_options'.
3055 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3056 `disasm_options_and_args_t' structure.
3057 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3059 (valid_disassembler_options): Switch from `disasm_options_t' to
3060 the `disasm_options_and_args_t' structure.
3061 * NEWS: Document `set disassembler-options' support for the MIPS
3063 * gdbarch.h: Regenerate.
3064 * gdbarch.c: Regenerate.
3068 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3072 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3073 parameter in call to amd64_target_description.
3074 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3075 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3076 (amd64fbsd_init_abi): Likewise.
3077 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3078 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3079 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3080 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3084 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3085 "segments" parameter.
3086 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3087 (_initialize_amd64_tdep): Update call to
3088 amd64_create_target_description.
3089 (amd64_target_description): Add "segments" parameter. Adjust
3090 the implementation to use it.
3091 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3092 call to amd64_create_target_description.
3093 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3094 * gdb/arch/amd64.h (amd64_create_target_description): Add
3095 "segments" register.
3096 * gdb/arch/amd64.c (amd64_create_target_description): Add
3097 "segments" parameter. Call create_feature_i386_64bit_segments
3098 only if SEGMENTS is true.
3099 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3100 call to amd64_create_target_description.
3104 * thread.c (thread_target_id_str): New, factored out from ...
3105 (print_thread_info_1): ... here. Use it to compute the max
3106 "Target Id" column width.
3110 * remote.c (remote_target::extra_thread_info): Delete
3111 'display_buf' and 'n' locals. from the cache, regardless of
3112 packet mechanims is in use. Use cache for qThreadExtra and qP
3117 * blockframe.c (find_pc_sect_containing_function): New function.
3118 * breakpoint.c (print_breakpoint_location): Don't call
3119 find_pc_sect_function.
3120 * linespec.c (create_sals_line_offset): Record the location's
3122 * linespec.c (convert_address_location_to_sals): Fill in sal's
3123 symbol with find_pc_sect_containing_function.
3124 * symtab.c (find_function_start_sal): Rename to ...
3125 (find_function_start_sal_1): ... this.
3126 (find_function_start_sal): Reimplement as wrapper around
3127 find_function_start_sal_1, and use
3128 find_pc_sect_containing_function to fill in the sal's symbol.
3129 (find_function_start_sal(symbol*, bool)): Adjust.
3130 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3132 (find_pc_sect_containing_function): Declare.
3136 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3137 true if the the location has no symbol.
3141 * NEWS: Mention --enable-codesign.
3142 * silent-rules.mk (ECHO_SIGN): New variable.
3143 * configure.ac: Add --enable-codesign.
3144 * configure: Rebuild.
3145 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3146 (gdb$(EXEEXT)): Optionally invoke codesign.
3150 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3152 (switch_to_thread_no_regs): Adjust comment.
3153 * infcmd.c (stop_pc): Delete.
3154 (post_create_inferior, info_program_command): Replace references
3155 to stop_pc with references to thread_info->suspend.stop_pc.
3156 * inferior.h (stop_pc): Delete declaration.
3157 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3158 (handle_inferior_event_1, handle_signal_stop)
3159 (process_event_stop_test, keep_going_stepped_thread)
3160 (handle_step_into_function, handle_step_into_function_backward)
3161 (print_stop_location): Replace references to stop_pc with
3162 references to thread_info->suspend.stop_pc.
3163 (struct infcall_suspend_state) <stop_pc>: Delete field.
3164 (save_infcall_suspend_state, restore_infcall_suspend_state):
3165 Remove references to inf_stat->stop_pc.
3166 * linux-fork.c (fork_load_infrun_state): Likewise.
3167 * record-btrace.c (record_btrace_set_replay): Likewise.
3168 * record-full.c (record_full_goto_entry): Likewise.
3169 * remote.c (print_one_stopped_thread): Likewise.
3170 * target.c (target_resume): Extend comment.
3171 * thread.c (set_executing_thread): New.
3172 (set_executing): Use it.
3173 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3174 Remove references to stop_pc.
3178 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3179 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3183 * coffread.c (coff_symfile_finish): Update.
3184 * xcoffread.c (xcoff_symfile_finish): Update.
3185 * elfread.c (elf_symfile_finish): Update.
3186 * symfile.h (dwarf2_free_objfile): Don't declare.
3187 * dwarf2read.c (_initialize_dwarf2_read): Use
3188 register_objfile_data_with_cleanup.
3189 (dwarf2_free_objfile): Now static. Change signature.
3193 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3194 option "-o" to add-symbol-file-load to add an offset to each
3195 section's load address.
3196 * symfile.c (set_objfile_default_section_offset): New function.
3200 * symfile.c (add_symbol_file_command): Make sure that sections
3201 with the same name are sorted in the same order.
3205 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3206 require the second argument. If omitted, load sections at the
3207 addresses specified in the file.
3211 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3212 (_initialize_symfile): Add option "-o" to symbol-file to add an
3213 offset to each section of the symbol file.
3217 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3221 * stack.c (_initialize_stack): Update "func" help text.
3225 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3227 (unwind_infopy_str, pyuw_create_unwind_info)
3228 (unwind_infopy_add_saved_register, pyuw_sniffer)
3229 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3231 (struct saved_reg): Add constructor.
3232 <value>: Now a gdbpy_ref<>.
3236 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3240 * gdb-gdb.py.in: Format using autopep8.
3244 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3245 (type_lookup_function): Recognize CORE_ADDR values.
3249 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3254 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3259 * gdb-gdb.py: Move to...
3260 * gdb-gdb.py.in: ... here.
3261 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3262 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3264 (distclean): Remove gdb-gdb.py when cleaning.
3265 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3266 * configure: Re-generate.
3270 * proc-service.c (get_ps_regcache): New.
3271 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3272 (ps_lsetfpregs): Use it.
3277 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3278 (dwarf_decode_lines_1): Adjust.
3282 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3284 <info_proc>: Likewise.
3288 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3289 to windows_fetch_one_register, and only handle the case of
3290 fetching one register. Move the code that reloads the context
3291 and iterates over all registers if R is negative to...
3292 (windows_nat_target::fetch_registers): ... here.
3293 (do_windows_store_inferior_registers): Rename to
3294 windows_store_one_register, and only handle the case of storing
3295 one register. Move the code that handles the case where r is
3297 (windows_nat_target::store_registers) ... here.
3302 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3303 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3305 (rust_internal_print_type): Add podata parameter.
3306 (rust_print_type): Update.
3310 * typeprint.h (struct print_offset_data) <update, finish,
3311 maybe_print_hole>: New methods.
3312 <indentation>: New constant.
3313 * typeprint.c (print_offset_data::indentation): Define.
3314 (print_offset_data::maybe_print_hole, print_offset_data::update)
3315 (print_offset_data::finish): Move from c-typeprint.c and rename.
3316 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3317 (print_spaces_filtered_with_print_options): Update.
3318 (c_print_type_union_field_offset, maybe_print_hole)
3319 (c_print_type_struct_field_offset): Move to typeprint.c and
3321 (c_type_print_base_struct_union): Update.
3325 * gdbthread.h (thread_info_ref, delete_thread)
3326 (delete_thread_silent, first_thread_of_inferior)
3327 (any_thread_of_inferior, switch_to_thread)
3328 (enable_thread_stack_temporaries)
3329 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3330 (get_last_thread_stack_temporary)
3331 (value_in_thread_stack_temporaries, can_access_registers_thread):
3332 Spell out "struct thread_info" instead of just "thread_info".
3333 * inferior.h (notice_new_inferior): Likewise.
3337 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3338 pass thread_info pointer to delete_thread.
3339 (windows_nat_target::detach): Pass inferior pointer to
3341 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3343 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3344 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3345 and pass a thread_info pointer to delete_thread.
3346 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3347 pass thread_info pointer to delete_thread.
3348 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3349 delete_thread_silent call.
3350 * procfs.c (procfs_target::detach): Pass inferior pointer to
3352 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3353 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3354 delete_thread_silent call.
3355 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3356 pass thread_info pointer to delete_thread.
3357 (windows_nat_target::detach): Pass inferior pointer to
3362 * regcache.c (readable_regcache::read_part): Fix asserts.
3363 (reg_buffer::raw_collect_part): New function.
3364 (regcache::write_part): Fix asserts.
3365 (reg_buffer::raw_supply_part): New function.
3366 (regcache::transfer_regset_register): New helper function.
3367 (regcache::transfer_regset): Call new functions.
3368 (regcache_supply_regset): Use gdb_byte*.
3369 (regcache::supply_regset): Likewise.
3370 (regcache_collect_regset): Likewise.
3371 (regcache::collect_regset): Likewise.
3372 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3373 (reg_buffer::raw_supply_part): Likewise.
3374 (regcache::transfer_regset_register): Likewise.
3375 (regcache::transfer_regset): Use gdb_byte*.
3379 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3383 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3384 instead of a ptid_t. All callers adjusted.
3385 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3387 (print_ada_task_info, display_current_task_id, task_command_1):
3389 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3391 (breakpoint_kind): Adjust.
3392 (remove_breakpoints_pid): Rename to ...
3393 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3394 pointer. All callers adjusted.
3395 (bpstat_clear_actions): Use inferior_thread.
3396 (get_bpstat_thread): New.
3397 (bpstat_do_actions): Use it.
3398 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3399 to take a thread_info pointer. All callers adjusted.
3400 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3401 (breakpoint_re_set_thread): Use inferior_thread.
3402 * breakpoint.h (struct inferior): Forward declare.
3403 (bpstat_stop_status): Update.
3404 (remove_breakpoints_pid): Delete.
3405 (remove_breakpoints_inf): New.
3406 * bsd-uthread.c (bsd_uthread_target::wait)
3407 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3408 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3409 (maint_btrace_packet_history_cmd)
3410 (maint_btrace_clear_packet_history_cmd): Adjust.
3411 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3413 * cli/cli-interp.c: Include "inferior.h".
3414 * common/refcounted-object.h (struct
3415 refcounted_object_ref_policy): New.
3416 * compile/compile-object-load.c: Include gdbthread.h.
3417 (store_regs): Use inferior_thread.
3418 * corelow.c (core_target::close): Use current_inferior.
3419 (core_target_open): Adjust to use first_thread_of_inferior and use
3420 the current inferior.
3421 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3422 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3423 <thread>: ... this new field. All references adjusted.
3424 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3425 Take a thread_info pointer instead of a ptid_t.
3426 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3427 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3428 thread_info pointer instead of a ptid_t.
3429 * elfread.c: Include "inferior.h".
3430 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3431 Use inferior_thread.
3432 * eval.c (evaluate_subexp): Likewise.
3433 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3435 * gdb_proc_service.h (struct thread_info): Forward declare.
3436 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3437 <thread>: ... this new field. All references adjusted.
3438 * gdbarch.h, gdbarch.c: Regenerate.
3439 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3440 'thread' parameter. All implementations and callers adjusted.
3441 * gdbthread.h (thread_info) <set_running>: New method.
3442 (delete_thread, delete_thread_silent): Take a thread_info pointer
3444 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3445 (first_thread_of_process): Delete, replaced by ...
3446 (first_thread_of_inferior): ... this new function. All callers
3448 (any_live_thread_of_process): Delete, replaced by ...
3449 (any_live_thread_of_inferior): ... this new function. All callers
3451 (switch_to_thread, switch_to_no_thread): Declare.
3452 (is_executing): Delete.
3453 (enable_thread_stack_temporaries): Update comment.
3454 <enable_thread_stack_temporaries>: Take a thread_info pointer
3455 instead of a ptid_t. Incref the thread.
3456 <~enable_thread_stack_temporaries>: Decref the thread.
3459 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3460 (get_last_thread_stack_temporary)
3461 (value_in_thread_stack_temporaries, can_access_registers_thread):
3462 Take a thread_info pointer instead of a ptid_t. All callers
3464 * infcall.c (get_call_return_value): Use inferior_thread.
3465 (run_inferior_call): Work with thread pointers instead of ptid_t.
3466 (call_function_by_hand_dummy): Work with thread pointers instead
3467 of ptid_t. Use thread_info_ref.
3468 * infcmd.c (proceed_thread_callback): Access thread's state
3470 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3471 access thread's state directly.
3472 (continue_command): Use inferior_thread.
3473 (info_program_command): Use find_thread_ptid and access thread
3475 (proceed_after_attach_callback): Use thread state directly.
3476 (notice_new_inferior): Take a thread_info pointer instead of a
3477 ptid_t. All callers adjusted.
3478 (exit_inferior): Take an inferior pointer instead of a pid. All
3480 (exit_inferior_silent): New.
3481 (detach_inferior): Delete.
3482 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3483 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3484 (detach_inferior_command, kill_inferior_command): Use
3485 find_inferior_id instead of valid_gdb_inferior_id and
3486 gdb_inferior_id_to_pid.
3487 (inferior_command): Use inferior and thread pointers.
3488 * inferior.h (struct thread_info): Forward declare.
3489 (notice_new_inferior): Take a thread_info pointer instead of a
3490 ptid_t. All callers adjusted.
3491 (detach_inferior): Delete declaration.
3492 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3493 instead of a pid. All callers adjusted.
3494 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3495 (valid_gdb_inferior_id): Delete.
3496 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3497 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3498 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3500 <inf>: ... this new field.
3501 <step_ptid>: Delete, replaced by ...
3502 <step_thread>: ... this new field.
3503 (get_displaced_stepping_state): Take an inferior pointer instead
3504 of a pid. All callers adjusted.
3505 (displaced_step_in_progress_any_inferior): Adjust.
3506 (displaced_step_in_progress_thread): Take a thread pointer instead
3507 of a ptid_t. All callers adjusted.
3508 (displaced_step_in_progress, add_displaced_stepping_state): Take
3509 an inferior pointer instead of a pid. All callers adjusted.
3510 (get_displaced_step_closure_by_addr): Adjust.
3511 (remove_displaced_stepping_state): Take an inferior pointer
3512 instead of a pid. All callers adjusted.
3513 (displaced_step_prepare_throw, displaced_step_prepare)
3514 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3515 All callers adjusted.
3516 (start_step_over): Adjust.
3517 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3518 displaced step queue.
3519 (do_target_resume): Adjust.
3520 (fetch_inferior_event): Use inferior_thread.
3521 (context_switch, get_inferior_stop_soon): Take an
3522 execution_control_state pointer instead of a ptid_t. All callers
3524 (switch_to_thread_cleanup): Delete.
3525 (stop_all_threads): Use scoped_restore_current_thread.
3526 * inline-frame.c: Include "gdbthread.h".
3527 (inline_state) <inline_state>: Take a thread pointer instead of a
3528 ptid_t. All callers adjusted.
3529 <ptid>: Delete, replaced by ...
3530 <thread>: ... this new field.
3531 (find_inline_frame_state): Take a thread pointer instead of a
3532 ptid_t. All callers adjusted.
3533 (skip_inline_frames, step_into_inline_frame)
3534 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3535 pointer instead of a ptid_t. All callers adjusted.
3536 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3537 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3538 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3540 * linux-nat.c (get_detach_signal): Likewise.
3541 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3542 (thread_db_notice_clone): Adjust.
3543 (thread_db_find_new_threads_silently)
3544 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3545 a thread pointer instead of a ptid_t. All callers adjusted.
3546 * mi/mi-cmd-var.c: Include "inferior.h".
3547 (mi_cmd_var_update_iter): Update to use thread pointers.
3548 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3550 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3552 (mi_output_running): ... this new function.
3553 (mi_on_resume_1): Adjust to use it.
3554 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3555 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3557 (interrupt_thread_callback): : Adjust to use thread and inferior
3559 * proc-service.c: Include "gdbthread.h".
3560 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3561 * progspace-and-thread.c: Include "inferior.h".
3562 * progspace.c: Include "inferior.h".
3563 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3564 hold a reference to an inferior_object.
3565 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3567 * python/py-inferior.c (struct inferior_object): Give the type a
3568 tag name instead of a typedef.
3569 (python_on_normal_stop): No need to check if the current thread is
3571 (inferior_to_inferior_object): Change return type to
3572 inferior_object. All callers adjusted.
3573 (find_thread_object): Delete, bits factored out to ...
3574 (thread_to_thread_object): ... this new function.
3575 * python/py-infthread.c (create_thread_object): Use
3576 inferior_to_inferior_object.
3577 (thpy_is_stopped): Use thread pointer directly.
3578 (gdbpy_selected_thread): Use inferior_thread.
3579 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3580 field, replaced with ...
3581 <thread>: ... this new field. All users adjusted.
3582 (btpy_insn_or_gap_new): Drop const.
3583 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3585 * python/py-record.c: Include "gdbthread.h".
3586 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3587 a ptid_t. All callers adjusted.
3588 (gdbpy_current_recording): Use inferior_thread.
3589 * python/py-record.h (recpy_record_object) <ptid>: Delete
3590 field, replaced with ...
3591 <thread>: ... this new field. All users adjusted.
3592 (recpy_element_object) <ptid>: Delete
3593 field, replaced with ...
3594 <thread>: ... this new field. All users adjusted.
3595 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3596 a ptid_t. All callers adjusted.
3597 * python/py-threadevent.c: Include "gdbthread.h".
3598 (get_event_thread): Use thread_to_thread_object.
3599 * python/python-internal.h (struct inferior_object): Forward
3601 (find_thread_object, find_inferior_object): Delete declarations.
3602 (thread_to_thread_object, inferior_to_inferior_object): New
3604 * record-btrace.c: Include "inferior.h".
3605 (require_btrace_thread): Use inferior_thread.
3606 (record_btrace_frame_sniffer)
3607 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3608 (get_thread_current_frame): Use scoped_restore_current_thread and
3610 (get_thread_current_frame): Use thread pointer directly.
3611 (record_btrace_replay_at_breakpoint): Use thread's inferior
3613 * record-full.c: Include "inferior.h".
3614 * regcache.c: Include "gdbthread.h".
3615 (get_thread_arch_regcache): Use the inferior's address space
3617 (get_thread_regcache, registers_changed_thread): New.
3618 * regcache.h (get_thread_regcache(thread_info *thread)): New
3620 (registers_changed_thread): New.
3621 (remote_target) <remote_detach_1>: Swap order of parameters.
3622 (remote_add_thread): <remote_add_thread>: Return the new thread.
3623 (get_remote_thread_info(ptid_t)): New overload.
3624 (remote_target::remote_notice_new_inferior): Use thread pointers
3626 (remote_target::process_initial_stop_replies): Use
3627 thread_info::set_running.
3628 (remote_target::remote_detach_1, remote_target::detach)
3629 (extended_remote_target::detach): Adjust.
3630 * stack.c (frame_show_address): Use inferior_thread.
3631 * target-debug.h (target_debug_print_thread_info_pp): New.
3632 * target-delegates.c: Regenerate.
3633 * target.c (default_thread_address_space): Delete.
3634 (memory_xfer_partial_1): Use current_inferior.
3635 (target_detach): Use current_inferior.
3636 (target_thread_address_space): Delete.
3637 (generic_mourn_inferior): Use current_inferior.
3638 * target.h (struct target_ops) <thread_address_space>: Delete.
3639 (target_thread_address_space): Delete.
3640 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3642 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3643 thread pointer instead of a ptid_t. Adjust all callers.
3644 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3645 (first_thread_of_process): Delete, replaced by ...
3646 (first_thread_of_inferior): ... this new function. All callers
3648 (any_thread_of_process): Rename to ...
3649 (any_thread_of_inferior): ... this, and take an inferior pointer.
3650 (any_live_thread_of_process): Rename to ...
3651 (any_live_thread_of_inferior): ... this, and take an inferior
3653 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3654 (value_in_thread_stack_temporaries)
3655 (get_last_thread_stack_temporary): Take a thread pointer instead
3656 of a ptid_t. Adjust all callers.
3657 (thread_info::set_running): New.
3658 (validate_registers_access): Use inferior_thread.
3659 (can_access_registers_ptid): Rename to ...
3660 (can_access_registers_thread): ... this, and take a thread
3662 (print_thread_info_1): Adjust to compare thread pointers instead
3664 (switch_to_no_thread, switch_to_thread): Make extern.
3665 (scoped_restore_current_thread::~scoped_restore_current_thread):
3666 Use m_thread pointer directly.
3667 (scoped_restore_current_thread::scoped_restore_current_thread):
3668 Use inferior_thread.
3669 (thread_command): Use thread pointer directly.
3670 (thread_num_make_value_helper): Use inferior_thread.
3671 * top.c (execute_command): Use inferior_thread.
3672 * tui/tui-interp.c: Include "inferior.h".
3673 * varobj.c (varobj_create): Use inferior_thread.
3674 (value_of_root_1): Use find_thread_global_id instead of
3675 global_thread_id_to_ptid.
3679 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3681 (regcache::write_part): Likewise.
3682 (readable_regcache::cooked_read_part): Update comment.
3683 (readable_regcache::cooked_write_part): Likewise.
3684 * regcache.h: (readable_regcache::read_part): Likewise.
3685 (regcache::write_part): Likewise.
3690 * aarch64-linux-nat.c (post_attach): New.
3691 (aarch64_linux_nat_target::post_attach): Override post_attach to
3692 record the number of hardware debug registers.
3696 * python/py-param.c (add_setshow_generic): Make parameters const.
3697 (parmpy_init): Update.
3701 * regcache.h (regcache_cooked_read_ftype): Rename to...
3702 (register_read_ftype): ...this, change type to function_view.
3703 (class reg_buffer) <save>: Remove src parameter.
3704 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3705 parameter non-const in first overload. Remove src parameter in
3707 * regcache.c (do_cooked_read): Remove.
3708 (readonly_detached_regcache::readonly_detached_regcache): Make
3709 parameter non-const, adjust call to other constructor.
3710 (reg_buffer::save): Remove src parameter.
3711 * frame.c (do_frame_register_read): Remove.
3712 (frame_save_as_regcache): Use lambda function.
3713 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3714 parameter to ppu2spu_data *.
3715 (ppu2spu_sniffer): Use lambda function.
3719 * record-full.c (record_full_target::insert_breakpoint): Remove
3720 "struct" keyword, add const.
3724 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3725 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3726 * configure.ac: Remove AC_PREREQ, add missing quoting.
3727 * gnulib/configure.ac: Modernize usage of
3728 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3729 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3730 (AUTOMAKE_VERSION): Bump to 1.15.1.
3731 * configure: Re-generate.
3732 * config.in: Re-generate.
3733 * aclocal.m4: Re-generate.
3734 * gnulib/aclocal.m4: Re-generate.
3735 * gnulib/config.in: Re-generate.
3736 * gnulib/configure: Re-generate.
3737 * gnulib/import/Makefile.in: Re-generate.
3741 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3742 (lookup_minimal_symbol_by_pc_section): ... here with
3743 gdb_assert_not_reached added.
3747 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3748 parameter with a block parameter. Compare location's block symbol
3749 with the frame's block instead of addresses.
3750 (skip_inline_frames): Pass the current block instead of the
3751 frame's address. Break out as soon as we determine the frame
3752 should not be skipped.
3756 * solib-aix.c (solib_aix_get_section_offsets): Return
3758 (solib_aix_solib_create_inferior_hook): Update.
3762 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3766 * solib-frv.c (frv_relocate_main_executable): Use
3768 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3773 * objfiles.h (inhibit_section_map_updates): Update.
3774 (resume_section_map_updates, resume_section_map_updates_cleanup):
3776 * solib-svr4.c (svr4_handle_solib_event): Update.
3777 * objfiles.c (inhibit_section_map_updates): Return
3778 scoped_restore_tmpl<int>.
3779 (resume_section_map_updates, resume_section_map_updates_cleanup):
3784 * valprint.h (read_string): Update.
3785 * valprint.c (read_string): Change type of "buffer".
3786 (val_print_string): Update.
3787 * python/py-value.c (valpy_string): Update.
3788 * language.h (struct language_defn) <la_get_string>: Change
3790 (default_get_string, c_get_string): Update.
3791 * language.c (default_get_string): Change type of "buffer".
3792 * guile/scm-value.c (gdbscm_value_to_string): Update.
3793 * c-lang.c (c_get_string): Change type of "buffer".
3797 * ser-mingw.c (struct pipe_state_destroyer): New.
3798 (pipe_state_up): New typedef.
3799 (cleanup_pipe_state): Remove.
3800 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3804 * rust-lang.h (rust_yyerror): Don't declare.
3805 * rust-lang.c (rust_language_defn): Update.
3806 * rust-exp.y (yyerror): Now static.
3807 * parse.c (parse_exp_in_context_1): Update.
3808 * p-lang.h (p_yyerror): Don't declare.
3809 * p-lang.c (p_language_defn): Update.
3810 * p-exp.y (yyerror): Now static.
3811 * opencl-lang.c (opencl_language_defn): Update.
3812 * objc-lang.c (objc_language_defn): Update.
3813 * m2-lang.h (m2_yyerror): Don't declare.
3814 * m2-lang.c (m2_language_defn): Update.
3815 * m2-exp.y (yyerror): Now static.
3816 * language.h (struct language_defn) <la_error>: Remove.
3817 * language.c (unk_lang_error): Remove.
3818 (unknown_language_defn, auto_language_defn): Remove.
3819 * go-lang.h (go_yyerror): Don't declare.
3820 * go-lang.c (go_language_defn): Update.
3821 * go-exp.y (yyerror): Now static.
3822 * f-lang.h (f_yyerror): Don't declare.
3823 * f-lang.c (f_language_defn): Update.
3824 * f-exp.y (yyerror): Now static.
3825 * d-lang.h (d_yyerror): Don't declare.
3826 * d-lang.c (d_language_defn): Update.
3827 * d-exp.y (yyerror): Now static.
3828 * c-lang.h (c_yyerror): Don't declare.
3829 * c-lang.c (c_language_defn, cplus_language_defn)
3830 (asm_language_defn, minimal_language_defn): Update.
3831 * c-exp.y (yyerror): Now static.
3832 * ada-lang.h (ada_yyerror): Don't declare.
3833 * ada-lang.c (ada_language_defn): Update.
3834 * ada-exp.y (yyerror): Now static.
3838 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3839 (store_sveregs_to_thread): Likewise.
3840 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3841 (aarch64_linux_store_inferior_registers): Likewise.
3842 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3844 (aarch64_sve_regs_copy_to_regcache): Likewise.
3845 (aarch64_sve_regs_copy_from_regcache): Likewise.
3846 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3848 (aarch64_sve_regs_copy_to_regcache): Likewise.
3849 (aarch64_sve_regs_copy_from_regcache): Likewise.
3850 (sve_context): Structure from Linux headers.
3851 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3852 (SVE_SIG_ZREG_SIZE): Likewise.
3853 (SVE_SIG_PREG_SIZE): Likewise.
3854 (SVE_SIG_FFR_SIZE): Likewise.
3855 (SVE_SIG_REGS_OFFSET): Likewise.
3856 (SVE_SIG_ZREGS_OFFSET): Likewise.
3857 (SVE_SIG_ZREG_OFFSET): Likewise.
3858 (SVE_SIG_ZREGS_SIZE): Likewise.
3859 (SVE_SIG_PREGS_OFFSET): Likewise.
3860 (SVE_SIG_PREG_OFFSET): Likewise.
3861 (SVE_SIG_PREGS_SIZE): Likewise.
3862 (SVE_SIG_FFR_OFFSET): Likewise.
3863 (SVE_SIG_REGS_SIZE): Likewise.
3864 (SVE_SIG_CONTEXT_SIZE): Likewise.
3865 (SVE_PT_REGS_MASK): Likewise.
3866 (SVE_PT_REGS_FPSIMD): Likewise.
3867 (SVE_PT_REGS_SVE): Likewise.
3868 (SVE_PT_VL_INHERIT): Likewise.
3869 (SVE_PT_VL_ONEXEC): Likewise.
3870 (SVE_PT_REGS_OFFSET): Likewise.
3871 (SVE_PT_FPSIMD_OFFSET): Likewise.
3872 (SVE_PT_FPSIMD_SIZE): Likewise.
3873 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3874 (SVE_PT_SVE_PREG_SIZE): Likewise.
3875 (SVE_PT_SVE_FFR_SIZE): Likewise.
3876 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3877 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3878 (__SVE_SIG_TO_PT): Likewise.
3879 (SVE_PT_SVE_OFFSET): Likewise.
3880 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3881 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3882 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3883 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3884 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3885 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3886 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3887 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3888 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3889 (SVE_PT_SVE_SIZE): Likewise.
3890 (SVE_PT_SIZE): Likewise.
3891 (HAS_SVE_STATE): New define.
3895 * nat/aarch64-sve-linux-sigcontext.h: New file.
3896 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3898 (SVE_VQ_MIN): Likewise.
3899 (SVE_VQ_MAX): Likewise.
3900 (SVE_VL_MIN): Likewise.
3901 (SVE_VL_MAX): Likewise.
3902 (SVE_NUM_ZREGS): Likewise.
3903 (SVE_NUM_PREGS): Likewise.
3904 (sve_vl_valid): Likewise.
3905 (struct user_sve_header): Likewise.
3910 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3911 was requested by GDB.
3915 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3919 * gnulib/update-gnulib.sh: Print expected versions of
3924 * arch-utils.c (default_type_align): Use type_length_units.
3925 * gdbtypes.c (type_align): Use type_length_units.
3929 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3930 of 'define' command.
3935 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3936 get_no_prettyformat_print_options.
3940 * sparc-nat.h: Include target.h.
3941 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3942 <fetch_registers>: Remove this argument in function call.
3943 <store_registers>: Remove this argument in function call, remove
3945 <low_forget_process>: Call sparc64_forget_process instead of
3946 sparc_forget_process.
3950 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3951 (procfs_target::make_corefile_notes): Adjust to new
3952 target_read_alloc return type.
3958 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3959 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3960 Move should_notify_stop local into more inner scope.
3966 * infrun.c (resume_1): Add call to mark_async_event_handler.
3970 * infrun.c (do_target_wait): Change old version of $pc printed.
3974 * dwarf2read.c (read_index_from_section): Rename to...
3975 (read_gdb_index_from_section): ... this, update all callers.
3976 (dwarf2_read_index): Rename to...
3977 (dwarf2_read_gdb_index): ... this, update all callers.
3981 * gdb/hppa-linux-nat.c
3982 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3983 hppa_linux_nat_target::fetch_registers.
3987 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3988 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3989 (AARCH64_DWARF_SVE_FFR): Likewise.
3990 (AARCH64_DWARF_SVE_P0): Likewise.
3991 (AARCH64_DWARF_SVE_Z0): Likewise.
3995 * common/common-regcache.h (raw_compare): New function.
3996 * regcache.c (regcache::raw_compare): Likewise.
3997 * regcache.h (regcache::raw_compare): New declaration.
4001 * common/common-regcache.h (reg_buffer_common): New structure.
4002 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4003 (reg_buffer::raw_supply): Likewise.
4004 (reg_buffer::raw_supply_integer): Likewise.
4005 (reg_buffer::raw_supply_zeroed): Likewise.
4006 (reg_buffer::raw_collect): Likewise.
4007 (reg_buffer::raw_collect_integer): Likewise.
4008 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4009 (reg_buffer::raw_supply): Likewise.
4010 (reg_buffer::raw_supply_integer): Likewise.
4011 (reg_buffer::raw_supply_zeroed): Likewise.
4012 (reg_buffer::raw_collect): Likewise.
4013 (reg_buffer::raw_collect_integer): Likewise.
4017 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4018 (class remote_state) <stop_reply_queue>: Now std::vector.
4019 (remote_state::~remote_state)
4020 (remote_target::stop_reply_queue_length): Update.
4021 (struct queue_iter_param, remove_child_of_pending_fork)
4022 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4023 (check_pending_event_prevents_wildcard_vcont_callback)
4024 (remove_stop_reply_for_inferior)
4025 (remove_stop_reply_of_remote_state)
4026 (remote_notif_remove_once_on_match)
4027 (stop_reply_match_ptid_and_ws)
4028 (remote_kill_child_of_pending_fork): Remove.
4029 (remote_target::remove_new_fork_children)
4030 (remote_target::check_pending_events_prevent_wildcard_vcont)
4031 (remote_target::discard_pending_stop_replies)
4032 (remote_target::discard_pending_stop_replies_in_queue)
4033 (remote_target::remote_notif_remove_queued_reply)
4034 (remote_target::queued_stop_reply)
4035 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4036 (remote_target::wait, remote_target::kill_new_fork_children)
4037 (remote_target::async): Update.
4041 * record-full.c (record_full_arch_list_cleanups): Remove.
4042 (record_full_message): Use try/catch.
4043 (record_full_wait_cleanups): Remove.
4044 (record_full_wait_1): Use try/catch.
4045 (record_full_restore): Likewise.
4049 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4050 declare VEC. Add constructor.
4051 <in_target_beneath>: Now bool.
4052 (record_full_breakpoints): Now a std::vector, static.
4053 (record_full_sync_record_breakpoints)
4054 (record_full_init_record_breakpoints)
4055 (record_full_target::insert_breakpoint)
4056 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4060 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4061 * serial.c (serial_interface_lookup): Remove struct keyword.
4065 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4067 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4069 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4071 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4072 "beneath" as a method.
4073 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4074 Use "beneath" as a method.
4078 * tracefile.c (struct trace_file_writer_deleter): New.
4079 <operator()>: Rename from trace_file_writer_xfree.
4080 (trace_file_writer_up): New typedef.
4081 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4085 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4086 <m_registers, m_register_status>: Change type to
4088 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4093 * common/common-regcache.h (enum register_status): Add
4094 underlying type "signed char".
4095 * regcache.h (reg_buffer) <m_register_status>: Change type to
4097 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4098 register_status instead of signed char.
4099 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4100 (reg_buffer::get_register_status): Remove cast.
4101 (readable_regcache::raw_read): Remove cast.
4102 (readable_regcache::cooked_read): Remove cast.
4106 * source.c (reverse_search_command, forward_search_command): Use
4111 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4112 (serial_ops_list): Now static, std::vector.
4113 (serial_interface_lookup, serial_add_interface): Update.
4117 * dwarf2read.c (process_cu_includes): Update.
4118 (process_full_comp_unit): Update.
4119 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4126 * python/python.c (do_start_initialization):
4127 Avoid call to internal Python API.
4128 (init__gdb_module): New function.
4132 * linux-thread-db.c (valprint.h): New include.
4133 (struct check_thread_db_info): New structure.
4134 (check_thread_db_on_load, tdb_testinfo): New static globals.
4135 (check_thread_db, check_thread_db_callback): New functions.
4136 (try_thread_db_load_1): Run integrity checks if requested.
4137 (maintenance_check_libthread_db): New function.
4138 (_initialize_thread_db): Register "maint check libthread-db"
4139 and "maint set/show check-libthread-db".
4140 * NEWS: Mention the above new commands.
4144 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4149 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4153 * common/btrace-common.h (struct btrace_data): Add constructor,
4154 destructor, move assignment operator.
4155 <empty, clear, fini>: New methods.
4156 <format>: Initialize.
4157 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4158 (btrace_data_empty): Don't declare.
4159 * common/btrace-common.c (btrace_data_init): Remove.
4160 (btrace_data::fini): Rename from btrace_data_fini.
4161 (btrace_data::empty): Rename from btrace_data_empty.
4162 (btrace_data::clear): Rename from btrace_data_clear. Return
4164 * btrace.h (make_cleanup_btrace_data): Don't declare.
4165 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4166 (parse_xml_btrace): Update.
4167 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4168 (maint_btrace_clear_packet_history_cmd): Update.
4172 * target.h (target_ops) <beneath>: Now a method. All references
4174 (class target_stack): New.
4175 * target.c (g_target_stack): New.
4176 (g_current_top_target): Delete.
4177 (current_top_target): Get the top target out of g_target_stack.
4178 (target_stack::push, target_stack::unpush): New.
4179 (push_target, unpush_target): Reimplement.
4180 (target_is_pushed): Reimplement in terms of g_target_stack.
4181 (target_ops::beneath, target_stack::find_beneath): New.
4185 * target.h (find_target_beneath): Delete declaration.
4186 * target.c (find_target_beneath): Delete definition.
4187 * aix-thread.c: All callers of find_target_beneath adjusted to
4188 call target_ops::beneath instead.
4189 * bsd-uthread.c: Likewise.
4190 * linux-thread-db.c: Likewise.
4191 * ravenscar-thread.c: Likewise.
4192 * sol-thread.c: Likewise.
4193 * spu-multiarch.c: Likewise.
4197 * target.h (target_ops) <beneath>: Now a method. All references
4199 (target_ops) <m_beneath>: New.
4200 * target.c (target_ops::beneath): New.
4201 * corelow.c: Adjust all references to target_ops::beneath.
4202 * linux-thread-db.c: Likewise.
4203 * make-target-delegates: Likewise.
4204 * record-btrace.c: Likewise.
4205 * record-full.c: Likewise.
4206 * remote.c: Likewise.
4207 * target.c: Likewise.
4208 * target-delegates.c: Regenerate.
4212 * target.h (target_stack): Delete.
4213 (current_top_target): Declare function.
4214 * target.c (target_stack): Delete.
4215 (g_current_top_target): New.
4216 (current_top_target): New function.
4217 * auxv.c: Use current_top_target instead of target_stack
4219 * avr-tdep.c: Likewise.
4220 * breakpoint.c: Likewise.
4221 * corefile.c: Likewise.
4222 * elfread.c: Likewise.
4224 * exceptions.c: Likewise.
4225 * frame.c: Likewise.
4226 * gdbarch-selftests.c: Likewise.
4227 * gnu-v3-abi.c: Likewise.
4228 * ia64-tdep.c: Likewise.
4229 * ia64-vms-tdep.c: Likewise.
4230 * infcall.c: Likewise.
4231 * infcmd.c: Likewise.
4232 * infrun.c: Likewise.
4233 * linespec.c: Likewise.
4234 * linux-tdep.c: Likewise.
4235 * minsyms.c: Likewise.
4236 * ppc-linux-nat.c: Likewise.
4237 * ppc-linux-tdep.c: Likewise.
4238 * procfs.c: Likewise.
4239 * regcache.c: Likewise.
4240 * remote.c: Likewise.
4241 * rs6000-tdep.c: Likewise.
4242 * s390-linux-nat.c: Likewise.
4243 * s390-tdep.c: Likewise.
4244 * solib-aix.c: Likewise.
4245 * solib-darwin.c: Likewise.
4246 * solib-dsbt.c: Likewise.
4247 * solib-spu.c: Likewise.
4248 * solib-svr4.c: Likewise.
4249 * solib-target.c: Likewise.
4250 * sparc-tdep.c: Likewise.
4251 * sparc64-tdep.c: Likewise.
4252 * spu-tdep.c: Likewise.
4253 * symfile.c: Likewise.
4254 * symtab.c: Likewise.
4255 * target-descriptions.c: Likewise.
4256 * target-memory.c: Likewise.
4257 * target.c: Likewise.
4258 * target.h: Likewise.
4259 * tracefile-tfile.c: Likewise.
4260 * tracepoint.c: Likewise.
4261 * valops.c: Likewise.
4262 * valprint.c: Likewise.
4263 * value.c: Likewise.
4264 * windows-tdep.c: Likewise.
4265 * mi/mi-main.c: Likewise.
4269 * valprint.h (build_address_symbolic): Declare.
4270 * printcmd.c (print_address_symbolic): Update.
4271 (build_address_symbolic): Change "name" and "filename" to
4273 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4275 * defs.h (build_address_symbolic): Remove declaration.
4279 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4280 (aarch64_vnv_type): Add function.
4281 (aarch64_pseudo_register_name): Add V regs for SVE.
4282 (aarch64_pseudo_register_type): Likewise.
4283 (aarch64_pseudo_register_reggroup_p): Likewise.
4284 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4285 (aarch64_pseudo_read_value): Add V regs for SVE.
4286 (aarch64_pseudo_write_2): Use V0 offset for SVE
4287 (aarch64_pseudo_write): Add V regs for SVE.
4288 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4292 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4293 (sve_vl_from_vq): Likewise.
4297 * cli/cli-cmds.c (show_version): Update.
4298 * top.c (print_gdb_version): Add "interactive" parameter.
4300 * main.c (captured_main_1): Update.
4301 * top.h (print_gdb_version): Add "interactive" parameter and a
4306 * common/enum-flags.h: Add trailing semicolon to example in
4312 * NEWS: Add entry about pager.
4313 * utils.c (pagination_disabled_for_command): New global.
4314 (prompt_for_continue): Allow "c" response to prompt.
4315 (reinitialize_more_filter): Clear
4316 pagination_disabled_for_command.
4317 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4321 * ada-lang.h (ada_lookup_symbol_list): Update.
4322 * ada-lang.c (resolve_subexp): Update.
4323 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4325 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4326 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4327 results parameter to std::vector.
4328 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4330 * ada-exp.y (block_lookup): Update.
4331 (select_possible_type_sym): Change type of syms. Remove nsyms
4333 (write_var_or_type, write_name_assoc): Update.
4337 * windows-nat.c (windows_nat_target::xfer_partial): Return
4338 TARGET_XFER_E_IO if we need to delegate to the target beneath
4339 but BENEATH is NULL.
4343 * Makefile.in (config.status): Add configure.nat as a
4348 * cp-name-parser.y (cpname_state): Add method declarations.
4349 (HANDLE_QUAL): Update.
4350 (cpname_state::d_grab, cpname_state::fill_comp)
4351 (cpname_state::make_operator, cpname_state::make_dtor)
4352 (cpname_state::make_builtin_type, cpname_state::make_name)
4353 (cpname_state::d_qualify, cpname_state::d_int_type)
4354 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4355 (%union): Move earlier.
4359 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4363 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4364 (aarch64_pseudo_write_1): Likewise.
4365 (aarch64_pseudo_read_value): Use helper.
4366 (aarch64_pseudo_write): Likewise.
4370 * darwin-nat.c (darwin_ops): Delete.
4371 (darwin_attach_pid): Use get_native_target.
4375 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4376 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4380 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4381 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4382 (aarch64_gdbarch_init): Check for SVE.
4383 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4387 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4388 * aarch64-tdep.h (aarch64_read_description): Likewise.
4389 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4390 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4391 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4392 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4393 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4397 * value.c (value_fetch_lazy_bitfield): New.
4398 (value_fetch_lazy_memory): New.
4399 (value_fetch_lazy_register): New.
4400 (value_fetch_lazy): Factor out to smaller functions.
4404 * cp-name-parser.y (backslashable, represented): Now const.
4408 * cp-name-parser.y: Include parser-defs.h.
4409 (parser_fprintf): Remove declaration.
4413 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4415 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4416 (global_result): Remove globals.
4417 (struct cpname_state): New.
4418 (yyparse): Don't declare.
4419 (yylex, yyerror): Move declarations after %union.
4420 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4421 (make_name): Add state parameter.
4423 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4425 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4427 (yylex): Add lvalp, state parameters.
4428 (yyerror): Add state parameter.
4429 (cp_demangled_name_to_comp): Update.
4433 * cp-name-parser.y (parser_fprintf): Declare.
4434 (GDB_YY_REMAP_PREFIX): Define.
4435 Include yy-remap.h. Don't redefine yy* identifiers.
4439 * python/py-type.c (typy_legacy_template_argument): Update.
4440 * cp-support.h (cp_demangled_name_to_comp): Update.
4441 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4442 parameter to be a "std::string *".
4447 * ada-lex.l: Include "diagnostics.h" instead of
4448 "common/diagnostics.h".
4449 * unittests/environ-selftests.c: Likewise.
4450 * common/diagnostics.h: Moved to ../include.
4454 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4455 to language_mode_manual while calling breakpoint_re_set_one.
4459 * valops.c (value_cast_structs, destructor_name_p): Update.
4460 * symtab.c (gdb_mangle_name): Update.
4461 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4463 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4464 (pascal_object_print_value_fields, pascal_object_print_value):
4466 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4467 * linespec.c (find_methods): Update.
4468 * gdbtypes.h (type_name_no_tag): Remove.
4469 (type_name_or_error): Rename from type_name_no_tag_or_error.
4470 * gdbtypes.c (type_name_no_tag): Remove.
4471 (type_name_or_error): Rename from type_name_no_tag_or_error.
4472 (lookup_struct_elt_type, check_typedef): Update.
4473 * expprint.c (print_subexp_standard): Update.
4474 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4475 * d-namespace.c (d_lookup_nested_symbol): Update.
4476 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4477 (cp_print_class_member): Update.
4478 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4479 * completer.c (add_struct_fields): Update.
4480 * c-typeprint.c (cp_type_print_derivation_info)
4481 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4483 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4484 (ada_prefer_type, ada_is_exception_sym): Update.
4488 * valops.c (enum_constant_from_type, value_namespace_elt)
4489 (value_maybe_namespace_elt): Update.
4490 * valarith.c (find_size_for_pointer_math): Update.
4491 * target-descriptions.c (make_gdb_type): Update.
4492 * symmisc.c (print_symbol): Update.
4493 * stabsread.c (define_symbol, read_type)
4494 (complain_about_struct_wipeout, add_undefined_type)
4495 (cleanup_undefined_types_1): Update.
4496 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4497 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4498 (rust_internal_print_type, rust_composite_type)
4499 (rust_evaluate_funcall, rust_evaluate_subexp)
4500 (rust_inclusive_range_type_p): Update.
4501 * python/py-type.c (typy_get_tag): Update.
4502 * p-typeprint.c (pascal_type_print_base): Update.
4503 * mdebugread.c (parse_symbol, parse_type): Update.
4504 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4506 * guile/scm-type.c (gdbscm_type_tag): Update.
4507 * go-lang.c (sixg_string_p): Update.
4508 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4510 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4511 (TYPE_TAG_NAME): Remove.
4512 * gdbtypes.c (type_name_no_tag): Simplify.
4513 (check_typedef, check_types_equal, recursive_dump_type)
4514 (copy_type_recursive, arch_composite_type): Update.
4515 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4516 in summary mode when needed.
4517 * eval.c (evaluate_funcall): Update.
4518 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4519 (process_structure_scope, read_enumeration_type)
4520 (read_namespace_type, read_module_type, determine_prefix): Update.
4521 * cp-support.c (inspect_type): Update.
4522 * coffread.c (process_coff_symbol, decode_base_type): Update.
4523 * c-varobj.c (c_is_path_expr_parent): Update.
4524 * c-typeprint.c (c_type_print_base_struct_union): Update.
4525 (c_type_print_base_1): Update. Print struct/class/union/enum in
4526 summary when using C language.
4527 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4528 (gen_maybe_namespace_elt): Update.
4529 * ada-lang.c (ada_type_name): Simplify.
4530 (empty_record, ada_template_to_fixed_record_type_1)
4531 (template_to_static_fixed_type)
4532 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4536 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4538 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4539 (c_print_type): Update.
4540 (c_print_type): New overload.
4541 (c_type_print_varspec_prefix, c_type_print_args)
4542 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4543 (c_type_print_base_struct_union, c_type_print_base_1)
4544 (cp_type_print_method_args): Add "language" parameter.
4545 (c_type_print_base): Update.
4546 * c-lang.h (c_print_type): Add new overload.
4550 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4551 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4555 * aarch64-tdep.c (aarch64_sve_register_names): New const
4557 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4558 (AARCH64_SVE_Z_REGS_NUM): New define.
4559 (AARCH64_SVE_P_REGS_NUM): Likewise.
4560 (AARCH64_SVE_NUM_REGS): Likewise.
4564 * nat/linux-ptrace.h [__alpha__]
4565 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4570 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4571 the endianness selected.
4572 * NEWS: Document `set endian auto' mode operation update.
4576 * Makefile.in: Add new header.
4577 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4578 (sve_vl_from_vg): Likewise.
4579 (sve_vq_from_vl): Likewise.
4580 (sve_vl_from_vq): Likewise.
4581 (sve_vq_from_vg): Likewise.
4582 (sve_vg_from_vq): Likewise.
4583 * configure.nat: Add new c file.
4584 * nat/aarch64-sve-linux-ptrace.c: New file.
4585 * nat/aarch64-sve-linux-ptrace.h: New file.
4589 * aarch64-linux-nat.c (aarch64_linux_read_description):
4591 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4593 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4594 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4595 (aarch64_gdbarch_init): Add parmeter zero.
4596 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4597 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4598 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4600 * doc/gdb.texinfo: Describe SVE feature
4601 * features/aarch64-sve.c: New file.
4606 * gdbarch.sh (significant_addr_bit): Default to zero when
4607 not set by target architecture.
4608 * gdbarch.c: Re-generated.
4609 * utils.c (address_significant): Update.
4613 * stack.c (func_command): Remove trailing newline in call to error.
4617 * regcache.h (regcache_raw_collect): Remove, update callers to
4618 use regcache::raw_collect.
4619 * regcache.c (regcache_raw_collect): Remove.
4623 * regcache.h (regcache_raw_supply): Remove, update callers to
4624 use detached_regcache::raw_supply.
4625 * regcache.c (regcache_raw_supply): Remove.
4629 * regcache.h (regcache_cooked_write_part): Remove, update
4630 callers to use regcache::cooked_write_part.
4631 * regcache.c (regcache_cooked_write_part): Remove.
4635 * regcache.h (regcache_cooked_read_part): Remove, update callers
4636 to use readable_regcache::cooked_read_part.
4637 * regcache.c (regcache_cooked_read_part): Remove.
4641 * regcache.h (regcache_cooked_read_value): Remove, update
4642 callers to use readable_regcache::cooked_read_value.
4643 * regcache.c (regcache_cooked_read_value): Remove.
4647 * regcache.h (regcache_cooked_write): Remove, update callers to
4648 use regcache::cooked_write.
4649 * regcache.c (regcache_cooked_write): Remove.
4653 * regcache.h (regcache_invalidate): Remove, update callers to
4654 use detached_regcache::invalidate instead.
4655 * regcache.c (regcache_invalidate): Remove.
4659 * regcache.h (regcache_raw_write_part): Remove, update callers
4660 to use regcache::raw_write_part instead.
4661 * regcache.c (regcache_raw_write_part): Remove.
4665 * regcache.h (regcache_raw_read_part): Remove, update callers to
4666 use readable_regcache::raw_read_part instead.
4667 * regcache.c (regcache_raw_read_part): Remove.
4671 * regcache.h (regcache_cooked_read): Remove, update callers to
4672 use readable_regcache::cooked_read instead.
4673 * regcache.c (regcache_cooked_read): Remove.
4677 * regcache.h (regcache_raw_write): Remove, update callers to use
4678 regcache::raw_write instead.
4679 * regcache.c (regcache_raw_write): Remove.
4683 * regcache.h (regcache_raw_read): Remove, update callers to use
4684 readable_regcache::raw_read instead.
4685 * regcache.c (regcache_raw_read): Remove.
4689 * regcache.h (regcache_raw_update): Remove, update callers to
4690 use readable_regcache::raw_update instead.
4691 * regcache.c (regcache_raw_update): Remove.
4695 * regcache.h (regcache_register_status): Remove, update callers
4696 to use reg_buffer::get_register_status directly instead.
4697 * regcache.c (regcache_register_status): Remove.
4701 * regcache.h (regcache_get_ptid): Remove, update all callers to
4702 call regcache::ptid instead.
4703 * regcache.c (regcache_get_ptid): Remove.
4707 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4711 * common/common-exceptions.h (exception_rethrow): Use
4716 * breakpoint.c (print_solib_event, check_status_catch_solib):
4717 Remove struct keyword in range-based for loops.
4718 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4719 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4721 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4723 * symfile.c (addr_info_make_relative): Likewise.
4724 * thread.c (value_in_thread_stack_temporaries): Likewise.
4729 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4730 aggregate type to get its real type before accessing it.
4734 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4735 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4736 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4737 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4738 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4739 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4740 * printcmd.c (info_address_command): Likewise.
4744 * windows-nat.c (handle_exception): Update fall-through comment.
4748 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4749 (struct program_space) <added_solibs>: Now a std::vector.
4750 * breakpoint.c (print_solib_event): Update.
4751 (check_status_catch_solib): Update.
4752 * progspace.c (clear_program_space_solib_cache): Update.
4753 * solib.c (update_solib_list): Update.
4757 * python/py-type.c (typy_richcompare): Update.
4758 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4759 * gdbtypes.h (types_deeply_equal): Return bool.
4760 (types_equal): Likewise.
4761 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4763 (check_types_equal): Change worklist to std::vector. Return
4765 (struct type_equality_entry): Add constructor.
4766 (compare_maybe_null_strings): Return bool.
4767 (check_types_worklist): Return bool. Change worklist to
4769 (types_deeply_equal): Use std::vector.
4770 (types_equal): Return bool.
4771 (compare_maybe_null_strings): Simplify.
4775 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4779 * objc-lang.h: Don't include cp-support.h.
4780 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4785 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4789 * value.c (value::location): Initialize.
4793 * dbxread.c (init_bincl_list): Remove.
4794 (bincl_list): Now a std::vector.
4795 (bincls_allocated, next_bincl): Remove.
4796 (free_bincl_list, do_free_bincl_list_cleanup)
4797 (make_cleanup_free_bincl_list): Remove.
4798 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4800 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4801 (struct header_file_location): Add constructor.
4802 (add_bincl_to_list): Remove.
4806 * tui/tui.c (tui_enable): Update.
4807 * mi/mi-interp.c (mi_interp::init): Update.
4808 * interps.h (class interp) <name>: New method.
4809 <m_name>: Rename from name.
4810 (~scoped_restore_interp): Update.
4811 * interps.c (interp::interp): Update.
4812 (interp_add, interp_set, interp_lookup_existing)
4813 (current_interp_named_p): Update.
4817 * interps.c (interp_name): Remove.
4818 * mi/mi-interp.c (mi_interp::init): Update.
4819 * interps.h (interp_name): Remove.
4820 (~scoped_restore_interp): Update.
4821 * tui/tui.c (tui_enable): Update.
4825 * utils.c (fputs_maybe_filtered): Update.
4826 * linespec.c (decode_line_full): Update.
4827 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4828 (mi_print_breakpoint_for_event, mi_solib_loaded)
4829 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4830 (mi_user_selected_context_changed): Update.
4831 * mi/mi-main.c (mi_execute_command): Update.
4832 * cli/cli-script.c (execute_control_command): Update.
4833 * python/python.c (execute_gdb_command): Update.
4834 * solib.c (info_sharedlibrary_command): Update.
4835 * interps.c (interp_ui_out): Remove.
4836 * interps.h (interp_ui_out): Remove.
4840 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4841 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4842 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4846 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4847 * interps.c (interp_exec): Use scoped_restore.
4851 * remote.c (remote_target::remote_file_get): Use
4853 (remote_target::remote_file_put): Likewise.
4857 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4859 (get_pe_section_index, add_pe_exported_sym): Update.
4860 (read_pe_exported_syms): Use gdb::def_vector.
4864 * frame.c (remove_prev_frame): Remove.
4865 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4869 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4871 * mips-linux-nat.c (supply_fpregset): Always call
4872 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4873 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4874 `mips_fill_fpregset'.
4875 * mips-linux-tdep.c (mips_supply_fpregset)
4876 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4877 (mips_fill_fpregset_wrapper): Remove functions.
4878 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4879 (mips_linux_fpregset): Remove variable.
4880 (mips_linux_iterate_over_regset_sections): Use
4881 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4882 (mips_linux_o32_sigframe_init): Remove comment.
4886 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4887 (struct readahead_cache, struct packet_reg, struct
4888 remote_arch_state, class remote_state): Move higher up in the
4890 (remote_target::m_remote_state): Now an object instead of a pointer.
4891 (remote_target::get_remote_state): Adjust.
4895 * stack.c (select_and_print_frame): Delete.
4896 (struct function_bounds): Move struct within function.
4897 (func_command): Most content moved into new function
4898 find_frame_for_function, use new function, print result, add
4900 (find_frame_for_function): New function, now returns a result.
4904 * stack.c (iterate_over_block_arg_vars): Fix comment.
4905 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4911 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4913 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4915 * frame.h (class scoped_restore_selected_frame): New class.
4916 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4917 of any exception, use scoped_restore_selected_frame to restore the
4922 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4927 * complaints.c (struct complaints): Remove.
4928 (symfile_complaint_book): Remove.
4929 (series): New global.
4930 (complaint_internal): Update.
4931 (clear_complaints): Update.
4935 * complaints.c (counters): New global.
4936 (struct complain): Remove.
4937 (struct complaints) <root>: Remove.
4938 (complaint_sentinel): Remove.
4939 (symfile_complaint_book): Update.
4940 (find_complaint) Remove.
4941 (complaint_internal, clear_complaints): Update.
4945 * complaints.c (struct complain) <file, line>: Remove.
4946 (find_complaint): Remove file, line parameters.
4947 (complaint_internal): Update.
4951 * complaints.c (vcomplaint): Remove.
4952 (complaint_internal) Merge in contents of vcomplaint.
4956 * complaints.c (struct complaints) <explanation>: Remove.
4957 (symfile_explanations): Remove.
4958 (symfile_complaint_book): Update.
4959 (vcomplaint): Update.
4960 (struct explanation): Remove.
4964 * complaints.c (symfile_complaints): Remove.
4965 (complaint_internal): Remove "complaints" parameter.
4966 (clear_complaints, vcomplaint): Remove "c" parameter.
4967 (get_complaints): Remove.
4968 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4969 (dwarf2_debug_line_missing_file_complaint)
4970 (dwarf2_debug_line_missing_end_sequence_complaint)
4971 (dwarf2_complex_location_expr_complaint)
4972 (dwarf2_const_value_length_mismatch_complaint)
4973 (dwarf2_section_buffer_overflow_complaint)
4974 (dwarf2_macro_malformed_definition_complaint)
4975 (dwarf2_invalid_attrib_class_complaint)
4976 (create_addrmap_from_index, dw2_symtab_iter_next)
4977 (dw2_expand_marked_cus)
4978 (dw2_debug_names_iterator::find_vec_in_debug_names)
4979 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4980 (create_debug_type_hash_table, init_cutu_and_read_dies)
4981 (partial_die_parent_scope, add_partial_enumeration)
4982 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4983 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4984 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4985 (create_cus_hash_table, create_dwp_hash_table)
4986 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4987 (dwarf2_rnglists_process, dwarf2_ranges_process)
4988 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4989 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4990 (handle_struct_member_die, process_structure_scope)
4991 (read_array_type, read_common_block, read_module_type)
4992 (read_tag_pointer_type, read_typedef, read_base_type)
4993 (read_subrange_type, load_partial_dies, partial_die_info::read)
4994 (partial_die_info::read, partial_die_info::read)
4995 (partial_die_info::read, read_checked_initial_length_and_offset)
4996 (dwarf2_string_attr, read_formatted_entries)
4997 (dwarf_decode_line_header)
4998 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4999 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5000 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5001 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5002 (get_signatured_type, get_DW_AT_signature_type)
5003 (decode_locdesc, file_file_name, consume_improper_spaces)
5004 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5005 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5006 (dwarf2_symbol_mark_computed, set_die_type)
5007 (read_attribute_value): Update.
5008 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5010 * dbxread.c (unknown_symtype_complaint)
5011 (lbrac_mismatch_complaint, repeated_header_complaint)
5012 (set_namestring, function_outside_compilation_unit_complaint)
5013 (read_dbx_symtab, process_one_symbol): Update.
5014 * gdbtypes.c (stub_noname_complaint): Update.
5015 * windows-nat.c (handle_unload_dll): Update.
5016 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5017 (decode_base_type): Update.
5018 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5019 (eb_complaint, record_include_begin, record_include_end)
5020 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5021 (process_xcoff_symbol, read_symbol)
5022 (function_outside_compilation_unit_complaint)
5023 (scan_xcoff_symtab): Update.
5024 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5025 * buildsym.c (finish_block_internal, make_blockvector)
5026 (end_symtab_get_static_block, augment_type_symtab): Update.
5027 * dtrace-probe.c (dtrace_process_dof)
5028 (dtrace_static_probe_ops::get_probes): Update.
5029 * complaints.h (struct complaint): Don't declare.
5030 (symfile_complaints): Remove.
5031 (complaint_internal): Remove "complaints" parameter.
5032 (complaint): Likewise.
5033 (clear_complaints): Likewise.
5034 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5035 (reread_symbols): Update.
5036 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5037 (dwarf2_frame_cache, decode_frame_entry): Update.
5038 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5039 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5040 (info_selectors_command): Update.
5041 * macrotab.c (macro_include, check_for_redefinition)
5042 (macro_undef): Update.
5043 * objfiles.c (filter_overlapping_sections): Update.
5044 * stabsread.c (invalid_cpp_abbrev_complaint)
5045 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5046 (define_symbol, error_type, read_type, rs6000_builtin_type)
5047 (stabs_method_name_from_physname, read_member_functions)
5048 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5049 (attach_fields_to_type, complain_about_struct_wipeout)
5050 (read_range_type, read_args, common_block_start)
5051 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5053 * mdebugread.c (index_complaint, unknown_ext_complaint)
5054 (basic_type_complaint, bad_tag_guess_complaint)
5055 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5056 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5057 (parse_procedure, parse_lines)
5058 (function_outside_compilation_unit_complaint)
5059 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5060 (bad_tag_guess_complaint, reg_value_complaint): Update.
5061 * cp-support.c (demangled_name_complaint): Update.
5062 * macroscope.c (sal_macro_scope): Update.
5063 * dwarf-index-write.c (class debug_names): Update.
5067 * complaints.c (clear_complaints): Remove "noisy" parameter.
5068 * complaints.h (clear_complaints): Update.
5069 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5070 (reread_symbols): Update.
5074 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5076 (vcomplaint, clear_complaints): Update.
5077 (symfile_explanations): Remove some messages.
5081 * complaints.c (internal_complaint): Remove.
5082 * complaints.h (internal_complaint): Remove.
5086 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5090 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5091 (remote_fileio_badfd, remote_fileio_return_errno)
5092 (remote_fileio_return_success, remote_fileio_func_open)
5093 (remote_fileio_func_open, remote_fileio_func_close)
5094 (remote_fileio_func_read, remote_fileio_func_write)
5095 (remote_fileio_func_lseek, remote_fileio_func_rename)
5096 (remote_fileio_func_unlink, remote_fileio_func_stat)
5097 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5098 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5099 remote_target parameter.
5100 (remote_fio_func_map) <func>: Add remote_target parameter.
5101 (do_remote_fileio_request, remote_fileio_request):
5102 * remote-fileio.h (remote_fileio_request):
5103 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5104 remote_target parameter.
5105 (remote_notif_process, handle_notification): Adjust to pass down
5107 (remote_notif_state_allocate): Add remote_target parameter. Save
5109 * remote-notif.h (struct remote_target): Forward declare.
5110 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5111 remote_target parameter.
5112 (struct remote_notif_state) <remote>: New field.
5113 (remote_notif_ack, remote_notif_parse): Add remote_target
5115 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5116 remote_target parameter.
5117 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5118 (threads_listing_context, rmt_thread_action, protocol_feature)
5119 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5120 (packet_result, struct threads_listing_context, remote_state):
5121 Move definitions and declarations higher up.
5122 (remote_target) <~remote_target>: Declare.
5123 (remote_download_command_source, remote_file_put, remote_file_get)
5124 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5125 (remote_hostio_pread_vFile, remote_hostio_send_command)
5126 (remote_hostio_set_filesystem, remote_hostio_open)
5127 (remote_hostio_close, remote_hostio_unlink, remote_state)
5128 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5129 (get_memory_write_packet_size, get_memory_read_packet_size)
5130 (append_pending_thread_resumptions, remote_detach_1)
5131 (append_resumption, remote_resume_with_vcont)
5132 (add_current_inferior_and_thread, wait_ns, wait_as)
5133 (process_stop_reply, remote_notice_new_inferior)
5134 (process_initial_stop_replies, remote_add_thread)
5135 (btrace_sync_conf, remote_btrace_maybe_reopen)
5136 (remove_new_fork_children, kill_new_fork_children)
5137 (discard_pending_stop_replies, stop_reply_queue_length)
5138 (check_pending_events_prevent_wildcard_vcont)
5139 (discard_pending_stop_replies_in_queue, stop_reply)
5140 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5141 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5142 (remote_interrupt_as, remote_interrupt_ns)
5143 (remote_get_noisy_reply, remote_query_attached)
5144 (remote_add_inferior, remote_current_thread, get_current_thread)
5145 (set_thread, set_general_thread, set_continue_thread)
5146 (set_general_process, write_ptid)
5147 (remote_unpack_thread_info_response, remote_get_threadinfo)
5148 (parse_threadlist_response, remote_get_threadlist)
5149 (remote_threadlist_iterator, remote_get_threads_with_ql)
5150 (remote_get_threads_with_qxfer)
5151 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5152 (get_offsets, remote_check_symbols, remote_supported_packet)
5153 (remote_query_supported, remote_packet_size)
5154 (remote_serial_quit_handler, remote_detach_pid)
5155 (remote_vcont_probe, remote_resume_with_hc)
5156 (send_interrupt_sequence, interrupt_query)
5157 (remote_notif_get_pending_events, fetch_register_using_p)
5158 (send_g_packet, process_g_packet, fetch_registers_using_g)
5159 (store_register_using_P, store_registers_using_G)
5160 (set_remote_traceframe, check_binary_download)
5161 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5162 (remote_xfer_live_readonly_partial, remote_read_bytes)
5163 (remote_send_printf, remote_flash_write, readchar)
5164 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5165 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5166 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5167 (extended_remote_disable_randomization, extended_remote_run)
5168 (send_environment_packet, extended_remote_environment_support)
5169 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5170 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5171 (packet_command): Now methods of ...
5172 (remote_target): ... this class.
5173 (m_remote_state) <remote_target>: New field.
5174 (struct remote_state) <stop_reply_queue,
5175 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5177 (remote_state::remote_state): Allocate stop_reply_queue.
5178 (remote_state): Delete global.
5179 (get_remote_state_raw): Delete.
5180 (remote_target::get_remote_state): Allocate m_remote_state on
5182 (get_current_remote_target): New.
5183 (remote_ops, extended_remote_ops): Delete.
5184 (wait_forever_enabled_p, remote_async_inferior_event_token):
5185 Delete, moved to struct remote_state.
5186 (remote_target::close): Delete self. Destruction bits split to
5188 (remote_target::~remote_target): ... this.
5189 (show_memory_packet_size): Adjust to use
5190 get_current_remote_target.
5191 (struct protocol_feature) <func>: Add remote_target parameter.
5192 All callers adjusted.
5193 (curr_quit_handler_target): New.
5194 (remote_serial_quit_handler): Reimplement.
5195 (remote_target::open_1): Adjust to use get_current_remote_target.
5196 Heap-allocate remote_target/extended_remote_target instances.
5197 (vcont_builder::vcont_builder): Add remote_target parameter, and
5198 save it in m_remote. All callers adjusted.
5199 (vcont_builder::m_remote): New field.
5200 (vcont_builder::restart, vcont_builder::flush)
5201 (vcont_builder::push_action): Use it.
5202 (remote_target::commit_resume): Use it.
5203 (struct queue_iter_param) <remote>: New field.
5204 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5205 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5206 (check_pending_event_prevents_wildcard_vcont_callback)
5207 (remote_target::check_pending_events_prevent_wildcard_vcont)
5208 (remote_target::discard_pending_stop_replies)
5209 (remote_target::discard_pending_stop_replies_in_queue)
5210 (remote_target::remote_notif_remove_queued_reply): Fill in
5212 (remote_notif_get_pending_events): New.
5213 (remote_target::readchar, remote_target::remote_serial_write):
5214 Save/restore curr_quit_handler_target.
5216 (kill_new_fork_children): Fill in 'remote' field.
5217 (packet_command): Use get_current_remote_target, defer to
5218 remote_target method of same name.
5219 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5220 parameter, and save it in m_remote. All callers adjusted.
5221 (scoped_remote_fd::release): Use m_remote.
5222 (scoped_remote_fd::m_remote): New field.
5223 (remote_file_put, remote_file_get, remote_file_delete): Use
5224 get_current_remote_target, defer to remote_target method of same
5226 (remote_btrace_reset): Add remote_state paremeter. Update all
5228 (remote_async_inferior_event_handler). Pass down 'data'.
5229 (remote_new_objfile): Use get_current_remote_target.
5230 (remote_target::vcont_r_supported): New.
5231 (set_range_stepping): Use get_current_remote_target and
5232 remote_target::vcont_r_supported.
5233 (_initialize_remote): Don't allocate 'remote_state' and
5234 'stop_reply_queue' globals.
5235 * remote.h (struct remote_target): Forward declare.
5236 (getpkt, putpkt, remote_notif_get_pending_events): Add
5237 'remote_target' parameter.
5241 * remote.c (vcont_builder): Now a class. Make all data members
5243 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5245 (vcont_builder_restart): Rename to ...
5246 (vcont_builder::restart): ... this.
5247 (vcont_builder_flush): Rename to ...
5248 (vcont_builder::flush): ... this.
5249 (vcont_builder_push_action): Rename to ...
5250 (vcont_builder::push_action): ... this.
5251 (remote_target::commit_resume): Adjust.
5255 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5256 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5257 (get_fixed_memory_packet_size): New.
5258 (get_memory_packet_size): Use it.
5259 (set_memory_packet_size): Don't override the config size with
5260 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5261 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5262 Don't refer to get_memory_packet_size if not connected to a remote
5263 target. Show "(default)" if configured size is 0.
5267 * remote.c (remote_target::mourn_inferior): Move
5268 discard_pending_stop_replies call here from ...
5269 (_initialize_remote): ... here.
5273 * remote.c (compare_section_command): Remove set_general_process
5278 * remote.c (struct packet_reg, struct remote_arch_state):
5279 Move higher up in the file.
5280 (remote_state) <m_arch_states>: Store remote_arch_state values
5281 instead of remote_arch_state pointers.
5282 (remote_state::get_remote_arch_state): Adjust.
5286 * remote.c: Include <unordered_map>.
5287 (remote_state): Now a class.
5288 (remote_state) <get_remote_arch_state>: Declare method.
5289 <get_remote_arch_state>: New field.
5290 (remote_arch_state) <remote_arch_state>: Declare ctor.
5291 <regs>: Now a unique_ptr.
5292 (remote_gdbarch_data_handle): Delete.
5293 (get_remote_arch_state): Delete.
5294 (remote_state::get_remote_arch_state): New.
5295 (get_remote_state): Adjust to call remote_state's
5296 get_remote_arch_state method.
5297 (init_remote_state): Delete, bits factored out to ...
5298 (remote_arch_state::remote_arch_state): ... this new method.
5299 (get_remote_packet_size, get_memory_packet_size)
5300 (process_g_packet, remote_target::fetch_registers)
5301 (remote_target::prepare_to_store, store_registers_using_G)
5302 (remote_target::store_registers, remote_target::get_trace_status):
5303 Adjust to call remote_state's method.
5304 (_initialize_remote): Remove reference to
5305 remote_gdbarch_data_handle.
5309 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5310 pread>: New method declarations.
5311 (remote_target::open_1): Adjust.
5312 (readahead_cache_invalidate): Rename to ...
5313 (readahead_cache::invalidate): ... this, and adjust to be a class
5315 (readahead_cache_invalidate_fd): Rename to ...
5316 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5318 (remote_hostio_pwrite): Adjust.
5319 (remote_hostio_pread_from_cache): Rename to ...
5320 (readahead_cache::pread): ... this, and adjust to be a class
5322 (remote_hostio_close): Adjust.
5326 * remote.c (remote_hostio_close_cleanup): Delete.
5327 (class scoped_remote_fd): New.
5328 (remote_file_put, remote_file_get): Use it.
5332 (struct vCont_action_support): Use bool and initialize all fields.
5333 (struct readahead_cache): Initialize all fields.
5334 (remote_state): Use bool and initialize all fields.
5335 (remote_state::remote_state, remote_state::~remote_state): New.
5336 (new_remote_state): Delete.
5337 (_initialize_remote): Use new to allocate remote_state.
5343 * c-exp.y: Include "c-support.h".
5344 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5345 of tolower. Use c_ident_is_alpha to scan names.
5346 * c-lang.c: Include "c-support.h".
5347 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5348 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5349 * c-support.h: New file, with bits factored out from ...
5350 * cp-name-parser.y: ... this file.
5351 Include "c-support.h".
5352 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5353 c-support.h and renamed.
5354 (symbol_end, yylex): Adjust.
5358 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5359 parameter type to CORE_ADDR.
5360 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5361 parameter type in declaration to CORE_ADDR.
5362 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5363 target_auxv_search to get AT_HWCAP and use the result to get the
5365 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5366 to CORE_ADDR. Remove the cast of the return value to unsigned
5367 long. Fix error predicate of target_auxv_search.
5368 (ppc_linux_nat_target::read_description): Change the type of the
5369 hwcap variable to CORE_ADDR.
5373 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5374 if the size of fpscr is larger than 32 bits.
5378 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5379 (ppc32_linux_vsxregmap): New global.
5380 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5381 regcache_supply_regset, and regcache_collect_regset.
5382 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5383 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5384 (fetch_vsx_register, store_vsx_register): Remove.
5385 (fetch_vsx_registers): Add regno parameter. Get regset using
5386 ppc_linux_vsxregset. Use regset to supply registers.
5387 (store_vsx_registers): Add regno parameter. Get regset using
5388 ppc_linux_vsxregset. Use regset to collect registers.
5389 (fetch_register): Call fetch_vsx_registers instead of
5391 (store_register): Call store_vsx_registers instead of
5393 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5394 new regno parameter.
5395 (store_ppc_registers): Call store_vsx_registers with -1 for the
5396 new regno parameter.
5397 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5398 (ppc_collect_vsxregset): Remove.
5402 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5404 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5405 for vector register offset fields.
5406 (ppc64_fbsd_reg_offsets): Likewise.
5407 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5408 to vector register offset fields.
5409 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5410 to vector register offset fields.
5411 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5412 vector register offset fields.
5413 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5414 initializers for vector register offset fields.
5415 (rs6000_aix64_reg_offsets): Likewise.
5416 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5417 (ppc_supply_vrregset): Remove.
5418 (ppc_collect_vrregset): Remove.
5419 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5420 (ppc_linux_vrregset) : New function.
5421 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5422 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5423 (ppc32_linux_vrregset): Remove.
5424 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5425 and use result instead of ppc32_linux_vrregset.
5426 (ppc32_linux_reg_offsets): Remove initializers for vector register
5428 (ppc64_linux_reg_offsets): Likewise.
5429 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5430 * ppc-linux-nat.c: Include regset.h.
5431 (gdb_vrregset_t): Adjust comment to account for little-endian
5433 (supply_vrregset, fill_vrregset): Remove.
5434 (fetch_altivec_register, store_altivec_register): Remove.
5435 (fetch_altivec_registers): Add regno parameter. Get regset using
5436 ppc_linux_vrregset. Use regset to supply registers.
5437 (store_altivec_registers): Add regno parameter. Get regset using
5438 ppc_linux_vrregset. Use regset to collect registers.
5439 (fetch_register): Call fetch_altivec_registers instead of
5440 fetch_altivec_register.
5441 (store_register): Call store_altivec_registers instead of
5442 store_altivec_register.
5443 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5444 the new regno parameter.
5445 (store_ppc_registers): Call store_altivec_registers with -1 for
5446 the new regno parameter.
5450 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5451 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5452 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5453 (gdb_vrregset_t): Change array type size to
5454 PPC_LINUX_SIZEOF_VRREGSET.
5455 (gdb_vsxregset_t): Change array type size to
5456 PPC_LINUX_SIZEOF_VSXREGSET.
5457 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5458 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5459 PPC_LINUX_SIZEOF_VSXREGSET.
5463 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5464 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5466 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5467 ppc_linux_target_wordsize with tid.
5468 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5470 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5471 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5472 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5473 tid parameter. Remove static specifier.
5474 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5475 (ppc_linux_target_wordsize): New declaration.
5479 * arch/ppc-linux-common.c: New file.
5480 * arch/ppc-linux-common.h: New file.
5481 * arch/ppc-linux-tdesc.h: New file.
5482 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5483 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5484 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5485 arch/ppc-linux-tdesc.h.
5486 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5487 arch/ppc-linux-tdesc.h.
5488 (ppc_linux_nat_target::read_description): Remove target
5489 description matching code. Fill a ppc_linux_features struct and
5490 call ppc_linux_match_description with it. Move comment about ISA
5491 2.05 to ppc-linux-common.c.
5492 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5493 arch/ppc-linux-tdesc.h.
5494 (ppc_linux_core_read_description): Remove target description
5495 matching code. Fill a ppc_linux_features struct and call
5496 ppc_linux_match_description with it.
5497 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5498 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5499 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5500 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5501 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5502 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5503 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5504 (tdesc_powerpc_e500l): Remove.
5508 * ada-lang.c (catch_assert_command): Pass empty string instead
5509 of NULL for excep_string argument.
5513 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5514 the width of the requested register exceeds the width of the
5519 * printcmd.c (output_command): Remove.
5520 (output_command_const): Rename to output_command.
5521 * valprint.h (output_command): Rename from output_command_const.
5522 * tracepoint.c (trace_dump_actions): Call output_command.
5526 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5527 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5528 * ada-lang.h (create_ada_exception_catchpoint): Update.
5529 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5531 (create_excep_cond_exprs, ~ada_catchpoint)
5532 (should_stop_exception, print_one_exception)
5533 (print_mention_exception, print_recreate_exception): Update.
5534 (ada_get_next_arg): Remove.
5535 (catch_ada_exception_command_split): Use std::string. Change type
5536 of "excep_string", "cond_string".
5537 (catch_ada_exception_command): Update.
5538 (create_ada_exception_catchpoint): Change type of excep_string.
5539 (ada_exception_sal): Remove excep_string parameter.
5540 (~ada_catchpoint): Remove.
5544 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5549 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5550 Return unique_xmalloc_ptr.
5551 (print_it_exception): Update.
5555 * tracepoint.c (trace_dump_actions): Use std::string.
5559 * symfile.c (reread_symbols): Use std::string for original_name.
5563 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5564 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5569 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5571 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5572 * objfiles.c (get_objfile_bfd_data): Allocate
5573 objfile_per_bfd_storage with obstack_new when allocating on
5578 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5580 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5581 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5582 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5583 (add_pending): Likewise.
5584 (parse_symbol): Likewise.
5585 (parse_partial_symbols): Likewise.
5586 (psymtab_to_symtab_1): Likewise.
5587 (new_psymtab): Likewise.
5588 (elfmdebug_build_psymtabs): Likewise.
5589 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5590 * objfiles.c (get_objfile_bfd_data): Likewise.
5591 (objfile_register_static_link): Likewise.
5592 * psymtab.c (allocate_psymtab): Likewise.
5593 * stabsread.c (read_member_functions): Likewise.
5594 * xcoffread.c (xcoff_end_psymtab): Likewise.
5598 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5599 compiler supports std::is_trivially_constructible.
5600 * common/poison.h: Include obstack.h.
5601 (IsMallocable): Define to is_trivially_constructible if the
5602 compiler supports it, define to true_type otherwise.
5606 (XOBNEWVEC): Redefine.
5607 * gdb_obstack.h (obstack_zalloc): New.
5608 (OBSTACK_ZALLOC): Redefine.
5609 (obstack_calloc): New.
5610 (OBSTACK_CALLOC): Redefine.
5612 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5613 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5615 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5616 obstack_calloc/obstack_zalloc.
5617 (gdbarch_obstack_zalloc): Remove.
5618 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5622 * stack.c (backtrace_command_1): Remove useless variable int i.
5626 * stack.c (print_frame_info): Fix comment.
5630 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5631 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5632 (~dwarf2_per_objfile): Update
5633 (dwarf2_get_dwz_file): Use new.
5634 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5639 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5641 * dwarf2read.c (struct dwp_file): Add constructor and
5643 (open_and_init_dwp_file): Return a unique_ptr.
5644 (dwarf2_per_objfile, create_dwp_hash_table)
5645 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5646 (lookup_dwo_unit_in_dwp): Update.
5647 (open_and_init_dwp_file, get_dwp_file): Update.
5651 * dwarf2read.c (dwarf2_per_objfile): Update.
5652 (struct mapped_index): Add initializers.
5653 (dwarf2_read_index): Use new.
5654 (dw2_symtab_iter_init): Update.
5655 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5660 * dwarf2read.c (mapped_index) <total_size>: Remove.
5664 * unittests/format_pieces-selftests.c (test_format_specifier):
5669 * c-typeprint.c (maybe_print_hole): New function.
5670 (c_print_type_struct_field_offset): Update.
5671 (c_type_print_base_struct_union): Call maybe_print_hole.
5675 * breakpoint.c (build_bpstat_chain): New function, moved from
5677 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5678 If no stop chain is passed, call build_bpstat_chain to build it.
5679 * breakpoint.h (build_bpstat_chain): Declare.
5680 (bpstat_stop_status): Move documentation here from breakpoint.c.
5681 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5682 build the stop chain and pass it to skip_inline_frames.
5683 Pass this stop chain to bpstat_stop_status.
5684 * inline-frame.c: Include breakpoint.h.
5685 (stopped_by_user_bp_inline_frame): New function.
5686 (skip_inline_frames): Add parameter `stop_chain'.
5687 Move documention to inline-frame.h.
5688 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5689 whether the frame should be elided.
5690 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5691 Add moved documentation and update for new parameter.
5696 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5697 unittests/format_pieces-selftests.c.
5698 * common/format.h (format_piece) <operator==>: New.
5699 (format_pieces) <operator[]>: Remove.
5700 * common/format.c (format_pieces::format_pieces): Handle \e.
5701 * unittests/format_pieces-selftests.c: New.
5706 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5707 (dw2_instantiate_symtab): Add skip_partial parameter.
5708 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5709 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5710 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5711 (dw2_expand_symtabs_matching_one)
5712 (dw2_find_pc_sect_compunit_symtab)
5713 (dw2_debug_names_lookup_symbol)
5714 (dw2_debug_names_expand_symtabs_for_function): Update.
5715 (init_cutu_and_read_dies): Add skip_partial parameter.
5716 (process_psymtab_comp_unit, build_type_psymtabs_1)
5717 (process_skeletonless_type_unit, load_partial_comp_unit)
5718 (psymtab_to_symtab_1): Update.
5719 (load_full_comp_unit): Add skip_partial parameter.
5720 (process_imported_unit_die, dwarf2_read_addr_index)
5721 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5722 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5723 (read_signatured_type): Update.
5727 * value.c (release_value): Remove unused variable.
5728 (record_latest_value): Likewise.
5729 (access_value_history): Likewise.
5730 (preserve_values): Likewise.
5734 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5740 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5741 Also handle registers whose width is not a multiple of
5743 (linux_nat_trad_target::store_register): Likewise.
5747 * gdbcore.h (core_bfd): Redefine.
5748 * corelow.c (core_target::close): Update.
5749 (core_target_open): Update.
5750 * progspace.h (struct program_space) <cbfd>: Now a
5756 * symfile-add-flags.h (enum symfile_add_flags)
5757 <SYMFILE_NOT_FILENAME>: New constant.
5758 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5759 objfile name from BFD.
5760 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5761 * minidebug.c (find_separate_debug_file_in_section): Put
5762 ".gnu_debugdata" into BFD's file name.
5766 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5772 * aarch64-tdep.c (aarch64_analyze_prologue,
5773 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5774 Indicate not interested in errors.
5778 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5779 Supply the MIPS_ZERO_REGNUM register.
5783 * mips-tdep.c (mask_address_var): Make variable static.
5787 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5791 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5792 FXSAVE_ADDR for the mxcsr register.
5796 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5800 * corelow.c (core_target) <core_target>: No longer inline.
5801 Initialize m_core_gdbarch, m_core_vec and build the section table
5803 <~core_target>: New.
5804 <core_gdbarch, get_core_register_section>: New methods.
5805 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5806 factored out from ...
5807 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5809 (sniff_core_bfd): Add gdbarch parameter.
5810 (core_close): Delete, merged into ...
5811 (core_target::close): ... here. Delete self.
5812 (core_close_cleanup): Delete.
5813 (core_target_open): Allocate a core_target on the heap. Use a
5814 unique_ptr instead of a cleanup. Bits moved into the core_target
5815 ctor. Adjust to use core_target methods instead of globals.
5816 (get_core_register_section): Rename to ...
5817 (core_target::get_core_register_section): ... this and adjust.
5818 (struct get_core_registers_cb_data): New.
5819 (get_core_registers_cb): Use it. Use bool.
5820 (core_target::fetch_registers, core_target::files_info)
5821 (core_target::xfer_partial, core_target::read_description)
5822 (core_target::pid_to, core_target::thread_name): Adjust to
5823 reference class fields instead of globals.
5824 * target.h (struct target_ops_deleter, target_ops_up): New.
5828 * corefile.c (core_file_command): Move to corelow.c.
5829 * corelow.c (the_core_target): Delete.
5830 (core_file_command): Moved from corefile.c. Check exec_bfd
5831 instead of the_core_target. Use target_detach instead of calling
5832 into the_core_target directly.
5833 (maybe_say_no_core_file_now): New.
5834 (core_target::detach): Use it.
5835 (_initialize_corelow): Remove references to the_core_target.
5836 * gdbcore.h (the_core_target): Delete.
5841 * corefile.c (core_bfd): Remove.
5842 * gdbcore.h (core_bfd): Now a macro.
5843 * progspace.h (struct program_space) <cbfd>: New field.
5847 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5852 * configure: Rebuild.
5853 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5858 * regformats/regdat.sh: Adjust script, following the addition
5859 of the new expedite_regs parameter to init_target_desc.
5864 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5865 set_gdbarch_significant_addr_bit.
5866 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5867 set_gdbarch_significant_addr_bit.
5868 * utils.c (address_significant): Update to sign extend addr.
5872 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5873 (xtensa_linux_init_abi): Limit tdep->num_regs by
5874 tdep->num_nopriv_regs.
5875 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5876 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5881 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5885 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5886 (I387_MXCSR_INIT_VAL): New constant.
5887 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5888 buffer if it was supplied by the inferior.
5889 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5890 (i387_xsave_get_clear_bv): New function.
5891 (i387_supply_xsave): Only read x87 control registers from the
5892 xsave buffer if the feature is enabled, and the state will have
5893 been written, otherwise, provide a suitable default.
5894 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5895 including x87 control registers. Update control registers if they
5896 have changed from the default value, and mark features as enabled
5898 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5902 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5906 * configure: Rebuild.
5907 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5912 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5913 bit. Use correct value for VDIV.
5917 * configure: Rebuild.
5918 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5922 * linux-record.c (record_linux_system_call) <case
5923 RECORD_SYS_RECVFROM>: Add "break".
5927 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5928 Add missing "break".
5929 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5930 Add missing "break".
5934 * rs6000-tdep.c (ppc_process_record_op4)
5935 (ppc_process_record_op63): Add fall-through comment.
5939 * i386-tdep.c (i386_process_record): Add fall-through comment.
5943 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5948 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5949 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5950 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5952 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5954 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5959 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5963 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5964 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5965 * symfile.c (section_is_mapped): Fix fall-through comment.
5966 * stabsread.c (define_symbol, read_member_functions): Fix
5967 fall-through comment.
5968 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5970 * remote.c (remote_wait_as): Fix fall-through comment.
5971 * p-exp.y (yylex): Fix fall-through comment.
5972 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5974 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5975 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5976 * jv-exp.y (yylex): Fix fall-through comment.
5977 * go-exp.y (lex_one_token): Fix fall-through comment.
5978 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5979 fall-through comment.
5980 * f-exp.y (yylex): Fix fall-through comment.
5981 * dwarf2read.c (process_die): Fix fall-through comments.
5982 * dbxread.c (process_one_symbol): Fix fall-through comment.
5983 * d-exp.y (lex_one_token): Fix fall-through comment.
5984 * cp-name-parser.y (yylex): Fix fall-through comment.
5985 * coffread.c (coff_symtab_read): Fix fall-through comment.
5986 * c-exp.y (lex_one_token): Fix fall-through comment.
5987 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5989 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5995 * NEWS: Mention gdb.execute change.
5996 * gdbcmd.h (execute_control_command): Don't declare.
5997 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5998 execute_control_commands, execute_control_commands_to_string.
5999 * cli/cli-script.h (execute_control_commands)
6000 (execute_control_commands_to_string): Declare.
6001 (execute_control_command): Add from_tty parameter.
6002 * cli/cli-script.c (execute_control_commands)
6003 (execute_control_commands_to_string): New functions.
6004 (execute_user_command): Use execute_control_commands.
6005 (execute_control_command_1): Add "from_tty" parameter. Update.
6006 (execute_control_command): Likewise.
6011 * NEWS: Mention that breakpoint commands are writable.
6012 * python/py-breakpoint.c (bppy_set_commands): New function.
6013 (breakpoint_object_getset) <"commands">: Use it.
6017 * tracepoint.c (actions_command): Update.
6018 * mi/mi-cmd-break.c (mi_command_line_array)
6019 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6020 (mi_read_next_line): Remove.
6021 (mi_cmd_break_commands): Update.
6022 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6024 * cli/cli-script.c (get_command_line): Update.
6025 (process_next_line): Use function_view. Constify.
6026 (recurse_read_control_structure, read_command_lines)
6027 (read_command_lines_1): Change argument types to function_view.
6028 (do_define_command, document_command): Update.
6029 * breakpoint.h (check_tracepoint_command): Don't declare.
6030 * breakpoint.c (check_tracepoint_command): Remove.
6031 (commands_command_1, create_tracepoint_from_upload): Update.
6036 * cli/cli-script.h (enum command_control_type) <define_control>:
6038 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6039 (build_command_line, execute_control_command_1)
6040 (process_next_line): Likewise.
6041 (do_define_command): New function, extracted from define_command.
6042 (define_command): Use it.
6046 * tracepoint.c (actions_command): Update.
6047 * cli/cli-script.h (read_command_lines): Update.
6048 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6049 (MAX_TMPBUF): Remove define.
6050 (define_command): Use string_printf.
6051 (document_command): Likewise.
6052 * breakpoint.c (commands_command_1): Update.
6056 * top.c (execute_command): Update.
6057 * cli/cli-script.h (print_command_lines): Now varargs.
6058 * cli/cli-script.c (print_command_lines): Now varargs.
6059 (execute_control_command_1) <case while_control, case if_control>:
6064 * tracepoint.c (all_tracepoint_actions): Rename from
6065 all_tracepoint_actions_and_cleanup. Change return type.
6066 (actions_command, encode_actions_1, encode_actions)
6067 (trace_dump_actions, tdump_command): Update.
6068 * remote.c (remote_download_command_source): Update.
6069 * python/python.c (gdbpy_eval_from_control_command)
6070 (python_command, python_interactive_command): Update.
6071 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6072 * guile/guile.c (guile_command)
6073 (gdbscm_eval_from_control_command, guile_command): Update.
6074 * compile/compile.c (compile_code_command)
6075 (compile_print_command, compile_to_object): Update.
6076 * cli/cli-script.h (struct command_lines_deleter): New.
6077 (counted_command_line): New typedef.
6078 (struct command_line): Add constructor, destructor.
6079 <body_list>: Remove.
6080 <body_list_0, body_list_1>: New members.
6081 (command_line_up): Remove typedef.
6082 (read_command_lines, read_command_lines_1, get_command_line):
6084 (copy_command_lines): Don't declare.
6085 * cli/cli-script.c (build_command_line): Use "new".
6086 (get_command_line): Return counted_command_line.
6087 (print_command_lines, execute_user_command)
6088 (execute_control_command_1, while_command, if_command): Update.
6089 (realloc_body_list): Remove.
6090 (process_next_line, recurse_read_control_structure): Update.
6091 (read_command_lines, read_command_lines_1): Return counted_command_line.
6092 (free_command_lines): Use "delete".
6093 (copy_command_lines): Remove.
6094 (define_command, document_command, show_user_1): Update.
6095 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6096 a counted_command_line.
6097 * breakpoint.h (counted_command_line): Remove typedef.
6098 (breakpoint_set_commands): Update.
6099 * breakpoint.c (check_no_tracepoint_commands)
6100 (validate_commands_for_breakpoint): Update.
6101 (breakpoint_set_commands): Change commands to be a
6102 counted_command_line.
6103 (commands_command_1, update_dprintf_command_list)
6104 (create_tracepoint_from_upload): Update.
6108 * cli/cli-decode.h (cmd_list_element): New constructor.
6109 (~cmd_list_element): New destructor.
6110 (struct cmd_list_element): Add initializers.
6111 * cli/cli-decode.c (do_add_cmd): Use "new".
6112 (delete_cmd): Use "delete".
6117 PR breakpoints/19806 and support for PR external/20207.
6118 * NEWS: Mention Aarch64 watchpoint improvements.
6119 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6120 watchpoints and PR external/20207 watchpoints.
6121 * nat/aarch64-linux-hw-point.c
6122 (kernel_supports_any_contiguous_range): New.
6123 (aarch64_watchpoint_offset): New.
6124 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6125 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6126 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6127 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6128 next_addr_orig_p. Support PR external/20207 watchpoints.
6129 (aarch64_downgrade_regs): New.
6130 (aarch64_dr_state_insert_one_point): New parameters offset and
6132 (aarch64_dr_state_remove_one_point): Likewise.
6133 (aarch64_handle_breakpoint): Update caller.
6134 (aarch64_handle_aligned_watchpoint): Likewise.
6135 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6137 (aarch64_linux_set_debug_regs): Remove const from state. Call
6138 aarch64_downgrade_regs.
6139 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6140 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6141 (DR_CONTROL_MASK): ... this.
6142 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6143 (unsigned int aarch64_watchpoint_offset): New prototype.
6144 (aarch64_linux_set_debug_regs): Remove const from state.
6145 * utils.c (align_up, align_down): Move to ...
6146 * common/common-utils.c (align_up, align_down): ... here.
6147 * utils.h (align_up, align_down): Move to ...
6148 * common/common-utils.h (align_up, align_down): ... here.
6152 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6153 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6154 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6155 Re-implement to match the ABI as summarized in GCC's
6156 gcc/config/sparc/sparc.c. All callers updated.
6157 (sparc32_store_arguments): Remove assertion.
6161 * printcmd.c: Don't include tui.h.
6162 (decode_format): Use skip_spaces.
6167 * printcmd.c (last_count): New global.
6168 (x_command): Use saved count when repeating.
6172 * nto-procfs.c (do_closedir_cleanup): Remove.
6173 (procfs_pidlist): Use gdb_dir_up.
6174 * procfs.c (do_closedir_cleanup): Remove.
6175 (proc_update_threads): Use gdb_dir_up.
6176 * common/filestuff.h (struct gdb_dir_deleter): New.
6177 (gdb_dir_up): New typedef.
6181 * ada-lang.c (print_mention_exception): Use std::string.
6185 * ada-lang.c (create_excep_cond_exprs): Update.
6186 (ada_exception_catchpoint_cond_string): Use std::string.
6190 * ada-lang.c (xget_renaming_scope): Return std::string.
6191 (old_renaming_is_invisible): Update.
6195 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6196 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6200 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6204 * remote.c (remote_query_supported_append): Change type.
6205 (remote_check_symbols): Update.
6210 * configure.ac: Prepend libpython.
6211 * python/python-config.py: Likewise.
6212 * configure: Regenerate.
6216 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6221 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6222 override. Write 'true' instead of '1'.
6223 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6228 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6229 add_inf_child_target.
6230 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6231 add_inf_child_target.
6232 * aix-thread.c (aix_thread_target_info): New.
6233 (aix_thread_target) <shortname, longname, doc>: Delete.
6235 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6236 add_inf_child_target.
6237 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6238 add_inf_child_target.
6239 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6240 add_inf_child_target.
6241 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6242 add_inf_child_target.
6243 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6244 add_inf_child_target.
6245 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6246 add_inf_child_target.
6247 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6248 add_inf_child_target.
6249 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6250 add_inf_child_target.
6251 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6252 add_inf_child_target.
6253 * bfd-target.c (target_bfd_target_info): New.
6254 (target_bfd) <shortname, longname, doc>: Delete.
6256 * bsd-kvm.c (bsd_kvm_target_info): New.
6257 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6259 (bsd_kvm_target::open): Rename to ...
6260 (bsd_kvm_target_open): ... this. Adjust.
6261 * bsd-uthread.c (bsd_uthread_target_info): New.
6262 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6264 * corefile.c (core_file_command): Adjust.
6265 * corelow.c (core_target_info): New.
6266 (core_target) <shortname, longname, doc>: Delete.
6268 (core_target::open): Rename to ...
6269 (core_target_open): ... this. Adjust.
6270 * ctf.c (ctf_target_info): New.
6271 (ctf_target) <shortname, longname, doc>: Delete.
6273 (ctf_target::open): Rename to ...
6274 (ctf_target_open): ... this.
6275 (_initialize_ctf): Adjust.
6276 * exec.c (exec_target_info): New.
6277 (exec_target) <shortname, longname, doc>: Delete.
6279 (exec_target::open): Rename to ...
6280 (exec_target_open): ... this.
6281 * gdbcore.h (core_target_open): Declare.
6282 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6283 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6284 add_inf_child_target.
6285 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6286 add_inf_child_target.
6287 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6288 add_inf_child_target.
6289 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6290 add_inf_child_target.
6291 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6292 add_inf_child_target.
6293 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6294 add_inf_child_target.
6295 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6296 add_inf_child_target.
6297 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6298 add_inf_child_target.
6299 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6300 add_inf_child_target.
6301 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6302 add_inf_child_target.
6303 * inf-child.c (inf_child_target_info): New.
6304 (inf_child_target::info): New.
6305 (inf_child_open_target): Remove 'target' parameter. Use
6306 get_native_target instead.
6307 (inf_child_target::open): Delete.
6308 (add_inf_child_target): New.
6309 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6312 (add_inf_child_target): Declare.
6313 (inf_child_open_target): Declare.
6314 * linux-thread-db.c (thread_db_target_info): New.
6315 (thread_db_target) <shortname, longname, doc>: Delete.
6317 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6318 add_inf_child_target.
6319 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6320 add_inf_child_target.
6321 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6322 add_inf_child_target.
6323 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6324 add_inf_child_target.
6325 * make-target-delegates (print_class): Adjust.
6326 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6327 add_inf_child_target.
6328 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6329 add_inf_child_target.
6330 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6331 add_inf_child_target.
6332 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6333 add_inf_child_target.
6334 * nto-procfs.c (nto_native_target_info): New.
6335 (nto_procfs_target_native) <shortname, longname, doc>:
6338 (nto_procfs_target_info): New.
6339 (nto_procfs_target_procfs) <shortname, longname, doc>:
6342 (init_procfs_targets): Adjust.
6343 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6344 add_inf_child_target.
6345 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6346 add_inf_child_target.
6347 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6348 add_inf_child_target.
6349 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6350 add_inf_child_target.
6351 * ravenscar-thread.c (ravenscar_target_info): New.
6352 (ravenscar_thread_target) <shortname, longname, doc>:
6355 * record-btrace.c (record_btrace_target_info):
6356 (record_btrace_target) <shortname, longname, doc>: Delete.
6358 (record_btrace_target::open): Rename to ...
6359 (record_btrace_target_open): ... this. Adjust.
6360 * record-full.c (record_longname, record_doc): New.
6361 (record_full_base_target) <shortname, longname, doc>: Delete.
6363 (record_full_target_info): New.
6364 (record_full_target): <shortname>: Delete.
6366 (record_full_core_open_1, record_full_open_1): Update comments.
6367 (record_full_base_target::open): Rename to ...
6368 (record_full_open): ... this.
6369 (cmd_record_full_restore): Update.
6370 (_initialize_record_full): Update.
6371 * remote-sim.c (remote_sim_target_info): New.
6372 (gdbsim_target) <shortname, longname, doc>: Delete.
6374 (gdbsim_target::open): Rename to ...
6375 (gdbsim_target_open): ... this.
6376 (_initialize_remote_sim): Adjust.
6377 * remote.c (remote_doc): New.
6378 (remote_target_info): New.
6379 (remote_target) <shortname, longname, doc>: Delete.
6381 (extended_remote_target_info): New.
6382 (extended_remote_target) <shortname, longname, doc>: Delete.
6384 (remote_target::open_1): Make static. Adjust.
6385 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6386 * s390-linux-nat.c (_initialize_s390_nat): Use
6387 add_inf_child_target.
6388 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6389 add_inf_child_target.
6390 * sol-thread.c (thread_db_target_info): New.
6391 (sol_thread_target) <shortname, longname, doc>: Delete.
6393 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6394 add_inf_child_target.
6395 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6396 add_inf_child_target.
6397 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6398 add_inf_child_target.
6399 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6400 add_inf_child_target.
6401 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6402 add_inf_child_target.
6403 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6404 add_inf_child_target.
6405 * spu-linux-nat.c (_initialize_spu_nat): Use
6406 add_inf_child_target.
6407 * spu-multiarch.c (spu_multiarch_target_info): New.
6408 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6410 * target-delegates.c: Regenerate.
6411 * target.c: Include <unordered_map>.
6412 (target_ops_p): Delete.
6413 (DEF_VEC_P(target_ops_p)): Delete.
6414 (target_factories): New.
6415 (test_target_info): New.
6416 (test_target_ops::info): New.
6417 (open_target): Adjust to use target_factories.
6418 (add_target_with_completer): Rename to ...
6419 (add_target): ... this. Change prototype. Register target_info
6420 and open callback in target_factories. Register target_info in
6421 command context instead of target_ops.
6422 (add_target): Delete old implementation.
6423 (add_deprecated_target_alias): Change prototype. Adjust.
6424 (the_native_target): New.
6425 (set_native_target, get_native_target): New.
6426 (find_default_run_target): Use the_native_target.
6427 (find_attach_target, find_run_target): Simplify.
6428 (target_ops::open): Delete.
6429 (dummy_target_info): New.
6430 (dummy_target::shortname, dummy_target::longname)
6431 (dummy_target::doc): Delete.
6432 (dummy_target::info): New.
6433 (debug_target::shortname, debug_target::longname)
6434 (debug_target::doc): Delete.
6435 (debug_target::info): New.
6436 * target.h (struct target_info): New.
6437 (target_ops::~target_ops): Add comment.
6438 (target_ops::info): New.
6439 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6440 longer virtual. Implement in terms of target_info.
6441 (set_native_target, get_native_target): Declare.
6442 (target_open_ftype): New.
6443 (add_target, add_target_with_completer)
6444 (add_deprecated_target_alias): Change prototype.
6445 (test_target) <shortname, longname, doc>: Delete.
6447 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6448 add_inf_child_target.
6449 * tracefile-tfile.c (tfile_target_info): New.
6450 (tfile_target) <shortname, longname, doc>: Delete.
6452 (tfile_target::open): Rename to ...
6453 (tfile_target_open): ... this.
6454 (_initialize_tracefile_tfile): Adjust.
6455 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6456 add_inf_child_target.
6457 * windows-nat.c (_initialize_windows_nat): Use
6458 add_inf_child_target.
6459 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6460 add_inf_child_target.
6464 * linux-nat.h (linux_nat_target) <low_new_thread,
6465 low_delete_thread, low_new_fork, low_forget_process,
6466 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6467 New virtual methods.
6468 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6469 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6470 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6471 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6472 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6474 * linux-fork.c (delete_fork): Adjust to call low method.
6475 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6476 (linux_nat_new_fork, linux_nat_forget_process_hook)
6477 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6478 (linux_nat_status_is_event):
6479 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6480 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6482 (sigtrap_is_event): Rename to ...
6483 (linux_nat_target::low_status_is_event): ... this.
6484 (linux_nat_set_status_is_event): Delete.
6485 (save_stop_reason, linux_nat_wait_1)
6486 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6488 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6489 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6490 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6491 (linux_nat_set_prepare_to_resume): Delete.
6492 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6493 low virtual methods.
6494 * amd64-linux-nat.c: Likewise.
6495 * arm-linux-nat.c: Likewise.
6496 * i386-linux-nat.c: Likewise.
6497 * ia64-linux-nat.c: Likewise.
6498 * mips-linux-nat.c: Likewise.
6499 * ppc-linux-nat.c: Likewise.
6500 * s390-linux-nat.c: Likewise.
6501 * sparc64-linux-nat.c: Likewise.
6502 * x86-linux-nat.c: Likewise.
6503 * x86-linux-nat.h: Include "nat/x86-linux.h".
6504 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6505 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6510 * target.h (target_ops)
6511 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6512 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6513 stopped_by_watchpoint, have_continuable_watchpoint,
6514 stopped_data_address, watchpoint_addr_within_range,
6515 can_accel_watchpoint_condition, can_run, thread_alive,
6516 has_all_memory, has_memory, has_stack, has_registers,
6517 has_execution, can_async_p, is_async_p, supports_non_stop,
6518 always_non_stop_p, can_execute_reverse, supports_multi_process,
6519 supports_enable_disable_tracepoint,
6520 supports_disable_randomization, supports_string_tracing,
6521 supports_evaluation_of_breakpoint_conditions,
6522 can_run_breakpoint_commands, filesystem_is_local,
6523 can_download_tracepoint, get_trace_state_variable_value,
6524 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6525 record_is_replaying, record_will_replay,
6526 augmented_libraries_svr4_read>: Adjust to return bool.
6527 * aarch64-linux-nat.c: All implementations adjusted.
6528 * aix-thread.c: All implementations adjusted.
6529 * arm-linux-nat.c: All implementations adjusted.
6530 * breakpoint.c: All implementations adjusted.
6531 * bsd-kvm.c: All implementations adjusted.
6532 * bsd-uthread.c: All implementations adjusted.
6533 * corelow.c: All implementations adjusted.
6534 * ctf.c: All implementations adjusted.
6535 * darwin-nat.c: All implementations adjusted.
6536 * darwin-nat.h: All implementations adjusted.
6537 * exec.c: All implementations adjusted.
6538 * fbsd-nat.c: All implementations adjusted.
6539 * fbsd-nat.h: All implementations adjusted.
6540 * gnu-nat.c: All implementations adjusted.
6541 * gnu-nat.h: All implementations adjusted.
6542 * go32-nat.c: All implementations adjusted.
6543 * ia64-linux-nat.c: All implementations adjusted.
6544 * inf-child.c: All implementations adjusted.
6545 * inf-child.h: All implementations adjusted.
6546 * inf-ptrace.c: All implementations adjusted.
6547 * inf-ptrace.h: All implementations adjusted.
6548 * linux-nat.c: All implementations adjusted.
6549 * linux-nat.h: All implementations adjusted.
6550 * mips-linux-nat.c: All implementations adjusted.
6551 * nto-procfs.c: All implementations adjusted.
6552 * ppc-linux-nat.c: All implementations adjusted.
6553 * procfs.c: All implementations adjusted.
6554 * ravenscar-thread.c: All implementations adjusted.
6555 * record-btrace.c: All implementations adjusted.
6556 * record-full.c: All implementations adjusted.
6557 * remote-sim.c: All implementations adjusted.
6558 * remote.c: All implementations adjusted.
6559 * s390-linux-nat.c: All implementations adjusted.
6560 * sol-thread.c: All implementations adjusted.
6561 * spu-multiarch.c: All implementations adjusted.
6562 * target-delegates.c: All implementations adjusted.
6563 * target.c: All implementations adjusted.
6564 * target.h: All implementations adjusted.
6565 * tracefile-tfile.c: All implementations adjusted.
6566 * tracefile.c: All implementations adjusted.
6567 * tracefile.h: All implementations adjusted.
6568 * windows-nat.c: All implementations adjusted.
6569 * x86-linux-nat.h: All implementations adjusted.
6570 * x86-nat.h: All implementations adjusted.
6574 * make-target-delegates (scan_target_h): Don't trim lines here.
6575 Replace sequences of tabs and/or whitespace with a single
6577 (top level, parsing methods): Trim each line before processing it
6583 * target.h (enum strata) <debug_stratum>: New.
6584 (struct target_ops) <all delegation methods>: Replace by C++
6585 virtual methods, and drop "to_" prefix. All references updated
6587 <to_shortname, to_longname, to_doc, to_data,
6588 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6589 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6590 virtual methods. All references updated throughout.
6591 <can_attach, supports_terminal_ours, can_create_inferior,
6592 get_thread_control_capabilities, attach_no_wait>: New
6594 <insert_breakpoint, remove_breakpoint>: Now
6595 TARGET_DEFAULT_NORETURN methods.
6596 <info_proc>: Now returns bool.
6598 (OPS_MAGIC): Delete.
6599 (current_target): Delete. All references replaced by references
6601 (target_stack): ... this. New.
6602 (target_shortname, target_longname): Adjust.
6603 (target_can_run): Now a function declaration.
6604 (default_child_has_all_memory, default_child_has_memory)
6605 (default_child_has_stack, default_child_has_registers)
6606 (default_child_has_execution): Remove target_ops parameter.
6607 (complete_target_initialization): Delete.
6608 (memory_breakpoint_target): New template class.
6609 (test_target_ops): Refactor as a C++ class with virtual methods.
6610 * make-target-delegates (NAME_PART): Tighten.
6611 (POINTER_PART, CP_SYMBOL): New.
6612 (SIMPLE_RETURN_PART): Reimplement.
6613 (VEC_RETURN_PART): Expect less.
6614 (RETURN_PART, VIRTUAL_PART): New.
6615 (METHOD): Adjust to C++ virtual methods.
6616 (scan_target_h): Remove reference to C99.
6617 (dname): Output "target_ops::" prefix.
6618 (write_function_header): Adjust to output a C++ class method.
6619 (write_declaration): New.
6620 (write_delegator): Adjust to output a C++ class method.
6621 (tdname): Output "dummy_target::" prefix.
6622 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6624 (tdefault_names, debug_names): Delete.
6625 (return_types, tdefaults, styles, argtypes_array): New.
6626 (top level): All methods are delegators.
6628 (top level): Print dummy_target and debug_target classes.
6629 * target-delegates.c: Regenerate.
6630 * target-debug.h (target_debug_print_enum_info_proc_what)
6631 (target_debug_print_thread_control_capabilities)
6632 (target_debug_print_thread_info_p): New.
6633 * target.c (dummy_target): Delete.
6634 (the_dummy_target, the_debug_target): New.
6635 (target_stack): Now extern.
6636 (set_targetdebug): Push/unpush debug target.
6637 (default_child_has_all_memory, default_child_has_memory)
6638 (default_child_has_stack, default_child_has_registers)
6639 (default_child_has_execution): Remove target_ops parameter.
6640 (complete_target_initialization): Delete.
6641 (add_target_with_completer): No longer call
6642 complete_target_initialization.
6643 (target_supports_terminal_ours): Use regular delegation.
6644 (update_current_target): Delete.
6645 (push_target): No longer check magic number. Don't call
6646 update_current_target.
6647 (unpush_target): Don't call update_current_target.
6648 (target_is_pushed): No longer check magic number.
6649 (target_require_runnable): Skip for all stratums over
6651 (target_ops::info_proc): New.
6652 (target_info_proc): Use find_target_at and
6653 find_default_run_target.
6654 (target_supports_disable_randomization): Use regular delegation.
6655 (target_get_osdata): Use find_target_at.
6656 (target_ops::open, target_ops::close, target_ops::can_attach)
6657 (target_ops::attach, target_ops::can_create_inferior)
6658 (target_ops::create_inferior, target_ops::can_run)
6659 (target_can_run): New.
6660 (default_fileio_target): Use regular delegation.
6661 (target_ops::fileio_open, target_ops::fileio_pwrite)
6662 (target_ops::fileio_pread, target_ops::fileio_fstat)
6663 (target_ops::fileio_close, target_ops::fileio_unlink)
6664 (target_ops::fileio_readlink): New.
6665 (target_fileio_open_1, target_fileio_unlink)
6666 (target_fileio_readlink): Always call the target method. Handle
6668 (return_zero, return_zero_has_execution): Delete.
6669 (init_dummy_target): Delete.
6670 (dummy_target::dummy_target, dummy_target::shortname)
6671 (dummy_target::longname, dummy_target::doc)
6672 (debug_target::debug_target, debug_target::shortname)
6673 (debug_target::longname, debug_target::doc): New.
6674 (target_supports_delete_record): Use regular delegation.
6675 (setup_target_debug): Delete.
6676 (maintenance_print_target_stack): Skip debug_stratum.
6677 (initialize_targets): Instantiate the_dummy_target and
6679 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6681 (target_auxv_search, fprint_target_auxv): Adjust.
6682 (info_auxv_command): Adjust to use target_stack.
6683 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6684 * exceptions.c (print_flush): Handle a NULL target_stack.
6685 * regcache.c (target_ops_no_register): Refactor as class with
6688 * exec.c (exec_target): New class.
6689 (exec_ops): Now an exec_target.
6690 (exec_open, exec_close_1, exec_get_section_table)
6691 (exec_xfer_partial, exec_files_info, exec_has_memory)
6692 (exec_make_note_section): Refactor as exec_target methods.
6693 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6695 (exec_target::find_memory_regions): New.
6696 (_initialize_exec): Don't call init_exec_ops.
6697 * gdbcore.h (exec_file_clear): Delete.
6699 * corefile.c (core_target): Delete.
6700 (core_file_command): Adjust.
6701 * corelow.c (core_target): New class.
6702 (the_core_target): New.
6703 (core_close): Remove target_ops parameter.
6704 (core_close_cleanup): Adjust.
6705 (core_target::close): New.
6706 (core_open, core_detach, get_core_registers, core_files_info)
6707 (core_xfer_partial, core_thread_alive, core_read_description)
6708 (core_pid_to_str, core_thread_name, core_has_memory)
6709 (core_has_stack, core_has_registers, core_info_proc): Rework as
6710 core_target methods.
6711 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6712 (_initialize_corelow): Initialize the_core_target.
6713 * gdbcore.h (core_target): Delete.
6714 (the_core_target): New.
6716 * ctf.c: (ctf_target): New class.
6717 (ctf_ops): Now a ctf_target.
6718 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6719 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6720 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6722 (init_ctf_ops): Delete.
6723 (_initialize_ctf): Don't call it.
6724 * tracefile-tfile.c (tfile_target): New class.
6725 (tfile_ops): Now a tfile_target.
6726 (tfile_open, tfile_close, tfile_files_info)
6727 (tfile_get_tracepoint_status, tfile_trace_find)
6728 (tfile_fetch_registers, tfile_xfer_partial)
6729 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6730 Refactor as tfile_target methods.
6731 (tfile_xfer_partial_features): Remove target_ops parameter.
6732 (init_tfile_ops): Delete.
6733 (_initialize_tracefile_tfile): Don't call it.
6734 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6735 (tracefile_has_stack, tracefile_has_registers)
6736 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6737 tracefile_target methods.
6738 (init_tracefile_ops): Delete.
6739 (tracefile_target::tracefile_target): New.
6740 * tracefile.h: Include "target.h".
6741 (tracefile_target): New class.
6742 (init_tracefile_ops): Delete.
6744 * spu-multiarch.c (spu_multiarch_target): New class.
6745 (spu_ops): Now a spu_multiarch_target.
6746 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6747 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6748 (spu_search_memory, spu_mourn_inferior): Refactor as
6749 spu_multiarch_target methods.
6750 (init_spu_ops): Delete.
6751 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6752 complete_target_initialization.
6754 * ravenscar-thread.c (ravenscar_thread_target): New class.
6755 (ravenscar_ops): Now a ravenscar_thread_target.
6756 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6757 (ravenscar_thread_alive, ravenscar_pid_to_str)
6758 (ravenscar_fetch_registers, ravenscar_store_registers)
6759 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6760 (ravenscar_stopped_by_hw_breakpoint)
6761 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6762 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6763 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6765 (init_ravenscar_thread_ops): Delete.
6766 (_initialize_ravenscar): Remove references to
6767 init_ravenscar_thread_ops and complete_target_initialization.
6769 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6770 (bsd_uthread_target): New class.
6771 (bsd_uthread_ops): Now a bsd_uthread_target.
6772 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6773 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6774 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6775 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6776 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6777 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6778 (bsd_uthread_target): Delete function.
6779 (_initialize_bsd_uthread): Remove reference to
6780 complete_target_initialization.
6782 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6783 (target_bfd): ... this new class.
6784 (target_bfd_xfer_partial, target_bfd_get_section_table)
6785 (target_bfd_close): Refactor as target_bfd methods.
6786 (target_bfd::~target_bfd): New.
6787 (target_bfd_reopen): Adjust.
6788 (target_bfd::close): New.
6790 * record-btrace.c (record_btrace_target): New class.
6791 (record_btrace_ops): Now a record_btrace_target.
6792 (record_btrace_open, record_btrace_stop_recording)
6793 (record_btrace_disconnect, record_btrace_close)
6794 (record_btrace_async, record_btrace_info)
6795 (record_btrace_insn_history, record_btrace_insn_history_range)
6796 (record_btrace_insn_history_from, record_btrace_call_history)
6797 (record_btrace_call_history_range)
6798 (record_btrace_call_history_from, record_btrace_record_method)
6799 (record_btrace_is_replaying, record_btrace_will_replay)
6800 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6801 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6802 (record_btrace_store_registers, record_btrace_prepare_to_store)
6803 (record_btrace_to_get_unwinder)
6804 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6805 (record_btrace_commit_resume, record_btrace_wait)
6806 (record_btrace_stop, record_btrace_can_execute_reverse)
6807 (record_btrace_stopped_by_sw_breakpoint)
6808 (record_btrace_supports_stopped_by_sw_breakpoint)
6809 (record_btrace_stopped_by_hw_breakpoint)
6810 (record_btrace_supports_stopped_by_hw_breakpoint)
6811 (record_btrace_update_thread_list, record_btrace_thread_alive)
6812 (record_btrace_goto_begin, record_btrace_goto_end)
6813 (record_btrace_goto, record_btrace_stop_replaying_all)
6814 (record_btrace_execution_direction)
6815 (record_btrace_prepare_to_generate_core)
6816 (record_btrace_done_generating_core): Refactor as
6817 record_btrace_target methods.
6818 (init_record_btrace_ops): Delete.
6819 (_initialize_record_btrace): Remove reference to
6820 init_record_btrace_ops.
6821 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6822 the execution_direction global.
6823 (record_full_base_target, record_full_target)
6824 (record_full_core_target): New classes.
6825 (record_full_ops): Now a record_full_target.
6826 (record_full_core_ops): Now a record_full_core_target.
6827 (record_full_target::detach, record_full_target::disconnect)
6828 (record_full_core_target::disconnect)
6829 (record_full_target::mourn_inferior, record_full_target::kill):
6831 (record_full_open, record_full_close, record_full_async): Refactor
6832 as methods of the record_full_base_target class.
6833 (record_full_resume, record_full_commit_resume): Refactor
6834 as methods of the record_full_target class.
6835 (record_full_wait, record_full_stopped_by_watchpoint)
6836 (record_full_stopped_data_address)
6837 (record_full_stopped_by_sw_breakpoint)
6838 (record_full_supports_stopped_by_sw_breakpoint)
6839 (record_full_stopped_by_hw_breakpoint)
6840 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6841 methods of the record_full_base_target class.
6842 (record_full_store_registers, record_full_xfer_partial)
6843 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6844 Refactor as methods of the record_full_target class.
6845 (record_full_can_execute_reverse, record_full_get_bookmark)
6846 (record_full_goto_bookmark, record_full_execution_direction)
6847 (record_full_record_method, record_full_info, record_full_delete)
6848 (record_full_is_replaying, record_full_will_replay)
6849 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6850 (record_full_stop_replaying): Refactor as methods of the
6851 record_full_base_target class.
6852 (record_full_core_resume, record_full_core_kill)
6853 (record_full_core_fetch_registers)
6854 (record_full_core_prepare_to_store)
6855 (record_full_core_store_registers, record_full_core_xfer_partial)
6856 (record_full_core_insert_breakpoint)
6857 (record_full_core_remove_breakpoint)
6858 (record_full_core_has_execution): Refactor
6859 as methods of the record_full_core_target class.
6860 (record_full_base_target::supports_delete_record): New.
6861 (init_record_full_ops): Delete.
6862 (init_record_full_core_ops): Delete.
6863 (record_full_save): Refactor as method of the
6864 record_full_base_target class.
6865 (_initialize_record_full): Remove references to
6866 init_record_full_ops and init_record_full_core_ops.
6868 * remote.c (remote_target, extended_remote_target): New classes.
6869 (remote_ops): Now a remote_target.
6870 (extended_remote_ops): Now an extended_remote_target.
6871 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6872 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6873 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6874 (remote_pass_signals, remote_set_syscall_catchpoint)
6875 (remote_program_signals, )
6876 (remote_thread_always_alive): Remove target_ops parameter.
6877 (remote_thread_alive, remote_thread_name)
6878 (remote_update_thread_list, remote_threads_extra_info)
6879 (remote_static_tracepoint_marker_at)
6880 (remote_static_tracepoint_markers_by_strid)
6881 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6882 (remote_open): Refactor as methods of remote_target.
6883 (extended_remote_open, extended_remote_detach)
6884 (extended_remote_attach, extended_remote_post_attach):
6885 (extended_remote_supports_disable_randomization)
6886 (extended_remote_create_inferior): : Refactor as method of
6887 extended_remote_target.
6888 (remote_set_permissions, remote_open_1, remote_detach)
6889 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6890 (remote_resume, remote_commit_resume, remote_stop)
6891 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6892 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6893 (remote_prepare_to_store, remote_store_registers)
6894 (remote_flash_erase, remote_flash_done, remote_files_info)
6895 (remote_kill, remote_mourn, remote_insert_breakpoint)
6896 (remote_remove_breakpoint, remote_insert_watchpoint)
6897 (remote_watchpoint_addr_within_range)
6898 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6899 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6900 (remote_supports_stopped_by_sw_breakpoint)
6901 (remote_stopped_by_hw_breakpoint)
6902 (remote_supports_stopped_by_hw_breakpoint)
6903 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6904 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6905 (remote_verify_memory): Refactor as methods of remote_target.
6906 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6908 (remote_xfer_partial, remote_get_memory_xfer_limit)
6909 (remote_search_memory, remote_rcmd, remote_memory_map)
6910 (remote_pid_to_str, remote_get_thread_local_address)
6911 (remote_get_tib_address, remote_read_description): Refactor as
6912 methods of remote_target.
6913 (remote_target::fileio_open, remote_target::fileio_pwrite)
6914 (remote_target::fileio_pread, remote_target::fileio_close): New.
6915 (remote_hostio_readlink, remote_hostio_fstat)
6916 (remote_filesystem_is_local, remote_can_execute_reverse)
6917 (remote_supports_non_stop, remote_supports_disable_randomization)
6918 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6919 (remote_supports_enable_disable_tracepoint)
6920 (remote_supports_string_tracing)
6921 (remote_can_run_breakpoint_commands, remote_trace_init)
6922 (remote_download_tracepoint, remote_can_download_tracepoint)
6923 (remote_download_trace_state_variable, remote_enable_tracepoint)
6924 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6925 (remote_trace_start, remote_get_trace_status)
6926 (remote_get_tracepoint_status, remote_trace_stop)
6927 (remote_trace_find, remote_get_trace_state_variable_value)
6928 (remote_save_trace_data, remote_get_raw_trace_data)
6929 (remote_set_disconnected_tracing, remote_core_of_thread)
6930 (remote_set_circular_trace_buffer, remote_traceframe_info)
6931 (remote_get_min_fast_tracepoint_insn_len)
6932 (remote_set_trace_buffer_size, remote_set_trace_notes)
6933 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6934 (remote_disable_btrace, remote_teardown_btrace)
6935 (remote_read_btrace, remote_btrace_conf)
6936 (remote_augmented_libraries_svr4_read, remote_load)
6937 (remote_pid_to_exec_file, remote_can_do_single_step)
6938 (remote_execution_direction, remote_thread_handle_to_thread_info):
6939 Refactor as methods of remote_target.
6940 (init_remote_ops, init_extended_remote_ops): Delete.
6941 (remote_can_async_p, remote_is_async_p, remote_async)
6942 (remote_thread_events, remote_upload_tracepoints)
6943 (remote_upload_trace_state_variables): Refactor as methods of
6945 (_initialize_remote): Remove references to init_remote_ops and
6946 init_extended_remote_ops.
6948 * remote-sim.c (gdbsim_target): New class.
6949 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6950 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6951 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6952 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6953 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6954 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6955 Refactor as methods of gdbsim_target.
6956 (gdbsim_ops): Now a gdbsim_target.
6957 (init_gdbsim_ops): Delete.
6958 (gdbsim_cntrl_c): Adjust.
6959 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6961 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6962 (the_amd64_linux_nat_target): New.
6963 (amd64_linux_fetch_inferior_registers)
6964 (amd64_linux_store_inferior_registers): Refactor as methods of
6965 amd64_linux_nat_target.
6966 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6967 * i386-linux-nat.c: Don't include "linux-nat.h".
6968 (i386_linux_nat_target): New class.
6969 (the_i386_linux_nat_target): New.
6970 (i386_linux_fetch_inferior_registers)
6971 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6972 as methods of i386_linux_nat_target.
6973 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6974 * inf-child.c (inf_child_ops): Delete.
6975 (inf_child_fetch_inferior_registers)
6976 (inf_child_store_inferior_registers): Delete.
6977 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6978 methods of inf_child_target.
6979 (inf_child_target::supports_terminal_ours)
6980 (inf_child_target::terminal_init)
6981 (inf_child_target::terminal_inferior)
6982 (inf_child_target::terminal_ours_for_output)
6983 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6984 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6986 (inf_child_open, inf_child_disconnect, inf_child_close)
6987 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6988 (inf_child_post_startup_inferior, inf_child_can_run)
6989 (inf_child_pid_to_exec_file): Refactor as methods of
6991 (inf_child_follow_fork): Delete.
6992 (inf_child_target::can_create_inferior)
6993 (inf_child_target::can_attach): New.
6994 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6995 (inf_child_target::has_stack, inf_child_target::has_registers)
6996 (inf_child_target::has_execution): New.
6997 (inf_child_fileio_open, inf_child_fileio_pwrite)
6998 (inf_child_fileio_pread, inf_child_fileio_fstat)
6999 (inf_child_fileio_close, inf_child_fileio_unlink)
7000 (inf_child_fileio_readlink, inf_child_use_agent)
7001 (inf_child_can_use_agent): Refactor as methods of
7003 (return_zero, inf_child_target): Delete.
7004 (inf_child_target::inf_child_target): New.
7005 * inf-child.h: Include "target.h".
7006 (inf_child_target): Delete function prototype.
7007 (inf_child_target): New class.
7008 (inf_child_open_target, inf_child_mourn_inferior)
7009 (inf_child_maybe_unpush_target): Delete.
7010 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7011 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7012 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7013 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7014 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7015 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7016 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7017 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7018 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7019 methods of inf_ptrace_target.
7020 (inf_ptrace_target): Delete function.
7021 * inf-ptrace.h: Include "inf-child.h".
7022 (inf_ptrace_target): Delete function declaration.
7023 (inf_ptrace_target): New class.
7024 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7025 * linux-nat.c (linux_target): New.
7026 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7027 (linux_nat_target::~linux_nat_target): New.
7028 (linux_child_post_attach, linux_child_post_startup_inferior)
7029 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7030 (linux_child_remove_fork_catchpoint)
7031 (linux_child_insert_vfork_catchpoint)
7032 (linux_child_remove_vfork_catchpoint)
7033 (linux_child_insert_exec_catchpoint)
7034 (linux_child_remove_exec_catchpoint)
7035 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7036 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7037 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7038 (linux_nat_stopped_data_address)
7039 (linux_nat_stopped_by_sw_breakpoint)
7040 (linux_nat_supports_stopped_by_sw_breakpoint)
7041 (linux_nat_stopped_by_hw_breakpoint)
7042 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7043 (linux_nat_kill, linux_nat_mourn_inferior)
7044 (linux_nat_xfer_partial, linux_nat_thread_alive)
7045 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7046 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7047 (linux_child_static_tracepoint_markers_by_strid)
7048 (linux_nat_is_async_p, linux_nat_can_async_p)
7049 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7050 (linux_nat_supports_multi_process)
7051 (linux_nat_supports_disable_randomization, linux_nat_async)
7052 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7053 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7054 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7055 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7056 methods of linux_nat_target.
7057 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7058 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7060 (check_stopped_by_watchpoint): Adjust.
7061 (linux_xfer_partial): Delete.
7062 (linux_target_install_ops, linux_target, linux_nat_add_target):
7064 (linux_nat_target::linux_nat_target): New.
7065 * linux-nat.h: Include "inf-ptrace.h".
7066 (linux_nat_target): New.
7067 (linux_target, linux_target_install_ops, linux_nat_add_target):
7068 Delete function declarations.
7069 (linux_target): Declare global.
7070 * linux-thread-db.c (thread_db_target): New.
7071 (thread_db_target::thread_db_target): New.
7072 (thread_db_ops): Delete.
7073 (the_thread_db_target): New.
7074 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7075 (thread_db_update_thread_list, thread_db_pid_to_str)
7076 (thread_db_extra_thread_info)
7077 (thread_db_thread_handle_to_thread_info)
7078 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7079 (thread_db_resume): Refactor as methods of thread_db_target.
7080 (init_thread_db_ops): Delete.
7081 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7082 * x86-linux-nat.c: Don't include "linux-nat.h".
7083 (super_post_startup_inferior): Delete.
7084 (x86_linux_nat_target::~x86_linux_nat_target): New.
7085 (x86_linux_child_post_startup_inferior)
7086 (x86_linux_read_description, x86_linux_enable_btrace)
7087 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7088 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7089 methods of x86_linux_nat_target.
7090 (x86_linux_create_target): Delete. Bits folded ...
7091 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7093 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7094 (x86_linux_nat_target): New class.
7095 (x86_linux_create_target): Delete.
7096 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7097 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7098 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7099 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7100 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7101 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7103 (x86_use_watchpoints): Delete.
7104 * x86-nat.h: Include "breakpoint.h" and "target.h".
7105 (x86_use_watchpoints): Delete.
7106 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7107 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7108 (x86_insert_watchpoint, x86_remove_watchpoint)
7109 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7110 (x86_stopped_by_hw_breakpoint): New declarations.
7111 (x86_nat_target): New template class.
7113 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7114 (the_ppc_linux_nat_target): New.
7115 (ppc_linux_fetch_inferior_registers)
7116 (ppc_linux_can_use_hw_breakpoint)
7117 (ppc_linux_region_ok_for_hw_watchpoint)
7118 (ppc_linux_ranged_break_num_registers)
7119 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7120 (ppc_linux_insert_mask_watchpoint)
7121 (ppc_linux_remove_mask_watchpoint)
7122 (ppc_linux_can_accel_watchpoint_condition)
7123 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7124 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7125 (ppc_linux_watchpoint_addr_within_range)
7126 (ppc_linux_masked_watch_num_registers)
7127 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7128 (ppc_linux_read_description): Refactor as methods of
7129 ppc_linux_nat_target.
7130 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7132 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7133 (procfs_target): New class.
7134 (the_procfs_target): New.
7135 (procfs_target): Delete function.
7136 (procfs_auxv_parse, procfs_attach, procfs_detach)
7137 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7138 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7139 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7140 (procfs_create_inferior, procfs_update_thread_list)
7141 (procfs_thread_alive, procfs_pid_to_str)
7142 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7143 (procfs_stopped_data_address, procfs_insert_watchpoint)
7144 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7145 (proc_find_memory_regions, procfs_info_proc)
7146 (procfs_make_note_section): Refactor as methods of procfs_target.
7147 (_initialize_procfs): Adjust.
7148 * sol-thread.c (sol_thread_target): New class.
7149 (sol_thread_ops): Now a sol_thread_target.
7150 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7151 (sol_thread_fetch_registers, sol_thread_store_registers)
7152 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7153 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7154 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7155 (init_sol_thread_ops): Delete.
7156 (_initialize_sol_thread): Adjust. Remove references to
7157 init_sol_thread_ops and complete_target_initialization.
7159 * windows-nat.c (windows_nat_target): New class.
7160 (windows_fetch_inferior_registers)
7161 (windows_store_inferior_registers, windows_resume, windows_wait)
7162 (windows_attach, windows_detach, windows_pid_to_exec_file)
7163 (windows_files_info, windows_create_inferior)
7164 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7165 (windows_close, windows_pid_to_str, windows_xfer_partial)
7166 (windows_get_tib_address, windows_get_ada_task_ptid)
7167 (windows_thread_name, windows_thread_alive): Refactor as
7168 windows_nat_target methods.
7169 (do_initial_windows_stuff): Adjust.
7170 (windows_target): Delete function.
7171 (_initialize_windows_nat): Adjust.
7173 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7174 (darwin_mourn_inferior, darwin_kill_inferior)
7175 (darwin_create_inferior, darwin_attach, darwin_detach)
7176 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7177 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7178 (darwin_supports_multi_process): Refactor as darwin_nat_target
7180 (darwin_resume_to, darwin_files_info): Delete.
7181 (_initialize_darwin_inferior): Rename to ...
7182 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7183 * darwin-nat.h: Include "inf-child.h".
7184 (darwin_nat_target): New class.
7185 (darwin_complete_target): Delete.
7186 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7187 (darwin_target): New.
7188 (i386_darwin_fetch_inferior_registers)
7189 (i386_darwin_store_inferior_registers): Refactor as methods of
7191 (darwin_complete_target): Delete, with ...
7192 (_initialize_i386_darwin_nat): ... bits factored out here.
7194 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7195 (the_alpha_linux_nat_target): New.
7196 (alpha_linux_register_u_offset): Refactor as
7197 alpha_linux_nat_target method.
7198 (_initialize_alpha_linux_nat): Adjust.
7199 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7200 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7201 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7202 methods of linux_nat_trad_target.
7203 (linux_trad_target): Delete.
7204 * linux-nat-trad.h (linux_trad_target): Delete function.
7205 (linux_nat_trad_target): New class.
7206 * mips-linux-nat.c (mips_linux_nat_target): New class.
7207 (super_fetch_registers, super_store_registers, super_close):
7209 (the_mips_linux_nat_target): New.
7210 (mips64_linux_regsets_fetch_registers)
7211 (mips64_linux_regsets_store_registers)
7212 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7213 (mips_linux_register_u_offset, mips_linux_read_description)
7214 (mips_linux_can_use_hw_breakpoint)
7215 (mips_linux_stopped_by_watchpoint)
7216 (mips_linux_stopped_data_address)
7217 (mips_linux_region_ok_for_hw_watchpoint)
7218 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7219 (mips_linux_close): Refactor as methods of mips_linux_nat.
7220 (_initialize_mips_linux_nat): Adjust to C++ification.
7222 * aix-thread.c (aix_thread_target): New class.
7223 (aix_thread_ops): Now an aix_thread_target.
7224 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7225 (aix_thread_fetch_registers, aix_thread_store_registers)
7226 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7227 (aix_thread_thread_alive, aix_thread_pid_to_str)
7228 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7229 Refactor as methods of aix_thread_target.
7230 (init_aix_thread_ops): Delete.
7231 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7232 and complete_target_initialization.
7233 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7234 (rs6000_nat_target): New class.
7235 (the_rs6000_nat_target): New.
7236 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7237 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7238 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7239 (super_create_inferior): Delete.
7240 (_initialize_rs6000_nat): Adjust to C++ification.
7242 * arm-linux-nat.c (arm_linux_nat_target): New class.
7243 (the_arm_linux_nat_target): New.
7244 (arm_linux_fetch_inferior_registers)
7245 (arm_linux_store_inferior_registers, arm_linux_read_description)
7246 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7247 (arm_linux_remove_hw_breakpoint)
7248 (arm_linux_region_ok_for_hw_watchpoint)
7249 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7250 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7251 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7252 arm_linux_nat_target.
7253 (_initialize_arm_linux_nat): Adjust to C++ification.
7255 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7256 (the_aarch64_linux_nat_target): New.
7257 (aarch64_linux_fetch_inferior_registers)
7258 (aarch64_linux_store_inferior_registers)
7259 (aarch64_linux_child_post_startup_inferior)
7260 (aarch64_linux_read_description)
7261 (aarch64_linux_can_use_hw_breakpoint)
7262 (aarch64_linux_insert_hw_breakpoint)
7263 (aarch64_linux_remove_hw_breakpoint)
7264 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7265 (aarch64_linux_region_ok_for_hw_watchpoint)
7266 (aarch64_linux_stopped_data_address)
7267 (aarch64_linux_stopped_by_watchpoint)
7268 (aarch64_linux_watchpoint_addr_within_range)
7269 (aarch64_linux_can_do_single_step): Refactor as methods of
7270 aarch64_linux_nat_target.
7271 (super_post_startup_inferior): Delete.
7272 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7274 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7275 (the_hppa_linux_nat_target): New.
7276 (hppa_linux_fetch_inferior_registers)
7277 (hppa_linux_store_inferior_registers): Refactor as methods of
7278 hppa_linux_nat_target.
7279 (_initialize_hppa_linux_nat): Adjust to C++ification.
7281 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7282 (the_ia64_linux_nat_target): New.
7283 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7284 (ia64_linux_stopped_data_address)
7285 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7286 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7287 ia64_linux_nat_target methods.
7288 (super_xfer_partial): Delete.
7289 (_initialize_ia64_linux_nat): Adjust to C++ification.
7291 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7292 (the_m32r_linux_nat_target): New.
7293 (m32r_linux_fetch_inferior_registers)
7294 (m32r_linux_store_inferior_registers): Refactor as
7295 m32r_linux_nat_target methods.
7296 (_initialize_m32r_linux_nat): Adjust to C++ification.
7298 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7299 (the_m68k_linux_nat_target): New.
7300 (m68k_linux_fetch_inferior_registers)
7301 (m68k_linux_store_inferior_registers): Refactor as
7302 m68k_linux_nat_target methods.
7303 (_initialize_m68k_linux_nat): Adjust to C++ification.
7305 * s390-linux-nat.c (s390_linux_nat_target): New class.
7306 (the_s390_linux_nat_target): New.
7307 (s390_linux_fetch_inferior_registers)
7308 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7309 (s390_insert_watchpoint, s390_remove_watchpoint)
7310 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7311 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7312 (s390_auxv_parse, s390_read_description): Refactor as methods of
7313 s390_linux_nat_target.
7314 (_initialize_s390_nat): Adjust to C++ification.
7316 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7317 (the_sparc_linux_nat_target): New.
7318 (_initialize_sparc_linux_nat): Adjust to C++ification.
7319 * sparc-nat.c (sparc_fetch_inferior_registers)
7320 (sparc_store_inferior_registers): Remove target_ops parameter.
7321 * sparc-nat.h (sparc_fetch_inferior_registers)
7322 (sparc_store_inferior_registers): Remove target_ops parameter.
7323 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7324 (the_sparc64_linux_nat_target): New.
7325 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7327 * spu-linux-nat.c (spu_linux_nat_target): New class.
7328 (the_spu_linux_nat_target): New.
7329 (spu_child_post_startup_inferior, spu_child_post_attach)
7330 (spu_child_wait, spu_fetch_inferior_registers)
7331 (spu_store_inferior_registers, spu_xfer_partial)
7332 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7334 (_initialize_spu_nat): Adjust to C++ification.
7336 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7337 (the_tilegx_linux_nat_target): New.
7338 (fetch_inferior_registers, store_inferior_registers):
7339 Refactor as methods.
7340 (_initialize_tile_linux_nat): Adjust to C++ification.
7342 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7343 (the_xtensa_linux_nat_target): New.
7344 (xtensa_linux_fetch_inferior_registers)
7345 (xtensa_linux_store_inferior_registers): Refactor as
7346 xtensa_linux_nat_target methods.
7347 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7349 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7350 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7351 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7352 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7353 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7354 (fbsd_stopped_by_sw_breakpoint)
7355 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7356 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7357 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7358 (fbsd_post_startup_inferior, fbsd_post_attach)
7359 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7360 (fbsd_set_syscall_catchpoint)
7361 (super_xfer_partial, super_resume, super_wait)
7362 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7363 (fbsd_handle_debug_trap): Remove target_ops parameter.
7364 (fbsd_nat_add_target): Delete.
7365 * fbsd-nat.h: Include "inf-ptrace.h".
7366 (fbsd_nat_add_target): Delete.
7367 (USE_SIGTRAP_SIGINFO): Define.
7368 (fbsd_nat_target): New class.
7370 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7371 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7372 (amd64bsd_target): Delete.
7373 * amd64-bsd-nat.h: New file.
7374 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7376 (amd64_fbsd_nat_target): New class.
7377 (the_amd64_fbsd_nat_target): New.
7378 (amd64fbsd_read_description): Refactor as method of
7379 amd64_fbsd_nat_target.
7380 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7381 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7382 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7383 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7384 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7385 (i386bsd_target): Delete.
7386 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7387 (i386bsd_fetch_inferior_registers)
7388 (i386bsd_store_inferior_registers): Declare.
7389 (i386_bsd_nat_target): New class.
7390 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7391 (the_i386_fbsd_nat_target): New.
7392 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7393 i386_fbsd_nat_target methods.
7394 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7395 (_initialize_i386fbsd_nat): Adjust to C++ification.
7396 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7397 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7398 (_initialize_x86_bsd_nat): Adjust to C++ification.
7399 * x86-bsd-nat.h: Include "x86-nat.h".
7400 (x86bsd_target): Delete declaration.
7401 (x86bsd_nat_target): New class.
7403 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7404 (the_aarch64_fbsd_nat_target): New.
7405 (aarch64_fbsd_fetch_inferior_registers)
7406 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7407 aarch64_fbsd_nat_target.
7408 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7409 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7410 (the_alpha_bsd_nat_target): New.
7411 (alphabsd_fetch_inferior_registers)
7412 (alphabsd_store_inferior_registers): Refactor as
7413 alpha_bsd_nat_target methods.
7414 (_initialize_alphabsd_nat): Refactor as methods of
7415 alpha_bsd_nat_target.
7416 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7417 (the_amd64_nbsd_nat_target): New.
7418 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7419 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7420 (the_amd64_obsd_nat_target): New.
7421 (_initialize_amd64obsd_nat): Adjust to C++ification.
7422 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7423 (the_arm_fbsd_nat_target): New.
7424 (arm_fbsd_fetch_inferior_registers)
7425 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7426 (_initialize_arm_fbsd_nat): Refactor as methods of
7427 arm_fbsd_nat_target.
7428 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7429 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7430 (the_arm_netbsd_nat_target): New.
7431 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7432 arm_netbsd_nat_target.
7433 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7434 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7435 (the_hppa_nbsd_nat_target): New.
7436 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7437 hppa_nbsd_nat_target methods.
7438 (_initialize_hppanbsd_nat): Adjust to C++ification.
7439 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7440 (the_hppa_obsd_nat_target): New.
7441 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7442 methods of hppa_obsd_nat_target.
7443 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7445 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7446 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7448 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7449 (_initialize_i386obsd_nat): Use add_target.
7450 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7451 (the_m68k_bsd_nat_target): New.
7452 (m68kbsd_fetch_inferior_registers)
7453 (m68kbsd_store_inferior_registers): Refactor as methods of
7454 m68k_bsd_nat_target.
7455 (_initialize_m68kbsd_nat): Adjust to C++ification.
7456 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7457 (the_mips_fbsd_nat_target): New.
7458 (mips_fbsd_fetch_inferior_registers)
7459 (mips_fbsd_store_inferior_registers): Refactor as methods of
7460 mips_fbsd_nat_target.
7461 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7463 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7464 (the_mips_nbsd_nat_target): New.
7465 (mipsnbsd_fetch_inferior_registers)
7466 (mipsnbsd_store_inferior_registers): Refactor as methods of
7467 mips_nbsd_nat_target.
7468 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7469 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7470 (the_mips64_obsd_nat_target): New.
7471 (mips64obsd_fetch_inferior_registers)
7472 (mips64obsd_store_inferior_registers): Refactor as methods of
7473 mips64_obsd_nat_target.
7474 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7476 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7478 * nbsd-nat.h: Include "inf-ptrace.h".
7479 (nbsd_nat_target): New class.
7480 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7481 (obsd_wait): Refactor as methods of obsd_nat_target.
7482 (obsd_add_target): Delete.
7483 * obsd-nat.h: Include "inf-ptrace.h".
7484 (obsd_nat_target): New class.
7485 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7486 (the_ppc_fbsd_nat_target): New.
7487 (ppcfbsd_fetch_inferior_registers)
7488 (ppcfbsd_store_inferior_registers): Refactor as methods of
7489 ppc_fbsd_nat_target.
7490 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7492 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7493 (the_ppc_nbsd_nat_target): New.
7494 (ppcnbsd_fetch_inferior_registers)
7495 (ppcnbsd_store_inferior_registers): Refactor as methods of
7496 ppc_nbsd_nat_target.
7497 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7498 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7499 (the_ppc_obsd_nat_target): New.
7500 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7501 methods of ppc_obsd_nat_target.
7502 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7504 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7505 (the_sh_nbsd_nat_target): New.
7506 (shnbsd_fetch_inferior_registers)
7507 (shnbsd_store_inferior_registers): Refactor as methods of
7509 (_initialize_shnbsd_nat): Adjust to C++ification.
7510 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7511 (inf_ptrace_xfer_partial): Delete.
7512 (sparc_xfer_partial, sparc_target): Delete.
7513 * sparc-nat.h (sparc_fetch_inferior_registers)
7514 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7515 (sparc_target): Delete function declaration.
7516 (sparc_target): New template class.
7517 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7518 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7519 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7520 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7522 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7523 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7524 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7525 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7527 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7528 (the_vax_bsd_nat_target): New.
7529 (vaxbsd_fetch_inferior_registers)
7530 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7532 (_initialize_vaxbsd_nat): Adjust to C++ification.
7534 * bsd-kvm.c (bsd_kvm_target): New class.
7535 (bsd_kvm_ops): Now a bsd_kvm_target.
7536 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7537 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7538 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7540 (bsd_kvm_return_one): Delete.
7541 (bsd_kvm_add_target): Adjust to C++ification.
7543 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7544 (nto_procfs_target_procfs): New classes.
7545 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7546 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7547 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7548 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7549 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7550 (procfs_remove_hw_breakpoint, procfs_resume)
7551 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7552 (procfs_kill_inferior, procfs_store_registers)
7553 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7554 as methods of nto_procfs_target.
7555 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7556 (nto_native_ops): Delete.
7557 (procfs_open, procfs_native_open): Delete.
7558 (nto_native_ops): Now an nto_procfs_target_native.
7559 (init_procfs_targets): Adjust to C++ification.
7560 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7561 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7562 Refactor as methods of nto_procfs_target.
7564 * go32-nat.c (go32_nat_target): New class.
7565 (the_go32_nat_target): New.
7566 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7567 (go32_store_registers, go32_xfer_partial, go32_files_info)
7568 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7569 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7570 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7571 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7572 (go32_target): Delete.
7573 (_initialize_go32_nat): Adjust to C++ification.
7575 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7576 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7577 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7578 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7580 (gnu_target): Delete.
7581 * gnu-nat.h (gnu_target): Delete.
7582 (gnu_nat_target): New class.
7583 * i386-gnu-nat.c (gnu_base_target): New.
7584 (i386_gnu_nat_target): New class.
7585 (the_i386_gnu_nat_target): New.
7586 (_initialize_i386gnu_nat): Adjust to C++ification.
7590 * bfd-target.c (target_bfd_xclose): Rename to ...
7591 (target_bfd_close): ... this.
7592 (target_bfd_reopen): Adjust.
7593 * target.c (target_close): Remove references to to_xclose.
7594 * target.h (target_ops::to_xclose): Delete.
7595 (target_ops::to_close): Update comments.
7599 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7601 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7602 * inf-ptrace.c (inf_ptrace_register_u_offset)
7603 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7604 (inf_ptrace_store_register, inf_ptrace_store_registers)
7605 (inf_ptrace_trad_target): Move to ...
7606 * linux-nat-trad.c: ... this new file.
7607 * linux-nat-trad.h: New file.
7608 * linux-nat.c (linux_target_install_ops): Make extern.
7609 (linux_trad_target): Delete.
7610 * linux-nat.h (linux_trad_target): Delete declaration.
7611 (linux_target_install_ops): Declare.
7612 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7617 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7618 procfs_target/add_target here.
7619 * procfs.c (procfs_target): Make static.
7620 (_initialize_procfs): Call add_target here.
7621 * procfs.h (struct target_ops): Remove forward declaration.
7622 (procfs_target): Remove declaration.
7623 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7627 * procfs.c (procfs_stopped_by_watchpoint)
7628 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7629 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7631 (procfs_use_watchpoints): Delete, move contents...
7632 (procfs_target): ... here.
7633 * procfs.h (procfs_use_watchpoints): Delete declaration.
7634 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7635 procfs_use_watchpoints.
7636 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7637 procfs_use_watchpoints.
7642 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7643 and var_zuinteger_unlimited.
7644 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7645 and PARAM_ZUINTEGER_UNLIMITED.
7646 (set_parameter_value): Handle var_zuinteger and
7647 var_zuinteger_unlimited.
7648 (add_setshow_generic): Likewise.
7649 (parmpy_init): Likewise.
7654 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7655 pointer is not null before dereferencing it.
7659 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7664 * breakpoint.c (mention): Remove use of is_mi_like_p.
7665 (print_mention_ranged_breakpoint): Likewise.
7666 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7671 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7675 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7676 (info_spu_event_command): Remove some uses of is_mi_like_p.
7680 * python/py-framefilter.c (py_print_single_arg)
7681 (enumerate_locals, py_print_args, py_print_frame): Remove some
7682 uses of is_mi_like_p.
7687 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7688 * ui-out.h (ui_out::is_mi_like_p): Now const.
7689 (ui_out::do_is_mi_like_p): Now const.
7690 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7694 * varobj.c (varobj_set_visualizer): Use new_reference.
7695 * python/python.c (gdbpy_decode_line): Use new_reference.
7696 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7701 * varobj.c (install_new_value): Use new_reference.
7702 * value.h (value_incref): Return void. Swap intro comment with
7704 * value.c (set_value_parent): Use new_reference.
7705 (value_incref): Return void. Update intro comment.
7706 (release_value): Use new_reference.
7707 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7711 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7712 * gdb_bfd.h (new_bfd_ref): Remove.
7713 (gdb_bfd_open): Update comment.
7714 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7715 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7716 (gdb_bfd_fdopenr): Use new_reference.
7717 * exec.c (exec_file_attach): Use new_reference.
7721 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7726 * jit.c (jit_read_code_entry): Use type_align.
7727 * i386-tdep.c (i386_gdbarch_init): Don't call
7728 set_gdbarch_long_long_align_bit.
7729 * gdbarch.sh: Remove long_long_align_bit.
7730 * gdbarch.c, gdbarch.h: Rebuild.
7731 * arc-tdep.c (arc_type_align): New function.
7732 (arc_gdbarch_init): Use arc_type_align. Don't call
7733 set_gdbarch_long_long_align_bit.
7737 * rust-lang.c (rust_type_alignment): Remove.
7738 (rust_composite_type): Use type_align.
7742 * NEWS: Mention Type.align.
7743 * python/py-type.c (typy_get_alignof): New function.
7744 (type_object_getset): Add "alignof".
7750 * std-operator.def (UNOP_ALIGNOF): New operator.
7751 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7753 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7754 * c-lang.c (c_op_print_tab): Add alignof.
7755 * c-exp.y (ALIGNOF): New token.
7756 (exp): Add "ALIGNOF" production.
7757 (ident_tokens): Add _Alignof and alignof.
7761 * i386-tdep.c (i386_type_align): New function.
7762 (i386_gdbarch_init): Update.
7763 * gdbarch.sh (type_align): New method.
7764 * gdbarch.c, gdbarch.h: Rebuild.
7765 * arch-utils.h (default_type_align): Declare.
7766 * arch-utils.c (default_type_align): New function.
7767 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7768 (struct type) <align_log2>: New field.
7769 <instance_flags>: Now a bitfield.
7770 (TYPE_RAW_ALIGN): New macro.
7771 (type_align, type_raw_align, set_type_align): Declare.
7772 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7774 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7775 (get_alignment, maybe_set_alignment): New functions.
7776 (read_structure_type, read_enumeration_type, read_array_type)
7777 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7778 (read_subrange_type, read_base_type): Set type alignment.
7782 * dwarf2read.c (read_index_from_section): Use bool.
7787 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7793 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7794 last step, and do it atomically.
7798 * compile/compile-c-types.c (convert_int, convert_float):
7804 * rust-lang.c (rust_inclusive_range_type_p): New function.
7805 (rust_range): Handle inclusive ranges.
7806 (rust_compute_range): Likewise.
7807 * rust-exp.y (struct rust_op) <inclusive>: New field.
7808 (DOTDOTEQ): New constant.
7809 (range_expr): Add "..=" productions.
7810 (operator_tokens): Add "..=" token.
7811 (ast_range): Add "inclusive" parameter.
7812 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7814 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7816 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7817 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7819 * expprint.c (print_subexp_standard): Handle new bounds values.
7820 (dump_subexp_body_standard): Likewise.
7824 * configure: Rebuild.
7825 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7826 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7828 (class symbol_needs_eval_context): Likewise.
7829 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7830 (mock_mapped_index::symbol_name_at): Use "override". Remove
7832 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7834 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7835 * aarch64-tdep.c (instruction_reader::read): Use "override".
7836 (instruction_reader_test::read): Likewise.
7837 * arm-tdep.c (instruction_reader::read): Use "override".
7838 (instruction_reader_thumb::read): Likewise.
7843 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7844 instead of remote_send.
7845 (remote_send): Remove.
7849 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7850 find_function_start_sal instead of find_pc_line.
7854 * breakpoint.c (set_breakpoint_location_function): Handle
7856 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7857 * elfread.c (elf_symtab_read): Give data symbols with
7858 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7859 (elf_rel_plt_read): Update comment.
7860 * linespec.c (convert_linespec_to_sals): Handle
7862 (minsym_found): Handle mst_data_gnu_ifunc.
7863 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7864 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7865 * parse.c (find_minsym_type_and_address): Handle
7867 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7868 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7869 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7871 <mst_data_gnu_ifunc>: New enumerator.
7875 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7876 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7877 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7879 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7880 (lookup_minimal_symbol_by_pc): Adjust.
7881 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7882 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7883 * minsyms.h (lookup_msym_prefer): New enum.
7884 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7885 parameter by a lookup_msym_prefer parameter.
7889 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7890 ends in "@plt" instead of looking at the symbol's section.
7894 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7896 (find_pc_partial_function_gnu_ifunc): Rename to ...
7897 (find_pc_partial_function): ... this, and remove references to
7899 (find_pc_partial_function): Delete old implementation.
7900 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7904 * linespec.c (struct bound_minimal_symbol_search_key): New.
7905 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7906 skip first line if we found a GNU ifunc minimal symbol by name.
7907 (compare_msymbols): Change parameters to work with a destructured
7909 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7914 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7915 ifunc targets here. Instead, if we have an ifunc minsym, use its
7917 (add_location_to_breakpoint): Store the minsym and the objfile in
7918 the breakpoint location.
7919 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7920 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7921 Record the minsym in the sal.
7922 * symtab.h (symtab_and_line) <msymbol>: New field.
7926 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7927 unless we actually resolved the ifunc.
7931 * c-exp.y (variable production): Prefer ifunc minsyms over
7932 regular function symbols.
7933 * symtab.c (find_gnu_ifunc): New function.
7934 * minsyms.h (lookup_msym_prefer): New enum.
7935 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7936 parameter by a lookup_msym_prefer parameter.
7937 * symtab.h (find_gnu_ifunc): New declaration.
7941 * blockframe.c (find_gnu_ifunc_target_type): New function.
7942 (find_function_type): New.
7943 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7944 return a value with a memory address.
7945 (eval_call): For calls to GNU ifunc functions, try to find the
7946 type of the target function from the type that the resolver
7948 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7950 * infcall.c (find_function_return_type): Delete.
7951 (find_function_addr): Add 'function_type' parameter. For calls to
7952 GNU ifunc functions, try to find the type of the target function
7953 from the type that the resolver returns, and return it via
7955 (call_function_by_hand_dummy): Adjust to use the function type
7956 returned by find_function_addr.
7957 (find_function_addr): Add 'function_type' parameter and move
7959 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7964 * c-exp.y (variable production): Skip finding an alias for ifunc
7969 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7973 * infcmd.c (kill_command): Print the pid as string, not the whole
7974 thread's ptid. Add comment. s/has been killed/killed/ in output
7976 * remote.c (remote_detach_1): Print the pid as string, not the
7977 whole thread's ptid.
7983 * infcmd.c (kill_command): Print message when inferior has
7985 * inferior.c (print_inferior_events): Remove 'static'. Set as
7987 (add_inferior): Improve message printed when
7988 'print_inferior_events' is on.
7989 (exit_inferior): Remove message printed when
7990 'print_inferior_events' is on.
7991 (detach_inferior): Improve message printed when
7992 'print_inferior_events' is on.
7993 (initialize_inferiors): Use 'add_inferior_silent' to set
7994 'current_inferior_'.
7995 * inferior.h (print_inferior_events): Declare here as
7997 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7998 '[Detaching...]' messages when 'print_inferior_events' is on.
7999 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8000 as prefix/suffix for messages. Remove periods. Fix erroneous
8001 'Detaching after fork from child...', replace it by '... from
8003 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8004 prefix/suffix when printing 'Detaching...' messages. Print
8005 them when 'print_inferior_events' is on.
8006 * remote.c (remote_detach_1): Print message when detaching
8007 from inferior and '!is_fork_parent'.
8011 * cli-out.h: Reindent.
8015 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8016 (cli_ui_out::do_field_string): Use fputs_filtered.
8017 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8021 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8022 gdb::unique_xmalloc_ptr.
8026 * configure: Rebuild.
8031 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8032 prepare_for_testing. Set normal_bp to r_debug_state if target
8038 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8039 * remote.c (extended_remote_attach): In all-stop mode, mark the
8040 thread as executing.
8044 * thread.c (thread_apply_all_command): Fix comment.
8045 (thread_command): Fix comment.
8049 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8051 * features/aarch64-core.c (create_feature_aarch64_core):
8053 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8055 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8057 * features/i386/32bit-avx512.c
8058 (create_feature_i386_32bit_avx512): Likewise.
8059 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8061 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8063 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8065 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8067 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8069 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8071 * features/i386/64bit-avx512.c
8072 (create_feature_i386_64bit_avx512): Likewise.
8073 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8075 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8077 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8079 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8081 * features/i386/64bit-segments.c
8082 (create_feature_i386_64bit_segments): Likewise.
8083 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8085 * features/i386/x32-core.c
8086 (create_feature_i386_x32_core): Likewise.
8087 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8088 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8089 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8090 * target-descriptions.c: In generated code, don't pass xml
8095 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8096 (print_xml_feature::visit_post): Likewise.
8097 (print_xml_feature::visit): Likewise.
8098 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8099 (print_xml_feature): Add new class.
8100 * regformats/regdat.sh: Null xmltarget on feature targets.
8101 * target-descriptions.c (struct target_desc): Add xmltarget.
8102 (maintenance_check_tdesc_xml_convert): Add unittest function.
8103 (tdesc_get_features_xml): Add function to get xml.
8104 (maintenance_check_xml_descriptions): Test xml generation.
8105 * xml-tdesc.c (string_read_description_xml): Add function.
8106 * xml-tdesc.h (string_read_description_xml): Add declaration.
8110 * features/Makefile: Add feature marker to targets with new style
8111 target descriptions.
8112 * regformats/aarch64.dat: Regenerate.
8113 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8114 * regformats/i386/amd64-avx-linux.dat: Likewise.
8115 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8116 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8117 * regformats/i386/amd64-linux.dat: Likewise.
8118 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8119 * regformats/i386/amd64.dat: Likewise.
8120 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8121 * regformats/i386/i386-avx-linux.dat: Likewise.
8122 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8123 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8124 * regformats/i386/i386-linux.dat: Likewise.
8125 * regformats/i386/i386-mmx-linux.dat: Likewise.
8126 * regformats/i386/i386-mpx-linux.dat: Likewise.
8127 * regformats/i386/i386.dat: Likewise.
8128 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8129 * regformats/i386/x32-avx-linux.dat: Likewise.
8130 * regformats/i386/x32-linux.dat: Likewise.
8131 * regformats/tic6x-c62x-linux.dat: Likewise.
8132 * regformats/tic6x-c64x-linux.dat: Likewise.
8133 * regformats/tic6x-c64xp-linux.dat: Likewise.
8134 * regformats/regdat.sh: Parse feature marker.
8138 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8139 (tdesc_osabi_name): Likewise.
8140 * target-descriptions.c (tdesc_architecture_name): Add new
8142 (tdesc_osabi_name): Likewise.
8146 * common/tdesc.c (tdesc_predefined_type): Move to here.
8147 (tdesc_named_type): Likewise.
8148 (tdesc_create_vector): Likewise.
8149 (tdesc_create_struct): Likewise.
8150 (tdesc_set_struct_size): Likewise.
8151 (tdesc_create_union): Likewise.
8152 (tdesc_create_flags): Likewise.
8153 (tdesc_create_enum): Likewise.
8154 (tdesc_add_field): Likewise.
8155 (tdesc_add_typed_bitfield): Likewise.
8156 (tdesc_add_bitfield): Likewise.
8157 (tdesc_add_flag): Likewise.
8158 (tdesc_add_enum_value): Likewise.
8159 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8160 (struct tdesc_type_vector): Likewise.
8161 (struct tdesc_type_field): Likewise.
8162 (struct tdesc_type_with_fields): Likewise.
8163 (tdesc_create_enum): Add declaration.
8164 (tdesc_add_typed_bitfield): Likewise.
8165 (tdesc_add_enum_value): Likewise.
8166 * target-descriptions.c (tdesc_type_field): Move from here.
8167 (tdesc_type_builtin): Likewise.
8168 (tdesc_type_vector): Likewise.
8169 (tdesc_type_with_fields): Likewise.
8170 (tdesc_predefined_types): Likewise.
8171 (tdesc_named_type): Likewise.
8172 (tdesc_create_vector): Likewise.
8173 (tdesc_create_struct): Likewise.
8174 (tdesc_set_struct_size): Likewise.
8175 (tdesc_create_union): Likewise.
8176 (tdesc_create_flags): Likewise.
8177 (tdesc_create_enum): Likewise.
8178 (tdesc_add_field): Likewise.
8179 (tdesc_add_typed_bitfield): Likewise.
8180 (tdesc_add_bitfield): Likewise.
8181 (tdesc_add_flag): Likewise.
8182 (tdesc_add_enum_value): Likewise.
8183 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8184 (tdesc_add_typed_bitfield): Likewise.
8185 (tdesc_add_enum_value): Likewise.
8189 * common/tdesc.c (tdesc_feature::accept): Move to here.
8190 (tdesc_feature::operator==): Likewise.
8191 (tdesc_create_reg): Likewise.
8192 * common/tdesc.h (tdesc_type_kind): Likewise.
8193 (struct tdesc_type): Likewise.
8194 (struct tdesc_feature): Likewise.
8195 * regformats/regdat.sh: Create a feature.
8196 * target-descriptions.c (tdesc_type_kind): Move from here.
8197 (tdesc_type): Likewise.
8198 (tdesc_type_up): Likewise.
8199 (tdesc_feature): Likewise.
8200 (tdesc_create_reg): Likewise.
8204 * Makefile.in: Add arch/tdesc.c
8205 * common/tdesc.c: New file.
8206 * common/tdesc.h (tdesc_element_visitor): Move to here.
8207 (tdesc_element): Likewise.
8208 (tdesc_reg): Likewise.
8209 (tdesc_reg_up): Likewise.
8210 * regformats/regdef.h (reg): Add offset to constructors.
8211 * target-descriptions.c (tdesc_element_visitor): Move from here.
8212 (tdesc_element): Likewise.
8213 (tdesc_reg): Likewise.
8214 (tdesc_reg_up): Likewise.
8218 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8223 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8227 * symtab.c (print_symbol_info): Skip printing filename and line
8228 number when `last' is NULL.
8229 (symtab_symbol_info): Use empty string instead of NULL for first
8230 invocation of print_symbol_info.
8231 (rbreak_command): Pass NULL to `last' parameter of
8236 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8241 * MAINTAINERS (sh): Remove.
8242 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8243 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8244 (ALLDEPFILES): Remove sh64-tdep.c.
8245 * NEWS: Mentions that support for SH-5/SH64 is removed.
8246 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8247 (sh*-*-openbsd*): Ditto.
8248 (sh64-*-elf*): Remove.
8250 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8251 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8252 * sh-tdep.c: No longer include "sh64-tdep.h".
8253 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8254 * sh64-tdep.c, sh64-tdep.h: Remove files.
8258 * MAINTAINERS: Remove m88k.
8259 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8260 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8261 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8262 * NEWS: Mention that support for m88k was removed.
8263 * configure.host (m88*-*-*): Remove support.
8264 * configure.nat (m88k-*-*): Remove support.
8265 * configure.tgt (m88*-*-openbsd*): Remove.
8266 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8270 * configure.tgt (x86_tobjs): New variable.
8271 (amd64_tobjs, i386_tobjs): Use it.
8275 * symtab.c (print_symbol_info): Precede the symbol definition by
8276 the line number when available.
8277 * NEWS: Advertise this enhancement.
8281 * NEWS (New options): announce set/show record btrace cpu.
8282 * btrace.c: Include record-btrace.h.
8283 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8284 the vendor is unknown.
8285 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8286 Maybe overwrite the btrace configuration's cpu.
8287 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8288 (btrace_fetch): Add cpu parameter. Update callers.
8289 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8290 Maybe overwrite the btrace configuration's cpu. Skip enabling
8291 errata workarounds if the vendor is unknown.
8292 * python/py-record-btrace.c: Include record-btrace.h.
8293 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8294 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8295 * record-btrace.c (record_btrace_cpu_state_kind): New.
8296 (record_btrace_cpu): New.
8297 (set_record_btrace_cpu_cmdlist): New.
8298 (record_btrace_get_cpu): New.
8299 (require_btrace_thread, record_btrace_info)
8300 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8301 (cmd_set_record_btrace_cpu_none): New.
8302 (cmd_set_record_btrace_cpu_auto): New.
8303 (cmd_set_record_btrace_cpu): New.
8304 (cmd_show_record_btrace_cpu): New.
8305 (_initialize_record_btrace): Initialize set/show record btrace cpu
8307 * record-btrace.h (record_btrace_get_cpu): New.
8311 * record.c (set_record_command): Fix typo in message.
8315 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8319 * infrun.c (process_event_stop_test): Call
8320 gdbarch_in_indirect_branch_thunk.
8321 * gdbarch.sh (in_indirect_branch_thunk): New.
8322 * gdbarch.c: Regenerated.
8323 * gdbarch.h: Regenerated.
8326 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8327 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8328 (ALLDEPFILES): Add x86-tdep.c.
8329 * arch-utils.h (default_in_indirect_branch_thunk): New.
8330 * arch-utils.c (default_in_indirect_branch_thunk): New.
8331 * i386-tdep: Include x86-tdep.h.
8332 (i386_in_indirect_branch_thunk): New.
8333 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8335 * amd64-tdep: Include x86-tdep.h.
8336 (amd64_in_indirect_branch_thunk): New.
8337 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8342 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8343 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8344 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8349 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8350 (rust_evaluate_subexp): Likewise.
8354 * procfs.c (procfs_detach): Make forward declaration's prototype
8355 match definition's protototype.
8356 (proc_get_LDT_entry): Remove stale do_cleanups call.
8360 * target.h (target_ops::to_has_exited): Delete.
8361 (target_has_exited): Delete.
8362 * target-delegates.c: Regenerate.
8366 * target.c (fileio_fh_t::t): Add comment.
8367 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8368 (target_fileio_close): Handle a NULL target.
8369 (invalidate_fileio_fh): New.
8370 (target_close): Call it.
8371 * remote.c (remote_hostio_send_command): No longer check whether
8372 remote_desc is open.
8376 * target.c (fileio_fh_t): Make it a named struct instead of a
8378 (fileio_fh_t::is_closed): New method.
8379 (DEF_VEC_O (fileio_fh_t)): Remove.
8380 (fileio_fhandles): Now a std::vector.
8381 (is_closed_fileio_fh): Delete.
8382 (acquire_fileio_fd): Adjust. Rename parameters.
8383 (release_fileio_fd): Adjust.
8384 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8385 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8386 (target_fileio_close): Adjust.
8390 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8395 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8396 (scoped_finish_thread_state): New class.
8397 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8399 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8400 (fetch_inferior_event, normal_stop): Likewise.
8401 * thread.c (finish_thread_state_cleanup): Delete.
8406 * value.c: Include "selftest.h" and "common/array-view.h".
8407 (struct range) <operator ==>: New.
8408 (test_ranges_contain): New.
8409 (check_ranges_vector): New.
8410 (test_insert_into_bit_range_vector): New.
8411 (_initialize_values): Register selftests.
8412 * common/array-view.h (operator==, operator!=): New.
8416 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8418 * inline-frame.c: Include <algorithm>.
8419 (struct inline_state): Add constructor.
8420 (inline_state_s): Remove.
8421 (DEF_VEC_O(inline_state_s)): Remove.
8422 (inline_states): Change type to std::vector.
8423 (find_inline_frame_state): Adjust to std::vector.
8424 (allocate_inline_frame_state): Remove.
8425 (clear_inline_frame_state): Adjust to std::vector.
8426 (skip_inline_frames): Adjust to std::vector.
8430 * tracepoint.h (struct trace_state_variable): Add constructor.
8431 <name>: Change type to std::string.
8432 * tracepoint.c (tsv_s): Remove.
8433 (DEF_VEC_O(tsv_s)): Remove.
8434 (tvariables): Change to std::vector.
8435 (create_trace_state_variable): Adjust to std::vector.
8436 (find_trace_state_variable): Likewise.
8437 (find_trace_state_variable_by_number): Likewise.
8438 (delete_trace_state_variable): Likewise.
8439 (trace_variable_command): Adjust to std::string.
8440 (delete_trace_variable_command): Likewise.
8441 (tvariables_info_1): Adjust to std::vector.
8442 (save_trace_state_variables): Likewise.
8443 (start_tracing): Likewise.
8444 (merge_uploaded_trace_state_variables): Adjust to std::vector
8446 * target.h (struct target_ops)
8447 <to_download_trace_state_variable>: Pass reference to
8448 trace_state_variable.
8449 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8450 * target-delegates.c: Re-generate.
8451 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8452 (mi_tsv_deleted): Likewise.
8453 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8454 * remote.c (remote_download_trace_state_variable): Change
8455 pointer to reference and adjust.
8456 * make-target-delegates (parse_argtypes): Handle references.
8457 (write_function_header): Likewise.
8458 (munge_type): Likewise.
8462 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8463 string_view-selftests.c.
8464 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8466 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8467 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8468 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8469 * unittests/basic_string_view/element_access/char/1.cc:
8471 * unittests/basic_string_view/element_access/char/empty.cc:
8473 * unittests/basic_string_view/element_access/char/front_back.cc:
8475 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8476 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8478 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8480 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8482 * unittests/basic_string_view/operations/compare/char/1.cc:
8484 * unittests/basic_string_view/operations/compare/char/13650.cc:
8486 * unittests/basic_string_view/operations/copy/char/1.cc:
8488 * unittests/basic_string_view/operations/data/char/1.cc:
8490 * unittests/basic_string_view/operations/find/char/1.cc:
8492 * unittests/basic_string_view/operations/find/char/2.cc:
8494 * unittests/basic_string_view/operations/find/char/3.cc:
8496 * unittests/basic_string_view/operations/find/char/4.cc:
8498 * unittests/basic_string_view/operations/rfind/char/1.cc:
8500 * unittests/basic_string_view/operations/rfind/char/2.cc:
8502 * unittests/basic_string_view/operations/rfind/char/3.cc:
8504 * unittests/basic_string_view/operations/substr/char/1.cc:
8506 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8507 * unittests/string_view-selftests.c: New file.
8511 * unittests/basic_string_view/capacity/1.cc: New file.
8512 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8513 * unittests/basic_string_view/cons/char/1.cc: New file.
8514 * unittests/basic_string_view/cons/char/2.cc: New file.
8515 * unittests/basic_string_view/cons/char/3.cc: New file.
8516 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8517 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8518 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8519 * unittests/basic_string_view/element_access/char/1.cc: New file.
8520 * unittests/basic_string_view/element_access/char/2.cc: New file.
8521 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8522 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8523 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8524 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8525 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8526 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8527 * unittests/basic_string_view/include.cc: New file.
8528 * unittests/basic_string_view/inserters/char/1.cc: New file.
8529 * unittests/basic_string_view/inserters/char/2.cc: New file.
8530 * unittests/basic_string_view/inserters/char/3.cc: New file.
8531 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8532 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8533 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8534 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8535 * unittests/basic_string_view/literals/types.cc: New file.
8536 * unittests/basic_string_view/literals/values.cc: New file.
8537 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8538 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8539 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8540 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8541 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8542 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8543 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8544 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8545 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8546 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8547 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8548 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8549 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8550 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8551 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8552 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8553 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8554 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8555 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8556 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8557 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8558 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8559 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8560 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8561 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8562 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8563 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8564 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8565 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8566 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8567 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8568 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8569 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8570 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8571 * unittests/basic_string_view/operators/char/2.cc: New file.
8572 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8573 * unittests/basic_string_view/range_access/char/1.cc: New file.
8574 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8575 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8576 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8577 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8578 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8579 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8580 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8581 * unittests/basic_string_view/typedefs.cc: New file.
8582 * unittests/basic_string_view/types/1.cc: New file.
8586 * common/gdb_string_view.h: Remove libstdc++ implementation
8587 details, adjust to gdb reality.
8588 * common/gdb_string_view.tcc: Likewise.
8589 * cli/cli-script.c (struct string_view): Remove.
8590 (user_args) <m_args>: Change element type to gdb::string_view.
8591 (user_args::insert_args): Adjust.
8595 * common/gdb_string_view.h: New file.
8596 * common/gdb_string_view.tcc: New file.
8600 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8601 * configure: Re-generate.
8605 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8606 (set_target_gdbarch): Call
8607 gdb::observers::architecture_changed.notify instead of
8608 observer_notify_architecture_changed.
8612 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8613 (do_restore_current_traceframe_cleanup): Remove.
8614 (restore_current_traceframe_cleanup_dtor): Remove.
8615 (make_cleanup_restore_current_traceframe): Remove.
8616 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8618 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8619 * infrun.c (fetch_inferior_event): Use
8620 scoped_restore_current_traceframe.
8624 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8626 <n_allocated_type_units>: Remove.
8627 <all_type_units>: Change to std::vector.
8628 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8629 to std::vector change.
8630 (dwarf2_per_objfile::get_cutu): Likewise.
8631 (dwarf2_per_objfile::get_tu): Likewise.
8632 (create_signatured_type_table_from_index): Likewise.
8633 (create_signatured_type_table_from_debug_names): Likewise.
8634 (dw2_symtab_iter_next): Likewise.
8635 (dw2_print_stats): Likewise.
8636 (dw2_expand_all_symtabs): Likewise.
8637 (dw2_expand_marked_cus): Likewise.
8638 (dw2_debug_names_iterator::next): Likewise.
8639 (dwarf2_initialize_objfile): Likewise.
8640 (add_signatured_type_cu_to_table): Likewise.
8641 (create_all_type_units): Likewise.
8642 (add_type_unit): Likewise.
8643 (struct tu_abbrev_offset): Add constructor.
8644 (build_type_psymtabs_1): Adjust to std::vector change.
8645 (print_tu_stats): Likewise.
8646 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8647 (write_debug_names): Likewise.
8651 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8652 Make an std::vector.
8653 <n_comp_units>: Remove.
8654 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8655 to std::vector change.
8656 (dwarf2_per_objfile::get_cutu): Likewise.
8657 (dwarf2_per_objfile::get_cu): Likewise.
8658 (create_cus_from_index): Likewise.
8659 (create_addrmap_from_index): Likewise.
8660 (create_addrmap_from_aranges): Likewise.
8661 (dwarf2_read_index): Likewise.
8662 (dw2_find_last_source_symtab): Likewise.
8663 (dw2_map_symtabs_matching_filename): Likewise.
8664 (dw2_symtab_iter_next): Likewise.
8665 (dw2_print_stats): Likewise.
8666 (dw2_expand_all_symtabs): Likewise.
8667 (dw2_expand_symtabs_with_fullname): Likewise.
8668 (dw2_expand_marked_cus): Likewise.
8669 (dw2_map_symbol_filenames): Likewise.
8670 (create_cus_from_debug_names): Likewise.
8671 (dwarf2_read_debug_names): Likewise.
8672 (dw2_debug_names_iterator::next): Likewise.
8673 (dwarf2_initialize_objfile): Likewise.
8674 (set_partial_user): Likewise.
8675 (dwarf2_build_psymtabs_hard): Likewise.
8676 (read_comp_units_from_section): Remove arguments, adjust to
8678 (create_all_comp_units): Adjust to std::vector and
8679 read_comp_units_from_section changes.
8680 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8682 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8683 (psyms_seen_size): Likewise.
8684 (write_gdbindex): Likewise.
8685 (write_debug_names): Likewise.
8689 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8690 with dwarf2_per_objfile.
8691 (create_cus_from_index): Likewise.
8692 (create_signatured_type_table_from_index): Likewise.
8693 (dwarf2_read_index): Likewise.
8694 (dwarf2_initialize_objfile): Likewise.
8695 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8696 per_cu rather than get_dwarf2_per_objfile.
8700 * dwarf2read.h (struct signatured_type): Forward declare.
8701 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8703 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8704 (dw2_get_cutu): ...this.
8705 (dwarf2_per_objfile::get_cu): Rename from...
8706 (dw2_get_cu): ...this.
8707 (dwarf2_per_objfile::get_tu): New.
8708 (create_addrmap_from_index): Adjust.
8709 (create_addrmap_from_aranges): Adjust.
8710 (dw2_find_last_source_symtab): Adjust.
8711 (dw2_map_symtabs_matching_filename): Adjust.
8712 (dw2_symtab_iter_next): Adjust.
8713 (dw2_print_stats): Adjust.
8714 (dw2_expand_all_symtabs): Adjust.
8715 (dw2_expand_symtabs_with_fullname): Adjust.
8716 (dw2_expand_marked_cus): Adjust.
8717 (dw_expand_symtabs_matching_file_matcher): Adjust.
8718 (dw2_map_symbol_filenames): Adjust.
8719 (dw2_debug_names_iterator::next): Adjust.
8720 (dwarf2_initialize_objfile): Adjust.
8721 (set_partial_user): Adjust.
8722 (dwarf2_build_psymtabs_hard): Adjust.
8726 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8727 Remove unused variables.
8728 (dw2_map_symtabs_matching_filename): Likewise.
8729 (dwarf2_record_block_ranges): Likewise.
8730 (dwarf2_read_addr_index): Likewise.
8731 (follow_die_offset): Likewise.
8735 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8736 to symbol_file_add_main.
8741 * mi/mi-console.c (do_fputc_async_safe): New.
8742 (mi_console_file::write_async_safe): New.
8743 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8744 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8746 * ui-file.c (ui_file::putstrn): Adjust call to
8747 fputstrn_unfiltered.
8748 * utils.c (printchar): Replace do_fputs and do_fprintf
8749 parameters by do_fputc.
8750 (fputstr_filtered): Adjust call to printchar.
8751 (fputstr_unfiltered): Likewise.
8752 (fputstrn_filtered): Likewise.
8753 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8755 * utils.h (do_fputc_ftype): New typedef.
8756 (fputstrn_unfiltered): Add do_fputc parameter.
8760 * regformats/i386/i386-avx.dat: Remove.
8765 * amd64-tdep.c (amd64_none_init_abi): New function.
8766 (amd64_x32_none_init_abi): New function.
8767 (_initialize_amd64_tdep): Register handlers for x86-64 and
8768 x64_32 with GDB_OSABI_NONE.
8769 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8770 GDB_OSABI_NONE osabi.
8775 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8777 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8778 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8782 * common/byte-vector.h (char_vector): New type.
8783 * target.h (target_read_alloc): Return
8784 gdb::optional<byte_vector>.
8785 (target_read_stralloc): Return gdb::optional<char_vector>.
8786 (target_get_osdata): Return gdb::optional<char_vector>.
8787 * target.c (target_read_alloc_1): Templatize. Replacement
8788 manual memory management with vector.
8789 (target_read_alloc): Change return type, adjust.
8790 (target_read_stralloc): Change return type, adjust.
8791 (target_get_osdata): Change return type, adjust.
8792 * auxv.c (struct auxv_info) <length>: Remove.
8793 <data>: Change type to gdb::optional<byte_vector>.
8794 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8795 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8796 (target_auxv_search): Adjust.
8797 (fprint_target_auxv): Adjust.
8798 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8799 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8800 (linux_make_corefile_notes): Adjust.
8801 * osdata.c (get_osdata): Adjust.
8802 * remote.c (remote_get_threads_with_qxfer): Adjust.
8803 (remote_memory_map): Adjust.
8804 (remote_traceframe_info): Adjust.
8805 (btrace_read_config): Adjust.
8806 (remote_read_btrace): Adjust.
8807 (remote_pid_to_exec_file): Adjust.
8808 * solib-aix.c (solib_aix_get_library_list): Adjust.
8809 * solib-dsbt.c (decode_loadmap): Don't free buf.
8810 (dsbt_get_initial_loadmaps): Adjust.
8811 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8812 * solib-target.c (solib_target_current_sos): Adjust.
8813 * tracepoint.c (sdata_make_value): Adjust.
8814 * xml-support.c (xinclude_start_include): Adjust.
8815 (xml_fetch_content_from_file): Adjust.
8816 * xml-support.h (xml_fetch_another): Change return type.
8817 (xml_fetch_content_from_file): Change return type.
8818 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8819 * xml-tdesc.c (file_read_description_xml): Adjust.
8820 (fetch_available_features_from_target): Change return type.
8821 (target_fetch_description_xml): Adjust.
8822 (target_read_description_xml): Adjust.
8826 * value.c (~value): Update.
8827 (struct value) <contents>: Now unique_xmalloc_ptr.
8828 (value_contents_bits_eq, allocate_value_contents)
8829 (value_contents_raw, value_contents_all_raw)
8830 (value_contents_for_printing, value_contents_for_printing_const)
8831 (set_value_enclosing_type): Update.
8835 * value.c (range_s): Remove typedef, VEC.
8836 (struct range): Add operator<.
8837 (range_lessthan): Remove.
8838 (ranges_contain): Change type.
8840 (struct value) <unavailable, optimized_out>: Now std::vector.
8841 (value_entirely_available)
8842 (value_entirely_covered_by_range_vector)
8843 (value_entirely_unavailable, value_entirely_optimized_out):
8845 (insert_into_bit_range_vector): Change argument type.
8846 (find_first_range_overlap): Likewise.
8847 (struct ranges_and_idx, value_contents_bits_eq)
8848 (require_not_optimized_out, require_available): Update.
8849 (ranges_copy_adjusted): Change argument types.
8850 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8854 * value.c (~value): Update.
8855 (struct value) <parent>: Now a value_ref_ptr.
8856 (value_parent, set_value_parent, value_address, value_copy):
8861 * value.c (struct value): Add constructor, destructor, and member
8863 (allocate_value_lazy, value_decref): Update.
8867 * value.c (struct value) <released, next>: Remove.
8868 (all_values): Now a std::vector.
8869 (allocate_value_lazy): Update.
8870 (value_next): Remove.
8871 (value_mark, value_free_to_mark, release_value)
8872 (value_release_to_mark): Update.
8876 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8877 (free_value_chain): Remove.
8878 * value.c (free_value_chain): Remove.
8879 (value_release_to_mark): Return a std::vector.
8880 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8882 (check_condition): Update.
8883 * eval.c (fetch_subexp_value): Change "val_chain" to a
8885 * breakpoint.c (update_watchpoint): Update.
8886 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8890 * value.h (free_all_values): Remove.
8891 * value.c (free_all_values): Remove.
8895 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8896 (value_history_chain, value_history_count): Remove.
8897 (value_history): New global.
8898 (record_latest_value, access_value_history, show_values)
8899 (preserve_values): Update.
8903 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8904 * varobj.c (varobj_set_display_format, varobj_set_value)
8905 (install_default_visualizer, construct_visualizer)
8906 (install_new_value, ~varobj, varobj_get_value_type)
8907 (my_value_of_variable, varobj_editable_p): Update.
8908 * c-varobj.c (c_describe_child, c_value_of_variable)
8909 (cplus_number_of_children, cplus_describe_child): Update.
8910 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8911 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8912 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8916 * printcmd.c (last_examine_address): Change type to
8918 (do_examine, x_command): Update.
8922 * value.c (release_value): Update.
8923 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8924 (struct bpstats) <val>: Now a value_ref_ptr.
8925 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8926 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8927 (~watchpoint, print_it_watchpoint, watch_command_1)
8928 (invalidate_bp_value_on_memory_change): Update.
8932 * varobj.c (varobj_clear_saved_item)
8933 (update_dynamic_varobj_children, install_new_value, ~varobj):
8935 * value.h (value_incref): Move declaration earlier.
8936 (value_decref): Rename from value_free.
8937 (struct value_ref_policy): New.
8938 (value_ref_ptr): New typedef.
8939 (struct value_deleter): Remove.
8940 (gdb_value_up): Remove typedef.
8941 (release_value): Change return type.
8942 (release_value_or_incref): Remove.
8943 * value.c (set_value_parent): Update.
8944 (value_incref): Change return type.
8945 (value_decref): Rename from value_free.
8946 (value_free_to_mark, free_all_values, free_value_chain): Update.
8947 (release_value): Return value_ref_ptr.
8948 (release_value_or_incref): Remove.
8949 (record_latest_value, set_internalvar, clear_internalvar):
8951 * stack.c (info_frame_command): Don't call value_free.
8952 * python/py-value.c (valpy_dealloc, valpy_new)
8953 (value_to_value_object): Update.
8954 * printcmd.c (do_examine): Update.
8955 * opencl-lang.c (lval_func_free_closure): Update.
8956 * mi/mi-main.c (register_changed_p): Don't call value_free.
8957 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8958 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8959 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8961 * guile/scm-value.c (vlscm_free_value_smob)
8962 (vlscm_scm_from_value): Update.
8963 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8964 (frame_unwind_register_unsigned, get_frame_register_bytes)
8965 (put_frame_register_bytes): Don't call value_free.
8966 * findvar.c (address_from_register): Don't call value_free.
8967 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8968 * dwarf2loc.c (entry_data_value_free_closure)
8969 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8970 (dwarf2_evaluate_loc_desc_full): Update.
8971 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8972 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8973 (~watchpoint, watch_command_1)
8974 (invalidate_bp_value_on_memory_change): Update.
8975 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8980 * warning.m4: Add -Wno-error=deprecated-register.
8981 * configure: Re-generate.
8985 * linespec.h: Remove include of "vec.h".
8989 * linespec.c (typep): Remove typedef.
8990 (find_methods, find_superclass_methods): Take a std::vector.
8991 (find_method): Use std::vector.
8995 * utils.c (compare_strings): Remove.
8996 * utils.h (compare_strings): Remove.
8997 * objc-lang.h (find_imps): Update.
8998 * objc-lang.c (find_methods): Take a std::vector.
8999 (uniquify_strings, find_imps): Likewise.
9000 * linespec.c (find_methods): Take a std::vector.
9001 (decode_objc): Use std::vector.
9002 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9004 (find_method, find_function_symbols): Use std::vector.
9008 * completer.c (completion_tracker::completion_tracker): Remove
9010 (completion_tracker::discard_completions): Likewise.
9011 * breakpoint.c (ambiguous_names_p): Remove cast.
9012 * ada-lang.c (_initialize_ada_language): Remove cast.
9013 * utils.h (streq): Update.
9014 (streq_hash): Add new declaration.
9015 * utils.c (streq): Return bool.
9016 (streq_hash): New function.
9020 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9021 Remove a string copy.
9025 * linespec.c (filter_results): Use std::vector.
9026 (decode_line_2, decode_line_full): Update.
9030 * linespec.c (canonical_to_fullform): Return std::string.
9031 (filter_results): Update.
9032 (struct decode_line_2_item): Add constructor.
9033 <fullform, displayform>: Now std::string.
9034 (decode_line_2_compare_items): Now a std::sort comparator.
9035 (decode_line_2): Update.
9039 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9040 (unexpected_linespec_error): Update.
9041 (linespec_parse_basic, parse_linespec): Update.
9045 * linespec.c (linespec_parse_basic): Reindent.
9049 * minsyms.h (iterate_over_minimal_symbols): Update.
9050 * minsyms.c (iterate_over_minimal_symbols): Take a
9052 * linespec.c (struct collect_minsyms): Remove.
9053 (compare_msyms): Now a std::sort comparator.
9054 (add_minsym): Add parameters.
9055 (search_minsyms_for_name): Update. Use std::vector.
9059 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9064 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9069 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9070 printing static type.
9074 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9075 (rs6000_xfer_shared_libraries): Update.
9079 * common/gdb_vecs.h (char_ptr): Remove.
9080 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9084 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9086 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9090 * tracepoint.h (struct uploaded_tp): Initialize fields.
9091 <actions, step_actions, cmd_strings>: Change type to
9092 std::vector<char *>.
9093 * tracepoint.c (get_uploaded_tp): Allocate with new.
9094 (free_uploaded_tps): Free with delete.
9095 (parse_tracepoint_definition): Adjust to std::vector change.
9096 * breakpoint.c (read_uploaded_action): Likewise.
9097 (create_tracepoint_from_upload): Likewise.
9098 * ctf.c (ctf_write_uploaded_tp): Likewise.
9099 (SET_ARRAY_FIELD): Likewise.
9100 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9104 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9106 (svr4_keep_data_in_core): Update.
9107 (svr4_read_so_list): Update.
9111 * windows-nat.c (handle_output_debug_string, handle_exception):
9113 * target.h (target_read_string): Update.
9114 * target.c (target_read_string): Change "string" to
9116 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9118 * solib-frv.c (frv_current_sos): Update.
9119 * solib-dsbt.c (dsbt_current_sos): Update.
9120 * solib-darwin.c (darwin_current_sos): Update.
9121 * linux-thread-db.c (inferior_has_bug): Update.
9122 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9123 Update. Remove alloca.
9124 * ada-lang.c (ada_main_name): Update.
9128 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9129 (struct dwo_file_deleter): New.
9130 (dwo_file_up): New typedef.
9131 (open_and_init_dwo_file): Use dwo_file_up.
9132 (free_dwo_file_cleanup): Remove.
9136 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9137 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9141 * dwarf2read.c (class free_cached_comp_units): New class.
9142 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9143 (free_cached_comp_units): Remove function.
9147 * utils.h (make_cleanup_unpush_target): Remove.
9148 * inf-ptrace.c (struct target_unpusher): New.
9149 (target_unpush_up) New typedef.
9150 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9152 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9156 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9161 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9162 destructor. Now a class.
9163 (gdb_readline_wrapper_cleanup): Remove function.
9164 (gdb_readline_wrapper): Remove cleanups.
9168 * typeprint.h (struct type_print_options) <local_typedefs,
9169 global_typedefs>: Remove "struct" keyword.
9170 (class typedef_hash_table): New class.
9171 (recursively_update_typedef_hash, add_template_parameters)
9172 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9173 (find_typedef_in_hash): Don't declare.
9174 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9175 (typedef_hash_table::recursively_update): Rename from
9176 recursively_update_typedef_hash. Now a member.
9177 (typedef_hash_table::add_template_parameters): Rename from
9178 add_template_parameters. Now a member.
9179 (typedef_hash_table::typedef_hash_table): Now a constructor;
9180 rename from create_typedef_hash.
9181 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9182 rename from free_typedef_hash.
9183 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9184 (do_free_global_table): Remove.
9185 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9186 from copy_type_recursive.
9187 (create_global_typedef_table): Remove.
9188 (typedef_hash_table::find_global_typedef): Now a member of
9190 (typedef_hash_table::find_typedef): Rename from
9191 find_typedef_in_hash; now a member.
9192 (whatis_exp): Update.
9193 * extension.h (struct ext_lang_type_printers): Add constructor and
9195 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9197 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9198 Now a constructor; rename from start_ext_lang_type_printers.
9199 (ext_lang_type_printers): Now a destructor; rename from
9200 free_ext_lang_type_printers.
9201 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9203 (c_type_print_base_struct_union): Update. Remove cleanups.
9207 * dwarf-index-write.c: Include <cmath>.
9211 * NEWS: Add entry describing new "set|show varsize-limit" command.
9212 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9214 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9219 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9221 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9222 * dwarf-index-common.c: New file.
9223 * dwarf-index-common.h: New file.
9224 * dwarf-index-write.c: New file.
9225 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9226 (struct dwarf2_section_info): Move from here.
9227 (dwarf2_section_info_def): Likewise.
9228 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9229 (offset_type): Likewise.
9230 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9231 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9232 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9233 (byte_swap): Likewise.
9234 (MAYBE_SWAP): Likewise.
9235 (dwarf2_per_cu_ptr): Likewise.
9236 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9237 (struct tu_stats): Likewise.
9238 (struct dwarf2_per_objfile): Likewise.
9239 (struct dwarf2_per_cu_data): Likewise.
9240 (struct signatured_type): Likewise.
9241 (sig_type_ptr): Likewise.
9242 (DEF_VEC_P (sig_type_ptr)): Likewise.
9243 (INDEX4_SUFFIX): Likewise.
9244 (INDEX5_SUFFIX): Likewise.
9245 (DEBUG_STR_SUFFIX): Likewise.
9246 (dwarf2_read_section): Make non-static.
9247 (mapped_index_string_hash): Move from here.
9248 (dwarf5_djb_hash): Likewise.
9249 (file_write): Likewise.
9250 (class data_buf): Likewise.
9251 (struct symtab_index_entry): Likewise.
9252 (struct mapped_symtab): Likewise.
9253 (find_slot): Likewise.
9254 (hash_expand): Likewise.
9255 (add_index_entry): Likewise.
9256 (uniquify_cu_indices): Likewise.
9257 (class c_str_view): Likewise.
9258 (class c_str_view_hasher): Likewise.
9259 (class vector_hasher): Likewise.
9260 (write_hash_table): Likewise.
9261 (psym_index_map): Likewise.
9262 (struct addrmap_index_data): Likewise.
9263 (add_address_entry): Likewise.
9264 (add_address_entry_worker): Likewise.
9265 (write_address_map): Likewise.
9266 (symbol_kind): Likewise.
9267 (write_psymbols): Likewise.
9268 (struct signatured_type_index_data): Likewise.
9269 (write_one_signatured_type): Likewise.
9270 (recursively_count_psymbols): Likewise.
9271 (recursively_write_psymbols): Likewise.
9272 (class debug_names): Likewise.
9273 (check_dwarf64_offsets): Likewise.
9274 (psyms_seen_size): Likewise.
9275 (write_gdbindex): Likewise.
9276 (write_debug_names): Likewise.
9277 (assert_file_size): Likewise.
9278 (write_psymtabs_to_index): Likewise.
9279 (save_gdb_index_command): Likewise.
9280 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9282 * dwarf2read.h: New file.
9287 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9288 symbol name if the CU's language stores symbol names in linkage
9290 * language.h (struct language_defn)
9291 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9292 all instances of this struct.
9296 * stack.c (backtrace_command_1): Remove verbose code.
9300 * python/py-framefilter.c (py_print_type): Don't catch
9301 exceptions. Return void.
9302 (py_print_value): Likewise.
9303 (py_print_single_arg): Likewise.
9304 (enumerate_args): Don't catch exceptions.
9305 (py_print_args): Likewise.
9306 (py_print_frame): Likewise.
9307 (gdbpy_apply_frame_filter): Catch exceptions here.
9311 * stack.c (_initialize_stack): Remove trailing newlines from help
9312 text. Add "Usage" line to "backtrace" help.
9317 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9321 * python/py-framefilter.c (py_print_single_arg): Return
9322 EXT_LANG_BT_ERROR from catch.
9327 * stack.c (backtrace_command_1): Move some code into no-filters
9332 * python/py-framefilter.c (throw_quit_or_print_exception): New
9334 (gdbpy_apply_frame_filter): Use it.
9339 * python/py-framefilter.c (py_print_type, py_print_value)
9340 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9345 * python/py-framefilter.c (enumerate_args): Use
9346 gdb::unique_xmalloc_ptr.
9350 * python/py-framefilter.c (py_print_frame): Return
9352 (gdbpy_apply_frame_filter): Update comment.
9353 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9355 <EXT_LANG_BT_NO_FILTERS>: Change value.
9360 * stack.c (backtrace_command): Parse "hide" argument.
9361 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9362 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9367 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9369 (backtrace_command): Remove "fulltrace", add "flags".
9373 * stack.c (backtrace_command): Rewrite command line parsing.
9377 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9381 * filename-seen-cache.h: Add include guard.
9385 * symfile.c (place_section): Remove "struct" from section_addr_info
9387 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9388 "struct" keyword from section_addr_info.
9392 * regformats/regdef.h (reg): Add constructors.
9396 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9397 if then/else bodies in var_func_name extraction.
9401 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9402 lookup_minimal_symbol() to find symbol entry.
9403 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9408 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9409 nested type definitions for C++, too.
9413 * machoread.c (struct oso_el): Add a constructor. Don't define as
9415 (macho_register_oso): Remove.
9416 (macho_symtab_read): Take a std::vector.
9417 (oso_el_compare_name): Now a std::sort comparator.
9418 (macho_symfile_read_all_oso): Take a std::vector.
9419 (macho_symfile_read): Use std::vector. Remove cleanups.
9423 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9424 (record_full_goto_bookmark): Use std::string.
9429 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9434 * rs6000-tdep.c (store_insn_p): New function.
9435 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9436 and cr_reg to their unshifted values. Use store_insn_p to
9437 match LR saves using either R1 or fdata->alloca_reg. Use
9438 store_insn_p to match CR saves. Set alloca_reg_offset
9439 when alloca_reg and framep are set. Remove lr_reg shift
9440 when assigning to fdata->lr_register.
9444 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9445 command line args instead of emitting a warning.
9449 * tracepoint.h (struct static_tracepoint_marker): Initialize
9450 fields, define default constructor, move constructor and move
9451 assignment, disable the rest.
9452 <str_id, extra>: Make std::string.
9453 (release_static_tracepoint_marker): Remove.
9454 (free_current_marker): Remove.
9455 * tracepoint.c (free_current_marker): Remove.
9456 (parse_static_tracepoint_marker_definition): Adjust to
9457 std::string, use new hex2str overload.
9458 (release_static_tracepoint_marker): Remove.
9459 (print_one_static_tracepoint_marker): Get marker by reference
9460 and adjust to std::string.
9461 (info_static_tracepoint_markers_command): Adjust to std::vector
9463 * target.h (static_tracepoint_marker_p): Remove typedef.
9464 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9465 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9467 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9469 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9470 (target_debug_print_std_vector_static_tracepoint_marker): New.
9471 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9473 (target_debug_print_static_tracepoint_marker_p): ... this.
9474 * target-delegates.c: Re-generate.
9475 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9477 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9478 (decode_static_tracepoint_spec): Adjust to std::vector.
9479 (tracepoint_print_one_detail): Adjust to std::string.
9480 (strace_marker_decode_location): Adjust to std::string.
9481 (update_static_tracepoint): Adjust to std::string, remove call
9482 to release_static_tracepoint_marker.
9483 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9484 Adjust to std::vector.
9485 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9486 (remote_static_tracepoint_markers_by_strid): Adjust to
9488 * common/rsp-low.h (hex2str): New overload with explicit count
9490 * common/rsp-low.c (hex2str): New overload with explicit count
9492 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9493 (_initialize_rsp_low_selftests): Add test_hex2str test.
9494 * unittests/tracepoint-selftests.c
9495 (test_parse_static_tracepoint_marker_definition): Adjust to
9500 * tracepoint.c (parse_static_tracepoint_marker_definition):
9501 Consider case where the definition is followed by more
9503 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9504 tracepoint-selftests.c.
9505 * unittests/tracepoint-selftests.c: New.
9509 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9514 * symtab.c (find_pc_sect_line): fixed indentation.
9518 * symtab.c (find_pc_sect_line): now uses binary search.
9522 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9528 * unittests/observable-selftests.c: New file.
9529 * common/observable.h: New file.
9530 * observable.h: New file.
9531 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9532 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9533 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9534 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9535 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9536 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9537 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9538 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9539 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9540 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9541 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9542 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9543 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9544 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9545 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9546 tui/tui-interp.c, valops.c: Update all users.
9547 * tui/tui-hooks.c (tui_bp_created_observer)
9548 (tui_bp_deleted_observer, tui_bp_modified_observer)
9549 (tui_inferior_exit_observer, tui_before_prompt_observer)
9550 (tui_normal_stop_observer, tui_register_changed_observer):
9552 (tui_observers_token): New global.
9553 (attach_or_detach, tui_attach_detach_observers): New functions.
9554 (tui_install_hooks, tui_remove_hooks): Use
9555 tui_attach_detach_observers.
9556 * record-btrace.c (record_btrace_thread_observer): Remove.
9557 (record_btrace_thread_observer_token): New global.
9558 * observer.sh: Remove.
9559 * observer.c: Rename to observable.c.
9560 * observable.c (namespace gdb_observers): Define new objects.
9561 (observer_debug): Move into gdb_observers namespace.
9562 (struct observer, struct observer_list, xalloc_observer_list_node)
9563 (xfree_observer_list_node, generic_observer_attach)
9564 (generic_observer_detach, generic_observer_notify): Remove.
9565 (_initialize_observer): Update.
9566 Don't include observer.inc.
9567 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9568 (clean mostlyclean): Likewise.
9569 (observer.h, observer.inc): Remove targets.
9570 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9571 (COMMON_SFILES): Use observable.c, not observer.c.
9572 * .gitignore: Remove observer.h.
9576 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9578 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9582 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9586 * target.c (class scoped_target_fd): New.
9587 (target_fileio_close_cleanup): Remove.
9588 (target_fileio_read_alloc_1): Use scoped_target_fd.
9592 * silent-rules.mk: New.
9593 * Makefile.in: Include silent-rules.mk
9594 (srcdir, VPATH, top_srcdir): Move up.
9595 (COMPILE): Add ECHO_CXX.
9596 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9597 (init.c): Add ECHO_INIT_C.
9598 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9599 (version.c): Add ECHO_GEN.
9600 (printcmd.o): Add ECHO_CXX.
9601 (target-float.o): Add ECHO_CXX.
9602 (ada-exp.o): Add ECHO_CXX.
9603 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9604 (insight$(EXEEXT)): Add ECHO_CXXLD.
9605 * gnulib/configure.ac: Add AM_SILENT_RULES.
9606 * gnulib/aclocal.m4: Re-generate.
9607 * gnulib/configure: Re-generate.
9608 * gnulib/import/Makefile.in: Re-generate.
9612 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9613 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9614 * utils.c (do_free_section_addr_info)
9615 (make_cleanup_free_section_addr_info): Remove.
9616 * symfile.h (struct other_sections): Add constructor.
9617 (struct section_addr_info): Remove.
9618 (section_addr_info): New typedef.
9619 (struct sym_fns) <sym_offsets>: Change type of parameter.
9620 (build_section_addr_info_from_objfile)
9621 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9622 (default_symfile_offsets, symbol_file_add)
9623 (symbol_file_add_from_bfd)
9624 (build_section_addr_info_from_section_table): Update.
9625 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9626 * symfile.c (alloc_section_addr_info): Remove.
9627 (build_section_addr_info_from_section_table): Change return type.
9629 (build_section_addr_info_from_bfd)
9630 (build_section_addr_info_from_objfile): Likewise.
9631 (free_section_addr_info): Remove.
9632 (relative_addr_info_to_section_offsets): Change type of "addrs".
9633 (addrs_section_compar): Now a std::sort comparator.
9634 (addrs_section_sort): Change return type.
9635 (addr_info_make_relative): Change type of "addrs". Update.
9636 (default_symfile_offsets, syms_from_objfile_1)
9637 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9638 (symbol_file_add_separate): Update.
9639 (symbol_file_add): Change type of "addrs". Update.
9640 (add_symbol_file_command): Update. Remove cleanups.
9641 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9643 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9644 * solib.c (solib_read_symbols): Update.
9645 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9646 * machoread.c (macho_symfile_offsets): Update.
9647 * jit.c (jit_bfd_try_read_symtab): Update.
9651 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9652 unittests/utils-selftests.c.
9653 * unittests/utils-selftests.c: New file.
9658 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9664 * printcmd.c (printf_pointer): Allow "-" in format.
9668 * printcmd.c (_initialize_printcmd): Add usage to printf.
9672 * MAINTAINERS: Update my email address.
9676 * machoread.c (macho_check_dsym): Change filenamep to a
9678 (macho_symfile_read): Update.
9679 * symfile.c (load_command): Use std::string.
9683 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9684 to error message string.
9685 (riscv_register_name): Use xsnprintf instead of sprintf.
9686 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9688 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9690 (riscv_push_dummy_call): Likewise.
9694 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9695 Use gdb::byte_vector.
9696 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9700 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9701 parameter type to readable_regcache.
9702 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9707 * dwarf2read.c (struct nextfield): Add initializers.
9708 (struct nextfnfield): Remove.
9709 (struct fnfieldlist): Add initializers. Remove "length" and
9710 "head", use std::vector.
9711 (struct decl_field_list): Remove.
9712 (struct field_info): Add initializers.
9713 <fields, baseclasses>: Now std::vector.
9714 <nbaseclasses, nfnfields, typedef_field_list_count,
9715 nested_types_list_count>: Remove.
9716 (dwarf2_add_field, dwarf2_add_type_defn)
9717 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9718 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9719 (process_structure_scope): Update.
9723 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9724 for use by std::sort.
9725 (build_type_psymtabs_1): Use std::vector.
9729 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9730 and LIBMPFR in the printed configuration.
9734 * source.c (get_filename_and_charpos): Use scoped_fd.
9735 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9736 (procfs_pidlist): Likewise.
9737 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9738 (iterate_over_mappings): Likewise.
9742 * infcall.c (struct call_return_meta_info)
9743 <stack_temporaries_enabled>: Remove.
9744 (get_call_return_value, call_function_by_hand_dummy): Update.
9745 * thread.c (disable_thread_stack_temporaries): Remove.
9746 (enable_thread_stack_temporaries): Remove.
9747 (thread_stack_temporaries_enabled_p): Return bool.
9748 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9749 (get_last_thread_stack_temporary): Update.
9750 * eval.c (evaluate_subexp): Update.
9751 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9752 class, not a function.
9753 (value_ptr, value_vec): Remove typedefs.
9754 (class thread_info) <stack_temporaries_enabled>: Now bool.
9755 <stack_temporaries>: Now a std::vector.
9756 (thread_stack_temporaries_enabled_p)
9757 (value_in_thread_stack_temporaries): Return bool.
9761 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9762 (getpkt_or_notif_sane_1): Likewise.
9766 * build-id.c (build_id_to_debug_bfd): Use std::string.
9770 * build-id.c (find_separate_debug_file_by_buildid): Return
9772 * build-id.h (find_separate_debug_file_by_buildid): Return
9774 * coffread.c (coff_symfile_read): Adjust to std::string.
9775 * elfread.c (elf_symfile_read): Adjust to std::string.
9776 * symfile.c (separate_debug_file_exists): Change parameter to
9778 (find_separate_debug_file): Return std::string.
9779 (find_separate_debug_file_by_debuglink): Return std::string.
9780 * symfile.h (find_separate_debug_file_by_debuglink): Return
9785 * common/xml-utils.c (xml_escape_text): Move code to...
9786 (xml_escape_text_append): ... this new function.
9787 * common/xml-utils.h (xml_escape_text_append): New declaration.
9788 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9790 (_initialize_xml_utils): register test_xml_escape_text_append as
9795 * defs.h: Remove MAX_REGISTER_SIZE.
9796 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9798 * python/py-unwind.c (pyuw_sniffer): Likewise.
9802 * linux-tdep.c (linux_info_proc): Update.
9803 * target.h (struct target_ops) <to_fileio_readlink>: Return
9805 (target_fileio_readlink): Return optional<string>.
9806 * remote.c (remote_hostio_readlink): Return optional<string>.
9807 * inf-child.c (inf_child_fileio_readlink): Return
9809 * target.c (target_fileio_readlink): Return optional<string>.
9813 * regcache.c (cooked_read_test): Add riscv to the list of
9814 architectures that have a save_reggroup.
9818 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9819 value is not a dynamic class object.
9823 * rust-exp.y: Formatting fixes.
9827 * riscv-tdep.c (riscv_register_name): Remove target description
9829 (riscv_gdbarch_init): Remove target description check.
9833 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9835 * riscv-tdep.h: Likewise.
9839 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9840 (riscv_pseudo_register_write): Delete.
9841 (riscv_gdbarch_init): Remove all use of pseudo registers.
9845 * record-btrace.c (btrace_print_lines): Replace cleanup
9846 parameter with RAII equivalents.
9847 (btrace_insn_history): Replace cleanup with RAII equivalents.
9848 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9849 make_cleanup_ui_out_tuple_begin_end): Remove.
9850 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9851 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9852 make_cleanup_ui_out_list_begin_end): Remove.
9856 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9857 parameter types to std::vector. Use bool.
9858 (record_btrace_wait): Replace VEC(tp_t) with
9859 std::vector<thread_info *>.
9860 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9864 * record-btrace.c (record_btrace_disable_callback): Remove.
9865 (struct scoped_btrace_disable): New.
9866 (record_btrace_open): Use scoped_btrace_disable.
9870 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9871 reading values from registers.
9875 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9880 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9881 change parameter type. Use GDB's print functions, and use
9882 core_addr_to_string where appropriate.
9883 (riscv_push_dummy_call): Use core_addr_to_string where
9884 appropriate, update call to riscv_print_arg_location, and reindent
9886 (riscv_return_value): Update call to riscv_print_arg_location.
9893 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9894 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9895 (ALLDEPFILES): Add riscv-tdep.c
9896 * configure.tgt: Add riscv support.
9897 * riscv-tdep.c: New file.
9898 * riscv-tdep.h: New file.
9899 * NEWS: Mention new target.
9900 * MAINTAINERS: Add entry for riscv.
9904 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9905 fields within aggregates.
9909 * record-btrace.c (btrace_print_lines): Change type of flags to
9910 gdb_disassembly_flags.
9914 * fbsd-nat.c: Include "inf-ptrace.h".
9915 (USE_SIGTRAP_SIGINFO): Conditionally define.
9916 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9917 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9918 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9920 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9922 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9924 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9925 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9926 "supports_stopped_by_hw_breakpoint" target methods.
9930 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9931 * fbsd-nat.c (debug_fbsd_nat): New variable.
9932 (show_fbsd_nat_debug): New function.
9933 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9934 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9938 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9939 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9941 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9942 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9947 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9948 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9952 * charset.c (struct charset_vector): New.
9953 (charsets): Change type to charset_vector.
9954 (find_charset_names): Adjust.
9956 (_initialize_charset): Adjust.
9960 * progspace.h (struct program_space) <deleted_solibs>: Change
9961 type to std::vector<std::string>.
9962 * progspace.c (clear_program_space_solib_cache): Adjust.
9963 * breakpoint.c (print_solib_event): Adjust.
9964 (check_status_catch_solib): Adjust.
9965 * solib.c (update_solib_list): Adjust.
9966 * ui-out.h (class ui_out) <field_string>: New overload.
9967 * ui-out.c (ui_out::field_string): New overload.
9971 * progspace.h (struct program_space): Add constructor and
9972 destructor, initialize fields.
9973 (add_program_space): Remove.
9974 * progspace.c (add_program_space): Rename to...
9975 (program_space::program_space): ... this.
9976 (release_program_space): Rename to...
9977 (program_space::~program_space): ... this.
9978 (delete_program_space): Use delete to delete program_space.
9979 (initialize_progspace): Use new to allocate program_space.
9980 * inferior.c (add_inferior_with_spaces): Likewise.
9981 (clone_inferior_command): Likewise.
9982 * infrun.c (follow_fork_inferior): Likewise.
9983 (handle_vfork_child_exec_or_exit): Likewise.
9987 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9988 (delim_string_to_char_ptr_vec): Return std::vector of
9989 gdb::unique_xmalloc_ptr.
9990 (dirnames_to_char_ptr_vec_append): Take std::vector of
9991 gdb::unique_xmalloc_ptr.
9992 (dirnames_to_char_ptr_vec): Return std::vector of
9993 gdb::unique_xmalloc_ptr.
9994 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9995 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9996 (delim_string_to_char_ptr_vec): Return an std::vector of
9997 gdb::unique_xmalloc_ptr, adjust the code.
9998 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9999 gdb::unique_xmalloc_ptr, adjust the code.
10000 (dirnames_to_char_ptr_vec): Return an std::vector of
10001 gdb::unique_xmalloc_ptr, adjust the code.
10002 * auto-load.c (auto_load_safe_path_vec): Change type to
10003 std::vector of gdb::unique_xmalloc_ptr.
10004 (auto_load_expand_dir_vars): Return an std::vector of
10005 gdb::unique_xmalloc_ptr, adjust the code.
10006 (auto_load_safe_path_vec_update): Adjust.
10007 (filename_is_in_auto_load_safe_path_vec): Adjust.
10008 (auto_load_objfile_script_1): Adjust.
10009 * build-id.c (build_id_to_debug_bfd): Adjust.
10010 * linux-thread-db.c (thread_db_load_search): Adjust.
10011 * source.c (add_path): Adjust.
10013 * symfile.c (find_separate_debug_file): Adjust.
10014 * utils.c (do_free_char_ptr_vec): Remove.
10015 (make_cleanup_free_char_ptr_vec): Remove.
10020 * common/pathstuff.c: Conditionally include "<windows.h>".
10025 * gcore.in: Quote variables and switch interpreter to bash.
10029 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10030 assertion. Add assertion for discriminant_index.
10031 (quirk_rust_enum): Use correct base type name in univariant case.
10035 * record.c (get_call_history_modifiers): Return a
10036 record_print_flags.
10037 (cmd_record_call_history): Adjust.
10038 * record-btrace.c (record_btrace_call_history): Adjust.
10039 (record_btrace_call_history_range): Adjust.
10040 (record_btrace_call_history_from): Adjust.
10041 * target-debug.h (target_debug_print_record_print_flags): New.
10042 * target-delegates.c: Re-generate.
10043 * target.c (target_call_history): Change flags type.
10044 (target_call_history_from): Likewise.
10045 (target_call_history_range): Likewise.
10046 * target.h (struct target_ops) <target_call_history>: Likewise.
10047 (target_call_history_from): Likewise.
10048 (target_call_history_range): Likewise.
10053 * common/common-utils.c: Include "sys/stat.h".
10054 (is_regular_file): Move here from "source.c"; change return
10056 * common/common-utils.h (is_regular_file): New prototype.
10057 * common/pathstuff.c (contains_dir_separator): New function.
10058 * common/pathstuff.h (contains_dir_separator): New prototype.
10059 * source.c: Don't include "sys/stat.h".
10060 (is_regular_file): Move to "common/common-utils.c".
10064 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10065 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10066 * auto-load.c: Include "common/pathstuff.h".
10067 * common/common-def.h (current_directory): Move here.
10068 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10070 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10072 * common/pathstuff.c: New file.
10073 * common/pathstuff.h: New file.
10074 * compile/compile.c: Include "common/pathstuff.h".
10075 * defs.h (current_directory): Move to "common/common-defs.h".
10076 * dwarf2read.c: Include "common/pathstuff.h".
10077 * exec.c: Likewise.
10078 * guile/scm-safe-call.c: Likewise.
10079 * linux-thread-db.c: Likewise.
10080 * main.c: Likewise.
10081 * nto-tdep.c: Likewise.
10082 * objfiles.c: Likewise.
10083 * source.c: Likewise.
10084 * symtab.c: Likewise.
10085 * utils.c: Include "common/pathstuff.h".
10086 (gdb_realpath): Move to "common/pathstuff.c".
10087 (gdb_realpath_keepfile): Likewise.
10088 (gdb_abspath): Likewise.
10089 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10090 (gdb_realpath_keepfile): Likewise.
10091 (gdb_abspath): Likewise.
10095 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10096 wildcard process pid for super_resume for kernels with a
10101 * compile/compile.c (get_args): Add additional comments
10102 explaining function.
10107 * target.h (memory_write_request_s): Remove typedef. Don't define
10109 (target_write_memory_blocks): Change argument to std::vector.
10110 (struct memory_write_request): Add constructor.
10111 * target-memory.c (compare_block_starting_address): Return bool.
10112 Change argument types.
10113 (claim_memory): Change arguments to use std::vector.
10114 (split_regular_and_flash_blocks, blocks_to_erase)
10115 (compute_garbled_blocks): Likewise.
10116 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10117 (target_write_memory_blocks): Change argument to std::vector.
10118 * symfile.c (struct load_section_data): Add constructor and
10119 destructor. Use std::vector for "requests".
10120 (struct load_progress_data): Add initializers.
10121 (load_section_callback): Update. Use "new".
10122 (clear_memory_write_data): Remove.
10123 (generic_load): Update.
10127 * arch/aarch64.h: Use common/tdesc.h.
10131 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10132 architecture with a 64-bit ABI.
10136 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10137 ahead of target description loading.
10141 * stack.c (backtrace_command_1): Update.
10142 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10144 * python/py-framefilter.c (py_print_frame)
10145 (gdbpy_apply_frame_filter): Change type of "flags".
10146 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10148 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10149 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10150 * extension.h (enum frame_filter_flag): Rename from
10151 frame_filter_flags.
10152 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10153 (apply_ext_lang_frame_filter): Change type of "flags".
10154 * extension.c (apply_ext_lang_frame_filter): Change type of
10156 * extension-priv.h (struct extension_language_ops)
10157 <apply_frame_filter>: Change type of "flags".
10162 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10163 off-by-one in py_end computation.
10164 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10166 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10171 * dwarf2read.c (struct variant_field): New.
10172 (struct nextfield) <variant>: New field.
10173 (dwarf2_add_field): Handle DW_TAG_variant_part.
10174 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10175 discriminated union.
10176 (read_structure_type): Handle DW_TAG_variant_part.
10177 (handle_struct_member_die): New function, extracted from
10178 process_structure_scope. Handle DW_TAG_variant.
10179 (process_structure_scope): Handle discriminated unions. Call
10180 handle_struct_member_die.
10184 * rust-lang.h (rust_last_path_segment): Declare.
10185 * rust-lang.c (rust_last_path_segment): Now public. Change
10187 (struct disr_info): Remove.
10188 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10189 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10190 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10191 (rust_enum_p, rust_enum_variant): New function.
10192 (rust_underscore_fields): Remove "offset" parameter.
10193 (rust_print_enum): New function.
10194 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10195 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10196 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10198 (rust_internal_print_type): New function, from rust_print_type.
10200 (rust_print_type): Call rust_internal_print_type.
10201 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10202 Update enum handling.
10203 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10204 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10205 (rust_union_quirks): New functions.
10206 (process_full_comp_unit, process_full_type_unit): Call
10208 (process_structure_scope): Update rust_unions if necessary.
10212 * value.h (value_union_variant): Declare.
10213 * valops.c (value_union_variant): New function.
10214 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10215 (struct discriminant_info): New.
10216 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10218 (struct main_type) <flag_discriminated_union>: New field.
10222 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10223 unittests/unpack-selftests.c.
10224 * unittests/unpack-selftests.c: New file.
10225 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10229 * dwarf2read.c (struct partial_die_info) <read>: New method.
10230 (read_partial_die): Remove the declaration.
10231 (load_partial_dies): Update.
10232 (partial_die_info::partial_die_info):
10233 (read_partial_die): Change it to partial_die_info::read.
10237 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10238 (fixup_partial_die): Remove declaration.
10239 (scan_partial_symbols): Update.
10240 (partial_die_parent_scope): Likewise.
10241 (partial_die_full_name): Likewise.
10242 (fixup_partial_die): Change it to partial_die_info::fixup.
10246 * dwarf2read.c (read_partial_die): Update the declaration.
10247 (load_partial_dies): Caller update.
10248 (read_partial_die): Remove one argument abbrev_len.
10252 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10253 assignment operator.
10254 (load_partial_dies): Use ctor and copy ctor.
10255 (read_partial_die): Update.
10256 (dwarf2_cu::find_partial_die): Use ctor.
10260 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10261 (find_partial_die_in_comp_unit): Change it to
10262 dwarf2_cu::find_partial_die.
10263 (find_partial_die): Update.
10267 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10272 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10276 * arch/amd64.h: Use common/tdesc.h.
10277 * arch/i386.c: Likewise.
10278 * arch/i386.h: Likewise.
10279 * arch/tic6x.c: Likewise.
10280 * arch/tdesc.h: Move file from here...
10281 * common/tdesc.h: ...to here.
10282 * features/aarch64-core.c: Regenerate.
10283 * features/aarch64-fpu.c: Regenerate.
10284 * features/i386/32bit-avx.c: Regenerate.
10285 * features/i386/32bit-avx512.c: Regenerate.
10286 * features/i386/32bit-core.c: Regenerate.
10287 * features/i386/32bit-linux.c: Regenerate.
10288 * features/i386/32bit-mpx.c: Regenerate.
10289 * features/i386/32bit-pkeys.c: Regenerate.
10290 * features/i386/32bit-sse.c: Regenerate.
10291 * features/i386/64bit-avx.c: Regenerate.
10292 * features/i386/64bit-avx512.c: Regenerate.
10293 * features/i386/64bit-core.c: Regenerate.
10294 * features/i386/64bit-linux.c: Regenerate.
10295 * features/i386/64bit-mpx.c: Regenerate.
10296 * features/i386/64bit-pkeys.c: Regenerate.
10297 * features/i386/64bit-segments.c: Regenerate.
10298 * features/i386/64bit-sse.c: Regenerate.
10299 * features/i386/x32-core.c: Regenerate.
10300 * features/tic6x-c6xp.c: Regenerate.
10301 * features/tic6x-core.c: Regenerate.
10302 * features/tic6x-gp.c: Regenerate.
10303 * target-descriptions.c: Use common/tdesc.h.
10304 * target-descriptions.h: Likewise.
10308 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10309 (try_thread_db_load_from_dir, thread_db_load_search): Use
10311 (info_auto_load_libthread_db_compare): Return bool. Change
10313 (info_auto_load_libthread_db): Use std::vector, std::string.
10318 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10320 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10322 * gdbarch.c: Rebuild.
10323 * gdbarch.h: Rebuild.
10324 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10325 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10326 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10331 * gdbtypes.h (sect_offset): Change type to uint64_t.
10332 (sect_offset_str): New function.
10333 * dwarf2read.c (create_addrmap_from_aranges): Use
10335 (error_check_comp_unit_head): Likewise.
10336 (create_debug_type_hash_table): Likewise.
10337 (read_cutu_die_from_dwo): Likewise.
10338 (init_cutu_and_read_dies): Likewise.
10339 (init_cutu_and_read_dies_no_follow): Likewise.
10340 (process_psymtab_comp_unit_reader): Likewise.
10341 (partial_die_parent_scope): Likewise.
10342 (peek_die_abbrev): Likewise.
10343 (process_queue): Likewise.
10344 (dwarf2_physname): Likewise.
10345 (read_namespace_alias): Likewise.
10346 (read_import_statement): Likewise.
10347 (create_dwo_cu_reader): Likewise.
10348 (create_cus_hash_table): Likewise.
10349 (lookup_dwo_cutu): Likewise.
10350 (inherit_abstract_dies): Likewise.
10351 (read_func_scope): Likewise.
10352 (read_call_site_scope): Likewise.
10353 (dwarf2_add_member_fn): Likewise.
10354 (read_common_block): Likewise.
10355 (read_module_type): Likewise.
10356 (read_typedef): Likewise.
10357 (read_subrange_type): Likewise.
10358 (load_partial_dies): Likewise.
10359 (read_partial_die): Likewise.
10360 (find_partial_die): Likewise.
10361 (read_str_index): Likewise.
10362 (dwarf2_string_attr): Likewise.
10363 (build_error_marker_type): Likewise.
10364 (lookup_die_type): Likewise.
10365 (dump_die_shallow): Likewise.
10366 (follow_die_ref): Likewise.
10367 (dwarf2_fetch_die_loc_sect_off): Likewise.
10368 (dwarf2_fetch_constant_bytes): Likewise.
10369 (follow_die_sig): Likewise.
10370 (get_signatured_type): Likewise.
10371 (get_DW_AT_signature_type): Likewise.
10372 (dwarf2_find_containing_comp_unit): Likewise.
10373 (set_die_type): Likewise.
10377 * arch/aarch64.c: Include "common-defs.h".
10378 * arch/amd64.c: Likewise.
10379 * arch/i386.c: Likewise.
10383 * value.h: (extract_field_op): Update.
10384 * eval.c (extract_field_op): Return a const char *.
10385 * expression.h (parse_expression_for_completion): Update.
10386 * completer.c (complete_expression): Update.
10387 (add_struct_fields): Make fieldname const.
10388 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10389 (mark_completion_tag, parse_exp_in_context_1): Update.
10390 (parse_expression_for_completion): Change "name" to
10391 unique_xmalloc_ptr*.
10395 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10399 * avr-tdep.c (avr_read_pc): Change parameter type to
10401 * gdbarch.sh (read_pc): Likewise.
10402 * gdbarch.c: Re-generated.
10403 * gdbarch.h: Re-generated.
10404 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10406 * ia64-tdep.c (ia64_read_pc): Likewise.
10407 * mips-tdep.c (mips_read_pc): Likewise.
10408 * spu-tdep.c (spu_read_pc): Likewise.
10412 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10413 * regcache-dump.c: New file.
10414 * regcache.c: Move register_dump to regcache-dump.c.
10415 (maintenance_print_registers): Likewise.
10416 (maintenance_print_raw_registers): Likewise.
10417 (maintenance_print_cooked_registers): Likewise.
10418 (maintenance_print_register_groups): Likewise.
10419 (maintenance_print_remote_registers): Likewise.
10420 (_initialize_regcache): Likewise.
10421 * regcache.h (register_dump): Moved from regcache.c.
10425 * regcache.c (regcache::regcache): Update.
10426 (regcache::invalidate): Move it to detached_regcache::invalidate.
10427 (get_thread_arch_aspace_regcache): Update.
10428 (regcache::raw_update): Update.
10429 (regcache::cooked_read): Remove some code.
10430 (regcache::cooked_read_value): Likewise.
10431 (regcache::raw_write): Remove assert on m_readonly_p.
10432 (regcache::raw_supply_integer): Move it to
10433 detached_regcache::raw_supply_integer.
10434 (regcache::raw_supply_zeroed): Likewise.
10435 * regcache.h (detached_regcache) <raw_supply_integer>: New
10437 <raw_supply_zeroed, invalidate>: Likewise.
10438 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10439 <invalidate>: Likewise.
10440 <m_readonly_p>: Removed.
10444 * infcmd.c (get_return_value): Let stop_regs point to
10445 get_current_regcache.
10446 * regcache.c (regcache::regcache): Remove.
10447 (register_dump_reg_buffer): New class.
10448 (regcache_print): Adjust.
10449 * regcache.h (regcache): Remove constructors.
10453 * regcache.c (class register_dump): New class.
10454 (register_dump_regcache, register_dump_none): New class.
10455 (register_dump_remote, register_dump_groups): New class.
10456 (regcache_print): Update.
10457 * regcache.h (regcache_dump_what): Move it to regcache.c.
10458 (regcache) <dump>: Remove.
10462 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10464 (jit_unwind_reg_set_impl): Call raw_supply.
10465 (jit_frame_sniffer): Use reg_buffer_rw.
10466 * record-full.c (record_full_core_regbuf): Change its type.
10467 (record_full_core_open_1): Use reg_buffer_rw.
10468 (record_full_close): Likewise.
10469 (record_full_core_fetch_registers): Use regcache->raw_supply.
10470 (record_full_core_store_registers): Likewise.
10471 * regcache.c (regcache::get_register_status): Move it to
10473 (regcache_raw_set_cached_value): Remove.
10474 (regcache::raw_set_cached_value): Remove.
10475 (regcache::raw_write): Call raw_supply.
10476 (regcache::raw_supply): Move it to reg_buffer_rw.
10477 * regcache.h (regcache_raw_set_cached_value): Remove.
10478 (reg_buffer_rw): New class.
10482 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10483 readonly_detached_regcache.
10484 (dummy_frame_prev_register): Use regcache->cooked_read.
10485 * frame.c (frame_save_as_regcache): Change return type.
10486 (frame_pop): Update.
10487 * frame.h (frame_save_as_regcache): Update declaration.
10488 * inferior.h (get_infcall_suspend_state_regcache): Update
10490 * infrun.c (infcall_suspend_state) <registers>: use
10491 readonly_detached_regcache.
10492 (save_infcall_suspend_state): Don't use regcache_dup.
10493 (get_infcall_suspend_state_regcache): Change return type.
10494 * linux-fork.c (struct fork_info) <savedregs>: Change to
10495 readonly_detached_regcache.
10497 (fork_save_infrun_state): Don't use regcache_dup.
10498 (info_checkpoints_command): Adjust.
10499 * mi/mi-main.c (register_changed_p): Update declaration.
10500 (mi_cmd_data_list_changed_registers): Use
10501 readonly_detached_regcache.
10502 (register_changed_p): Change parameter type to
10503 readonly_detached_regcache.
10504 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10505 readonly_detached_regcache.
10506 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10507 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10509 (regcache::save): Move it to reg_buffer.
10510 (regcache::restore): Change parameter type.
10511 (regcache_dup): Remove.
10512 * regcache.h (reg_buffer) <save>: New method.
10513 (readonly_detached_regcache): New class.
10514 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10515 readonly_detached_regcache.
10516 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10520 * frame.c (frame_save_as_regcache): Use regcache method save.
10521 (frame_pop): Use regcache method restore.
10522 * infrun.c (restore_infcall_suspend_state): Likewise.
10523 * linux-fork.c (fork_load_infrun_state): Likewise.
10524 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10526 * regcache.c (regcache_save): Remove.
10527 (regcache::restore): More asserts.
10528 (regcache_cpy): Remove.
10529 * regcache.h (regcache_save): Remove the declaration.
10530 (regcache::restore): Move from private to public.
10531 Remove the friend declaration of regcache_cpy.
10532 (regcache_cpy): Remove declaration.
10536 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10537 parameter type to 'readable_regcache *'.
10538 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10539 * arm-tdep.c (arm_neon_quad_read): Likewise.
10540 (arm_pseudo_read): Likewise.
10541 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10542 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10543 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10544 * gdbarch.c: Re-generated.
10545 * gdbarch.h: Re-generated.
10546 * gdbarch.sh (pseudo_register_read): Change parameter type to
10547 'readable_regcache *'.
10548 (pseudo_register_read_value): Likewise.
10549 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10550 (h8300_pseudo_register_read): Likewise.
10551 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10552 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10553 (i386_pseudo_register_read_into_value): Likewise.
10554 (i386_pseudo_register_read_value): Likewise.
10555 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10557 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10558 * m32c-tdep.c (m32c_raw_read): Likewise.
10559 (m32c_read_flg): Likewise.
10560 (m32c_banked_register): Likewise.
10561 (m32c_banked_read): Likewise.
10562 (m32c_sb_read): Likewise.
10563 (m32c_part_read): Likewise.
10564 (m32c_cat_read): Likewise.
10565 (m32c_r3r2r1r0_read): Likewise.
10566 (m32c_pseudo_register_read): Likewise.
10567 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10568 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10569 (mep_pseudo_cr64_read): Likewise.
10570 (mep_pseudo_register_read): Likewise.
10571 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10572 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10573 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10574 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10575 (regcache::cooked_read): Likewise.
10576 (regcache::cooked_read_value): Likewise.
10577 (regcache_cooked_read_signed):
10578 (regcache::cooked_read): Likewise.
10579 * regcache.h (readable_regcache): New class.
10580 (regcache): Inherit readable_regcache. Move some methods to
10582 * rl78-tdep.c (rl78_pseudo_register_read): Change
10583 parameter type to 'readable_regcache *'.
10584 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10585 (e500_pseudo_register_read): Change parameter type to
10586 'readable_regcache *'.
10587 (dfp_pseudo_register_read): Likewise.
10588 (vsx_pseudo_register_read): Likewise.
10589 (efpr_pseudo_register_read): Likewise.
10590 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10591 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10592 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10593 (sh64_pseudo_register_read): Likewise.
10594 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10595 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10596 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10597 (spu_pseudo_register_read): Likewise.
10598 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10599 (xtensa_pseudo_register_read): Likewise.
10603 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10604 (regcache::arch): Move it to reg_buffer::arch.
10605 (regcache::register_buffer): Likewise.
10606 (regcache::assert_regnum): Likewise.
10607 (regcache::num_raw_registers): Likewise.
10608 * regcache.h (reg_buffer): New class.
10609 (regcache): Inherit reg_buffer.
10613 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10614 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10618 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10622 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10623 (SFILES): Remove common/*.c files.
10624 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10625 * common/common.host: Add common reference.
10626 * configure.ac: Likewise.
10627 * configure: Regenerate.
10631 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10632 (block_initialize_namespace): Use new.
10633 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10634 (dwarf2_free_objfile): Use delete.
10635 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10636 (copy_type_recursive): Use new.
10637 * gdb_obstack.h (allocate_on_obstack): New.
10642 * inferior.c (exit_inferior_1): Reset inf->control.
10646 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10651 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10652 frame_cleanup_after_sniffer on exception.
10656 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10658 (solib_bfd_open): Make pathname const.
10659 * solib.c (solib_bfd_open): Make pathname const.
10660 * solib-spu.c (spu_bfd_fopen): Make name const.
10661 (spu_bfd_open): Make pathname const.
10662 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10663 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10667 * symfile.c (symfile_bfd_open): Update.
10668 * source.h (openp, source_full_path_of, find_and_open_source):
10669 Change argument type to unique_xmalloc_ptr.
10670 * source.c (openp): Take a unique_xmalloc_ptr.
10671 (source_full_path_of, find_and_open_source): Likewise.
10672 (open_source_file, symtab_to_fullname): Update.
10673 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10674 unique_xmalloc_ptr.
10675 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10676 (exec_file_find): Update.
10677 * psymtab.c (psymtab_to_fullname): Update.
10678 * nto-tdep.h (nto_find_and_open_solib): Update.
10679 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10680 unique_xmalloc_ptr.
10681 * exec.c (exec_file_attach): Update.
10682 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10683 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10687 * solib.c: Include source.h.
10688 * nto-tdep.c: Include source.h.
10689 * mi/mi-cmd-env.c: Include source.h.
10690 * infcmd.c: Include source.h.
10691 * exec.c: Include source.h.
10692 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10693 (add_path, directory_switch, source_path, init_source_path): Move
10695 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10696 (add_path, directory_switch, source_path, init_source_path):
10701 * solist.h (exec_file_find, solib_find): Return
10702 unique_xmalloc_ptr.
10703 (solib_bfd_fopen): Take a const char *.
10704 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10705 (exec_file_find, solib_find): Likewise.
10706 (solib_bfd_fopen): Do not take ownership of "pathname".
10707 (solib_bfd_open): Use unique_xmalloc_ptr.
10708 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10709 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10710 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10711 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10715 * ada-lang.c (name_match_type_from_name): Remove reference to
10716 ada_name_for_lookup in function's documentation.
10717 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10721 * defs.h (enum openp_flags): New enum.
10722 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10723 Move to enum openp_flags.
10724 (openp_flags): New enum flags.
10725 (openp): Change parameter type to openp_flags.
10726 * source.c (openp): Change parameter type to openp_flags.
10727 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10728 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10732 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10737 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10739 (class dwarf2_queue_guard): ...the destructor of this new class.
10740 (dw2_do_instantiate_symtab): Create instance of the new class
10741 dwarf2_queue_guard, remove cleanup.
10745 * source.c (find_source_lines): Don't reference past the end of
10750 * remote.c (remote_btrace_maybe_reopen): Change error message.
10751 * btrace.c (btrace_enable): Likewise.
10752 (parse_xml_btrace): Likewise.
10753 (parse_xml_btrace_conf): Likewise.
10757 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10758 (linux_enable_pt, linux_enable_bts): Call
10759 diagnose_perf_event_open_fail.
10763 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10764 Remove parameter and change return type. Update callers. Move it.
10765 (linux_enable_bts, linux_enable_pt): Improve error message.
10766 (linux_enable_pt): Remove zero buffer size check.
10767 (linux_enable_btrace): Improve error messages. Remove NULL return
10772 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10773 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10774 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10775 (linux_supports_pt, linux_supports_btrace): Remove.
10776 (linux_enable_bts): Call cpu_supports_bts.
10777 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10778 * remote.c (remote_supports_btrace): Remove.
10779 (init_remote_ops): Remove remote_supports_btrace.
10780 * target-delegates.c: Regenerated.
10781 * target.c (target_supports_btrace): Remove.
10782 * target.h (target_ops) <to_supports_btrace>: Remove
10783 (target_supports_btrace): Remove.
10784 * x86-linux-nat.c (x86_linux_create_target): Remove
10785 linux_supports_btrace.
10789 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10791 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10792 exception and use message in own exception.
10796 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10797 (perf_event_pt_event_type): Use gdb_file_up.
10798 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10799 scoped_fd, and scoped_mmap.
10803 * common/scoped_mmap.h: New.
10804 * unittests/scoped_mmap-selftest.c: New.
10805 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10806 unittests/scoped_mmap-selftest.c.
10810 * common/scoped_fd.h: New.
10811 * unittests/scoped_fd-selftest.c: New.
10812 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10813 unittests/scoped_fd-selftest.c.
10817 * auto-load.c (auto_load_section_scripts): Use
10818 gdb::unique_xmalloc_ptr.
10822 * auto-load.c (execute_script_contents): Use std::string.
10826 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10827 Python function, rather than a new command.
10831 * solib.c (solib_find_1): Use std::string.
10832 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10836 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10840 * source.c (find_source_lines): Use gdb::def_vector.
10844 * macrocmd.c (struct temporary_macro_definition): New.
10845 (macro_define_command): Use temporary_macro_definition. Remove
10847 (free_macro_definition_ptr): Remove.
10851 * macroexp.c (maybe_expand): Use std::string.
10855 * macroexp.c (struct macro_buffer): Add initializers for some
10857 (init_buffer, init_shared_buffer, free_buffer)
10858 (free_buffer_return_text): Remove.
10859 (macro_buffer): New constructors.
10860 (~macro_buffer): New destructor.
10861 (macro_buffer::set_shared): New method.
10862 (macro_buffer::resize_buffer, macro_buffer::appendc)
10863 (macro_buffer::appendmem): Now methods, not free functions.
10864 (set_token, append_tokens_without_splicing, stringify)
10865 (macro_stringify): Update.
10866 (gather_arguments): Change return type. Remove argc_p argument,
10867 add args_ptr argument. Use std::vector.
10868 (substitute_args): Remove argc argument. Accept std::vector.
10869 (expand): Update. Use std::vector.
10870 (scan, macro_expand, macro_expand_next): Update.
10874 * symtab.c (default_collect_symbol_completion_matches_break_on):
10875 Use unique_xmalloc_ptr.
10876 * macroscope.h: (sal_macro_scope, user_macro_scope)
10877 (default_macro_scope): Return unique_xmalloc_ptr.
10878 * macroscope.c (sal_macro_scope, user_macro_scope)
10879 (default_macro_scope): Return unique_xmalloc_ptr.
10880 * macroexp.h (macro_expand, macro_expand_once): Return
10881 unique_xmalloc_ptr.
10882 * macroexp.c (macro_expand, macro_expand_once): Return
10883 unique_xmalloc_ptr.
10884 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10885 (info_macro_command, info_macros_command): Use
10886 unique_xmalloc_ptr.
10887 * compile/compile-c-support.c (write_macro_definitions): Use
10888 unique_xmalloc_ptr.
10889 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10893 * value.c (value_static_field): Assign field type instead of
10894 containing type when returning an optimized out value.
10898 * ft32-tdep.c (ft32_read_pc): Remove.
10899 (ft32_write_pc): Remove.
10900 (ft32_gdbarch_init): Update.
10901 * m32r-tdep.c (m32r_read_pc): Remove.
10902 (m32r_gdbarch_init): Update.
10903 * mep-tdep.c (mep_read_pc): Remove.
10904 (mep_gdbarch_init): Update.
10905 * microblaze-tdep.c (microblaze_write_pc): Remove.
10906 (microblaze_gdbarch_init): Update.
10907 * mn10300-tdep.c (mn10300_read_pc): Remove.
10908 (mn10300_write_pc): Remove.
10909 (mn10300_gdbarch_init): Update.
10910 * moxie-tdep.c (moxie_read_pc): Remove.
10911 (moxie_write_pc): Remove.
10912 (moxie_gdbarch_init): Update.
10916 * expprint.c (print_subexp_standard): Handle
10917 OP_F77_UNDETERMINED_ARGLIST.
10918 (dump_subexp_body_standard): Likewise.
10922 * target-descriptions.c (tdesc_element_visitor) Add empty
10924 (tdesc_type): Move make_gdb_type from here.
10925 (tdesc_type_builtin): Likewise.
10926 (tdesc_type_vector): Likewise.
10927 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10928 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10929 (make_gdb_type_union): Likewise.
10930 (make_gdb_type_flags): Likewise.
10931 (make_gdb_type_enum): Likewise.
10932 (make_gdb_type): New function.
10933 (tdesc_register_type): Use static make_gdb_type.
10937 * infcmd.c (default_print_one_register_info): Align natural-format
10938 column values consistently one under another.
10939 (pad_to_column): New function.
10943 * dwarf2read.c (dwarf2_physname): Move commment.
10947 * varobj.c (varobj_formatted_print_options): Allow recursive
10948 pretty printing if pretty printing is enabled.
10952 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10953 names after a structop as a filename.
10957 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10958 (arm_record_coproc_data_proc): Likewise.
10962 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10966 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10967 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10971 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10972 * inflow.c (child_terminal_save_inferior): Wrap reference to
10973 tcgetpgrp in HAVE_TERMIOS_H.
10974 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10976 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10977 always iterate over all inferiors.
10978 (gdbsim_cntrl_c): Adjust.
10979 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10983 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10984 index type is objfile-owned if the element type is as well.
10992 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10993 "features/s390x-linux64.c".
10994 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10995 s390_linux32 and s390x_linux64.
10996 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10998 * s390-tdep.c: Include "features/s390-linux32.c" and
10999 "features/s390x-linux64.c".
11000 (s390_tdesc_valid): Add check for tdesc_has_registers.
11001 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11002 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11003 tdesc_s390x_linux64.
11004 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11005 tdesc_s390x_linux64 to...
11006 * s390-tdep.h: ...here.
11011 * config.in, configure: Regenerate.
11012 * configure.ac: Check for getpgid.
11013 * go32-nat.c (go32_pass_ctrlc): New.
11014 (go32_target): Install it.
11015 * inf-child.c (inf_child_target): Install
11016 child_terminal_save_inferior, child_pass_ctrlc and
11018 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11019 (inf_ptrace_target): No longer install it.
11020 * infcmd.c (interrupt_target_1): Adjust.
11021 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11022 (child_interrupt): Declare.
11023 (inferior::terminal_state): New.
11024 * inflow.c (struct terminal_info): Update comments.
11025 (inferior_process_group): Delete.
11026 (terminal_is_ours): Delete.
11027 (gdb_tty_state): New.
11028 (child_terminal_init): Adjust.
11029 (is_gdb_terminal, sharing_input_terminal_1)
11030 (sharing_input_terminal): New functions.
11031 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11032 Set the process's actual process group in the foreground if
11033 possible. Handle is_ours_for_output/is_ours distinction. Don't
11034 mark terminal as the inferior's if not sharing GDB's terminal.
11035 Don't check attach_flag.
11036 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11037 pass down a target_terminal_state.
11038 (child_terminal_save_inferior): New, factored out from ...
11039 (child_terminal_ours_1): ... this. Handle
11040 target_terminal_state::is_ours_for_output.
11041 (child_interrupt, child_pass_ctrlc): New.
11042 (inflow_inferior_exit): Clear the inferior's terminal_state.
11043 (copy_terminal_info): Copy the inferior's terminal state.
11044 (_initialize_inflow): Remove reference to terminal_is_ours.
11045 * inflow.h (inferior_process_group): Delete.
11046 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11047 * procfs.c (procfs_target): Don't install procfs_interrupt.
11048 (procfs_interrupt): Delete.
11049 * remote.c (remote_serial_quit_handler): Adjust.
11050 (remote_interrupt): Remove ptid parameter. Adjust.
11051 * target-delegates.c: Regenerate.
11052 * target.c: Include "terminal.h".
11053 (target_terminal::terminal_state): Rename to ...
11054 (target_terminal::m_terminal_state): ... this.
11055 (target_terminal::init): Adjust.
11056 (target_terminal::inferior): Adjust to per-inferior
11058 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11059 (target_terminal::ours, target_terminal::ours_for_output): Use
11060 target_terminal_is_ours_kind.
11061 (target_interrupt): Remove ptid parameter. Adjust.
11062 (default_target_pass_ctrlc): Adjust.
11063 * target.h (target_ops::to_terminal_save_inferior): New field.
11064 (target_ops::to_interrupt): Remove ptid_t parameter.
11065 (target_interrupt): Remove ptid_t parameter. Update comment.
11066 (target_pass_ctrlc): Update comment.
11067 * target/target.h (target_terminal_state): New scoped enum,
11068 factored out of ...
11069 (target_terminal::terminal_state): ... here.
11070 (target_terminal::inferior): Update comments.
11071 (target_terminal::restore_inferior): New.
11072 (target_terminal::is_inferior, target_terminal::is_ours)
11073 (target_terminal::is_ours_for_output): Adjust.
11074 (target_terminal::scoped_restore_terminal_state): Adjust to
11075 rename, and call restore_inferior() instead of inferior().
11076 (target_terminal::scoped_restore_terminal_state::m_state): Change
11078 (target_terminal::terminal_state): Rename to ...
11079 (target_terminal::m_terminal_state): ... this and change type.
11083 * linux-nat.c (wait_for_signal): New function.
11084 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11086 (async_terminal_is_ours)
11087 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11088 (linux_nat_add_target): Don't override
11089 to_terminal_inferior/to_terminal_ours.
11093 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11097 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11098 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11099 dwarf2_per_objfile_free here.
11100 (dwarf2_per_objfile_free): Remove.
11101 (_initialize_dwarf2_read): Don't register
11102 dwarf2_per_objfile_free as a registry cleanup.
11106 Avoid compilation errors in MinGW native builds
11108 The error is triggered by including python-internal.h, and the
11111 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11112 from build-gnulib/import/math.h:27,
11113 from d:/usr/Python26/include/pyport.h:235,
11114 from d:/usr/Python26/include/Python.h:58,
11115 from python/python-internal.h:94,
11116 from python/py-arch.c:24:
11117 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11121 This happens because Python headers define 'hypot' to expand t
11122 '_hypot' in the Windows builds.
11123 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11124 'hypoth'. This avoids a compilation error.
11128 * MAINTAINERS (Write After Approval): Fix ordering.
11132 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11136 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11137 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11138 Remove nop. Make const. Comment.
11139 (powerpc32_plt_stub_so_2): New.
11140 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11141 Correct count. Update uses.
11142 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11143 Move common code reading PLT entry word. Correct
11144 powerpc32_plt_stub PLT address calculation.
11145 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11146 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11147 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11148 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11149 (ppc64_standard_linkage8): Likewise.
11150 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11151 Correct insns description.
11152 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11156 GCC PR libstdc++/83906
11157 * gdbtypes.c (operator==(const dynamic_prop &,
11158 const dynamic_prop &)): New.
11159 (operator==(const range_bounds &, const range_bounds &)): New.
11160 (check_types_equal): Use them instead of memcmp.
11161 * gdbtypes.h (operator==(const dynamic_prop &,
11162 const dynamic_prop &)): Declare.
11163 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11164 (operator==(const range_bounds &, const range_bounds &)): Declare.
11165 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11169 * s390-linux-tdep.c (s390_record_address_mask)
11170 (s390_record_calc_disp_common, s390_record_calc_disp)
11171 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11172 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11173 (s390_process_record): Move to s390-tdep.c.
11174 (s390_linux_init_abi_any): Adjust.
11175 * s390-tdep.c (s390_record_address_mask)
11176 (s390_record_calc_disp_common, s390_record_calc_disp)
11177 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11178 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11179 (s390_process_record): Moved from s390-linux-tdep.c
11180 (s390_gdbarch_init): Adjust.
11184 * s390-linux-nat.c (s390-tdep.h): New include.
11185 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11186 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11187 (ALLDEPFILES): Add s390-tdep.c.
11188 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11189 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11190 * s390-tdep.h: ...this. New file.
11191 * s390-linux-tdep.c (s390-tdep.h): New include.
11192 (_initialize_s390_tdep): Rename to...
11193 (_initialize_s390_linux_tdep): ...this and adjust.
11194 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11195 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11197 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11198 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11199 (s390_is_partial_instruction, s390_software_single_step)
11200 (is_non_branch_ril, s390_displaced_step_copy_insn)
11201 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11202 (s390_prologue_data, s390_addr, s390_store, s390_load)
11203 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11204 (s390_register_call_saved, s390_guess_tracepoint_registers)
11205 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11206 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11207 (s390_pseudo_register_name, s390_pseudo_register_type)
11208 (s390_pseudo_register_read, s390_pseudo_register_write)
11209 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11210 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11211 (s390_addr_bits_remove, s390_address_class_type_flags)
11212 (s390_address_class_type_flags_to_name)
11213 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11214 (s390_function_arg_float, s390_function_arg_vector)
11215 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11216 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11217 (s390_frame_align, s390_register_return_value, s390_return_value)
11218 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11219 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11220 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11221 (s390_trad_frame_prev_register, s390_unwind_cache)
11222 (s390_prologue_frame_unwind_cache)
11223 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11224 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11225 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11226 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11227 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11228 (s390_frame_base_address, s390_local_base_address)
11229 (s390_frame_base, s390_gcc_target_options)
11230 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11231 (s390_validate_reg_range, s390_tdesc_valid)
11232 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11233 * s390-tdep.c: ...this. New file.
11237 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11238 (s390_process_record, s390_gdbarch_tdep_alloc)
11239 (s390_linux_init_abi_any): Use/set new hook.
11243 * s390-linux-tdep.c (osabi.h): New include.
11244 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11245 (s390_linux_init_abi_any): New functions.
11246 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11250 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11251 tdesc_has_registers check
11255 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11256 (s390_validate_reg_range): New macro.
11257 (s390_gdbarch_init): Adjust.
11261 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11262 (s390_gdbarch_tdep_alloc): Adjust.
11263 (s390_gdbarch_init): Adjust.
11267 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11268 <have_tdb>: Change type to bool.
11269 (s390_gdbarch_tdep_alloc): Adjust.
11270 (s390_gdbarch_init): Adjust.
11274 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11275 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11276 (s390_gdbarch_tdep_alloc): New function.
11277 (s390_gdbarch_init): Allocate tdep at start and use its fields
11278 instead of separate variables.
11282 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11283 when looking for cached gdbarch and add comment for remaining.
11288 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11293 * MAINTAINERS: Update my company e-mail address.
11297 * regcache.c (cooked_write_test): New function.
11298 (_initialize_regcache): Register the test.
11302 * ia64-tdep.c (ia64_pseudo_register_read): Call
11303 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11304 * m32c-tdep.c (m32c_cat_read): Likewise.
11305 (m32c_r3r2r1r0_read): Likewise.
11306 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11307 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11311 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11312 method raw_read instead of regcache_raw_read.
11313 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11314 * arm-tdep.c (arm_neon_quad_read): Likewise.
11315 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11316 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11317 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11318 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11319 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11320 (i386_pseudo_register_read_into_value): Likewise.
11321 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11322 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11323 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11324 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11325 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11326 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11327 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11328 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11329 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11333 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11334 * configure.tgt: Remove target mt.
11335 * mt-tdep.c: Remove.
11336 * regcache.c (cooked_read_test): Remove the check for mt.
11340 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11341 instead of gdbarch_pseudo_register_read_value.
11345 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11350 * linespec.c (create_sals_line_offset): Remove code that preserved
11351 the symtab_and_line's line number.
11355 * varobj.c (varobj_create): Don't set valid_block when creating a
11360 * varobj.c (varobj_create): Remove out of date comment.
11365 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11366 updating innermost block.
11367 * parse.c (innermost_block_tracker::update): Take extra type
11368 parameter, and check types match before updating innermost block.
11369 (write_dollar_variable): Update innermost block for registers.
11370 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11371 (innermost_block_tracker::innermost_block_tracker): Initialise
11373 (innermost_block_tracker::reset): Take type parameter.
11374 (innermost_block_tracker::update): Take type parameter, and pass
11375 type through as needed.
11376 (innermost_block_tracker::m_types): New member.
11377 * varobj.c (varobj_create): Pass type when reseting innermost
11382 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11383 * ada-lang.c (resolve_subexp): Likewise.
11384 * breakpoint.c (set_breakpoint_condition) Likewise.
11385 (watch_command_1) Likewise.
11386 * c-exp.y (variable): Likewise.
11387 * d-exp.y (PrimaryExpression): Likewise.
11388 * f-exp.y (variable): Likewise.
11389 * go-exp.y (variable): Likewise.
11390 * m2-exp.y (variable): Likewise.
11391 * objfiles.c (objfile::~objfile): Likewise.
11392 * p-exp.y (variable): Likewise.
11393 * parse.c (innermost_block): Change type.
11394 * parser-defs.h (class innermost_block_tracker): New.
11395 (innermost_block): Change to innermost_block_tracker.
11396 * printcmd.c (display_command): Switch to innermost_block API.
11397 (do_one_display): Likewise.
11398 * rust-exp.y (do_one_display): Likewise.
11399 * symfile.c (clear_symtab_users): Likewise.
11400 * varobj.c (varobj_create): Switch to innermost_block API, replace
11401 use of innermost_block with block stored on varobj object.
11405 * expression.h (innermost_block): Remove declaration.
11406 * varobj.c: Add 'parser-defs.h' include.
11410 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11411 symbols in the static and global blocks.
11415 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11416 gdb_ptrace.h, and move including gdb_wait.h ...
11417 * nat/linux-ptrace.h: ... to here.
11421 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11422 inf_ptrace_detach_success.
11423 (inf_ptrace_detach_success): Add inferior parameter, use it
11424 instead of inferior_ptid, pass it to detach_inferior.
11425 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11427 * inferior.c (detach_inferior): Add overload that takes an
11429 * inferior.h (detach_inferior): Likewise.
11430 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11431 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11432 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11436 * target.h (struct target_ops) <to_detach>: Add inferior
11438 (target_detach): Likewise.
11439 * target.c (dispose_inferior): Pass inferior down.
11440 (target_detach): Pass inferior down. Assert that it is equal to
11441 the current inferior.
11442 * aix-thread.c (aix_thread_detach): Pass inferior down.
11443 * corefile.c (core_file_command): Pass current_inferior() down.
11444 * corelow.c (core_detach): Add inferior parameter.
11445 * darwin-nat.c (darwin_detach): Likewise.
11446 * gnu-nat.c (gnu_detach): Likewise.
11447 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11448 * infcmd.c (detach_command): Pass current_inferior() down to
11450 * infrun.c (follow_fork_inferior): Pass parent_inf to
11452 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11454 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11455 * linux-thread-db.c (thread_db_detach): Likewise.
11456 * nto-procfs.c (procfs_detach): Likewise.
11457 * procfs.c (procfs_detach): Likewise.
11458 * record.c (record_detach): Likewise.
11459 * record.h (struct inferior): Forward-declare.
11460 (record_detach): Add inferior parameter.
11461 * remote-sim.c (gdbsim_detach): Likewise.
11462 * remote.c (remote_detach_1): Likewise.
11463 (remote_detach): Likewise.
11464 (extended_remote_detach): Likewise.
11465 * sol-thread.c (sol_thread_detach): Likewise.
11466 * target-debug.h (target_debug_print_inferior_p): New macro.
11467 * target-delegates.c: Re-generate.
11468 * top.c (kill_or_detach): Pass inferior down to target_detach.
11469 * windows-nat.c (windows_detach): Add inferior parameter.
11473 * target.h (struct target_ops) <to_detach>: Remove args
11475 (target_detach): Likewise.
11476 * target.c (dispose_inferior): Adjust.
11477 (target_detach): Remove args parameter, adjust.
11478 * aix-thread.c (aix_thread_detach): Adjust.
11479 * corefile.c (core_file_command): Adjust.
11480 * corelow.c (core_detach): Adjust.
11481 * darwin-nat.c (darwin_detach): Adjust.
11482 * gnu-nat.c (gnu_detach): Adjust.
11483 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11484 * infcmd.c (detach_command): Adjust
11485 * infrun.c (follow_fork_inferior): Adjust.
11486 (handle_vfork_child_exec_or_exit): Adjust.
11487 * linux-fork.c (linux_fork_detach): Remove args parameter.
11488 * linux-fork.h (linux_fork_detach): Likewise.
11489 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11490 * linux-thread-db.c (thread_db_detach): Likewise.
11491 * nto-procfs.c (procfs_detach): Likewise.
11492 * procfs.c (procfs_detach): Likewise.
11493 (do_detach): Remove signo parameter.
11494 * record.c (record_detach): Remove args parameter.
11495 * record.h (record_detach): Likewise.
11496 * remote-sim.c (gdbsim_detach): Likewise.
11497 * remote.c (remote_detach_1): Likewise.
11498 (remote_detach): Likewise.
11499 (extended_remote_detach): Likewise.
11500 * sol-thread.c (sol_thread_detach): Likewise.
11501 * target-delegates.c: Re-generate.
11502 * top.c (struct qt_args) <args>: Remove field.
11503 (kill_or_detach): Don't pass args.
11504 (quit_force): Don't set args.
11505 * windows-nat.c (windows_detach): Remove args parameter.
11509 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11510 (arm_linux_init_abi): Install it.
11514 * osabi.c (gdb_osabi_names): Extend the regexp for
11515 arm-linux-gnueabihf.
11519 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11521 (abbrev_table::add_abbrev): Update.
11522 (abbrev_table::lookup_abbrev): Update.
11526 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11530 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11535 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11539 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11540 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11541 (create_array_type_with_stride): Update.
11542 * dwarf2read.c (set_die_type): Update.
11546 * dwarf2read.c (delayed_method_info): Remove typedef.
11547 (dwarf2_cu::method_info): Now a std::vector.
11548 (add_to_method_list): Update.
11549 (free_delayed_list): Remove.
11550 (compute_delayed_physnames): Update.
11551 (process_full_comp_unit, process_full_type_unit): Clear the method
11552 list. Remove cleanups.
11553 (psymtab_include_file_name): Add name_holder parameter. Use
11554 unique_xmalloc_ptr.
11555 (dwarf_decode_lines): Update.
11560 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11561 (dwarf2_per_objfile::free_cached_comp_units)
11562 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11563 (init_cutu_and_read_dies_no_follow): Update.
11564 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11565 (dwarf2_cu::~dwarf2_cu): New.
11566 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11567 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11572 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11573 (struct die_reader_specs) <abbrev_table>: New member.
11574 (struct abbrev_table): Add constructor.
11575 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11576 <abbrev_obstack>: Now an auto_obstack.
11577 (abbrev_table_up): New typedef.
11578 (init_cu_die_reader): Add abbrev_table parameter.
11579 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11580 Add result_dwo_abbrev_table.
11581 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11582 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11584 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11586 (skip_children): Update.
11587 (abbrev_table::alloc_abbrev): Rename from
11588 abbrev_table_alloc_abbrev.
11589 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11590 (abbrev_table::lookup_abbrev): Rename from
11591 abbrev_table_lookup_abbrev.
11592 (abbrev_table_read_table): Return abbrev_table_up.
11593 (abbrev_table_free, abbrev_table_free_cleanup)
11594 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11595 (load_partial_dies): Update.
11599 * dwarf2read.c (dwarf2_compute_name): Update comment.
11600 (read_func_scope, read_variable): Update.
11601 (new_symbol): Remove.
11602 (new_symbol_full): Rename to new_symbol.
11607 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11608 a warning instead of throwing an error, set section size to 0 and return
11610 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11614 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11616 (linux_ptrace_attach_fail_reason_string): Likewise.
11617 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11619 (linux_ptrace_attach_fail_reason_string): Likewise.
11620 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11624 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11629 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11630 checking for fs_base/gs_base fields in struct user_regs_struct.
11631 * configure: Regenerate.
11635 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11637 (aarch64_linux_init_abi): Install it to gdbarch hook
11638 gcc_target_options.
11642 * common/signals-state-save-restore.c
11643 (save_original_signals_state): Fix typos.
11648 * Makefile.in (install-only): Install gdb-add-index.
11652 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11656 * infrun.c (keep_going_pass_signal): Clear step-over info when
11657 insert_breakpoints fails.
11662 * infrun.c (resume): Rename to ...
11663 (resume_1): ... this.
11664 (resume): Reimplement as wrapper around resume_1.
11669 * remote.c (remote_parse_stop_reply): Default to the last-set
11670 general thread instead of to 'magic_null_ptid'.
11674 * language.h (language_get_symbol_name_matcher): Rename ...
11675 (get_symbol_name_matcher): ... this.
11676 * language.c (language_get_symbol_name_matcher): Ditto.
11677 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11684 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11685 Adjust to use language_get_symbol_name_matcher instead of
11686 language_defn::la_get_symbol_name_matcher.
11687 * language.c (language_get_symbol_name_matcher): If in Ada mode
11688 and the lookup name is a verbatim match, return Ada's matcher.
11689 * language.h (language_get_symbol_name_matcher): Adjust comment.
11690 (ada_lookup_name_info::verbatim_p):: New method.
11695 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11696 minsym's language is language_auto or language_cplus, pass down
11697 language_ada instead.
11698 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11703 * minsyms.c (linkage_name_str): New function.
11704 (iterate_over_minimal_symbols): Use it.
11708 * NEWS: Document that 'info proc' now works on FreeBSD.
11712 * configure.ac: Check for kinfo_getfile in libutil.
11713 * configure: Regenerate.
11714 * config.in: Regenerate.
11715 * fbsd-nat.c: Include "fbsd-tdep.h".
11716 (fbsd_fetch_cmdline): New.
11717 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11718 rather than calling error.
11719 (fbsd_info_proc): New.
11720 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11721 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11722 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11726 * fbsd-nat.c (struct free_deleter): Remove.
11727 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11731 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11732 NULL for an empty pathname.
11736 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11737 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11738 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11739 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11740 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11741 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11742 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11743 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11744 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11745 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11746 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11747 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11748 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11749 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11750 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11754 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11755 (gnu_xfer_auxv): New function.
11756 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11757 TARGET_OBJECT_AUXV.
11762 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11764 (COMMON_OBS): Remove selftest.o.
11765 * configure.ac: Append selftest-arch.c and common/selftest.c to
11766 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11767 * configure: Re-generated.
11768 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11770 (maintenance_info_selftests): Likewise.
11774 * ada-valprint.c (val_print_packed_array_elements): Use
11775 proper number of elements when printing an array indexed
11776 by an enumeration type.
11780 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11781 (dw2_get_file_names_reader): Adjust.
11782 (lookup_dwo_signatured_type): Adjust.
11783 (lookup_dwp_signatured_type): Adjust.
11784 (lookup_signatured_type): Adjust.
11785 (create_type_unit_group): Adjust.
11786 (get_type_unit_group): Adjust.
11787 (process_psymtab_comp_unit_reader): Adjust.
11788 (build_type_psymtabs_reader): Adjust.
11789 (scan_partial_symbols): Adjust.
11790 (add_partial_symbol): Adjust.
11791 (add_partial_subprogram): Adjust.
11792 (peek_die_abbrev): Adjust.
11793 (fixup_go_packaging): Adjust.
11794 (process_imported_unit_die): Adjust.
11795 (dwarf2_compute_name): Adjust.
11796 (dwarf2_physname): Adjust.
11797 (read_import_statement): Adjust.
11798 (handle_DW_AT_stmt_list): Adjust.
11799 (read_file_scope): Adjust.
11800 (read_func_scope): Adjust.
11801 (read_lexical_block_scope): Adjust.
11802 (read_call_site_scope): Adjust.
11803 (read_variable): Adjust.
11804 (dwarf2_rnglists_process): Adjust.
11805 (dwarf2_ranges_process): Adjust.
11806 (dwarf2_ranges_read): Adjust.
11807 (dwarf2_get_pc_bounds): Adjust.
11808 (dwarf2_record_block_ranges): Adjust.
11809 (dwarf2_add_field): Adjust.
11810 (dwarf2_add_member_fn): Adjust.
11811 (read_structure_type): Adjust.
11812 (process_structure_scope): Adjust.
11813 (read_enumeration_type): Adjust.
11814 (read_array_type): Adjust.
11815 (mark_common_block_symbol_computed): Adjust.
11816 (read_common_block): Adjust.
11817 (read_namespace_type): Adjust.
11818 (read_namespace): Adjust.
11819 (read_module_type): Adjust.
11820 (read_tag_pointer_type): Adjust.
11821 (read_tag_ptr_to_member_type): Adjust.
11822 (read_tag_string_type): Adjust.
11823 (read_subroutine_type): Adjust.
11824 (read_typedef): Adjust.
11825 (read_base_type): Adjust.
11826 (attr_to_dynamic_prop): Adjust.
11827 (read_subrange_type): Adjust.
11828 (read_unspecified_type): Adjust.
11829 (dwarf2_read_abbrevs): Adjust.
11830 (load_partial_dies): Adjust.
11831 (read_partial_die): Adjust.
11832 (find_partial_die): Adjust.
11833 (guess_partial_die_structure_name): Adjust.
11834 (fixup_partial_die): Adjust.
11835 (read_attribute_value): Adjust.
11836 (read_addr_index): Adjust.
11837 (read_addr_index_from_leb128): Adjust.
11838 (read_str_index): Adjust.
11839 (dwarf2_string_attr): Adjust.
11840 (get_debug_line_section): Adjust.
11841 (dwarf_decode_line_header): Adjust.
11842 (lnp_state_machine::check_line_address): Adjust.
11843 (dwarf_decode_lines_1): Adjust.
11844 (dwarf_decode_lines): Adjust.
11845 (dwarf2_start_symtab): Adjust.
11846 (var_decode_location): Adjust.
11847 (new_symbol_full): Adjust.
11848 (dwarf2_const_value_data): Adjust.
11849 (dwarf2_const_value_attr): Adjust.
11850 (dwarf2_const_value): Adjust.
11851 (die_type): Adjust.
11852 (die_containing_type): Adjust.
11853 (build_error_marker_type): Adjust.
11854 (lookup_die_type): Adjust.
11855 (guess_full_die_structure_name): Adjust.
11856 (anonymous_struct_prefix): Adjust.
11857 (determine_prefix): Adjust.
11858 (dwarf2_name): Adjust.
11859 (follow_die_ref_or_sig): Adjust.
11860 (follow_die_offset): Adjust.
11861 (follow_die_ref): Adjust.
11862 (follow_die_sig_1): Adjust.
11863 (follow_die_sig): Adjust.
11864 (get_signatured_type): Adjust.
11865 (get_DW_AT_signature_type): Adjust.
11866 (decode_locdesc): Adjust.
11867 (dwarf_decode_macros): Adjust.
11868 (cu_debug_loc_section): Adjust.
11869 (fill_in_loclist_baton): Adjust.
11870 (dwarf2_symbol_mark_computed): Adjust.
11871 (init_one_comp_unit): Don't assign
11872 dwarf2_cu::dwarf2_per_objfile.
11873 (set_die_type): Adjust.
11877 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11878 <dwarf2_per_objfile>: New field.
11879 (dwarf2_per_objfile): Remove global.
11880 (get_dwarf2_per_objfile): New function.
11881 (set_dwarf2_per_objfile): New function.
11882 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11883 dwarf2_per_objfile.
11884 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11885 (read_abbrev_offset): Likewise.
11886 (read_indirect_string): Likewise.
11887 (read_indirect_line_string): Likewise.
11888 (read_indirect_string_at_offset): Likewise.
11889 (read_indirect_string_from_dwz): Likewise.
11890 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11891 dwarf2_per_objfile.
11892 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11893 (create_all_comp_units): Change objfile parameter to
11894 dwarf2_per_objfile.
11895 (create_all_type_units): Likewise.
11896 (process_queue): Add dwarf2_per_objfile parameter.
11897 (read_and_check_comp_unit_head): Likewise.
11898 (lookup_dwo_unit_in_dwp): Likewise.
11899 (get_dwp_file): Likewise.
11900 (process_cu_includes): Likewise.
11901 (struct free_dwo_file_cleanup_data): New struct.
11902 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11903 set_dwarf2_per_objfile.
11904 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11905 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11906 context, adjust calls.
11907 (dw2_instantiate_symtab): Likewise.
11908 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11909 (dw2_get_cu): Likewise.
11910 (create_cu_from_index_list): Change objfile parameter to
11911 dwarf2_per_objfile.
11912 (create_cus_from_index_list): Get dwarf2_per_objfile from
11913 context, adjust calls.
11914 (create_cus_from_index): Likewise.
11915 (create_signatured_type_table_from_index): Change objfile
11916 parameter to dwarf2_per_objfile.
11917 (create_signatured_type_table_from_debug_names): Change objfile
11918 parameter to dwarf2_per_objfile.
11919 (create_addrmap_from_index): Likewise.
11920 (create_addrmap_from_aranges): Likewise.
11921 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11922 (dw2_setup): Remove.
11923 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11925 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11926 get_dwarf2_per_objfile.
11927 (dw2_forget_cached_source_info): Likewise.
11928 (dw2_map_symtabs_matching_filename): Likewise.
11929 (struct dw2_symtab_iterator) <index>: Remove.
11930 <dwarf2_per_objfile>: New field.
11931 (dw2_symtab_iter_init): Replace index parameter with
11932 dwarf2_per_objfile.
11933 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11934 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11935 (dw2_print_stats): Likewise.
11936 (dw2_dump): Likewise.
11937 (dw2_expand_symtabs_for_function): Likewise.
11938 (dw2_expand_all_symtabs): Likewise.
11939 (dw2_expand_symtabs_with_fullname): Likewise.
11940 (dw2_expand_marked_cus): Replace index and objfile parameters
11941 with dwarf2_per_objfile.
11942 (dw_expand_symtabs_matching_file_matcher): Add
11943 dwarf2_per_objfile parameter and adjust calls.
11944 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11946 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11947 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11949 (create_cus_from_debug_names_list): Replace objfile parameter
11950 with dwarf2_per_objfile and adjust calls.
11951 (create_cus_from_debug_names): Likewise.
11952 (dwarf2_read_debug_names): Likewise.
11953 (mapped_debug_names::namei_to_name): Adjust call.
11954 (dw2_debug_names_iterator::next): Likewise.
11955 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11956 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11957 (dw2_debug_names_dump): Likewise.
11958 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11959 (dw2_debug_names_expand_symtabs_matching): Likewise.
11960 (dwarf2_initialize_objfile): Likewise.
11961 (dwarf2_build_psymtabs): Likewise.
11962 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11964 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11965 (read_and_check_comp_unit_head): Likewise.
11966 (read_abbrev_offset): Likewise.
11967 (create_debug_type_hash_table): Likewise.
11968 (create_debug_types_hash_table): Likewise.
11969 (create_all_type_units): Replace objfile parameter with
11970 dwarf2_per_objfile.
11971 (add_type_unit): Add dwarf2_per_objfile parameter.
11972 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11973 with dwarf2_per_objfile.
11974 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11975 (lookup_dwp_signatured_type): Likewise.
11976 (lookup_signatured_type): Likewise.
11977 (read_cutu_die_from_dwo): Likewise.
11978 (init_tu_and_read_dwo_dies): Likewise.
11979 (init_cutu_and_read_dies): Likewise.
11980 (init_cutu_and_read_dies_no_follow): Likewise.
11981 (allocate_type_unit_groups_table): Add objfile parameter.
11982 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11983 (get_type_unit_group): Likewise.
11984 (process_psymtab_comp_unit): Update call.
11985 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11986 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11987 (print_tu_stats): Likewise.
11988 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11989 in void* parameter.
11990 (build_type_psymtabs): Change objfile parameter to
11991 dwarf2_per_objfile.
11992 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11993 passed in void* parameter.
11994 (process_skeletonless_type_units): Change objfile parameter to
11995 dwarf2_per_objfile.
11996 (set_partial_user): Likewise.
11997 (dwarf2_build_psymtabs_hard): Likewise.
11998 (read_comp_units_from_section): Likewise.
11999 (create_all_comp_units): Likewise.
12000 (scan_partial_symbols): Update calls.
12001 (add_partial_symbol): Likewise.
12002 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12003 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12004 (process_queue): Add dwarf2_per_objfile parameter.
12005 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12006 (compute_compunit_symtab_includes): Likewise.
12007 (process_cu_includes): Add dwarf2_per_objfile parameter.
12008 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12009 (process_full_type_unit): Likewise.
12010 (process_imported_unit_die): Update call.
12011 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12012 (read_file_scope): Likewise.
12013 (allocate_dwo_file_hash_table): Add objfile parameter.
12014 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12015 (create_cus_hash_table): Likewise.
12016 (create_dwp_hash_table): Likewise.
12017 (create_dwo_unit_in_dwp_v1): Likewise.
12018 (create_dwp_v2_section): Likewise.
12019 (create_dwo_unit_in_dwp_v2): Likewise.
12020 (lookup_dwo_unit_in_dwp): Likewise.
12021 (try_open_dwop_file): Likewise.
12022 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12023 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12024 cleanup to include a reference to dwarf2_per_objfile.
12025 (open_dwp_file): Add dwarf2_per_objfile parameter.
12026 (open_and_init_dwp_file): Likewise.
12027 (get_dwp_file): Likewise.
12028 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12029 (queue_and_load_all_dwo_tus): Update call.
12030 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12032 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12033 (dwarf2_ranges_process): Likewise.
12034 (dwarf2_get_pc_bounds): Likewise.
12035 (mark_common_block_symbol_computed): Likewise.
12036 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12037 (dwarf2_read_abbrevs): Update call.
12038 (read_partial_die): Use dwarf2_per_objfile from cu.
12039 (find_partial_die): Likewise.
12040 (fixup_partial_die): Likewise.
12041 (read_attribute_value): Likewise.
12042 (read_indirect_string_at_offset_from): Add objfile parameter.
12043 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12045 (read_indirect_string_from_dwz): Add objfile parameter.
12046 (read_indirect_string): Add objfile parameter.
12047 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12048 (read_addr_index): Use dwarf2_per_objfile from cu.
12049 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12051 (read_str_index): Use dwarf2_per_objfile from cu.
12052 (get_debug_line_section): Likewise.
12053 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12054 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12055 (new_symbol_full): Use dwarf2_per_objfile from cu.
12056 (build_error_marker_type): Likewise.
12057 (lookup_die_type): Likewise.
12058 (determine_prefix): Likewise.
12059 (follow_die_offset): Likewise.
12060 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12061 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12062 (dwarf2_fetch_die_type_sect_off): Likewise.
12063 (dwarf2_get_die_type): Likewise.
12064 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12065 (get_signatured_type): Likewise.
12066 (get_DW_AT_signature_type): Likewise.
12067 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12068 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12069 (cu_debug_loc_section): Likewise.
12070 (fill_in_loclist_baton): Likewise.
12071 (dwarf2_symbol_mark_computed): Likewise.
12072 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12073 dwarf2_per_objfile.
12074 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12076 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12077 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12078 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12079 (set_die_type): Use dwarf2_free_objfile from cu.
12080 (get_die_type_at_offset): Likewise.
12081 (dwarf2_per_objfile_free): Don't assign global variable.
12082 (debug_names) <constructor>: Add dwarf2_per_objfile
12083 parameter, update m_debugstrlookup construction.
12084 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12086 <m_dwarf2_per_objfile>: New field.
12087 <lookup>: Use m_dwarf2_per_objfile.
12088 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12089 (psyms_seen_size): Likewise.
12090 (write_gdbindex): Replace objfile parameter with
12091 dwarf2_per_objfile.
12092 (write_debug_names): Likewise.
12093 (write_psymtabs_to_index): Likewise.
12094 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12099 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12100 <dwarf2_per_objfile>: New field.
12101 (struct dwarf2_per_cu_data) <objfile>: Remove.
12102 <dwarf2_per_objfile>: New field.
12103 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12105 (create_signatured_type_table_from_index): Likewise.
12106 (create_debug_type_hash_table): Likewise.
12107 (fill_in_sig_entry_from_dwo_entry): Likewise.
12108 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12109 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12111 (create_partial_symtab): Access objfile through
12112 dwarf2_per_objfile.
12113 (process_psymtab_comp_unit_reader): Likewise.
12114 (read_comp_units_from_section): Likewise.
12115 (scan_partial_symbols): Likewise.
12116 (add_partial_symbol): Likewise.
12117 (add_partial_subprogram): Likewise.
12118 (peek_die_abbrev): Likewise.
12119 (fixup_go_packaging): Likewise.
12120 (process_full_comp_unit): Likewise.
12121 (process_full_type_unit): Likewise.
12122 (process_imported_unit_die): Likewise.
12123 (dwarf2_compute_name): Likewise.
12124 (dwarf2_physname): Likewise.
12125 (read_import_statement): Likewise.
12126 (create_cus_hash_table): Assign dwarf2_physname instead of
12128 (read_func_scope): Access objfile through dwarf2_per_objfile.
12129 (read_lexical_block_scope): Likewise.
12130 (read_call_site_scope): Likewise.
12131 (read_variable): Likewise.
12132 (dwarf2_rnglists_process): Likewise.
12133 (dwarf2_ranges_process): Likewise.
12134 (dwarf2_ranges_read): Likewise.
12135 (dwarf2_record_block_ranges): Likewise.
12136 (dwarf2_add_field): Likewise.
12137 (dwarf2_add_member_fn): Likewise.
12138 (read_structure_type): Likewise.
12139 (process_structure_scope): Likewise.
12140 (read_enumeration_type): Likewise.
12141 (read_array_type): Likewise.
12142 (read_common_block): Likewise.
12143 (read_namespace_type): Likewise.
12144 (read_namespace): Likewise.
12145 (read_module_type): Likewise.
12146 (read_tag_pointer_type): Likewise.
12147 (read_tag_ptr_to_member_type): Likewise.
12148 (read_tag_string_type): Likewise.
12149 (read_subroutine_type): Likewise.
12150 (read_typedef): Likewise.
12151 (read_base_type): Likewise.
12152 (attr_to_dynamic_prop): Likewise.
12153 (read_subrange_type): Likewise.
12154 (read_unspecified_type): Likewise.
12155 (load_partial_dies): Likewise.
12156 (read_partial_die): Likewise.
12157 (find_partial_die): Likewise.
12158 (guess_partial_die_structure_name): Likewise.
12159 (fixup_partial_die): Likewise.
12160 (read_attribute_value): Likewise.
12161 (read_addr_index_from_leb128): Likewise.
12162 (dwarf2_read_addr_index): Likewise.
12163 (dwarf2_string_attr): Likewise.
12164 (lnp_state_machine::check_line_address): Likewise.
12165 (dwarf_decode_lines_1): Likewise.
12166 (dwarf_decode_lines): Likewise.
12167 (dwarf2_start_symtab): Likewise.
12168 (var_decode_location): Likewise.
12169 (new_symbol_full): Likewise.
12170 (dwarf2_const_value_data): Likewise.
12171 (dwarf2_const_value_attr): Likewise.
12172 (dwarf2_const_value): Likewise.
12173 (die_type): Likewise.
12174 (die_containing_type): Likewise.
12175 (lookup_die_type): Likewise.
12176 (guess_full_die_structure_name): Likewise.
12177 (anonymous_struct_prefix): Likewise.
12178 (dwarf2_name): Likewise.
12179 (follow_die_ref_or_sig): Likewise.
12180 (follow_die_offset): Likewise.
12181 (follow_die_ref): Likewise.
12182 (dwarf2_fetch_die_loc_sect_off): Likewise.
12183 (dwarf2_fetch_constant_bytes): Likewise.
12184 (dwarf2_fetch_die_type_sect_off): Likewise.
12185 (dwarf2_get_die_type): Likewise.
12186 (follow_die_sig): Likewise.
12187 (decode_locdesc): Likewise.
12188 (dwarf2_per_cu_objfile): Likewise.
12189 (dwarf2_per_cu_text_offset): Likewise.
12190 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12192 (set_die_type): Access objfile through
12193 dwarf2_per_objfile.
12197 * valprint.c (converted_character_d): Remove typedef.
12198 (DEF_VEC_O (converted_character_d)): Remove.
12199 (count_next_character): Use std::vector.
12200 (print_converted_chars_to_obstack): Likewise.
12201 (generic_printstr): Likewise.
12205 * xml-support.h (struct gdb_xml_value): Add constructor.
12206 <value>: Change type to unique_xmalloc_ptr.
12207 (gdb_xml_value_s): Remove typedef.
12208 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12209 (gdb_xml_element_start_handler): Change parameter type to
12211 (xml_find_attribute): Likewise.
12212 * xml-support.c (xml_find_attribute): Change parameter type to
12213 std::vector and adjust.
12214 (gdb_xml_values_cleanup): Remove.
12215 (gdb_xml_parser::start_element): Adjust to std::vector.
12216 (xinclude_start_include): Change paraeter type to std::vector
12218 * btrace.c (check_xml_btrace_version): Likewise.
12219 (parse_xml_btrace_block): Likewise.
12220 (parse_xml_btrace_pt_config_cpu): Likewise.
12221 (parse_xml_btrace_pt): Likewise.
12222 (parse_xml_btrace_conf_bts): Likewise.
12223 (parse_xml_btrace_conf_pt): Likewise.
12224 * memory-map.c (memory_map_start_memory): Likewise.
12225 (memory_map_start_property): Likewise.
12226 * osdata.c (osdata_start_osdata): Likewise.
12227 (osdata_start_item): Likewise.
12228 (osdata_start_column): Likewise.
12229 * remote.c (start_thread): Likewise.
12230 * solib-aix.c (library_list_start_library): Likewise.
12231 (library_list_start_list): Likewise.
12232 * solib-svr4.c (library_list_start_library): Likewise.
12233 (svr4_library_list_start_list): Likewise.
12234 * solib-target.c (library_list_start_segment): Likewise.
12235 (library_list_start_section): Likewise.
12236 (library_list_start_library): Likewise.
12237 (library_list_start_list): Likewise.
12238 * tracepoint.c (traceframe_info_start_memory): Likewise.
12239 (traceframe_info_start_tvar): Likewise.
12240 * xml-syscall.c (syscall_start_syscall): Likewise.
12241 * xml-tdesc.c (tdesc_start_target): Likewise.
12242 (tdesc_start_feature): Likewise.
12243 (tdesc_start_reg): Likewise.
12244 (tdesc_start_union): Likewise.
12245 (tdesc_start_struct): Likewise.
12246 (tdesc_start_flags): Likewise.
12247 (tdesc_start_enum): Likewise.
12248 (tdesc_start_field): Likewise.
12249 (tdesc_start_enum_value): Likewise.
12250 (tdesc_start_vector): Likewise.
12254 * extension.h (struct xmethod_worker) <clone>: Remove.
12255 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12257 (python_xmethod_worker::clone): Remove.
12258 * valops.c (find_overload_match): Use std::move instead of
12263 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12264 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12265 <free_xmethod_worker_data>: Remove.
12266 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12267 <get_xmethod_arg_types>: Remove.
12268 <get_xmethod_result_type>: Remove.
12269 <invoke_xmethod>: Remove.
12270 * extension.c (new_xmethod_worker): Remove.
12271 (clone_xmethod_worker): Remove.
12272 (get_matching_xmethod_workers): Return void, pass std::vector by
12274 (get_xmethod_arg_types): Rename to...
12275 (xmethod_worker::get_arg_types): ... this, and adjust.
12276 (get_xmethod_result_type): Rename to...
12277 (xmethod_worker::get_result_type): ... this, and adjust.
12278 (invoke_xmethod): Remove.
12279 (free_xmethod_worker): Remove.
12280 (free_xmethod_worker_vec): Remove.
12281 * extension.h (enum ext_lang_rc): Move here from
12283 (struct xmethod_worker): Add constructor and destructor.
12286 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12287 virtual pure methods.
12288 <get_arg_types, get_result_type>: New methods.
12289 (xmethod_worker_ptr): Remove typedef.
12290 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12291 (xmethod_worker_vec): Remove typedef.
12292 (xmethod_worker_up): New typedef.
12293 (invoke_xmethod): Remove.
12294 (clone_xmethod_worker): Remove.
12295 (free_xmethod_worker): Remove.
12296 (free_xmethod_worker_vec): Remove.
12297 (get_xmethod_arg_types): Remove.
12298 (get_xmethod_result_type): Remove.
12299 * valops.c (find_method_list): Use std::vector, don't use
12300 intermediate vector.
12301 (value_find_oload_method_list): Use std::vector.
12302 (find_overload_match): Use std::vector.
12303 (find_oload_champ): Use std::vector.
12304 * value.c (value_free): Use operator delete.
12305 (value_of_xmethod): Rename to...
12306 (value_from_xmethod): ... this. Don't assign
12307 xmethod_worker::value, take rvalue-reference.
12308 (result_type_of_xmethod): Adjust.
12309 (call_xmethod): Adjust.
12310 * value.h: Include extension.h.
12311 (struct xmethod_worker): Don't forward-declare.
12312 (value_of_xmethod): Rename to...
12313 (value_from_xmethod): ... this, take rvalue-reference.
12314 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12315 (struct python_xmethod_worker): ... this, add constructor and
12317 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12318 (gdbpy_free_xmethod_worker_data): Rename to...
12319 (python_xmethod_worker::~python_xmethod_worker): ... this and
12321 (gdbpy_clone_xmethod_worker_data): Rename to...
12322 (python_xmethod_worker::clone): ... this and adjust.
12323 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12325 (gdbpy_get_xmethod_arg_types): Rename to...
12326 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12327 (gdbpy_get_xmethod_result_type): Rename to...
12328 (python_xmethod_worker::do_get_result_type): ... this and
12330 (gdbpy_invoke_xmethod): Rename to...
12331 (python_xmethod_worker::invoke): ... this and adjust.
12332 (new_python_xmethod_worker): Rename to...
12333 (python_xmethod_worker::python_xmethod_worker): ... this and
12335 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12337 (gdbpy_free_xmethod_worker_data): Remove.
12338 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12339 (gdbpy_get_xmethod_arg_types): Remove.
12340 (gdbpy_get_xmethod_result_type): Remove.
12341 (gdbpy_invoke_xmethod): Remove.
12342 * python/python.c (python_extension_ops): Remove obsolete
12348 * common/signals-state-save-restore.c
12349 (save_original_signals_state): New parameter 'quiet'. Warn if we
12350 find a custom handler preinstalled, instead of internal erroring.
12351 But only warn if !quiet.
12352 * common/signals-state-save-restore.h
12353 (save_original_signals_state): New parameter 'quiet'.
12354 * main.c (captured_main_1): Move save_original_signals_state call
12355 after option handling, and pass QUIET.
12359 * spu-tdep.c (spu_catch_start): Pass
12360 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12365 * ada-lang.c (literal_symbol_name_matcher): New function.
12366 (ada_get_symbol_name_matcher): Use it for
12367 symbol_name_match_type::SEARCH_NAME.
12368 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12369 it down instead of assuming symbol_name_match_type::FULL.
12370 * block.h (block_lookup_symbol): New parameter 'match_type'.
12371 * c-valprint.c (print_unpacked_pointer): Use
12372 lookup_symbol_search_name instead of lookup_symbol.
12373 * compile/compile-object-load.c (get_out_value_type): Pass down
12374 symbol_name_match_type::SEARCH_NAME.
12375 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12376 symbol_name_match_type::FULL.
12377 * cp-support.c (cp_get_symbol_name_matcher): Handle
12378 symbol_name_match_type::SEARCH_NAME.
12379 * infrun.c (insert_exception_resume_breakpoint): Use
12380 lookup_symbol_search_name.
12381 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12382 * psymtab.c (maintenance_check_psymtabs): Use
12383 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12384 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12385 SYMBOL_SEARCH_NAME.
12386 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12387 if symbol_name_match_type::SEARCH_NAME.
12388 (lookup_symbol_in_language): Pass down
12389 symbol_name_match_type::FULL.
12390 (lookup_symbol_search_name): New.
12391 (lookup_language_this): Pass down
12392 symbol_name_match_type::SEARCH_NAME.
12393 (lookup_symbol_aux, lookup_local_symbol): New parameter
12394 'match_type'. Pass it down.
12395 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12396 (lookup_symbol_search_name): New declaration.
12397 (lookup_symbol_in_block): New 'match_type' parameter.
12402 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12404 (ada_lookup_symbol): Reimplement in terms of
12405 ada_lookup_symbol_list, bits factored out from
12406 ada_lookup_encoded_symbol.
12410 * ada-exp.y (write_object_renaming): When subscripting an array
12411 using a symbol as the index, pass the block in call to
12412 ada_lookup_encoded_symbol when looking that symbol up.
12416 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12421 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12422 the case where VALUE_LVAL (val0) is not lval_memory.
12426 * ada-valprint.c (print_optional_low_bound): Handle
12427 character-indexed array printing like boolean-indexed array
12432 * NEWS: Create a new section for the next release branch.
12433 Rename the section of the current branch, now that it has
12438 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12439 * version.in: Bump version to 8.1.50.DATE-git.
12443 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12445 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12447 (default_exception_support_info) <catch_handlers_sym>: Add field.
12448 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12449 (ada_exception_name_addr_1): Add "catch handlers" handling.
12450 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12451 Update all callers.
12452 (create_excep_cond_exprs) <ex>: Add parameter.
12453 (re_set_exception): Update create_excep_cond_exprs call.
12454 (print_it_exception, print_one_exception, print_mention_exception)
12455 (print_recreate_exception): Add "catch handler" handling.
12456 (allocate_location_catch_handlers, re_set_catch_handlers)
12457 (check_status_catch_handlers, print_it_catch_handlers)
12458 (print_one_catch_handlers, print_mention_catch_handlers)
12459 (print_recreate_catch_handlers): New function.
12460 (catch_handlers_breakpoint_ops): New variable.
12461 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12462 Add parameter. Add "catch handler" handling.
12463 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12464 Add "catch handler" handling.
12465 (ada_exception_catchpoint_cond_string): Add "catch handler"
12467 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12469 (catch_ada_handlers_command): New function.
12470 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12471 operations structure.
12472 (_initialize_ada_language): Add "catch handlers" command entry.
12473 * NEWS: Document "catch handlers" feature.
12477 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12478 account when creating the array type of the slice.
12479 (ada_value_slice): Likewise.
12483 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12485 (create_array_type_with_stride): Add byte_stride_prop parameter.
12486 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12487 New parameter. Update all callers in this file.
12488 (array_type_has_dynamic_stride): New function.
12489 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12490 of arrays with dynamic byte strides.
12491 * dwarf2read.c (read_array_type): Add support for dynamic
12492 DW_AT_byte_stride attributes.
12496 * dwarf2read.c (read_unspecified_type): Treat
12497 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12501 Update copyright year range in all GDB files.
12505 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12506 and gdb/testsuite/gdb.base/step-line.c.
12510 * copyright.py (main): Dump the contents of
12511 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12512 even if BY_HAND is empty.
12516 * top.c (print_gdb_version): Update Copyright year in version
12521 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12523 For older changes see ChangeLog-2017.
12529 version-control: never