gdb: Extend the trad-frame API
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * trad-frame.h (trad_frame_set_realreg): Declare.
4 (trad_frame_set_addr): Declare.
5 * trad-frame.c (trad_frame_set_realreg): Define new function.
6 (trad_frame_set_addr): Define new function.
7 (trad_frame_set_reg_realreg): Use new function.
8 (trad_frame_set_reg_addr): Use new function.
9
10 2018-09-01 Keith Seitz <keiths@redhat.com>
11
12 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
13 pulongest instead of "%lld".
14 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
15 ATTRIBUTE_UNUSED.
16
17 2018-08-31 Tom Tromey <tom@tromey.com>
18
19 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
20 variant part type.
21
22 2018-08-31 Pedro Alves <palves@redhat.com>
23
24 * gdbarch.h: Regenerate.
25
26 2018-08-31 Pedro Alves <palves@redhat.com>
27
28 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
29 * target.h (Hardware watchpoint interfaces): Describe
30 continuable/steppable/non-steppable watchpoints.
31 * gdbarch.h, gdbarch.c: Regenerate.
32
33 2018-08-31 Pedro Alves <palves@redhat.com>
34
35 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
36 Delete.
37 * s390-linux-nat.c
38 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
39 * target.h (target_ops::have_continuable_watchpoint): Delete.
40 (target_have_continuable_watchpoint): Delete.
41 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
42 * target-delegates.c: Regenerate.
43
44 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
45
46 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
47 the files present in "gnulib/import/m4/".
48
49 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
50
51 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
52 c.sw, c.swsp, and c.sdsp.
53
54 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
55
56 * riscv-tdep.c (struct riscv_inferior_data): Delete.
57 (riscv_read_misa_reg): Don't cache value read into inferior data.
58 (riscv_new_inferior_data): Delete.
59 (riscv_inferior_data_cleanup): Delete.
60 (riscv_inferior_data): Delete.
61 (riscv_invalidate_inferior_data): Delete.
62 (_initialize_riscv_tdep): Remove initialisation of inferior data.
63
64 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
65
66 * compile/compile-cplus-types.c
67 (compile_cplus_instance::leave_scope): Take the address of scope
68 object.
69 (compile_cplus_instance::convert_qualified_base): Compare quals
70 to 0.
71
72 2018-08-30 Keith Seitz <keiths@redhat.com>
73
74 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
75 Use "%s" and host_address_to_string instead of "%p" in printf.
76
77 2018-08-29 Keith Seitz <keiths@redhat.com>
78
79 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
80 and compile-cplus-types.c.
81 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
82 * c-lang.c (cplus_language_defn): Set C++ compile functions.
83 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
84 Declare.
85 * compile/compile-c-support.c: Include compile-cplus.h.
86 (load_libcompile): Templatize.
87 (get_compile_context): "New" function.
88 (c_get_compile_context): Use get_compile_context.
89 (cplus_get_compile_context): New function.
90 (cplus_push_user_expression, cplus_pop_user_expression)
91 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
92 (cplus_compute_program): Define new structs/functions.
93 * compile/compile-cplus-symmbols.c: New file.
94 * compile/compile-cplus-types.c: New file.
95 * compile/compile-cplus.h: New file.
96 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
97 Declare.
98 * compile/compile-object-load.c (get_out_value_type): Use
99 strncmp_iw when comparing symbol names.
100 (compile_object_load): Add mst_bss and mst_data.
101 * compile/compile.c (_initialize_compile): Remove
102 -Wno-implicit-function-declaration from `compile_args'.
103 * compile/gcc-cp-plugin.h: New file.
104 * NEWS: Mention C++ compile support and new debug options.
105
106 2018-08-29 Keith Seitz <keiths@redhat.com>
107
108 * linespec.c (collect_info::add_symbol): Make virtual.
109 (struct symbol_searcher_collect_info): New struct.
110 (symbol_searcher::find_all_symbols): New method.
111 * symtab.h (class symbol_searcher): New class.
112
113 2018-08-29 Keith Seitz <keiths@redhat.com>
114
115 * linespec.c (struct linespec) <function_symbols, label_symbols>:
116 Change to vector of block_symbol. Update all users.
117 (struct collect_info) <symbols>: Likewise.
118 (collect_info::add_symbol): Take block_symbol as argument.
119 Update all callers.
120 (decode_compound_collector) <m_symbols>: Change type to vector
121 of block_symbol. Update all users.
122 (decode_compound_collector::operator ()): Change parameter type
123 to block_symbol.
124 (find_method, find_function_symbols, find_linespec_symbols)
125 (find_label_symbols_in_block, find_label_symbols): Change symbol
126 vectors to block_symbol vectors.
127 * symtab.h (symbol_found_callback_ftype): Change parameter type to
128 block_symbol.
129
130 2018-08-29 Keith Seitz <keiths@redhat.com>
131
132 * linespec.c (symbolp): Remove typedef and VEC definitions.
133 (bound_minimal_symbol_d): Likewise.
134
135 2018-08-29 Keith Seitz <keiths@redhat.com>
136
137 * linespec.c (decode_compound_collector::decode_compound_collector):
138 Remove initialization for `m_symtabs'.
139 (decode_compound_collector::release_symbols): Change return type
140 to std::vector. Update all callers.
141 (class decode_compound_collector) <m_symbols>: Change type to
142 std::vector.
143 (lookup_prefix_sym): Change return type to std::vector. Update all
144 callers.
145 (compare_symbols): Remove.
146 (std_compare_symbols): Rename to `compare_symbols'.
147 (find_method): Change `sym_classes' parameter to std::vector.
148 Update all callers. Use std::sort to sort sym_classes.
149 (find_linespec_symbols): Remove cleanup.
150
151 2018-08-29 Keith Seitz <keiths@redhat.com>
152
153 * linespec.c (struct linespec) <minimal_symbols>: Change type to
154 std::vector. Update all users.
155 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
156 (struct collect_info) <minimal_symbols>: Likewise.
157 (compare_msymbols): Return bool. Change parameters to const
158 bound_minimal_symbol references.
159 (find_method, find_function_symbols, find_linespec_symbols): Change
160 `minsyms' parameter to std::vector. Update all callers.
161
162 2018-08-29 Keith Seitz <keiths@redhat.com>
163
164 * linespec.c (struct linespec) <label_symbols>: Change type to
165 std::vector. Update all users.
166 (find_label_symbols_in_block): Change `result' parameter to
167 std::vector. Update all callers.
168 (find_label_symbols): Return std::vector. Update all callers.
169
170 2018-08-29 Keith Seitz <keiths@redhat.com>
171
172 * linespec.c (struct linespec) <function_symbols>: Change type to
173 std::vector. Update all users.
174 (struct collect_info) <function_symbols>: Likewise.
175 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
176 (std_compare_symbols): New function.
177 (find_method, find_function_symbols, find_linespec_symbols)
178 (find_label_symbols_in_block): Change `symbols' parameter to
179 std::vector. Update all callers.
180 (find_label_symbols): Likewise for `function_symbols' and
181 `label_funcs_ret'.
182
183 2018-08-29 Keith Seitz <keiths@redhat.com>
184
185 * linespec.c (symtab_vector_up): Define.
186 (struct linespec) <file_symtabs>: Change type to std::vector *.
187 Update all uses.
188 (struct collect_info) <file_symtabs>: Likewise.
189 (collect_symtabs_from_filename): Return symtab_vector_up.
190 Update all callers.
191 (decode_objc): Remove cleanup.
192 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
193 (symtab_collector::release_symtabs): Return symtab_vector_up.
194 Update all callers.
195 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
196 Update all users.
197 (collect_symtabs_from_filename, symtabs_from_filename): Return
198 symtab_vector_up. Update all callers.
199
200 2018-08-29 Tom Tromey <tom@tromey.com>
201
202 * csky-tdep.c (csky_analyze_prologue): Use
203 core_addr_to_string_nz.
204
205 2018-08-29 Tom Tromey <tom@tromey.com>
206
207 * windows-nat.c (struct xlate_exception) <them>: Change type to
208 DWORD.
209 (xlate): Fix formatting. Remove last entry.
210 (struct xlate_exception, xlate): Comment out.
211 (windows_nat_target::resume): Use ranged for.
212
213 2018-08-29 Jim Wilson <jimw@sifive.com>
214
215 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
216 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
217 of NT_PRFPREG.
218 (riscv_linux_nat_target::store_registers): Likewise.
219
220 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
221
222 PR gdb/23555
223 PR gdb/23558
224 * gnulib/aclocal.m4: Regenerate.
225 * gnulib/config.in: Regenerate.
226 * gnulib/configure: Regenerate.
227 * gnulib/import/Makefile.am: Update.
228 * gnulib/import/Makefile.in: Update.
229 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
230 * gnulib/import/_Noreturn.h: ... this.
231 * gnulib/import/alloca.in.h: Update.
232 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
233 * gnulib/import/arg-nonnull.h: ... this.
234 * gnulib/import/assure.h: Update.
235 * gnulib/import/at-func.c: Update.
236 * gnulib/import/basename-lgpl.c: Update.
237 * gnulib/import/extra/snippet/c++defs.h: Rename to...
238 * gnulib/import/c++defs.h: ... this.
239 * gnulib/import/canonicalize-lgpl.c: Update.
240 * gnulib/import/cdefs.h: Update.
241 * gnulib/import/chdir-long.c: Update.
242 * gnulib/import/chdir-long.h: Update.
243 * gnulib/import/cloexec.c: Update.
244 * gnulib/import/cloexec.h: Update.
245 * gnulib/import/close.c: Update.
246 * gnulib/import/closedir.c: Update.
247 * gnulib/import/config.charset: Update.
248 * gnulib/import/dirent-private.h: Update.
249 * gnulib/import/dirent.in.h: Update.
250 * gnulib/import/dirfd.c: Update.
251 * gnulib/import/dirname-lgpl.c: Update.
252 * gnulib/import/dirname.h: Update.
253 * gnulib/import/dosname.h: Update.
254 * gnulib/import/dup-safer-flag.c: Update.
255 * gnulib/import/dup-safer.c: Update.
256 * gnulib/import/dup.c: Update.
257 * gnulib/import/dup2.c: Update.
258 * gnulib/import/errno.in.h: Update.
259 * gnulib/import/error.c: Update.
260 * gnulib/import/error.h: Update.
261 * gnulib/import/exitfail.c: Update.
262 * gnulib/import/exitfail.h: Update.
263 * gnulib/import/extra/update-copyright: Update.
264 * gnulib/import/fchdir.c: Update.
265 * gnulib/import/fcntl.c: Update.
266 * gnulib/import/fcntl.in.h: Update.
267 * gnulib/import/fd-hook.c: Update.
268 * gnulib/import/fd-hook.h: Update.
269 * gnulib/import/fd-safer-flag.c: Update.
270 * gnulib/import/fd-safer.c: Update.
271 * gnulib/import/fdopendir.c: Update.
272 * gnulib/import/filename.h: Update.
273 * gnulib/import/filenamecat-lgpl.c: Update.
274 * gnulib/import/filenamecat.h: Update.
275 * gnulib/import/flexmember.h: Update.
276 * gnulib/import/float+.h: Update.
277 * gnulib/import/float.c: Update.
278 * gnulib/import/float.in.h: Update.
279 * gnulib/import/fnmatch.c: Update.
280 * gnulib/import/fnmatch.in.h: Update.
281 * gnulib/import/fnmatch_loop.c: Update.
282 * gnulib/import/fpucw.h: Update.
283 * gnulib/import/frexp.c: Update.
284 * gnulib/import/frexpl.c: Update.
285 * gnulib/import/fstat.c: Update.
286 * gnulib/import/fstatat.c: Update.
287 * gnulib/import/getcwd-lgpl.c: Update.
288 * gnulib/import/getcwd.c: Update.
289 * gnulib/import/getdtablesize.c: Update.
290 * gnulib/import/getlogin_r.c: Update.
291 * gnulib/import/getprogname.c: Update.
292 * gnulib/import/getprogname.h: Update.
293 * gnulib/import/gettext.h: Update.
294 * gnulib/import/gettimeofday.c: Update.
295 * gnulib/import/glob-libc.h: Update.
296 * gnulib/import/glob.c: Update.
297 * gnulib/import/glob.in.h: Update.
298 * gnulib/import/glob_internal.h: Update.
299 * gnulib/import/glob_pattern_p.c: Update.
300 * gnulib/import/globfree.c: Update.
301 * gnulib/import/hard-locale.c: Update.
302 * gnulib/import/hard-locale.h: Update.
303 * gnulib/import/intprops.h: Update.
304 * gnulib/import/inttypes.in.h: Update.
305 * gnulib/import/isnan.c: Update.
306 * gnulib/import/isnand-nolibm.h: Update.
307 * gnulib/import/isnand.c: Update.
308 * gnulib/import/isnanl-nolibm.h: Update.
309 * gnulib/import/isnanl.c: Update.
310 * gnulib/import/itold.c: Update.
311 * gnulib/import/libc-config.h: Update.
312 * gnulib/import/limits.in.h: Update.
313 * gnulib/import/localcharset.c: Update.
314 * gnulib/import/localcharset.h: Update.
315 * gnulib/import/localtime-buffer.c: Update.
316 * gnulib/import/localtime-buffer.h: Update.
317 * gnulib/import/lstat.c: Update.
318 * gnulib/import/m4/00gnulib.m4: Update.
319 * gnulib/import/m4/__inline.m4: Update.
320 * gnulib/import/m4/absolute-header.m4: Update.
321 * gnulib/import/m4/alloca.m4: Update.
322 * gnulib/import/m4/builtin-expect.m4: Update.
323 * gnulib/import/m4/canonicalize.m4: Update.
324 * gnulib/import/m4/chdir-long.m4: Update.
325 * gnulib/import/m4/close.m4: Update.
326 * gnulib/import/m4/closedir.m4: Update.
327 * gnulib/import/m4/configmake.m4: Update.
328 * gnulib/import/m4/d-ino.m4: Update.
329 * gnulib/import/m4/d-type.m4: Update.
330 * gnulib/import/m4/dirent_h.m4: Update.
331 * gnulib/import/m4/dirfd.m4: Update.
332 * gnulib/import/m4/dirname.m4: Update.
333 * gnulib/import/m4/double-slash-root.m4: Update.
334 * gnulib/import/m4/dup.m4: Update.
335 * gnulib/import/m4/dup2.m4: Update.
336 * gnulib/import/m4/eealloc.m4: Update.
337 * gnulib/import/m4/environ.m4: Update.
338 * gnulib/import/m4/errno_h.m4: Update.
339 * gnulib/import/m4/error.m4: Update.
340 * gnulib/import/m4/exponentd.m4: Update.
341 * gnulib/import/m4/exponentl.m4: Update.
342 * gnulib/import/m4/extensions.m4: Update.
343 * gnulib/import/m4/extern-inline.m4: Update.
344 * gnulib/import/m4/fchdir.m4: Update.
345 * gnulib/import/m4/fcntl-o.m4: Update.
346 * gnulib/import/m4/fcntl.m4: Update.
347 * gnulib/import/m4/fcntl_h.m4: Update.
348 * gnulib/import/m4/fdopendir.m4: Update.
349 * gnulib/import/m4/filenamecat.m4: Update.
350 * gnulib/import/m4/flexmember.m4: Update.
351 * gnulib/import/m4/float_h.m4: Update.
352 * gnulib/import/m4/fnmatch.m4: Update.
353 * gnulib/import/m4/fnmatch_h.m4: Update.
354 * gnulib/import/m4/fpieee.m4: Update.
355 * gnulib/import/m4/frexp.m4: Update.
356 * gnulib/import/m4/frexpl.m4: Update.
357 * gnulib/import/m4/fstat.m4: Update.
358 * gnulib/import/m4/fstatat.m4: Update.
359 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
360 * gnulib/import/m4/getcwd-path-max.m4: Update.
361 * gnulib/import/m4/getcwd.m4: Update.
362 * gnulib/import/m4/getdtablesize.m4: Update.
363 * gnulib/import/m4/getlogin.m4: Update.
364 * gnulib/import/m4/getlogin_r.m4: Update.
365 * gnulib/import/m4/getpagesize.m4: Update.
366 * gnulib/import/m4/getprogname.m4: Update.
367 * gnulib/import/m4/gettimeofday.m4: Update.
368 * gnulib/import/m4/glibc21.m4: Update.
369 * gnulib/import/m4/glob.m4: Update.
370 * gnulib/import/m4/glob_h.m4: Update.
371 * gnulib/import/m4/gnulib-cache.m4: Update.
372 * gnulib/import/m4/gnulib-common.m4: Update.
373 * gnulib/import/m4/gnulib-comp.m4: Update.
374 * gnulib/import/m4/gnulib-tool.m4: Update.
375 * gnulib/import/m4/hard-locale.m4: Update.
376 * gnulib/import/m4/include_next.m4: Update.
377 * gnulib/import/m4/inttypes-pri.m4: Update.
378 * gnulib/import/m4/inttypes.m4: Update.
379 * gnulib/import/m4/isnand.m4: Update.
380 * gnulib/import/m4/isnanl.m4: Update.
381 * gnulib/import/m4/largefile.m4: Update.
382 * gnulib/import/m4/limits-h.m4: Update.
383 * gnulib/import/m4/localcharset.m4: Update.
384 * gnulib/import/m4/locale-fr.m4: Update.
385 * gnulib/import/m4/locale-ja.m4: Update.
386 * gnulib/import/m4/locale-zh.m4: Update.
387 * gnulib/import/m4/localtime-buffer.m4: Update.
388 * gnulib/import/m4/longlong.m4: Update.
389 * gnulib/import/m4/lstat.m4: Update.
390 * gnulib/import/m4/malloc.m4: Update.
391 * gnulib/import/m4/malloca.m4: Update.
392 * gnulib/import/m4/math_h.m4: Update.
393 * gnulib/import/m4/mbrtowc.m4: Update.
394 * gnulib/import/m4/mbsinit.m4: Update.
395 * gnulib/import/m4/mbsrtowcs.m4: Update.
396 * gnulib/import/m4/mbstate_t.m4: Update.
397 * gnulib/import/m4/memchr.m4: Update.
398 * gnulib/import/m4/memmem.m4: Update.
399 * gnulib/import/m4/mempcpy.m4: Update.
400 * gnulib/import/m4/memrchr.m4: Update.
401 * gnulib/import/m4/mkdir.m4: Update.
402 * gnulib/import/m4/mkstemp.m4: Update.
403 * gnulib/import/m4/mmap-anon.m4: Update.
404 * gnulib/import/m4/mode_t.m4: Update.
405 * gnulib/import/m4/msvc-inval.m4: Update.
406 * gnulib/import/m4/msvc-nothrow.m4: Update.
407 * gnulib/import/m4/multiarch.m4: Update.
408 * gnulib/import/m4/nocrash.m4: Update.
409 * gnulib/import/m4/off_t.m4: Update.
410 * gnulib/import/m4/onceonly.m4: Update.
411 * gnulib/import/m4/open-cloexec.m4: Update.
412 * gnulib/import/m4/open.m4: Update.
413 * gnulib/import/m4/openat.m4: Update.
414 * gnulib/import/m4/opendir.m4: Update.
415 * gnulib/import/m4/pathmax.m4: Update.
416 * gnulib/import/m4/rawmemchr.m4: Update.
417 * gnulib/import/m4/readdir.m4: Update.
418 * gnulib/import/m4/readlink.m4: Update.
419 * gnulib/import/m4/realloc.m4: Update.
420 * gnulib/import/m4/rename.m4: Update.
421 * gnulib/import/m4/rewinddir.m4: Update.
422 * gnulib/import/m4/rmdir.m4: Update.
423 * gnulib/import/m4/save-cwd.m4: Update.
424 * gnulib/import/m4/secure_getenv.m4: Update.
425 * gnulib/import/m4/setenv.m4: Update.
426 * gnulib/import/m4/signal_h.m4: Update.
427 * gnulib/import/m4/ssize_t.m4: Update.
428 * gnulib/import/m4/stat-time.m4: Update.
429 * gnulib/import/m4/stat.m4: Update.
430 * gnulib/import/m4/std-gnu11.m4: Update.
431 * gnulib/import/m4/stdbool.m4: Update.
432 * gnulib/import/m4/stddef_h.m4: Update.
433 * gnulib/import/m4/stdint.m4: Update.
434 * gnulib/import/m4/stdio_h.m4: Update.
435 * gnulib/import/m4/stdlib_h.m4: Update.
436 * gnulib/import/m4/strchrnul.m4: Update.
437 * gnulib/import/m4/strdup.m4: Update.
438 * gnulib/import/m4/strerror.m4: Update.
439 * gnulib/import/m4/string_h.m4: Update.
440 * gnulib/import/m4/strstr.m4: Update.
441 * gnulib/import/m4/strtok_r.m4: Update.
442 * gnulib/import/m4/sys_socket_h.m4: Update.
443 * gnulib/import/m4/sys_stat_h.m4: Update.
444 * gnulib/import/m4/sys_time_h.m4: Update.
445 * gnulib/import/m4/sys_types_h.m4: Update.
446 * gnulib/import/m4/tempname.m4: Update.
447 * gnulib/import/m4/time_h.m4: Update.
448 * gnulib/import/m4/unistd-safer.m4: Update.
449 * gnulib/import/m4/unistd_h.m4: Update.
450 * gnulib/import/m4/warn-on-use.m4: Update.
451 * gnulib/import/m4/wchar_h.m4: Update.
452 * gnulib/import/m4/wchar_t.m4: Update.
453 * gnulib/import/m4/wctype_h.m4: Update.
454 * gnulib/import/m4/wint_t.m4: Update.
455 * gnulib/import/malloc.c: Update.
456 * gnulib/import/malloc/scratch_buffer.h: Update.
457 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
458 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
459 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
460 * gnulib/import/malloca.c: Update.
461 * gnulib/import/malloca.h: Update.
462 * gnulib/import/malloca.valgrind: Update.
463 * gnulib/import/math.in.h: Update.
464 * gnulib/import/mbrtowc.c: Update.
465 * gnulib/import/mbsinit.c: Update.
466 * gnulib/import/mbsrtowcs-impl.h: Update.
467 * gnulib/import/mbsrtowcs-state.c: Update.
468 * gnulib/import/mbsrtowcs.c: Update.
469 * gnulib/import/memchr.c: Update.
470 * gnulib/import/memmem.c: Update.
471 * gnulib/import/mempcpy.c: Update.
472 * gnulib/import/memrchr.c: Update.
473 * gnulib/import/mkdir.c: Update.
474 * gnulib/import/mkstemp.c: Update.
475 * gnulib/import/msvc-inval.c: Update.
476 * gnulib/import/msvc-inval.h: Update.
477 * gnulib/import/msvc-nothrow.c: Update.
478 * gnulib/import/msvc-nothrow.h: Update.
479 * gnulib/import/open.c: Update.
480 * gnulib/import/openat-die.c: Update.
481 * gnulib/import/openat-priv.h: Update.
482 * gnulib/import/openat-proc.c: Update.
483 * gnulib/import/openat.c: Update.
484 * gnulib/import/openat.h: Update.
485 * gnulib/import/opendir.c: Update.
486 * gnulib/import/pathmax.h: Update.
487 * gnulib/import/pipe-safer.c: Update.
488 * gnulib/import/rawmemchr.c: Update.
489 * gnulib/import/readdir.c: Update.
490 * gnulib/import/readlink.c: Update.
491 * gnulib/import/realloc.c: Update.
492 * gnulib/import/ref-add.sin: Update.
493 * gnulib/import/ref-del.sin: Update.
494 * gnulib/import/rename.c: Update.
495 * gnulib/import/rewinddir.c: Update.
496 * gnulib/import/rmdir.c: Update.
497 * gnulib/import/same-inode.h: Update.
498 * gnulib/import/save-cwd.c: Update.
499 * gnulib/import/save-cwd.h: Update.
500 * gnulib/import/scratch_buffer.h: Update.
501 * gnulib/import/secure_getenv.c: Update.
502 * gnulib/import/setenv.c: Update.
503 * gnulib/import/signal.in.h: Update.
504 * gnulib/import/stat-time.c: Update.
505 * gnulib/import/stat-time.h: Update.
506 * gnulib/import/stat-w32.c: Update.
507 * gnulib/import/stat-w32.h: Update.
508 * gnulib/import/stat.c: Update.
509 * gnulib/import/stdbool.in.h: Update.
510 * gnulib/import/stddef.in.h: Update.
511 * gnulib/import/stdint.in.h: Update.
512 * gnulib/import/stdio.in.h: Update.
513 * gnulib/import/stdlib.in.h: Update.
514 * gnulib/import/str-two-way.h: Update.
515 * gnulib/import/strchrnul.c: Update.
516 * gnulib/import/strdup.c: Update.
517 * gnulib/import/streq.h: Update.
518 * gnulib/import/strerror-override.c: Update.
519 * gnulib/import/strerror-override.h: Update.
520 * gnulib/import/strerror.c: Update.
521 * gnulib/import/string.in.h: Update.
522 * gnulib/import/stripslash.c: Update.
523 * gnulib/import/strnlen1.c: Update.
524 * gnulib/import/strnlen1.h: Update.
525 * gnulib/import/strstr.c: Update.
526 * gnulib/import/strtok_r.c: Update.
527 * gnulib/import/sys_stat.in.h: Update.
528 * gnulib/import/sys_time.in.h: Update.
529 * gnulib/import/sys_types.in.h: Update.
530 * gnulib/import/tempname.c: Update.
531 * gnulib/import/tempname.h: Update.
532 * gnulib/import/time.in.h: Update.
533 * gnulib/import/unistd--.h: Update.
534 * gnulib/import/unistd-safer.h: Update.
535 * gnulib/import/unistd.in.h: Update.
536 * gnulib/import/unsetenv.c: Update.
537 * gnulib/import/verify.h: Update.
538 * gnulib/import/extra/snippet/warn-on-use.h: Update.
539 * gnulib/import/wchar.in.h: Update.
540 * gnulib/import/wctype.in.h: Update.
541 * gnulib/import/xalloc-oversized.h: Update.
542 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
543 "53e2c179f26a890fa6685af4b6c1397ee370433b".
544
545 2018-08-16 Gary Benson <gbenson@redhat.com>
546
547 PR gdb/13000:
548 * gdb/main.c (captured_main_1): Exit with nonzero status
549 in batch mode if the last command to be executed failed.
550 * NEWS: Mention the above.
551
552 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
553
554 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
555 end of warning message.
556
557 2018-08-29 Alan Hayward <alan.hayward@arm.com>
558
559 PR gdb/22943:
560 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
561 (aarch64_extract_return_value): Use
562 aapcs_is_vfp_call_or_return_candidate.
563 (aarch64_return_in_memory): Likewise.
564 (aarch64_store_return_value): Likewise.
565
566 2018-08-29 Alan Hayward <alan.hayward@arm.com>
567
568 * aarch64-tdep.c
569 (aapcs_is_vfp_call_or_return_candidate): Make static
570 (pass_in_v_or_stack): Remove function.
571 (pass_in_v_vfp_candidate): New function.
572 (aarch64_push_dummy_call): Check for float register candidates.
573
574 2018-08-29 Alan Hayward <alan.hayward@arm.com>
575
576 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
577 (aapcs_is_vfp_call_or_return_candidate_1): New function.
578 (aapcs_is_vfp_call_or_return_candidate): Likewise.
579
580 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
581
582 PR build/23399
583 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
584 (struct ipa_sym_addresses): Rename to...
585 (struct ipa_sym_addresses_common): ... this.
586 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
587
588 2018-08-28 Tom Tromey <tom@tromey.com>
589
590 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
591 (token_fifo): Now a std::vector.
592 (yylex, c_parse): Update.
593 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
594 (token_fifo): Now a std::vector.
595 (yylex, d_parse): Update.
596 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
597 (token_fifo): Now a std::vector.
598 (yylex, go_parse): Update.
599
600 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
601
602 * parser-defs.h (struct type_stack) <elements>: Change type to
603 std::vector<union type_stack_elt>.
604 <depth, size>: Remove.
605 * parse.c (parse_exp_in_context_1): Adjust.
606 (type_stack_reserve): Remove.
607 (check_type_stack_depth): Remove.
608 (insert_into_type_stack): Adjust to std::vector.
609 (insert_type): Likewise.
610 (push_type): Likewise.
611 (push_type_int): Likewise.
612 (insert_type_address_space): Likewise.
613 (pop_type): Likewise.
614 (pop_type_int): Likewise.
615 (pop_typelist): Likewise.
616 (pop_type_stack): Likewise.
617 (append_type_stack): Likewise.
618 (push_type_stack): Likewise.
619 (get_type_stack): Likewise.
620 (type_stack_cleanup): Likewise.
621 (push_typelist): Likewise.
622 (follow_types): Likewise.
623 (_initialize_parse): Likewise.
624
625 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
626
627 * NEWS: Mention csky target.
628
629 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
630 Hafiz Abid Qadeer <abidh@codesourcery.com>
631 Don Breazeal <donb@codesourcery.com>
632
633 * csky-linux-tdep.c: New file.
634 * csky-tdep.c: Likewise.
635 * csky-tdep.h: Likewise.
636 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
637 csky-tdep.o.
638 (HFILES_NO_SRCDIR): Add csky-tdep.h.
639 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
640 * configure.tgt: Add csky support.
641
642 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
643
644 * python/py-framefilter.c (py_print_frame): Print frame architecture
645 when printing on an MI output.
646
647 2018-08-27 Tom Tromey <tom@tromey.com>
648
649 PR build/23087:
650 * configure: Rebuild.
651 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
652
653 2018-08-27 Tom Tromey <tom@tromey.com>
654
655 * aarch64-linux-tdep.c
656 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
657 casts to int.
658
659 2018-08-27 Tom Tromey <tom@tromey.com>
660
661 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
662 unsigned.
663 (ppc64_standard_linkage1, ppc64_standard_linkage2)
664 (ppc64_standard_linkage3, ppc64_standard_linkage4)
665 (ppc64_standard_linkage5, ppc64_standard_linkage6)
666 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
667 unsigned.
668
669 2018-08-27 Tom Tromey <tom@tromey.com>
670
671 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
672 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
673
674 2018-08-27 Tom Tromey <tom@tromey.com>
675
676 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
677 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
678 ULONGEST_MAX.
679 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
680 ULONGEST_MAX.
681 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
682 ULONGEST_MAX.
683 * sparc-linux-tdep.c (sparc32_linux_sigframe)
684 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
685 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
686 ULONGEST_MAX.
687 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
688 (ppc64_linux_sigaction_tramp_frame)
689 (ppc32_linux_sighandler_tramp_frame)
690 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
691 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
692 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
693 * mn10300-linux-tdep.c (am33_linux_sigframe)
694 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
695 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
696 * mips-linux-tdep.c (mips_linux_o32_sigframe)
697 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
698 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
699 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
700 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
701 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
702 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
703 * microblaze-linux-tdep.c
704 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
705 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
706 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
707 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
708 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
709 * common/common-types.h (ULONGEST_MAX): New define.
710 (CORE_ADDR_MAX): Fix formatting.
711 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
712 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
713 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
714 (arm_linux_rt_sigreturn_tramp_frame)
715 (arm_eabi_linux_sigreturn_tramp_frame)
716 (arm_eabi_linux_rt_sigreturn_tramp_frame)
717 (thumb2_eabi_linux_sigreturn_tramp_frame)
718 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
719 (arm_linux_restart_syscall_tramp_frame)
720 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
721 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
722 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
723 ULONGEST_MAX.
724 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
725
726 2018-08-27 Tom Tromey <tom@tromey.com>
727
728 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
729 CORE_ADDR_MAX.
730 * mips-tdep.c (mips_deal_with_atomic_sequence)
731 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
732 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
733 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
734 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
735 CORE_ADDR_MAX.
736 * aarch64-tdep.c (aarch64_software_single_step): Use
737 CORE_ADDR_MAX.
738
739 2018-08-27 Tom Tromey <tom@tromey.com>
740
741 * linespec.c (complete_linespec_component): Add cast to "char".
742 * completer.c (completion_tracker::build_completion_result): Add
743 cast to "char".
744
745 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
746
747 * solist.h (struct solist, struct target_so_ops): Fix
748 indentation.
749
750 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
751
752 * ada-tasks.c (ada_task_info_s): Remove typedef.
753 (DEF_VEC_O(ada_task_info_s)): Remove.
754 (struct ada_tasks_inferior_data): Initialize fields.
755 <task_list>: Make an std::vector.
756 (get_ada_tasks_inferior_data): Allocate with new.
757 (ada_get_task_number): Adjust.
758 (get_task_number_from_id): Likewise.
759 (valid_task_id): Likewise.
760 (ada_get_task_info_from_ptid): Likewise.
761 (iterate_over_live_ada_tasks): Likewise.
762 (add_ada_task): Likewise.
763 (read_known_tasks): Likewise.
764 (ada_build_task_list): Likewise.
765 (print_ada_task_info): Likewise.
766 (info_task): Likewise.
767 (task_command_1): Likewise.
768
769 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
770
771 * ada-lang.c (add_angle_brackets): Return std::string.
772
773 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
774
775 * python/py-threadevent.c (py_get_event_thread): Initialize
776 pythread.
777
778 2018-08-24 Pedro Alves <palves@redhat.com>
779
780 * python/py-bpevent.c (create_breakpoint_event_object): Use
781 copy-initialization.
782 * python/py-continueevent.c (emit_continue_event): Use
783 copy-initialization.
784 * python/py-exitedevent.c (create_exited_event_object): Return a
785 gdbpy_ref<>.
786 (emit_exited_event): Use copy-initialization.
787 * python/py-inferior.c (python_new_inferior)
788 (python_inferior_deleted, add_thread_object): Use
789 copy-initialization.
790 * python/py-infevents.c (create_inferior_call_event_object)
791 (create_register_changed_event_object)
792 (create_memory_changed_event_object): Return a gdbpy_ref<>.
793 (emit_inferior_call_event, emit_memory_changed_event)
794 (emit_register_changed_event): Use copy-initialization.
795 * python/py-newobjfileevent.c (create_new_objfile_event_object):
796 Return a gdbpy_ref<>.
797 (emit_new_objfile_event): Use copy-initialization.
798 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
799 (emit_clear_objfiles_event): Use copy-initialization.
800 * python/py-signalevent.c (create_signal_event_object): Use
801 copy-initialization.
802 * python/py-threadevent.c (create_thread_event_object): Use
803 copy-initialization.
804
805 2018-08-24 Pedro Alves <palves@redhat.com>
806 Simon Marchi <simon.marchi@ericsson.com>
807
808 PR gdb/23379
809 * python/py-continueevent.c: Include "gdbthread.h".
810 (create_continue_event_object): Add intro comment. Add 'ptid'
811 parameter. Use it to find thread to pass to
812 create_thread_event_object.
813 (emit_continue_event): Pass PTID down to
814 create_continue_event_object.
815 * python/py-event.h (py_get_event_thread): Declare.
816 (create_thread_event_object): Remove default from 'thread'
817 parameter.
818 * python/py-stopevent.c (create_stop_event_object): Use
819 py_get_event_thread.
820 * python/py-threadevent.c (get_event_thread): Rename to ...
821 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
822 and use it to find the thread.
823 (create_thread_event_object): Assert that THREAD isn't null.
824 Don't find the event thread here.
825
826 2018-08-23 Kevin Buettner <kevinb@redhat.com>
827
828 * block.h (blockrange, blockranges): New struct declarations.
829 (struct block): Add new field named `ranges'.
830 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
831 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
832 macros for accessing ranges in struct block.
833 (make_blockranges): New declaration.
834 block.c (make_blockranges): New function.
835 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
836 for block.
837 * symtab.h (find_pc_partial_function): Add new parameter `block'.
838 * blockframe.c (cache_pc_function_block): New static global.
839 (clear_pc_function_cache): Clear cache_pc_function_block.
840 (find_pc_partial_function): Move comment to symtab.h. Add
841 support for non-contiguous blocks.
842 * cli/cli-cmds.c (block.h): Include.
843 (print_disassembly): Handle printing of non-contiguous blocks.
844 (disassemble_current_function): Likewise.
845 (disassemble_command): Likewise.
846
847 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
848 BLOCK_START.
849 * blockframe.c (get_pc_function_start): Likewise.
850 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
851 (gcc_symbol_address): Likewise.
852 * compile/compile-object-run.c (compile_object_run): Likewise.
853 * compile/compile.c (get_expr_block_and_pc): Likewise.
854 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
855 (func_addr_to_tail_call_list): Likewise.
856 * findvar.c (default_read_var_value): Likewise.
857 * inline-frame.c (inline_frame_this_id): Likewise.
858 (skip-inline_frames): Likewise.
859 * infcmd.c (until_next_command): Likewise.
860 * linespec.c (convert_linespec_to_sals): Likewise.
861 * parse.c (parse_exp_in_context_1): Likewise.
862 * printcmd.c (build_address_symbolic): likewise.
863 (info_address_command): Likewise.
864 symtab.c (find_function_start_sal): Likewise.
865 (skip_prologue_sal): Likewise.
866 (find_function_alias_target): Likewise.
867 (find_gnu_ifunc): Likewise.
868 * stack.c (find_frame_funname): Likewise.
869 * symtab.c (fixup_symbol_section): Likewise.
870 (find_function_start_sal): Likewise.
871 (skip_prologue_sal): Likewsie.
872 (find_function_alias_target): Likewise.
873 (find_gnu_ifunc): Likewise.
874 * tracepoint.c (info_scope_command): Likewise.
875 * value.c (value_fn_field): Likewise.
876
877 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
878 in place of find_pc_partial_function.
879 * blockframe.c (find_function_entry_range_from_pc): New function.
880 * symtab.h (find_function_entry_range_from_pc): Declare and document.
881 * objfiles.c (objfile_relocate1): Relocate start and end addresses
882 for each range in a block.
883
884
885 2018-08-23 Xavier Roirand <roirand@adacore.com>
886
887 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
888 incrementation.
889
890 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
891
892 * solib-svr4.c (read_program_headers_from_bfd): Return
893 gdb::optional<gdb::byte_vector>.
894 (svr4_exec_displacement): Adjust.
895
896 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
897
898 * solib-svr4.c (read_program_header): Return
899 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
900 (find_program_interpreter): Return
901 gdb::optional<gdb::byte_vector>.
902 (scan_dyntag_auxv): Adjust.
903 (enable_break): Adjust.
904 (svr4_exec_displacement): Adjust.
905
906 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
907
908 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
909 * inf-child.c (inf_child_target::terminal_save_inferior): New.
910
911 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
912
913 * guile/scm-string.c (gdbscm_scm_from_printf): Use
914 string_vprintf.
915 * guile/scm-utils.c (gdbscm_printf): Likewise.
916 * serial.c (serial_printf): Likewise.
917 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
918
919 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
920
921 * stack.c (print_frame): Print frame architecture when printing on
922 an MI output.
923 * NEWS: Mention new "arch" attribute in frame output.
924
925 2018-08-21 Alan Hayward <alan.hayward@arm.com>
926
927 * arch/aarch64.h (aarch64_regnum): Update comment.
928
929 2018-08-21 Alan Hayward <alan.hayward@arm.com>
930
931 * NEWS: Add SVE to 8.2 section.
932
933 2018-08-21 Pedro Alves <palves@redhat.com>
934
935 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
936 out from gdbscm_parse_function_args.
937 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
938 gdbscm_parse_function_args_1.
939
940 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
941
942 PR gdb/17816
943 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
944 operator.
945
946 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
947
948 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
949
950 2018-08-19 Michael Spang <spang@google.com>
951
952 PR gdb/11786
953 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
954 for PT_TLS segments.
955
956 2018-08-18 Kevin Buettner <kevinb@redhat.com>
957
958 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
959 dwarf_variable_value.
960 * dwarf2-frame.c (class dwarf_expr_executor):
961 Add override for dwarf_variable_value.
962 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
963 (class symbol_needs_eval_context): Likewise.
964 (indirect_synthetic_pointer): Add forward declaration.
965 (sect_variable_value): New function.
966 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
967 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
968 for DW_OP_GNU_variable_value.
969
970 2018-08-16 Tom Tromey <tom@tromey.com>
971
972 * top.c (read_command_file): Update.
973 (command_line_input): Remove "repeat" argument.
974 * ada-lang.c (get_selections): Update.
975 * linespec.c (decode_line_2): Update.
976 * defs.h (command_line_input): Remove argument.
977 * cli/cli-script.c (read_next_line): Update.
978 * python/py-gdb-readline.c: Update.
979
980 2018-08-17 Tom Tromey <tom@tromey.com>
981
982 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
983 command_line_input.
984
985 2018-08-15 Tom Tromey <tom@tromey.com>
986
987 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
988
989 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
990
991 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
992 If used, use find_pc_partial_function to find address range
993 to disassemble.
994 * mi/mi-main.c (mi_cmd_list_features): Report
995 "data-disassemble-a-option" feature.
996 * NEWS: Mention new -data-disassemble option -a.
997
998 2018-08-13 Tom Tromey <tom@tromey.com>
999
1000 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1001
1002 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1003
1004 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1005 (aarch64_linux_collect_sve_regset): Likewise.
1006 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1007 * regcache.h (regcache_map_entry_size): New function.
1008
1009 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1010
1011 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1012 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1013 (SVE_HEADER_VL_LENGTH): Likewise.
1014 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1015 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1016 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1017 (SVE_HEADER_SIZE_OFFSET): Likewise.
1018 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1019 (SVE_HEADER_VL_OFFSET): Likewise.
1020 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1021 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1022 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1023 (SVE_HEADER_SIZE): Likewise.
1024 (aarch64_linux_core_read_vq): Add function.
1025 (aarch64_linux_core_read_description): Check for SVE section.
1026
1027 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1028
1029 * aarch64-fbsd-tdep.c
1030 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1031 collect_size.
1032 * aarch64-linux-tdep.c
1033 (aarch64_linux_iterate_over_regset_sections): Likewise.
1034 * alpha-linux-tdep.c
1035 (alpha_linux_iterate_over_regset_sections):
1036 * alpha-nbsd-tdep.c
1037 (alphanbsd_iterate_over_regset_sections): Likewise.
1038 * amd64-fbsd-tdep.c
1039 (amd64fbsd_iterate_over_regset_sections): Likewise.
1040 * amd64-linux-tdep.c
1041 (amd64_linux_iterate_over_regset_sections): Likewise.
1042 * arm-bsd-tdep.c
1043 (armbsd_iterate_over_regset_sections): Likewise.
1044 * arm-fbsd-tdep.c
1045 (arm_fbsd_iterate_over_regset_sections): Likewise.
1046 * arm-linux-tdep.c
1047 (arm_linux_iterate_over_regset_sections): Likewise.
1048 * corelow.c (get_core_registers_cb): Likewise.
1049 (core_target::fetch_registers): Likewise.
1050 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1051 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1052 * gdbarch.h (void): Regenerate.
1053 * gdbarch.sh: Add supply_size and collect_size.
1054 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1055 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1056 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1057 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1058 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1059 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1060 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1061 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1062 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1063 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1064 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1065 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1066 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1067 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1068 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1069 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1070 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1071 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1072 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1073 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1074 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1075 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1076 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1077 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1078 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1079 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1080 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1081 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1082 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1083 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1084
1085 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1086
1087 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1088 with string_printf.
1089
1090 2018-08-10 Keith Seitz <keiths@redhat.com>
1091
1092 * compile/compile-c-support.c (add_code_header, add_code_footer):
1093 Move into policy class.
1094 (c_push_user_expression, pop_user_expression_nop)
1095 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1096 (compile_program): New host class.
1097 (c_compile_program): New typedef.
1098 (c_compute_porgram): Use c_compile_program.
1099
1100 2018-08-10 Keith Seitz <keiths@redhat.com>
1101
1102 * compile/compile-internal.h (compile_instance::~compile_instance):
1103 Remove calls to htab_delete.
1104 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1105 * compile.c (compile_instance::compile_instance): Initialize
1106 htab unique pointers.
1107 (compile_instance::get_cached_type, compile_instance::insert_type)
1108 (compile_instance::error_symbol_once): Update for unique_ptr.
1109
1110 2018-08-10 Keith Seitz <keiths@redhat.com>
1111
1112 * compile/compile-c-symbols.c (struct symbol_error)
1113 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1114 (compile_instance::insert_symbol_error)
1115 (compile_instance::error_symbol_once): Move to ...
1116 * compile/compile.c: ... here.
1117
1118 2018-08-10 Keith Seitz <keiths@redhat.com>
1119
1120 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1121 instead of `new_compile_instance'.
1122 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1123 Update description.
1124 If the symbol error map is not initialized, create it.
1125 (generate_c_for_for_one_symbol): Do not check/initialize
1126 the symbol error map.
1127 * compile/compile-c-types.c (compile_c_instance): Make a class.
1128 Update all callers.
1129 (compile_instance::compile_instance): Initialize the type cache.
1130 (get_cached_type): New function.
1131 (insert_type): Update description.
1132 (compile_c_instance::m_default_cflags): Define.
1133 (convert_type): Update description. Use get_cached_type.
1134 (delete_instance): Moved to destructor.
1135 (new_compile_instance): Moved to constructor.
1136 * compile/compile-c.h (compile_c_instance): Make class inheriting
1137 from compile_instance.
1138 <base>: Remove field.
1139 <type_map, symbol_err_map>: Move to base class.
1140 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1141 * compile/compile-internal.h (compile_instance): Make class.
1142 <type_map_t, symbol_err_map_t>: Define.
1143 <fe>: Rename to `m_gcc_fe'.
1144 <scope, block, gcc_target_options>: Add `m_' prefix.
1145 <m_type_map, m_symbol_err_map>: New fields, moved from
1146 compile_c_instance.
1147 <destroy>: Remove.
1148 (convert_type, new_compile_instance): Remove.
1149 * compile/compile.c (cleanup_compile_instance): Remove.
1150 (compile_to_object): Use unique_ptr to eliminate cleanups.
1151 (compile_instance::set_print_callback, compile_instance::version)
1152 (compile_instance::set_verbose)
1153 (compile_instance::set_driver_filename)
1154 (compile_instance::set_triplet_regexp)
1155 (compile_instance::set_arguments)
1156 (compile_instance::set_source_file)
1157 (compile_instance::compile): Define.
1158
1159 2018-08-10 Keith Seitz <keiths@redhat.com>
1160
1161 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1162 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1163 gcc-c-fe.def to define C plugin.
1164 (delete_instance): Delete `c_plugin'.
1165 (new_compile_instance): Initialize `c_plugin'.
1166 * compile/compile-c.h: Include gcc_c_plugin.h.
1167 (struct compile_c_instance) <c_plugin>: New member.
1168 * gcc-c-plugin.h: New file.
1169 Update all callers with API change.
1170
1171 2018-08-10 Keith Seitz <keiths@redhat.com>
1172
1173 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1174 (HFILES_NO_SRCDIR): ... to here.
1175 Add compile-internal.h and compile-c.h.
1176 * compile/compile-c-support.c: Include compile-c.h.
1177 * compile/compile-c-symbols.c: Include compile-c.h.
1178 (generate_c_for_variable_locations): Update comment.
1179 * compile/compile-c-types.c: Include compile-c.h.
1180 * compile/compile-c.h: New file -- moved C language declarations
1181 from other files here.
1182 * compile/compile-internal.h: Do not include hashtab.h or
1183 common/enum-flags.h.
1184 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1185 (gcc_convert_symbol, gcc_symbol_address)
1186 (generate_c_for_variable_locations, c_get_mode_for_size)
1187 (c_get_range_decl_name): Definitions moved to compile-c.h.
1188 * compile/compile-loc2c.c: Include compile-c.h.
1189
1190 2018-08-10 Keith Seitz <keiths@redhat.com>
1191
1192 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1193 (c_symbol_substitution_name): ... this.
1194 Update all callers.
1195
1196 2018-08-10 Keith Seitz <keiths@redhat.com>
1197
1198 * compile/compile-c-support.c (c_compute_program): Use
1199 unique_xmalloc_ptr to eliminate cleanup.
1200 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1201 Return a unique_xmalloc_ptr and eliminate cleanup.
1202 * compile/compile-internal.h (generate_c_for_variable_locations):
1203 Return unique_xmalloc_ptr and update description.
1204
1205 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1206
1207 * corelow.c (core_target::get_core_register_section): Rename
1208 min_size to section_min_size.
1209
1210 2018-08-09 Jim Wilson <jimw@sifive.com>
1211
1212 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1213 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1214 * NEWS: Mention new GNU/Linux RISC-V target.
1215 * configure.host: Add riscv*-*-linux*.
1216 * configure.nat: Add riscv*.
1217 * configure.tgt: Add riscv*-*-linux*.
1218 * riscv-linux-nat.c: New file.
1219 * riscv-linux-tdep.c: New file.
1220
1221 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1222
1223 * infrun.c (resume): Make static, add forward declaration.
1224 (proceed): Update header comment.
1225 * infrun.h (resume): Delete declaration.
1226
1227 2018-08-09 Tom Tromey <tom@tromey.com>
1228
1229 * riscv-tdep.h: Minor formatting fixes.
1230
1231 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1232
1233 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1234 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1235 (test_mkdir_recursive): Likewise.
1236 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1237
1238 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1239
1240 * valarith.c (value_subscripted_rvalue): If an array is not in
1241 memory, and we don't know the upper bound, then we can't know that
1242 the requested element exists or not.
1243
1244 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1245
1246 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1247 (target_options_to_string): Add comment.
1248
1249 2018-08-08 Tom Tromey <tom@tromey.com>
1250
1251 * unittests/scoped_mmap-selftests.c: Check result of "write".
1252
1253 2018-08-08 Jim Wilson <jimw@sifive.com>
1254
1255 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1256 (decode_register_index_short): New.
1257 (decode_j_type_insn, decode_cj_type_insn): New.
1258 (decode_b_type_insn, decode_cb_type_insn): New.
1259 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1260 local xlen. Check xlen when decoding ambiguous compressed insns. In
1261 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1262 is_c_sw_insn instead of is_sw_insn.
1263 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1264 (riscv_software_single_step): New.
1265 * riscv-tdep.h (riscv_software_single_step): Declare.
1266
1267 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1268 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1269
1270 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1271
1272 PR gdb/18050:
1273 * target.c (dispose_inferior): Don't dispose of inferiors that are
1274 already killed.
1275
1276 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1277
1278 * remote.c (remote_target::download_tracepoint): Change char* to
1279 const char*.
1280
1281 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1282
1283 * target.h (target_options_to_string): Return an std::string.
1284 * target.c (str_comma_list_concat_elem): Return void, use
1285 std::string.
1286 (do_option): Likewise.
1287 (target_options_to_string): Return an std::string.
1288 * linux-nat.c (linux_nat_target::wait): Adjust.
1289 * target-debug.h (target_debug_print_options): Adjust.
1290
1291 2018-08-07 Tom Tromey <tom@tromey.com>
1292
1293 * Makefile.in (CPPFLAGS): New variable.
1294 (INTERNAL_CPPFLAGS): Use it.
1295
1296 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1297
1298 * NEWS: Mention the index cache.
1299
1300 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1301
1302 * common/pathstuff.h (get_standard_cache_dir): New.
1303 * common/pathstuff.c (get_standard_cache_dir): New.
1304 * build-id.h (build_id_to_string): New.
1305 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1306 DEBUG_STR_SUFFIX): Move to here.
1307 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1308 DEBUG_STR_SUFFIX): Move from there.
1309 (write_psymtabs_to_index): Make non-static, add basename
1310 parameter. Write to temporary files, rename when done.
1311 (save_gdb_index_command): Adjust call to
1312 write_psymtabs_to_index.
1313 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1314 field.
1315 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1316 (get_gdb_index_contents_from_cache): New.
1317 (get_gdb_index_contents_from_cache_dwz): New.
1318 (dwarf2_initialize_objfile): Read index from cache.
1319 (dwarf2_build_psymtabs): Save to index.
1320 * dwarf-index-cache.h: New file.
1321 * dwarf-index-cache.c: New file.
1322 * dwarf-index-write.h: New file.
1323
1324 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1325
1326 * gnulib/aclocal.m4: Re-generate.
1327 * gnulib/config.in: Re-generate.
1328 * gnulib/configure: Re-generate.
1329 * gnulib/import/Makefile.am: Re-generate.
1330 * gnulib/import/Makefile.in: Re-generate.
1331 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1332 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1333 * gnulib/import/m4/mkdir.m4: New file.
1334 * gnulib/import/mkdir.c: New file.
1335 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1336 module.
1337
1338 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1339
1340 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1341 * common/scoped_mmap.c: New file.
1342 * common/scoped_mmap.h (destroy): New method.
1343 (~scoped_mmap, reset): Use destroy.
1344 (scoped_mmap): New move constructor.
1345 (mmap_file): New declaration.
1346 * unittests/scoped_mmap-selftests.c (test_normal,
1347 test_invalid_filename, run_tests): New functions.
1348 (_initialize_scoped_mmap_selftests): Register selftest.
1349
1350 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1351
1352 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1353 (read_gdb_index_from_buffer): ... this. Remove section
1354 parameter, add buffer parameter.
1355 (get_gdb_index_contents_ftype,
1356 get_gdb_index_contents_dwz_ftype): New typedefs.
1357 (dwarf2_read_gdb_index): Add callback parameters to get the
1358 index contents.
1359 (get_gdb_index_contents_from_section): New.
1360 (dwarf2_initialize_objfile): Update call to
1361 dwarf2_read_gdb_index.
1362
1363 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1364
1365 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1366 (gdb_open_cloexec): Likewise.
1367 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1368 (commandline_from_pid): Likewise.
1369 (linux_xfer_osdata_threads): Likewise.
1370 (linux_xfer_osdata_fds): Likewise.
1371 * ada-lang.c (is_package_name): Likewise.
1372 * auxv.c (procfs_xfer_auxv): Likewise.
1373 * breakpoint.c (print_one_breakpoint_location): Use
1374 uiout::field_fmt.
1375 (print_one_catch_solib): Use string_printf.
1376 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1377 (add_pe_forwarded_sym): Likewise.
1378 * dwarf2read.c (create_type_unit_group): Likewise.
1379 (build_error_marker_type): Likewise.
1380 * infcall.c (get_function_name): Likewise.
1381 * valprint.c (print_converted_chars_to_obstack): Likewise.
1382 * xtensa-tdep.c (xtensa_register_type): Likewise.
1383
1384 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1385
1386 * remote.c (remote_target::download_tracepoint): Fix format
1387 string errors.
1388
1389 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1390
1391 * tracefile.c: Include common/byte-vector.h.
1392 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1393 with trace_regblock_size if needed. Update uses of buf.
1394
1395 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1396
1397 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1398 std::vector<unsigned char>.
1399 * tracepoint.c (collection_list::collection_list): Remove
1400 m_regs_mask initializer from initializer list. Resize
1401 m_regs_mask using the largest remote register number.
1402 (collection_list::add_remote_register): Remove size check on
1403 m_regs_mask. Use at to access element.
1404 (collection_list::stringify): Change type of temp_buf to
1405 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1406 stringify the register mask. Use pack_hex_byte for the register
1407 mask.
1408
1409 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1410
1411 * tracepoint.h (class collection_list) <add_register>: Remove.
1412 <add_remote_register, add_ax_registers, add_local_register>:
1413 Declare.
1414 <add_memrange>: Add scope parameter.
1415 * tracepoint.c (encode_actions_1): Likewise.
1416 (collection_list::add_register): Rename to ...
1417 (collection_list::add_remote_register): ... this. Update
1418 comment.
1419 (collection_list::add_ax_registers, add_local_register): New
1420 methods.
1421 (collection_list::add_memrange): Add scope parameter. Call
1422 add_local_register instead of add_register.
1423 (finalize_tracepoint_aexpr): New function.
1424 (collection_list::collect_symbol): Update calls to add_memrange.
1425 Call add_local_register instead of add_register. Call
1426 add_ax_registers. Call finalize_tracepoint_aexpr.
1427 (encode_actions_1): Get remote regnos for $reg action. Call
1428 add_remote_register, add_ax_registers, and add_local_register.
1429 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1430 (validate_actionline): Call finalize_tracepoint_aexpr.
1431
1432 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1433
1434 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1435 Replace array buf with gdb::char_vector buf, of size
1436 get_remote_packet_size (). Replace references to buf and
1437 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1438 and xsnprintf with snprintf. Raise errors if the buffer is too
1439 small.
1440
1441 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1442
1443 * remote.c (remote_target::download_tracepoint): Fix the has_more
1444 predicate in the QTDP action list iteration.
1445
1446 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1447
1448 * remote.c (remote_target::download_tracepoint): Fix indentation
1449 in for block.
1450
1451 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1452
1453 * proc-api.c (_initialize_proc_api): Remove c, unused.
1454 * procfs.c (procfs_init_inferior): Remove signals, unused.
1455 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1456 unused.
1457
1458 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1459 Andrew Burgess <andrew.burgess@embecosm.com>
1460
1461 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1462 'W_STOPCODE (0)' as this could be ambiguous.
1463
1464 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1465
1466 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1467 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1468 "ai_socktype").
1469
1470 2018-08-02 Tom Tromey <tom@tromey.com>
1471
1472 PR symtab/16842.
1473 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1474 symbols.
1475 (process_structure_scope): Likewise.
1476
1477 2018-08-02 Xavier Roirand <roirand@adacore.com>
1478
1479 PR gdb/22629:
1480 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1481 kill inferior.
1482
1483 2018-08-02 Tom Tromey <tom@tromey.com>
1484
1485 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1486 (darwin_suspend_inferior, darwin_resume_inferior)
1487 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1488 (darwin_check_new_threads): Check result of get_darwin_inferior.
1489
1490 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1491
1492 GDB 8.1.1 released.
1493
1494 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1495
1496 * varobj.c (varobj_get_path_expr_parent): Report an error if
1497 parent is a dynamic varobj.
1498
1499 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1500
1501 * gnulib/aclocal.m4: Re-generate.
1502 * gnulib/config.in: Re-generate.
1503 * gnulib/configure: Re-generate.
1504 * gnulib/import/Makefile.in: Re-generate.
1505 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1506 * gnulib/import/m4/onceonly.m4: Re-generate.
1507
1508 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1509
1510 * target-descriptions.c (struct xml_test_tdesc): New.
1511 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1512 (record_xml_tdesc): Update.
1513 (maintenance_check_xml_descriptions): Update.
1514 * target-descriptions.h (record_xml_tdesc): Update comment.
1515
1516 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1517
1518 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1519 checking array bounds are defined.
1520
1521 2018-07-30 Tom Tromey <tom@tromey.com>
1522
1523 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1524 irreflexivity violation.
1525
1526 2018-07-30 Tom Tromey <tom@tromey.com>
1527
1528 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1529 * value.c (unpack_long): Remove lint code.
1530 * valops.c (value_ind): Remove lint code.
1531 * valarith.c (value_x_binop, value_x_unop, value_equal)
1532 (value_pos): Remove lint code.
1533
1534 2018-07-28 Tom de Vries <tdevries@suse.de>
1535
1536 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1537 with undefined upper bound as <optimized out>.
1538
1539 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1540
1541 * gcore.in: Rename variable "name" to "prefix". Expand
1542 "usage" text.
1543
1544 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1545
1546 * windows-nat.c (windows_nat_target::create_inferior): Update to
1547 call close() in global namespace.
1548
1549 2018-07-26 Tom Tromey <tom@tromey.com>
1550
1551 * dwarf-index-write.c (add_address_entry): Don't add objfile
1552 offsets.
1553 * dbxread.c (find_stab_function): Rename from
1554 find_stab_function_addr. Return a bound_minimal_symbol.
1555 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1556 Don't add objfile offsets.
1557 (end_psymtab): Use raw_text_low, raw_text_high,
1558 MSYMBOL_VALUE_RAW_ADDRESS.
1559 (read_ofile_symtab): Update.
1560 (process_one_symbol): Update.
1561 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1562 offsets.
1563 (dw2_relocate): Remove.
1564 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1565 searching addrmap.
1566 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1567 Update.
1568 (process_psymtab_comp_unit_reader, add_partial_symbol)
1569 (add_partial_subprogram, dwarf2_ranges_read): Update.
1570 (load_partial_dies): Update.
1571 (add_address_entry): Don't add objfile offsets.
1572 (dwarf2_build_include_psymtabs): Update.
1573 (create_addrmap_from_aranges): Don't add objfile offsets.
1574 (dw2_find_pc_sect_compunit_symtab): Update.
1575 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1576 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1577 Update.
1578 (parse_partial_symbols): Don't add objfile offsets. Use
1579 raw_text_low, raw_text_high. Update.
1580 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1581 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1582 or call 'relocate' quick function. Clear psymbol_map.
1583 * psympriv.h (struct partial_symbol) <address>: Add section
1584 offset.
1585 <set_unrelocated_address>: Rename from set_address.
1586 <raw_text_low, raw_text_high>: New methods.
1587 <text_low, text_high>: Add objfile parameter.
1588 (add_psymbol_to_bcache): Add 'section' parameter. Call
1589 set_unrelocated_address.
1590 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1591 (find_pc_psymbol): Update.
1592 (fixup_psymbol_section, relocate_psymtabs): Remove.
1593 (dump_psymtab, psym_functions): Update.
1594 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1595 parameter.
1596 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1597 (start_psymtab_common): Update.
1598 * symfile-debug.c (debug_qf_relocate): Remove.
1599 (debug_sym_quick_functions): Update.
1600 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1601 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1602 Update.
1603
1604 2018-07-26 Tom Tromey <tromey@redhat.com>
1605
1606 * dbxread.c (end_psymtab): Use text_high_valid and
1607 text_low_valid.
1608 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1609 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1610 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1611 Update comment.
1612 <text_low_valid, text_high_valid>: New fields.
1613 <set_text_low, set_text_high>: Update.
1614 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1615
1616 2018-07-26 Tom Tromey <tom@tromey.com>
1617
1618 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1619 Update.
1620 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1621 textlow and texthigh fields.
1622 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1623 Update.
1624 * mdebugread.c (parse_lines, parse_partial_symbols)
1625 (psymtab_to_symtab_1): Update.
1626 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1627 Rename fields. Update comment. Now private.
1628 <text_low, text_high, set_text_low, set_text_high>: New methods.
1629 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1630 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1631 (start_psymtab_common, maintenance_info_psymtabs)
1632 (maintenance_check_psymtabs): Update.
1633 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1634 texthigh fields.
1635 (scan_xcoff_symtab): Update.
1636
1637 2018-07-26 Tom Tromey <tromey@redhat.com>
1638
1639 * psympriv.h (struct partial_symbol) <unrelocated_address,
1640 address, set_address>: New methods.
1641 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1642 (fixup_psymbol_section, relocate_psymtabs): Update.
1643 (print_partial_symbols): Add 'objfile' parameter. Update.
1644 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1645 Update.
1646
1647 2018-07-26 Tom Tromey <tom@tromey.com>
1648
1649 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1650 (debug_names::write_psymbols): Update.
1651 * psympriv.h (struct partial_symbol): Derive from
1652 general_symbol_info.
1653 <obj_section>: New method.
1654 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1655 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1656 (find_pc_sect_psymbol, fixup_psymbol_section)
1657 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1658 (print_partial_symbols, recursively_search_psymtabs)
1659 (compare_psymbols, psymbol_hash, psymbol_compare)
1660 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1661 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1662
1663 2018-07-26 Tom Tromey <tromey@redhat.com>
1664
1665 * dbxread.c (end_psymtab): Remove dead code.
1666
1667 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1668
1669 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1670 DWARF unwinders are disabled.
1671 * dwarf2-frame.c: Add dwarf2read.h include.
1672 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1673 disabled.
1674 (dwarf2_frame_unwinders_enabled_p): Define.
1675 (show_dwarf_unwinders_enabled_p): New function.
1676 (_initialize_dwarf2_frame): Register switch to control DWARF
1677 unwinder use.
1678 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1679 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1680 (show_dwarf_cmdlist): Remove static keyword.
1681 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1682 (show_dwarf_cmdlist): Declare.
1683 * NEWS: Document new feature.
1684
1685 2018-07-26 Tom de Vries <tdevries@suse.de>
1686
1687 PR breakpoints/23366
1688 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1689
1690 2018-07-26 Tom de Vries <tdevries@suse.de>
1691
1692 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1693 DW_AT_count can't be translated to a dynamic prop.
1694
1695 2018-07-25 Tom de Vries <tdevries@suse.de>
1696
1697 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1698 try/catch.
1699
1700 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1701
1702 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1703
1704 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1705
1706 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1707
1708 2018-07-24 Keith Seitz <keiths@redhat.comt
1709
1710 PR symtab/23010
1711 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1712 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1713 instead of add_symbol_to_list.
1714 (read_file_scope): Call prepare_one_comp_unit before reading
1715 any other DIEs.
1716
1717 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1718
1719 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1720
1721 2018-07-24 Tom Tromey <tom@tromey.com>
1722
1723 * utils.c (malloc, realloc, free): Don't declare.
1724 * configure, config.in: Rebuild.
1725 * configure.ac: Don't check for declarations of free, malloc, or
1726 realloc.
1727
1728 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1729
1730 * aarch64-linux-nat.c
1731 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1732 variable.
1733 * arm-linux-nat.c (fetch_regs): Likewise.
1734 (store_regs): Likewise.
1735 (fetch_vfp_regs): Likewise.
1736 (store_vfp_regs): Likewise.
1737 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1738 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1739 (arm_linux_nat_target::insert_watchpoint): Likewise.
1740 (arm_linux_nat_target::remove_watchpoint): Likewise.
1741 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1742 Likewise.
1743 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1744 Likewise.
1745 * ppc-linux-nat.c (fetch_register): Likewise.
1746 (fetch_all_gp_regs): Likewise.
1747 (fetch_ppc_registers): Likewise.
1748 (store_all_gp_regs): Likewise.
1749 (store_ppc_registers): Likewise.
1750 (hwdebug_insert_point): Likewise.
1751 (can_use_watchpoint_cond_accel): Likewise.
1752 * remote-sim.c (gdb_os_write_stdout): Likewise.
1753
1754 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1755 Tom Tromey <tom@tromey.com>
1756
1757 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1758 test for it.
1759 * configure: Rebuild.
1760
1761 2018-07-22 Tom Tromey <tom@tromey.com>
1762
1763 * regformats/regdat.sh: Define xmltarget_${name} inside
1764 #ifndef IN_PROCESS_AGENT.
1765
1766 2018-07-22 Tom Tromey <tom@tromey.com>
1767
1768 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1769
1770 2018-07-22 Tom Tromey <tom@tromey.com>
1771
1772 * symfile.c (reread_symbols): Notify iter, not objfile.
1773
1774 2018-07-22 Tom Tromey <tom@tromey.com>
1775
1776 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1777 Use arch_ops.
1778 (ravenscar_thread_target::prepare_to_store): Likewise.
1779
1780 2018-07-22 Tom Tromey <tom@tromey.com>
1781
1782 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1783 unused variable. Call value_fetch_lazy when needed.
1784 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1785 Remove unused variable. Call value_fetch_lazy when needed.
1786
1787 2018-07-22 Tom Tromey <tom@tromey.com>
1788
1789 * m32c-tdep.c (mark_dma): Return void.
1790 (make_regs): Remove unused declarations.
1791
1792 2018-07-22 Tom Tromey <tom@tromey.com>
1793
1794 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1795 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1796 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1797 bkscm_get_valid_block_smob_arg_unsafe for effect.
1798
1799 2018-07-22 Tom Tromey <tom@tromey.com>
1800
1801 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1802 value_type.
1803
1804 2018-07-22 Tom Tromey <tom@tromey.com>
1805
1806 * windows-nat.c (saved_context): Conditionally define.
1807 * remote.c (remote_target::remote_btrace_maybe_reopen):
1808 Conditionally declare "warned".
1809 * inflow.c (sigquit_ours): Conditionally define.
1810 (new_tty): Move "tty" declaration inside #if.
1811 * guile/guile.c (guile_datadir): Conditionally define.
1812 * charset.c (set_be_le_names): Move some declarations inside #if.
1813 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1814 #if.
1815 (parse_xml_btrace_conf): Likewise.
1816
1817 2018-07-22 Tom Tromey <tom@tromey.com>
1818
1819 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1820
1821 2018-07-22 Tom Tromey <tom@tromey.com>
1822
1823 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1824 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1825 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1826 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1827 * stack.c (frame_apply_level_command): Remove unused variable.
1828 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1829 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1830 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1831 unused variable.
1832 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1833 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1834 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1835 variable.
1836 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1837 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1838 variable.
1839 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1840 Remove unused variable.
1841 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1842 variable.
1843 * common/tdesc.c (print_xml_feature::visit): Remove unused
1844 variable.
1845 * compile/compile-object-load.c (store_regs): Remove unused
1846 variables.
1847 * complaints.c (clear_complaints): Remove unused variable.
1848 * corelow.c (core_target_open): Remove unused variable.
1849 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1850 variable.
1851 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1852 variable.
1853 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1854 variable.
1855 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1856 variable.
1857 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1858 variable.
1859 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1860 variable.
1861 * ia64-tdep.c (examine_prologue): Remove unused variable.
1862 * infcall.c (run_inferior_call): Remove unused variable.
1863 * inferior.c (exit_inferior): Remove unused variable.
1864 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1865 * linespec.c (decode_line_2): Remove unused variable.
1866 * linux-nat.c (super_close): Remove.
1867 * linux-tdep.c (linux_info_proc): Remove unused variable.
1868 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1869 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1870 Remove unused variable.
1871 * parse.c (find_minsym_type_and_address): Remove unused variable.
1872 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1873 variable.
1874 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1875 variable.
1876 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1877 variables.
1878 * record-btrace.c (record_btrace_target::store_registers): Remove
1879 unused variable.
1880 (cmd_show_record_btrace_cpu): Remove unused variable.
1881 * riscv-tdep.c (riscv_register_reggroup_p)
1882 (riscv_push_dummy_call, riscv_return_value): Remove unused
1883 variable.
1884 * rust-exp.y (literal): Remove unused variable.
1885 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1886 unused variable.
1887 <STRUCTOP_ANONYMOUS>: Likewise.
1888 * s390-linux-tdep.c (s390_linux_init_abi_31)
1889 (s390_linux_init_abi_64): Remove unused variable.
1890 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1891 (file_select_thread, net_windows_open, _initialize_ser_windows):
1892 Remove unused variables.
1893 * symtab.c (find_pc_sect_line): Remove unused variable.
1894 * target-memory.c (compute_garbled_blocks): Remove unused
1895 variable.
1896 (target_write_memory_blocks): Remove unused variable.
1897 * target.c (target_stack::unpush): Remove unused variables.
1898 * tracepoint.c (start_tracing, all_tracepoint_actions)
1899 (merge_uploaded_trace_state_variables)
1900 (print_one_static_tracepoint_marker): Remove unused variable.
1901 * unittests/basic_string_view/element_access/char/1.cc (test01):
1902 Remove unused variable.
1903 * windows-nat.c (windows_continue, windows_add_all_dlls)
1904 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1905 Remove unused variables.
1906
1907 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1908
1909 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1910 attr_profile in HAVE_ELF.
1911 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1912 HAVE_ELF.
1913
1914 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1915
1916 * frame.c (frame_register_unwind): Change parameter name.
1917 (frame_unwind_register): Likewise.
1918 (frame_unwind_register_value): Likewise.
1919 (frame_unwind_register_signed): Likewise.
1920 (frame_unwind_register_unsigned): Likewise.
1921 * frame.h (frame_register_unwind): Likewise.
1922 (frame_unwind_register): Likewise.
1923 (frame_unwind_register_value): Likewise.
1924 (frame_unwind_register_signed): Likewise.
1925 (frame_unwind_register_unsigned): Likewise.
1926 (frame_unwind_arch): Likewise.
1927
1928 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1929
1930 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1931 ISA maintenance.
1932
1933 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1934
1935 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1936 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1937 hand.
1938
1939 2018-07-20 Keith Seitz <keiths@redhat.com>
1940
1941 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1942 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1943 m_compunit_symtab, m_language>: Add "m_" prefix.
1944 Update all uses.
1945 * buildsym.c: Update all uses.
1946
1947 2018-07-20 Tom Tromey <tom@tromey.com>
1948
1949 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1950 * buildsym.h (record_line_ftype): Remove typedef.
1951
1952 2018-07-20 Tom Tromey <tom@tromey.com>
1953
1954 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1955 (end_expandable_symtab): Likewise.
1956 (end_symtab_get_static_block): Likewise.
1957 (end_symtab_from_static_block): Likewise.
1958 * buildsym-legacy.c (augment_type_symtab): Remove.
1959 (end_expandable_symtab): Remove.
1960 (end_symtab_get_static_block): Remove.
1961 (end_symtab_from_static_block): Remove.
1962
1963 2018-07-20 Tom Tromey <tom@tromey.com>
1964
1965 * dwarf2read.c: Include buildsym.h.
1966 (struct dwarf2_cu) <builder>: New method.
1967 (fixup_go_packaging): Update.
1968 (process_full_comp_unit, process_full_type_unit): Update. Don't
1969 use scoped_free_pendings.
1970 (using_directives): Add "cu" parameter, remove "language".
1971 (read_import_statement, setup_type_unit_groups, )
1972 (read_func_scope, read_lexical_block_scope)
1973 (dwarf2_record_block_ranges, read_namespace): Update.
1974 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1975 (lnp_state_machine::handle_end_sequence): Update.
1976 (class lnp_state_machine) <m_cu>: New member.
1977 <m_record_line_callback>: Remove.
1978 <m_currently_recording_lines>: New member.
1979 (lnp_state_machine::handle_set_file): Update.
1980 (noop_record_line): Remove.
1981 (dwarf_record_line_p): Add cu parameter.
1982 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1983 (lnp_state_machine::record_line)
1984 (lnp_state_machine::lnp_state_machine)
1985 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1986 (dwarf_decode_lines): Update.
1987 (dwarf2_start_subfile): Add cu parameter.
1988 (dwarf2_start_symtab, new_symbol): Update.
1989 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1990 Remove dwarf2_per_objfile parameter.
1991 (dwarf_decode_macros): Update.
1992
1993 2018-07-20 Tom Tromey <tom@tromey.com>
1994
1995 * stabsread.c (define_symbol): Update.
1996 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1997 * dwarf2read.c (new_symbol): Update.
1998 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1999 * cp-namespace.c: Include buildsym.h.
2000 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2001 * buildsym-legacy.c (get_buildsym_compunit): New function.
2002
2003 2018-07-20 Tom Tromey <tom@tromey.com>
2004
2005 * xcoffread.c: Include buildsym-legacy.h.
2006 * windows-nat.c: Include buildsym-legacy.h.
2007 * stabsread.c: Include buildsym-legacy.h.
2008 * mdebugread.c: Include buildsym-legacy.h.
2009 * buildsym-legacy.h: New file.
2010 * buildsym-legacy.c: New file, from buildsym.c.
2011 * go32-nat.c: Include buildsym-legacy.h.
2012 * dwarf2read.c: Include buildsym-legacy.h.
2013 * dbxread.c: Include buildsym-legacy.h.
2014 * cp-namespace.c: Include buildsym-legacy.h.
2015 * coffread.c: Include buildsym-legacy.h.
2016 * buildsym.h: Move some contents to buildsym-legacy.h.
2017 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2018 buildsym-legacy.c.
2019 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2020
2021 2018-07-20 Tom Tromey <tom@tromey.com>
2022
2023 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2024 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2025 (buildsym_compunit::buildsym_compunit)
2026 (buildsym_compunit::~buildsym_compunit)
2027 (buildsym_compunit::get_macro_table): Define.
2028
2029 2018-07-20 Tom Tromey <tom@tromey.com>
2030
2031 * buildsym.c (reset_symtab_globals): Remove.
2032 (buildsym_compunit::end_symtab_from_static_block): Update.
2033 (buildsym_compunit::augment_type_symtab): Update.
2034 (end_symtab_from_static_block): Call free_buildsym_compunit.
2035 (augment_type_symtab, end_symtab, end_expandable_symtab):
2036 Likewise.
2037
2038 2018-07-20 Tom Tromey <tom@tromey.com>
2039
2040 * arch-utils.c: Do not include buildsym.h.
2041 * mipsread.c: Do not include buildsym.h.
2042 * machoread.c: Do not include buildsym.h.
2043 * elfread.c: Do not include buildsym.h.
2044
2045 2018-07-20 Tom Tromey <tom@tromey.com>
2046
2047 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2048 initialization.
2049 (buildsym_compunit): Add new constructor.
2050 (struct buildsym_compunit) <get_last_source_file, finish_block,
2051 record_block_range, start_subfile, patch_subfile_names,
2052 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2053 set_last_source_start_addr, get_last_source_start_addr,
2054 get_local_using_directives, set_local_using_directives,
2055 get_global_using_directives, outermost_context_p,
2056 get_current_context_stack, get_context_stack_depth,
2057 get_current_subfile, get_local_symbols, get_file_symbols,
2058 get_global_symbols, record_debugformat, record_producer,
2059 push_context, pop_context, end_symtab_get_static_block,
2060 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2061 New public methods.
2062 <record_pending_block, finish_block_internal, make_blockvector,
2063 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2064 private methods.
2065 Update all users.
2066
2067 2018-05-22 Tom Tromey <tom@tromey.com>
2068
2069 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2070 parameter.
2071 (finish_block_internal): Update.
2072
2073 2018-07-20 Tom Tromey <tom@tromey.com>
2074
2075 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2076 parameter.
2077 (finish_block_internal): Update.
2078
2079 2018-07-20 Tom Tromey <tom@tromey.com>
2080
2081 * buildsym.h (EXTERN): Don't define or undef.
2082 * buildsym.c (EXTERN): Don't define.
2083
2084 2018-07-20 Tom Tromey <tom@tromey.com>
2085
2086 * buildsym.c: Remove TODO comment.
2087
2088 2018-07-20 Tom Tromey <tom@tromey.com>
2089
2090 * coffread.c (coff_symtab_read): Update.
2091 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2092 (xcoff_new_init): Update.
2093 * mipsread.c (mipscoff_new_init): Update.
2094 * mdebugread.c (mdebug_build_psymtabs): Update.
2095 * elfread.c (elf_new_init): Update.
2096 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2097 Update.
2098 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2099 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2100 (stabsect_build_psymtabs): Update.
2101 * buildsym.h (buildsym_init): Don't declare.
2102 * buildsym.c: Update comment.
2103 (prepare_for_building): Remove.
2104 (start_symtab, restart_symtab): Update.
2105 (reset_symtab_globals): Update comment.
2106 (buildsym_init): Remove.
2107
2108 2018-07-20 Tom Tromey <tom@tromey.com>
2109
2110 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2111 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2112 (read_enum_type, common_block_start, common_block_end)
2113 (cleanup_undefined_types_1, finish_global_stabs): Update.
2114 * mdebugread.c (psymtab_to_symtab_1): Update.
2115 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2116 (read_lexical_block_scope, new_symbol): Update.
2117 * dbxread.c (process_one_symbol): Update.
2118 * coffread.c (coff_symtab_read, process_coff_symbol)
2119 (coff_read_enum_type): Update.
2120 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2121 declare.
2122 (get_local_symbols, get_file_symbols, get_global_symbols): New
2123 functions.
2124 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2125 m_global_symbols.
2126 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2127 (~scoped_free_pendings): Update.
2128 (finish_block, prepare_for_building, reset_symtab_globals)
2129 (end_symtab_get_static_block, end_symtab_with_blockvector)
2130 (augment_type_symtab, push_context): Update.
2131 (get_local_symbols, get_file_symbols, get_global_symbols): New
2132 functions.
2133 (buildsym_init): Update.
2134
2135 2018-07-20 Tom Tromey <tom@tromey.com>
2136
2137 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2138 (process_full_type_unit): Likewise.
2139 (dwarf2_start_symtab): Set list_in_scope.
2140
2141 2018-07-20 Tom Tromey <tom@tromey.com>
2142
2143 * dwarf2read.c (process_psymtab_comp_unit_reader)
2144 (build_type_psymtabs_reader): Do not set list_in_scope.
2145
2146 2018-07-20 Tom Tromey <tom@tromey.com>
2147
2148 * buildsym.c (free_pendings): Remove.
2149 (add_symbol_to_list, scoped_free_pendings)
2150 (finish_block_internal, buildsym_init): Update.
2151
2152 2018-07-20 Tom Tromey <tom@tromey.com>
2153
2154 * xcoffread.c (read_xcoff_symtab): Update.
2155 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2156 Update.
2157 * dbxread.c (process_one_symbol): Update.
2158 * coffread.c (coff_symtab_read): Update.
2159 * buildsym.h (finish_block): Update.
2160 * buildsym.c (finish_block): Remove "listhead" argument.
2161 (end_symtab_get_static_block): Update.
2162
2163 2018-07-20 Tom Tromey <tom@tromey.com>
2164
2165 * buildsym.h (class scoped_free_pendings): Remove constructor.
2166 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2167 method.
2168 <m_pending_block_obstack, m_pending_blocks>: New members.
2169 (pending_block_obstack, pending_blocks): Remove.
2170 (scoped_free_pendings::scoped_free_pendings): Default.
2171 (~scoped_free_pendings): Update.
2172 (free_pending_blocks): Remove.
2173 (finish_block_internal, record_pending_block, make_blockvector)
2174 (end_symtab_get_static_block, augment_type_symtab, push_context)
2175 (buildsym_init): Update.
2176
2177 2018-07-20 Tom Tromey <tom@tromey.com>
2178
2179 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2180 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2181 members.
2182 (pending_addrmap, pending_addrmap_obstack)
2183 (pending_addrmap_interesting): Remove.
2184 (scoped_free_pendings, record_block_range, make_blockvector)
2185 (prepare_for_building, reset_symtab_globals, buildsym_init):
2186 Update.
2187
2188 2018-07-20 Tom Tromey <tom@tromey.com>
2189
2190 * xcoffread.c (process_linenos): Update.
2191 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2192 * mdebugread.c (psymtab_to_symtab_1): Update.
2193 * dwarf2read.c (setup_type_unit_groups)
2194 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2195 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2196 * dbxread.c (process_one_symbol): Update.
2197 * coffread.c (coff_symtab_read, enter_linenos)
2198 (process_coff_symbol): Update.
2199 * buildsym.h (current_subfile): Don't declare.
2200 (get_current_subfile): Declare.
2201 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2202 member.
2203 (start_subfile, free_buildsym_compunit, push_subfile)
2204 (prepare_for_building, start_symtab): Update.
2205 (get_current_subfile): New function.
2206
2207 2018-07-20 Tom Tromey <tom@tromey.com>
2208
2209 * coffread.c (coff_symtab_read): Update.
2210 * xcoffread.c (read_xcoff_symtab): Update.
2211 * dwarf2read.c (new_symbol): Update.
2212 (read_func_scope, read_lexical_block_scope): Update.
2213 * dbxread.c (process_one_symbol): Update.
2214 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2215 (outermost_context_p): Remove macro.
2216 (outermost_context_p, get_current_context_stack)
2217 (get_context_stack_depth): Declare.
2218 (pop_context): Return struct context_stack.
2219 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2220 member.
2221 (context_stack_size): Remove.
2222 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2223 (prepare_for_building, end_symtab_get_static_block)
2224 (augment_type_symtab, push_context): Update.
2225 (pop_context): Return struct context_stack.
2226 (outermost_context_p, get_current_context_stack)
2227 (get_context_stack_depth): New functions.
2228 (buildsym_init): Update.
2229
2230 2018-07-20 Tom Tromey <tom@tromey.com>
2231
2232 * rust-exp.y: Now a pure parser. Update all rules.
2233 (%union): Move earlier.
2234 (current_parser, work_obstack): Remove globals.
2235 (rust_parser, ~rust_parser): Update.
2236 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2237 lex_character, lex_number, lex_string, lex_identifier,
2238 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2239 convert_name, convert_params_to_expression,
2240 convert_ast_to_expression, ast_basic_type, ast_operation,
2241 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2242 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2243 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2244 ast_array_type, ast_slice_type, ast_reference_type,
2245 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2246 (rust_parse): Update.
2247 (rustyyerror, rustyylex): Add parser parameter.
2248 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2249 (rust_lex_stringish_test, rust_lex_test_sequence)
2250 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2251 (rust_lex_test_push_back, rust_lex_tests): Update.
2252
2253 2018-07-19 Pedro Alves <palves@redhat.com>
2254
2255 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2256 gdb::unique_xmalloc_ptr.
2257 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2258 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2259 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2260 copy-initialization.
2261 * guile/scm-pretty-print.c (ppscm_print_children): Use
2262 gdb::unique_xmalloc_ptr instead of cleanups.
2263 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2264 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2265 gdb::unique_xmalloc_ptr.
2266 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2267 Adjust to use gdb::unique_xmalloc_ptr.
2268 * guile/scm-utils.c (extract_arg): Adjust.
2269 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2270 gdb::unique_xmalloc_ptr instead of a cleanup.
2271
2272 2018-07-19 Tom Tromey <tom@tromey.com>
2273
2274 * utils.c (do_value_free_to_mark)
2275 (make_cleanup_value_free_to_mark): Remove.
2276 * utils.h (make_cleanup_value_free_to_mark): Remove.
2277
2278 2018-07-19 Pedro Alves <palves@redhat.com>
2279
2280 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2281 forwarding reference.
2282
2283 2018-07-18 Pedro Alves <palves@redhat.com>
2284
2285 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2286 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2287 cleanup.
2288
2289 2018-07-18 Pedro Alves <palves@redhat.com>
2290
2291 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2292 exceptions.
2293 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2294 (gdbscm_wrap): New.
2295 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2296 directly instead of a cleanup.
2297 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2298 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2299 (vlscm_binop_gdbthrow): New, factored out from ...
2300 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2301 (vlscm_rich_compare): Use gdbscm_wrap.
2302 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2303 instead of a cleanup.
2304 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2305 cleanup.
2306 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2307 Use xfree directly instead of a cleanup.
2308 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2309 Adjust to use gdbscm_wrap and scoped_value_mark.
2310 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2311 (gdbscm_value_address, gdbscm_value_dereference)
2312 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2313 scoped_value_mark.
2314 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2315 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2316 scoped_value_mark.
2317 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2318 gdbscm_wrap and scoped_value_mark.
2319 (gdbscm_value_to_string): Use xfree directly instead of a
2320 cleanup. Move 'buffer' unique_ptr to TRY scope.
2321 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2322 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2323 scoped_value_mark.
2324 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2325 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2326 scoped_value_mark.
2327 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2328 gdbscm_wrap.
2329
2330 2018-07-18 Tom de Vries <tdevries@suse.de>
2331
2332 * findvar.c (default_read_var_value): Also resolve dynamic type for
2333 LOC_OPTIMIZED_OUT vars.
2334
2335 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2336
2337 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2338 decoding.
2339
2340 2018-07-17 Tom Tromey <tom@tromey.com>
2341
2342 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2343 (compute_enum_list, pascm_set_param_value_x)
2344 (gdbscm_parameter_value): Update.
2345 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2346 (gdbscm_scm_to_host_string): Update.
2347 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2348 Update.
2349 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2350 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2351 * guile/scm-string.c (gdbscm_scm_to_string): Return
2352 unique_xmalloc_ptr.
2353 (gdbscm_scm_to_host_string): Likewise.
2354
2355 2018-07-17 Tom Tromey <tom@tromey.com>
2356
2357 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2358 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2359 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2360 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2361 unique_xmalloc_ptr.
2362
2363 2018-07-17 Tom Tromey <tom@tromey.com>
2364
2365 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2366 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2367 Update.
2368 * guile/scm-cmd.c (cmdscm_function): Update.
2369 * guile/scm-pretty-print.c
2370 (ppscm_print_exception_unless_memory_error): Update.
2371 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2372 Return unique_xmalloc_ptr.
2373
2374 2018-07-17 Tom Tromey <tom@tromey.com>
2375
2376 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2377 Use string_printf.
2378
2379 2018-07-17 Jim Wilson <jimw@sifive.com>
2380
2381 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2382 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2383 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2384 unecessary braces after EF_RISCV_RVC test. Delete call to
2385 set_gdbarch_decr_pc_after_break.
2386
2387 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2388 RISCV_LAST_FP_REGNUM + 1.
2389 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2390
2391 2018-07-17 Tom Tromey <tom@tromey.com>
2392
2393 * configure.ac: Remove --disable-gdbcli.
2394 * configure: Rebuild.
2395 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2396 (SUBDIR_CLI_CFLAGS): Remove.
2397 (SFILES): Use SUBDIR_CLI_SRCS.
2398 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2399
2400 2018-07-17 Tom Tromey <tom@tromey.com>
2401
2402 PR gdb/18624:
2403 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2404
2405 2018-07-16 Jim Wilson <jimw@sifive.com>
2406
2407 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2408
2409 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2410
2411 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2412 variable.
2413 (libunwind_frame_sniffer): Likewise.
2414 (libunwind_frame_prev_register): Likewise.
2415 (libunwind_sigtramp_frame_sniffer): Likewise.
2416 * ia64-tdep.c (ia64_access_reg): Likewise.
2417 (ia64_access_rse_reg): Likewise.
2418 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2419 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2420
2421 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2422
2423 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2424
2425 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2426
2427 * remote-sim.c (gdbsim_target::close,
2428 gdbsim_target::mourn_inferior): Remove unused variables.
2429
2430 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2431
2432 * ia64-tdep.c (ktab_buf): New global.
2433 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2434 (get_kernel_table): Adjust.
2435
2436 2018-07-16 Tom Tromey <tom@tromey.com>
2437
2438 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2439 * dwarf2read.c (using_directives, new_symbol): Use
2440 outermost_context_p.
2441 * dbxread.c (process_one_symbol): Use outermost_context_p.
2442 * coffread.c (coff_symtab_read): Use outermost_context_p.
2443
2444 2018-07-16 Tom Tromey <tom@tromey.com>
2445
2446 * dwarf2read.c (using_directives, read_func_scope)
2447 (read_lexical_block_scope): Update.
2448 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2449 * buildsym.h (local_using_directives, global_using_directives):
2450 Don't declare.
2451 (get_local_using_directives, set_local_using_directives)
2452 (get_global_using_directives): Declare.
2453 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2454 m_global_using_directives>: New members.
2455 (finish_block_internal, prepare_for_building)
2456 (reset_symtab_globals, end_symtab_get_static_block)
2457 (push_context): Update.
2458 (get_local_using_directives, set_local_using_directives)
2459 (get_global_using_directives): New functions.
2460 (buildsym_init): Update.
2461
2462 2018-07-16 Tom Tromey <tom@tromey.com>
2463
2464 * xcoffread.c (xcoff_initial_scan): Don't call
2465 free_pending_blocks.
2466 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2467 * buildsym.h (class scoped_free_pendings): Add constructor.
2468 (free_pending_blocks): Don't declare.
2469 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2470 (free_pending_blocks): Now static.
2471
2472 2018-07-16 Tom Tromey <tom@tromey.com>
2473
2474 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2475 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2476 member.
2477 (struct subfile_stack): Remove.
2478 (subfile_stack): Remove.
2479 (push_subfile, pop_subfile, buildsym_init): Update.
2480
2481 2018-07-16 Tom Tromey <tom@tromey.com>
2482
2483 * buildsym.c (push_subfile): Use gdb_assert.
2484 (pop_subfile): Use gdb_assert.
2485
2486 2018-07-16 Tom Tromey <tom@tromey.com>
2487
2488 * buildsym.h (merge_symbol_lists): Remove.
2489 * buildsym.c (merge_symbol_lists): Remove.
2490
2491 2018-07-16 Tom Tromey <tom@tromey.com>
2492
2493 * stabsread.c (scan_file_globals): Update comment.
2494 * stabsread.h (scan_file_globals): Move from buildsym.h.
2495 * buildsym.h (scan_file_globals): Move to stabsread.h.
2496
2497 2018-07-16 Tom Tromey <tom@tromey.com>
2498
2499 * xcoffread.c (xcoff_new_init): Update.
2500 * mipsread.c (mipscoff_new_init): Update.
2501 * mdebugread.c (mdebug_build_psymtabs): Update.
2502 * elfread.c (elf_new_init): Update.
2503 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2504 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2505 * buildsym.h (buildsym_new_init): Don't declare.
2506 * buildsym.c (buildsym_new_init): Remove.
2507
2508 2018-07-16 Tom Tromey <tom@tromey.com>
2509
2510 * stabsread.h (within_function): Move from buildsym.h.
2511 * stabsread.c (start_stabs): Clear within_function.
2512 * coffread.c (coff_start_symtab): Clear within_function.
2513 * buildsym.h (within_function): Move to stabsread.h.
2514 * buildsym.c (prepare_for_building): Update.
2515
2516 2018-07-16 Tom Tromey <tom@tromey.com>
2517
2518 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2519 * dwarf2read.c (dwarf2_start_symtab): Don't set
2520 processing_gcc_compilation.
2521 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2522
2523 2018-07-16 Tom Tromey <tom@tromey.com>
2524
2525 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2526 (next_symbol_text_func): Move from buildsym.h.
2527 * stabsread.c (hashname): Move from buildsym.c.
2528 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2529 (next_symbol_text_func, hashname): Move to stabsread.h.
2530 * buildsym.c: Don't include bcache.h
2531 (hashname): Move to stasbread.c.
2532
2533 2018-07-16 Tom Tromey <tom@tromey.com>
2534
2535 * buildsym.h (context_stack_size): Don't declare.
2536 * buildsym.c (context_stack_size): New global.
2537
2538 2018-07-16 Tom Tromey <tom@tromey.com>
2539
2540 * dbxread.c (processing_acc_compilation): New global.
2541 * buildsym.h (processing_acc_compilation): Don't declare.
2542
2543 2018-07-16 Tom Tromey <tom@tromey.com>
2544
2545 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2546 * dbxread.c (read_ofile_symtab): Update.
2547 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2548 * buildsym.h (last_source_start_addr): Remove.
2549 (set_last_source_start_addr, get_last_source_start_addr):
2550 Declare.
2551 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2552 parameter.
2553 (struct buildsym_compunit) <m_last_source_start_addr>: New
2554 member.
2555 (prepare_for_building): Remove start_addr parameter.
2556 (start_symtab, restart_symtab, end_symtab_get_static_block)
2557 (end_symtab_with_blockvector): Update.
2558 (set_last_source_start_addr, get_last_source_start_addr): New
2559 functions.
2560
2561 2018-07-16 Tom Tromey <tom@tromey.com>
2562
2563 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2564 member.
2565 (have_line_numbers): Remove.
2566 (record_line, prepare_for_building, end_symtab_get_static_block)
2567 (augment_type_symtab): Update.
2568
2569 2018-07-16 Tom Tromey <tom@tromey.com>
2570
2571 * buildsym.c (~buildsym_compunit): Free the macro table.
2572 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2573 methods.
2574 <m_pending_macros>: New member.
2575 (pending_macros): Remove.
2576 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2577 (reset_symtab_globals, end_symtab_get_static_block)
2578 (end_symtab_with_blockvector, augment_type_symtab)
2579 (buildsym_init): Update.
2580
2581 2018-07-16 Tom Tromey <tom@tromey.com>
2582
2583 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2584 parameter.
2585 (buildsym_compunit::set_last_source_file): New method.
2586 <m_last_source_file>: New member.
2587 (prepare_for_building): Remove "name" parameter.
2588 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2589 (last_source_file): Remove.
2590 (set_last_source_file, get_last_source_file): Update.
2591
2592 2018-07-16 Tom Tromey <tom@tromey.com>
2593
2594 * buildsym.c (prepare_for_building): Add assert.
2595
2596 2018-07-16 Tom Tromey <tom@tromey.com>
2597
2598 * buildsym.c (~buildsym_compunit): Update.
2599 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2600 (start_subfile, patch_subfile_names)
2601 (end_symtab_with_blockvector): Update.
2602
2603 2018-07-16 Tom Tromey <tom@tromey.com>
2604
2605 * buildsym.c (struct buildsym_compunit): Add constructor,
2606 destructor, initializers.
2607 (start_buildsym_compunit): Remove.
2608 (free_buildsym_compunit): Use "delete".
2609 (start_symtab, restart_symtab): Use "new".
2610
2611 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2612
2613 * symfile.c (set_objfile_default_section_offset): Remove struct
2614 keyword.
2615
2616 2018-07-14 Stafford Horne <shorne@gmail.com>
2617
2618 * (Responsible Maintainers): Add myself as or1k maintainer.
2619
2620 2018-07-13 Tom Tromey <tom@tromey.com>
2621
2622 * symfile.c (set_objfile_default_section_offset): Use extra braces
2623 around initializer.
2624
2625 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2626
2627 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2628 non-branching basr.
2629
2630 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2631
2632 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2633 unittests/cli-utils-selftests.c
2634 * unittests/cli-utils-selftests.c: New file.
2635
2636 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2637
2638 * NEWS: Mention new commands. Mention change to 'thread apply'.
2639
2640 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2641
2642 * thread.c (thr_try_catch_cmd): New function.
2643 (thread_apply_all_command): Handle qcs flags.
2644 (thread_apply_command): Handle qcs flags.
2645 (taas_command): New function.
2646 (tfaas_command): New function.
2647 (_initialize_thread): Update to setup the new commands 'taas
2648 and 'tfaas'. Change doc string for 'thread apply'.
2649
2650 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2651
2652 * stack.c: (trailing_outermost_frame): New function, mostly
2653 extracted from backtrace_command_1.
2654 (leading_innermost_frame): New function.
2655 (backtrace_command_1): Update to call trailing_outermost_frame.
2656 (frame_apply_command_count): New function.
2657 (frame_apply_level_command): New function.
2658 (frame_apply_all_command): New function.
2659 (frame_apply_command): New function.
2660 (faas_command): New function.
2661 (frame_cmd_list): New variable.
2662 (_initialize_stack): Update to setup the new commands 'frame apply'
2663 and 'faas'.
2664
2665 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2666
2667 * cli-utils.c (number_or_range_parser::get_number): Only handle
2668 numbers or convenience var as numbers.
2669 (parse_flags): New function.
2670 (parse_flags_qcs): New function.
2671 (number_or_range_parser::finished): Ensure parsing end is detected
2672 before end of string.
2673 * cli-utils.h (parse_flags): New function.
2674 (parse_flags_qcs): New function.
2675 (number_or_range_parser): Remove m_finished bool.
2676 (number_or_range_parser::skip_range): Set m_in_range to false.
2677
2678 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2679
2680 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2681 on Windows.
2682
2683 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2684 Jan Kratochvil <jan.kratochvil@redhat.com>
2685 Paul Fertser <fercerpav@gmail.com>
2686 Tsutomu Seki <sekiriki@gmail.com>
2687 Pedro Alves <palves@redhat.com>
2688
2689 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2690 'unittests/parse-connection-spec-selftests.c'.
2691 (COMMON_SFILES): Add 'common/netstuff.c'.
2692 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2693 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2694 * common/netstuff.c: New file.
2695 * common/netstuff.h: New file.
2696 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2697 (wait_for_connect): Update comment. New parameter
2698 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2699 Use 'sock' directly instead of 'scb->fd'.
2700 (try_connect): New function, with code from 'net_open'.
2701 (net_open): Rewrite main loop to deal with multiple
2702 sockets/addresses. Handle IPv6-style hostnames; implement
2703 support for IPv6 connections.
2704 * unittests/parse-connection-spec-selftests.c: New file.
2705
2706 2018-07-11 Pedro Alves <palves@redhat.com>
2707
2708 PR gdb/23377
2709 * remote.c (remote_target::remote_detach_pid): Call
2710 set_current_process.
2711
2712 2018-07-11 Pedro Alves <palves@redhat.com>
2713
2714 * h8300-tdep.c (h8300_gdbarch_init): Remove
2715 set_gdbarch_ecoff_reg_to_regnum calls.
2716
2717 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2718
2719 PR c++/23373
2720 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2721 offsets/sizes for static members of a class/struct.
2722
2723 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2724
2725 * target-descriptions.c (tdesc_register_bitsize): Rename.
2726 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2727 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2728 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2729
2730 2018-07-10 Tom Tromey <tom@tromey.com>
2731
2732 * breakpoint.c (moribund_locations): Now static and a
2733 std::vector.
2734 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2735 (build_bpstat_chain, update_global_location_list)
2736 (breakpoint_retire_moribund): Update.
2737 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2738 VEC.
2739
2740 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2741
2742 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2743 (riscv_register_reggroup_p): Use new function, remove unneeded
2744 parenthesis.
2745 (riscv_push_dummy_call): Extend assert to compare against xlen or
2746 flen based on register type.
2747
2748 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2749
2750 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2751
2752 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2753
2754 * remote.c (show_hardware_watchpoint_limit): New function.
2755 (show_hardware_watchpoint_length_limit): New function.
2756 (show_hardware_breakpoint_limit): New function.
2757 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2758 where appropriate, update help text.
2759
2760 2018-07-09 Tom Tromey <tom@tromey.com>
2761
2762 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2763 (CLIBS): Don't mention NAT_CLIBS.
2764
2765 2018-07-09 Tom Tromey <tom@tromey.com>
2766
2767 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2768 (LIBGDB_OBS, clean mostlyclean): Update.
2769 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2770
2771 2018-07-09 Tom Tromey <tom@tromey.com>
2772
2773 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2774 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2775 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2776
2777 2018-07-09 Tom Tromey <tom@tromey.com>
2778
2779 * Makefile.in (ALLDEPFILES): Remove exec.c.
2780 (COMMON_OBS): Remove exec.o.
2781 (COMMON_SFILES): Add exec.c.
2782
2783 2018-07-09 Tom Tromey <tom@tromey.com>
2784
2785 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2786
2787 2018-07-09 Tom Tromey <tom@tromey.com>
2788
2789 * Makefile.in (clean mostlyclean): Remove stamp-version.
2790 (version.c): Depend on stamp-version.
2791 (stamp-version): New rule, from version.c rule.
2792
2793 2018-07-09 Tom Tromey <tom@tromey.com>
2794
2795 * Makefile.in (init.c): Depend on stamp-init.
2796 (stamp-init): New rule, from init.c rule.
2797 (clean mostlyclean): Remove stamp-init.
2798
2799 2018-07-09 Tom Tromey <tom@tromey.com>
2800
2801 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2802 SUBDIR_GCC_COMPILE_SRCS.
2803
2804 2018-07-09 Tom Tromey <tom@tromey.com>
2805
2806 * Makefile.in (init.c): Remove some unused sed rules.
2807
2808 2018-07-09 Tom Tromey <tom@tromey.com>
2809
2810 * Makefile.in (TSOBS): Remove.
2811 (INIT_FILES): Update.
2812 (LIBGDB_OBS): Update.
2813 (COMMON_SFILES): Add inflow.c.
2814 (SFILES): Remove inflow.c.
2815
2816 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2817
2818 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2819
2820 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2821
2822 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2823 get_saveloc_name, is_signal_frame_name, step_name,
2824 init_remote_name, create_addr_space_name,
2825 destroy_addr_space_name, search_unwind_table_name,
2826 find_dyn_list_name): Constify.
2827
2828 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2829
2830 * darwin-nat.c (darwin_pthread_kill): New function.
2831 (darwin_resume_thread): Use darwin_pthread_kill.
2832
2833 2018-07-05 Tom de Vries <tdevries@suse.de>
2834
2835 * macroexp.c (macro_buffer) <operator=>: New member function.
2836
2837 2018-07-04 Tom Tromey <tom@tromey.com>
2838
2839 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2840
2841 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2842
2843 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2844 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2845 * maint.c: Likewise.
2846 * top.c: Likewise.
2847
2848 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2849
2850 * NEWS: Create a new section for the next release branch.
2851 Rename the section of the current branch, now that it has
2852 been cut.
2853
2854 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2855
2856 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2857 * version.in: Bump version to 8.2.50.DATE-git.
2858
2859 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2860 Pedro Alves <palves@redhat.com>
2861
2862 * linux-nat.c (linux_init_ptrace): Rename to ...
2863 (linux_init_ptrace_procfs): ... this. Call
2864 linux_proc_init_warnings.
2865 (linux_nat_target::post_attach)
2866 (linux_nat_target::post_startup_inferior): Adjust.
2867 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2868 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2869
2870 2018-07-04 Tom de Vries <tdevries@suse.de>
2871
2872 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2873 check ...
2874 (read_comp_unit_head): ... here.
2875
2876 2018-07-03 Tom Tromey <tom@tromey.com>
2877
2878 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2879 (stop_tracing, tstatus_command)
2880 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2881 (print_one_static_tracepoint_marker): Update.
2882 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2883 std::vector.
2884 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2885 VEC.
2886 (all_tracepoints, static_tracepoints_here): Return std::vector.
2887
2888 2018-07-03 Tom Tromey <tom@tromey.com>
2889
2890 * common/ptid.c (ptid_equal): Remove.
2891 * common/ptid.h (ptid_equal): Don't declare.
2892 * ada-tasks.c: Update.
2893 * breakpoint.c: Update.
2894 * common/agent.c: Update.
2895 * corelow.c: Update.
2896 * darwin-nat-info.c: Update.
2897 * darwin-nat.c: Update.
2898 * dcache.c: Update.
2899 * dtrace-probe.c: Update.
2900 * dummy-frame.c: Update.
2901 * fbsd-nat.c: Update.
2902 * frame.c: Update.
2903 * gdbthread.h: Update.
2904 * gnu-nat.c: Update.
2905 * go32-nat.c: Update.
2906 * inf-loop.c: Update.
2907 * inf-ptrace.c: Update.
2908 * infcall.c: Update.
2909 * infcmd.c: Update.
2910 * inflow.c: Update.
2911 * infrun.c: Update.
2912 * linux-fork.c: Update.
2913 * linux-nat.c: Update.
2914 * linux-thread-db.c: Update.
2915 * mi/mi-cmd-var.c: Update.
2916 * mi/mi-interp.c: Update.
2917 * mi/mi-main.c: Update.
2918 * nto-procfs.c: Update.
2919 * ppc-linux-tdep.c: Update.
2920 * procfs.c: Update.
2921 * python/py-inferior.c: Update.
2922 * python/py-record-btrace.c: Update.
2923 * python/py-record.c: Update.
2924 * ravenscar-thread.c: Update.
2925 * regcache.c: Update.
2926 * remote-sim.c: Update.
2927 * remote.c: Update.
2928 * sol-thread.c: Update.
2929 * solib.c: Update.
2930 * target.c: Update.
2931 * tui/tui-stack.c: Update.
2932 * varobj.c: Update.
2933 * windows-nat.c: Update.
2934 * windows-tdep.c: Update.
2935
2936 2018-07-03 Tom Tromey <tom@tromey.com>
2937
2938 * common/ptid.c (ptid_match): Remove.
2939 * common/ptid.h (ptid_match): Don't declare.
2940 * fbsd-nat.c: Update.
2941 * infcmd.c: Update.
2942 * infrun.c: Update.
2943 * linux-nat.c: Update.
2944 * record-btrace.c: Update.
2945 * regcache.c: Update.
2946 * remote.c: Update.
2947
2948 2018-07-03 Tom Tromey <tom@tromey.com>
2949
2950 * common/ptid.c (ptid_tid_p): Remove.
2951 * common/ptid.h (ptid_tid_p): Don't declare.
2952 * sol-thread.c: Update.
2953
2954 2018-07-03 Tom Tromey <tom@tromey.com>
2955
2956 * common/ptid.c (ptid_lwp_p): Remove.
2957 * common/ptid.h (ptid_lwp_p): Don't declare.
2958 * fbsd-nat.c: Update.
2959 * linux-nat.c: Update.
2960 * nat/linux-procfs.c: Update.
2961 * nat/x86-linux-dregs.c: Update.
2962 * sol-thread.c: Update.
2963
2964 2018-07-03 Tom Tromey <tom@tromey.com>
2965
2966 * common/ptid.c (ptid_is_pid): Remove.
2967 * common/ptid.h (ptid_is_pid): Don't declare.
2968 * infrun.c: Update.
2969 * linux-nat.c: Update.
2970 * mi/mi-interp.c: Update.
2971 * remote.c: Update.
2972 * thread.c: Update.
2973
2974 2018-07-03 Tom Tromey <tom@tromey.com>
2975
2976 * common/ptid.c (ptid_get_tid): Remove.
2977 * common/ptid.h (ptid_get_tid): Don't declare.
2978 * ada-tasks.c: Update.
2979 * aix-thread.c: Update.
2980 * bsd-uthread.c: Update.
2981 * darwin-nat.c: Update.
2982 * fbsd-nat.c: Update.
2983 * i386-darwin-nat.c: Update.
2984 * infrun.c: Update.
2985 * linux-tdep.c: Update.
2986 * nto-procfs.c: Update.
2987 * ppc-ravenscar-thread.c: Update.
2988 * python/py-infthread.c: Update.
2989 * ravenscar-thread.c: Update.
2990 * sol-thread.c: Update.
2991 * sparc-ravenscar-thread.c: Update.
2992 * windows-nat.c: Update.
2993
2994 2018-07-03 Tom Tromey <tom@tromey.com>
2995
2996 * common/ptid.c (ptid_get_lwp): Remove.
2997 * common/ptid.h (ptid_get_lwp): Don't declare.
2998 * aarch64-linux-nat.c: Update.
2999 * ada-tasks.c: Update.
3000 * aix-thread.c: Update.
3001 * amd64-linux-nat.c: Update.
3002 * arm-linux-nat.c: Update.
3003 * corelow.c: Update.
3004 * fbsd-nat.c: Update.
3005 * fbsd-tdep.c: Update.
3006 * gnu-nat.c: Update.
3007 * i386-cygwin-tdep.c: Update.
3008 * i386-gnu-nat.c: Update.
3009 * i386-linux-nat.c: Update.
3010 * ia64-linux-nat.c: Update.
3011 * inf-ptrace.c: Update.
3012 * infrun.c: Update.
3013 * linux-fork.c: Update.
3014 * linux-nat.c: Update.
3015 * linux-tdep.c: Update.
3016 * linux-thread-db.c: Update.
3017 * mips-linux-nat.c: Update.
3018 * nat/aarch64-linux-hw-point.c: Update.
3019 * nat/aarch64-linux.c: Update.
3020 * nat/linux-btrace.c: Update.
3021 * nat/linux-osdata.c: Update.
3022 * nat/linux-procfs.c: Update.
3023 * nat/x86-linux-dregs.c: Update.
3024 * obsd-nat.c: Update.
3025 * ppc-fbsd-nat.c: Update.
3026 * ppc-linux-nat.c: Update.
3027 * procfs.c: Update.
3028 * python/py-infthread.c: Update.
3029 * ravenscar-thread.c: Update.
3030 * remote.c: Update.
3031 * s390-linux-nat.c: Update.
3032 * sol-thread.c: Update.
3033 * sol2-tdep.c: Update.
3034 * spu-linux-nat.c: Update.
3035 * x86-linux-nat.c: Update.
3036 * xtensa-linux-nat.c: Update.
3037
3038 2018-07-03 Tom Tromey <tom@tromey.com>
3039
3040 * common/ptid.c (ptid_get_pid): Remove.
3041 * common/ptid.h (ptid_get_pid): Don't declare.
3042 * aarch64-linux-nat.c: Update.
3043 * ada-lang.c: Update.
3044 * aix-thread.c: Update.
3045 * alpha-bsd-nat.c: Update.
3046 * amd64-fbsd-nat.c: Update.
3047 * amd64-linux-nat.c: Update.
3048 * arm-linux-nat.c: Update.
3049 * arm-nbsd-nat.c: Update.
3050 * auxv.c: Update.
3051 * break-catch-syscall.c: Update.
3052 * breakpoint.c: Update.
3053 * bsd-uthread.c: Update.
3054 * corelow.c: Update.
3055 * ctf.c: Update.
3056 * darwin-nat.c: Update.
3057 * fbsd-nat.c: Update.
3058 * fbsd-tdep.c: Update.
3059 * gcore.c: Update.
3060 * gnu-nat.c: Update.
3061 * hppa-nbsd-nat.c: Update.
3062 * hppa-obsd-nat.c: Update.
3063 * i386-fbsd-nat.c: Update.
3064 * ia64-linux-nat.c: Update.
3065 * inf-ptrace.c: Update.
3066 * infcmd.c: Update.
3067 * inferior.c: Update.
3068 * inferior.h: Update.
3069 * inflow.c: Update.
3070 * infrun.c: Update.
3071 * linux-fork.c: Update.
3072 * linux-nat.c: Update.
3073 * linux-tdep.c: Update.
3074 * linux-thread-db.c: Update.
3075 * m68k-bsd-nat.c: Update.
3076 * mi/mi-interp.c: Update.
3077 * mi/mi-main.c: Update.
3078 * mips-linux-nat.c: Update.
3079 * mips-nbsd-nat.c: Update.
3080 * mips64-obsd-nat.c: Update.
3081 * nat/aarch64-linux-hw-point.c: Update.
3082 * nat/aarch64-linux.c: Update.
3083 * nat/linux-btrace.c: Update.
3084 * nat/linux-osdata.c: Update.
3085 * nat/linux-procfs.c: Update.
3086 * nat/x86-linux-dregs.c: Update.
3087 * nto-procfs.c: Update.
3088 * obsd-nat.c: Update.
3089 * ppc-linux-nat.c: Update.
3090 * ppc-nbsd-nat.c: Update.
3091 * ppc-obsd-nat.c: Update.
3092 * proc-service.c: Update.
3093 * procfs.c: Update.
3094 * python/py-inferior.c: Update.
3095 * python/py-infthread.c: Update.
3096 * ravenscar-thread.c: Update.
3097 * record.c: Update.
3098 * remote-sim.c: Update.
3099 * remote.c: Update.
3100 * rs6000-nat.c: Update.
3101 * s390-linux-nat.c: Update.
3102 * sh-nbsd-nat.c: Update.
3103 * sol-thread.c: Update.
3104 * sparc-nat.c: Update.
3105 * sparc64-tdep.c: Update.
3106 * spu-linux-nat.c: Update.
3107 * spu-tdep.c: Update.
3108 * target-debug.h: Update.
3109 * target.c: Update.
3110 * thread.c: Update.
3111 * tid-parse.c: Update.
3112 * tracefile-tfile.c: Update.
3113 * vax-bsd-nat.c: Update.
3114 * windows-nat.c: Update.
3115 * x86-linux-nat.c: Update.
3116 * x86-nat.c: Update.
3117
3118 2018-07-03 Tom Tromey <tom@tromey.com>
3119
3120 * common/ptid.c (pid_to_ptid): Remove.
3121 * common/ptid.h (pid_to_ptid): Don't declare.
3122 * aix-thread.c: Update.
3123 * arm-linux-nat.c: Update.
3124 * common/ptid.c: Update.
3125 * common/ptid.h: Update.
3126 * corelow.c: Update.
3127 * ctf.c: Update.
3128 * darwin-nat.c: Update.
3129 * fbsd-nat.c: Update.
3130 * fork-child.c: Update.
3131 * gnu-nat.c: Update.
3132 * go32-nat.c: Update.
3133 * inf-ptrace.c: Update.
3134 * infcmd.c: Update.
3135 * inferior.c: Update.
3136 * infrun.c: Update.
3137 * linux-fork.c: Update.
3138 * linux-nat.c: Update.
3139 * nat/aarch64-linux-hw-point.c: Update.
3140 * nat/fork-inferior.c: Update.
3141 * nat/x86-linux-dregs.c: Update.
3142 * nto-procfs.c: Update.
3143 * obsd-nat.c: Update.
3144 * procfs.c: Update.
3145 * progspace.c: Update.
3146 * remote.c: Update.
3147 * rs6000-nat.c: Update.
3148 * s390-linux-nat.c: Update.
3149 * sol-thread.c: Update.
3150 * spu-linux-nat.c: Update.
3151 * target.c: Update.
3152 * top.c: Update.
3153 * tracefile-tfile.c: Update.
3154 * windows-nat.c: Update.
3155
3156 2018-07-03 Tom Tromey <tom@tromey.com>
3157
3158 * common/ptid.h (ptid_build): Don't declare.
3159 * common/ptid.c (ptid_build): Remove.
3160 * aix-thread.c: Update.
3161 * bsd-kvm.c: Update.
3162 * bsd-uthread.c: Update.
3163 * common/agent.c: Update.
3164 * common/ptid.c: Update.
3165 * common/ptid.h: Update.
3166 * corelow.c: Update.
3167 * darwin-nat.c: Update.
3168 * fbsd-nat.c: Update.
3169 * gnu-nat.c: Update.
3170 * linux-fork.c: Update.
3171 * linux-nat.c: Update.
3172 * linux-thread-db.c: Update.
3173 * nat/linux-osdata.c: Update.
3174 * nat/linux-procfs.c: Update.
3175 * nto-procfs.c: Update.
3176 * obsd-nat.c: Update.
3177 * proc-service.c: Update.
3178 * procfs.c: Update.
3179 * ravenscar-thread.c: Update.
3180 * remote-sim.c: Update.
3181 * remote.c: Update.
3182 * sol-thread.c: Update.
3183 * target.c: Update.
3184 * windows-nat.c: Update.
3185
3186 2018-07-03 Tom Tromey <tom@tromey.com>
3187
3188 * infrun.c (follow_exec): Use exit_inferior_silent.
3189 * inferior.c (exit_inferior_num_silent): Remove.
3190 * inferior.h (exit_inferior_num_silent): Don't declare.
3191
3192 2018-07-03 Tom Tromey <tom@tromey.com>
3193
3194 PR cli/23340:
3195 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3196 inferior_ptid on error.
3197
3198 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3199 Simon Marchi <simon.marchi@polymtl.ca>
3200
3201 PR tdep/8282
3202 * disasm.h (gdb_disassembler): Add
3203 `m_disassembler_options_holder'. member
3204 * disasm.c (get_all_disassembler_options): New function.
3205 (gdb_disassembler::gdb_disassembler): Use it.
3206 (gdb_buffered_insn_length_init_dis): Likewise.
3207 (gdb_buffered_insn_length): Adjust accordingly.
3208 (set_disassembler_options): Handle options with arguments.
3209 (show_disassembler_options_sfunc): Likewise. Add a leading new
3210 line if showing options with descriptions.
3211 (disassembler_options_completer): Adapt to using the
3212 `disasm_options_and_args_t' structure.
3213 * mips-tdep.c (mips_disassembler_options): New variable.
3214 (mips_disassembler_options_o32): Likewise.
3215 (mips_disassembler_options_n32): Likewise.
3216 (mips_disassembler_options_n64): Likewise.
3217 (gdb_print_insn_mips): Don't set `disassembler_options'.
3218 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3219 functions.
3220 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3221 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3222 `gdbarch_disassembler_options_implicit' and
3223 `gdbarch_valid_disassembler_options'.
3224 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3225 `disasm_options_and_args_t' structure.
3226 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3227 method.
3228 (valid_disassembler_options): Switch from `disasm_options_t' to
3229 the `disasm_options_and_args_t' structure.
3230 * NEWS: Document `set disassembler-options' support for the MIPS
3231 target.
3232 * gdbarch.h: Regenerate.
3233 * gdbarch.c: Regenerate.
3234
3235 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3236
3237 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3238
3239 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3240
3241 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3242 parameter in call to amd64_target_description.
3243 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3244 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3245 (amd64fbsd_init_abi): Likewise.
3246 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3247 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3248 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3249 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3250
3251 2018-06-29 Pedro Alves <palves@redhat.com>
3252
3253 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3254 "segments" parameter.
3255 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3256 (_initialize_amd64_tdep): Update call to
3257 amd64_create_target_description.
3258 (amd64_target_description): Add "segments" parameter. Adjust
3259 the implementation to use it.
3260 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3261 call to amd64_create_target_description.
3262 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3263 * gdb/arch/amd64.h (amd64_create_target_description): Add
3264 "segments" register.
3265 * gdb/arch/amd64.c (amd64_create_target_description): Add
3266 "segments" parameter. Call create_feature_i386_64bit_segments
3267 only if SEGMENTS is true.
3268 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3269 call to amd64_create_target_description.
3270
3271 2018-06-29 Pedro Alves <palves@redhat.com>
3272
3273 * thread.c (thread_target_id_str): New, factored out from ...
3274 (print_thread_info_1): ... here. Use it to compute the max
3275 "Target Id" column width.
3276
3277 2018-06-29 Pedro Alves <palves@redhat.com>
3278
3279 * remote.c (remote_target::extra_thread_info): Delete
3280 'display_buf' and 'n' locals. from the cache, regardless of
3281 packet mechanims is in use. Use cache for qThreadExtra and qP
3282 methods too.
3283
3284 2018-06-29 Pedro Alves <palves@redhat.com>
3285
3286 * blockframe.c (find_pc_sect_containing_function): New function.
3287 * breakpoint.c (print_breakpoint_location): Don't call
3288 find_pc_sect_function.
3289 * linespec.c (create_sals_line_offset): Record the location's
3290 symbol in the sal.
3291 * linespec.c (convert_address_location_to_sals): Fill in sal's
3292 symbol with find_pc_sect_containing_function.
3293 * symtab.c (find_function_start_sal): Rename to ...
3294 (find_function_start_sal_1): ... this.
3295 (find_function_start_sal): Reimplement as wrapper around
3296 find_function_start_sal_1, and use
3297 find_pc_sect_containing_function to fill in the sal's symbol.
3298 (find_function_start_sal(symbol*, bool)): Adjust.
3299 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3300 comments.
3301 (find_pc_sect_containing_function): Declare.
3302
3303 2018-06-29 Pedro Alves <palves@redhat.com>
3304
3305 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3306 true if the the location has no symbol.
3307
3308 2018-06-28 Tom Tromey <tom@tromey.com>
3309
3310 * NEWS: Mention --enable-codesign.
3311 * silent-rules.mk (ECHO_SIGN): New variable.
3312 * configure.ac: Add --enable-codesign.
3313 * configure: Rebuild.
3314 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3315 (gdb$(EXEEXT)): Optionally invoke codesign.
3316
3317 2018-06-28 Pedro Alves <palves@redhat.com>
3318
3319 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3320 comments.
3321 (switch_to_thread_no_regs): Adjust comment.
3322 * infcmd.c (stop_pc): Delete.
3323 (post_create_inferior, info_program_command): Replace references
3324 to stop_pc with references to thread_info->suspend.stop_pc.
3325 * inferior.h (stop_pc): Delete declaration.
3326 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3327 (handle_inferior_event_1, handle_signal_stop)
3328 (process_event_stop_test, keep_going_stepped_thread)
3329 (handle_step_into_function, handle_step_into_function_backward)
3330 (print_stop_location): Replace references to stop_pc with
3331 references to thread_info->suspend.stop_pc.
3332 (struct infcall_suspend_state) <stop_pc>: Delete field.
3333 (save_infcall_suspend_state, restore_infcall_suspend_state):
3334 Remove references to inf_stat->stop_pc.
3335 * linux-fork.c (fork_load_infrun_state): Likewise.
3336 * record-btrace.c (record_btrace_set_replay): Likewise.
3337 * record-full.c (record_full_goto_entry): Likewise.
3338 * remote.c (print_one_stopped_thread): Likewise.
3339 * target.c (target_resume): Extend comment.
3340 * thread.c (set_executing_thread): New.
3341 (set_executing): Use it.
3342 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3343 Remove references to stop_pc.
3344
3345 2018-06-28 Pedro Alves <palves@redhat.com>
3346
3347 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3348 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3349
3350 2018-06-28 Tom Tromey <tom@tromey.com>
3351
3352 * coffread.c (coff_symfile_finish): Update.
3353 * xcoffread.c (xcoff_symfile_finish): Update.
3354 * elfread.c (elf_symfile_finish): Update.
3355 * symfile.h (dwarf2_free_objfile): Don't declare.
3356 * dwarf2read.c (_initialize_dwarf2_read): Use
3357 register_objfile_data_with_cleanup.
3358 (dwarf2_free_objfile): Now static. Change signature.
3359
3360 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3361
3362 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3363 option "-o" to add-symbol-file-load to add an offset to each
3364 section's load address.
3365 * symfile.c (set_objfile_default_section_offset): New function.
3366
3367 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3368
3369 * symfile.c (add_symbol_file_command): Make sure that sections
3370 with the same name are sorted in the same order.
3371
3372 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3373
3374 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3375 require the second argument. If omitted, load sections at the
3376 addresses specified in the file.
3377
3378 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3379
3380 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3381 (_initialize_symfile): Add option "-o" to symbol-file to add an
3382 offset to each section of the symbol file.
3383
3384 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3385
3386 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3387
3388 2018-06-27 Tom Tromey <tom@tromey.com>
3389
3390 * stack.c (_initialize_stack): Update "func" help text.
3391
3392 2018-06-27 Tom Tromey <tom@tromey.com>
3393
3394 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3395 std::vector.
3396 (unwind_infopy_str, pyuw_create_unwind_info)
3397 (unwind_infopy_add_saved_register, pyuw_sniffer)
3398 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3399 Update.
3400 (struct saved_reg): Add constructor.
3401 <value>: Now a gdbpy_ref<>.
3402
3403 2018-06-27 Tom Tromey <tom@tromey.com>
3404
3405 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3406
3407 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3408
3409 * gdb-gdb.py.in: Format using autopep8.
3410
3411 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3412
3413 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3414 (type_lookup_function): Recognize CORE_ADDR values.
3415
3416 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3417
3418 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3419 print tag_name.
3420
3421 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3422
3423 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3424 <__lt__>: Add.
3425
3426 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3427
3428 * gdb-gdb.py: Move to...
3429 * gdb-gdb.py.in: ... here.
3430 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3431 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3432 dependencies.
3433 (distclean): Remove gdb-gdb.py when cleaning.
3434 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3435 * configure: Re-generate.
3436
3437 2018-06-27 Pedro Alves <palves@redhat.com>
3438
3439 * proc-service.c (get_ps_regcache): New.
3440 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3441 (ps_lsetfpregs): Use it.
3442
3443 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3444
3445 PR gdb/21695
3446 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3447 (dwarf_decode_lines_1): Adjust.
3448
3449 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3450
3451 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3452 override.
3453 <info_proc>: Likewise.
3454
3455 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3456
3457 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3458 to windows_fetch_one_register, and only handle the case of
3459 fetching one register. Move the code that reloads the context
3460 and iterates over all registers if R is negative to...
3461 (windows_nat_target::fetch_registers): ... here.
3462 (do_windows_store_inferior_registers): Rename to
3463 windows_store_one_register, and only handle the case of storing
3464 one register. Move the code that handles the case where r is
3465 negative to...
3466 (windows_nat_target::store_registers) ... here.
3467
3468 2018-06-26 Tom Tromey <tom@tromey.com>
3469
3470 PR rust/22574:
3471 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3472 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3473 Update.
3474 (rust_internal_print_type): Add podata parameter.
3475 (rust_print_type): Update.
3476
3477 2018-06-26 Tom Tromey <tom@tromey.com>
3478
3479 * typeprint.h (struct print_offset_data) <update, finish,
3480 maybe_print_hole>: New methods.
3481 <indentation>: New constant.
3482 * typeprint.c (print_offset_data::indentation): Define.
3483 (print_offset_data::maybe_print_hole, print_offset_data::update)
3484 (print_offset_data::finish): Move from c-typeprint.c and rename.
3485 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3486 (print_spaces_filtered_with_print_options): Update.
3487 (c_print_type_union_field_offset, maybe_print_hole)
3488 (c_print_type_struct_field_offset): Move to typeprint.c and
3489 rename.
3490 (c_type_print_base_struct_union): Update.
3491
3492 2018-06-25 Pedro Alves <palves@redhat.com>
3493
3494 * gdbthread.h (thread_info_ref, delete_thread)
3495 (delete_thread_silent, first_thread_of_inferior)
3496 (any_thread_of_inferior, switch_to_thread)
3497 (enable_thread_stack_temporaries)
3498 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3499 (get_last_thread_stack_temporary)
3500 (value_in_thread_stack_temporaries, can_access_registers_thread):
3501 Spell out "struct thread_info" instead of just "thread_info".
3502 * inferior.h (notice_new_inferior): Likewise.
3503
3504 2018-06-25 Pedro Alves <palves@redhat.com>
3505
3506 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3507 pass thread_info pointer to delete_thread.
3508 (windows_nat_target::detach): Pass inferior pointer to
3509 detach_inferior.
3510 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3511 delete_thread.
3512 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3513 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3514 and pass a thread_info pointer to delete_thread.
3515 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3516 pass thread_info pointer to delete_thread.
3517 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3518 delete_thread_silent call.
3519 * procfs.c (procfs_target::detach): Pass inferior pointer to
3520 detach_inferior.
3521 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3522 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3523 delete_thread_silent call.
3524 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3525 pass thread_info pointer to delete_thread.
3526 (windows_nat_target::detach): Pass inferior pointer to
3527 delete_inferior.
3528
3529 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3530
3531 * regcache.c (readable_regcache::read_part): Fix asserts.
3532 (reg_buffer::raw_collect_part): New function.
3533 (regcache::write_part): Fix asserts.
3534 (reg_buffer::raw_supply_part): New function.
3535 (regcache::transfer_regset_register): New helper function.
3536 (regcache::transfer_regset): Call new functions.
3537 (regcache_supply_regset): Use gdb_byte*.
3538 (regcache::supply_regset): Likewise.
3539 (regcache_collect_regset): Likewise.
3540 (regcache::collect_regset): Likewise.
3541 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3542 (reg_buffer::raw_supply_part): Likewise.
3543 (regcache::transfer_regset_register): Likewise.
3544 (regcache::transfer_regset): Use gdb_byte*.
3545
3546 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3547
3548 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3549
3550 2018-06-21 Pedro Alves <palves@redhat.com>
3551
3552 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3553 instead of a ptid_t. All callers adjusted.
3554 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3555 adjusted.
3556 (print_ada_task_info, display_current_task_id, task_command_1):
3557 Adjust.
3558 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3559 inferior_thread.
3560 (breakpoint_kind): Adjust.
3561 (remove_breakpoints_pid): Rename to ...
3562 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3563 pointer. All callers adjusted.
3564 (bpstat_clear_actions): Use inferior_thread.
3565 (get_bpstat_thread): New.
3566 (bpstat_do_actions): Use it.
3567 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3568 to take a thread_info pointer. All callers adjusted.
3569 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3570 (breakpoint_re_set_thread): Use inferior_thread.
3571 * breakpoint.h (struct inferior): Forward declare.
3572 (bpstat_stop_status): Update.
3573 (remove_breakpoints_pid): Delete.
3574 (remove_breakpoints_inf): New.
3575 * bsd-uthread.c (bsd_uthread_target::wait)
3576 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3577 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3578 (maint_btrace_packet_history_cmd)
3579 (maint_btrace_clear_packet_history_cmd): Adjust.
3580 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3581 inferior_thread.
3582 * cli/cli-interp.c: Include "inferior.h".
3583 * common/refcounted-object.h (struct
3584 refcounted_object_ref_policy): New.
3585 * compile/compile-object-load.c: Include gdbthread.h.
3586 (store_regs): Use inferior_thread.
3587 * corelow.c (core_target::close): Use current_inferior.
3588 (core_target_open): Adjust to use first_thread_of_inferior and use
3589 the current inferior.
3590 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3591 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3592 <thread>: ... this new field. All references adjusted.
3593 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3594 Take a thread_info pointer instead of a ptid_t.
3595 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3596 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3597 thread_info pointer instead of a ptid_t.
3598 * elfread.c: Include "inferior.h".
3599 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3600 Use inferior_thread.
3601 * eval.c (evaluate_subexp): Likewise.
3602 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3603 inferior_thread.
3604 * gdb_proc_service.h (struct thread_info): Forward declare.
3605 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3606 <thread>: ... this new field. All references adjusted.
3607 * gdbarch.h, gdbarch.c: Regenerate.
3608 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3609 'thread' parameter. All implementations and callers adjusted.
3610 * gdbthread.h (thread_info) <set_running>: New method.
3611 (delete_thread, delete_thread_silent): Take a thread_info pointer
3612 instead of a ptid.
3613 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3614 (first_thread_of_process): Delete, replaced by ...
3615 (first_thread_of_inferior): ... this new function. All callers
3616 adjusted.
3617 (any_live_thread_of_process): Delete, replaced by ...
3618 (any_live_thread_of_inferior): ... this new function. All callers
3619 adjusted.
3620 (switch_to_thread, switch_to_no_thread): Declare.
3621 (is_executing): Delete.
3622 (enable_thread_stack_temporaries): Update comment.
3623 <enable_thread_stack_temporaries>: Take a thread_info pointer
3624 instead of a ptid_t. Incref the thread.
3625 <~enable_thread_stack_temporaries>: Decref the thread.
3626 <m_ptid>: Delete
3627 <m_thr>: New.
3628 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3629 (get_last_thread_stack_temporary)
3630 (value_in_thread_stack_temporaries, can_access_registers_thread):
3631 Take a thread_info pointer instead of a ptid_t. All callers
3632 adjusted.
3633 * infcall.c (get_call_return_value): Use inferior_thread.
3634 (run_inferior_call): Work with thread pointers instead of ptid_t.
3635 (call_function_by_hand_dummy): Work with thread pointers instead
3636 of ptid_t. Use thread_info_ref.
3637 * infcmd.c (proceed_thread_callback): Access thread's state
3638 directly.
3639 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3640 access thread's state directly.
3641 (continue_command): Use inferior_thread.
3642 (info_program_command): Use find_thread_ptid and access thread
3643 state directly.
3644 (proceed_after_attach_callback): Use thread state directly.
3645 (notice_new_inferior): Take a thread_info pointer instead of a
3646 ptid_t. All callers adjusted.
3647 (exit_inferior): Take an inferior pointer instead of a pid. All
3648 callers adjusted.
3649 (exit_inferior_silent): New.
3650 (detach_inferior): Delete.
3651 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3652 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3653 (detach_inferior_command, kill_inferior_command): Use
3654 find_inferior_id instead of valid_gdb_inferior_id and
3655 gdb_inferior_id_to_pid.
3656 (inferior_command): Use inferior and thread pointers.
3657 * inferior.h (struct thread_info): Forward declare.
3658 (notice_new_inferior): Take a thread_info pointer instead of a
3659 ptid_t. All callers adjusted.
3660 (detach_inferior): Delete declaration.
3661 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3662 instead of a pid. All callers adjusted.
3663 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3664 (valid_gdb_inferior_id): Delete.
3665 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3666 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3667 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3668 ...
3669 <inf>: ... this new field.
3670 <step_ptid>: Delete, replaced by ...
3671 <step_thread>: ... this new field.
3672 (get_displaced_stepping_state): Take an inferior pointer instead
3673 of a pid. All callers adjusted.
3674 (displaced_step_in_progress_any_inferior): Adjust.
3675 (displaced_step_in_progress_thread): Take a thread pointer instead
3676 of a ptid_t. All callers adjusted.
3677 (displaced_step_in_progress, add_displaced_stepping_state): Take
3678 an inferior pointer instead of a pid. All callers adjusted.
3679 (get_displaced_step_closure_by_addr): Adjust.
3680 (remove_displaced_stepping_state): Take an inferior pointer
3681 instead of a pid. All callers adjusted.
3682 (displaced_step_prepare_throw, displaced_step_prepare)
3683 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3684 All callers adjusted.
3685 (start_step_over): Adjust.
3686 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3687 displaced step queue.
3688 (do_target_resume): Adjust.
3689 (fetch_inferior_event): Use inferior_thread.
3690 (context_switch, get_inferior_stop_soon): Take an
3691 execution_control_state pointer instead of a ptid_t. All callers
3692 adjusted.
3693 (switch_to_thread_cleanup): Delete.
3694 (stop_all_threads): Use scoped_restore_current_thread.
3695 * inline-frame.c: Include "gdbthread.h".
3696 (inline_state) <inline_state>: Take a thread pointer instead of a
3697 ptid_t. All callers adjusted.
3698 <ptid>: Delete, replaced by ...
3699 <thread>: ... this new field.
3700 (find_inline_frame_state): Take a thread pointer instead of a
3701 ptid_t. All callers adjusted.
3702 (skip_inline_frames, step_into_inline_frame)
3703 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3704 pointer instead of a ptid_t. All callers adjusted.
3705 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3706 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3707 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3708 pointers directly.
3709 * linux-nat.c (get_detach_signal): Likewise.
3710 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3711 (thread_db_notice_clone): Adjust.
3712 (thread_db_find_new_threads_silently)
3713 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3714 a thread pointer instead of a ptid_t. All callers adjusted.
3715 * mi/mi-cmd-var.c: Include "inferior.h".
3716 (mi_cmd_var_update_iter): Update to use thread pointers.
3717 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3718 inferior directly.
3719 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3720 out to ...
3721 (mi_output_running): ... this new function.
3722 (mi_on_resume_1): Adjust to use it.
3723 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3724 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3725 directly.
3726 (interrupt_thread_callback): : Adjust to use thread and inferior
3727 pointers.
3728 * proc-service.c: Include "gdbthread.h".
3729 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3730 * progspace-and-thread.c: Include "inferior.h".
3731 * progspace.c: Include "inferior.h".
3732 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3733 hold a reference to an inferior_object.
3734 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3735 inferior_thread.
3736 * python/py-inferior.c (struct inferior_object): Give the type a
3737 tag name instead of a typedef.
3738 (python_on_normal_stop): No need to check if the current thread is
3739 listed.
3740 (inferior_to_inferior_object): Change return type to
3741 inferior_object. All callers adjusted.
3742 (find_thread_object): Delete, bits factored out to ...
3743 (thread_to_thread_object): ... this new function.
3744 * python/py-infthread.c (create_thread_object): Use
3745 inferior_to_inferior_object.
3746 (thpy_is_stopped): Use thread pointer directly.
3747 (gdbpy_selected_thread): Use inferior_thread.
3748 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3749 field, replaced with ...
3750 <thread>: ... this new field. All users adjusted.
3751 (btpy_insn_or_gap_new): Drop const.
3752 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3753 callers adjusted.
3754 * python/py-record.c: Include "gdbthread.h".
3755 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3756 a ptid_t. All callers adjusted.
3757 (gdbpy_current_recording): Use inferior_thread.
3758 * python/py-record.h (recpy_record_object) <ptid>: Delete
3759 field, replaced with ...
3760 <thread>: ... this new field. All users adjusted.
3761 (recpy_element_object) <ptid>: Delete
3762 field, replaced with ...
3763 <thread>: ... this new field. All users adjusted.
3764 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3765 a ptid_t. All callers adjusted.
3766 * python/py-threadevent.c: Include "gdbthread.h".
3767 (get_event_thread): Use thread_to_thread_object.
3768 * python/python-internal.h (struct inferior_object): Forward
3769 declare.
3770 (find_thread_object, find_inferior_object): Delete declarations.
3771 (thread_to_thread_object, inferior_to_inferior_object): New
3772 declarations.
3773 * record-btrace.c: Include "inferior.h".
3774 (require_btrace_thread): Use inferior_thread.
3775 (record_btrace_frame_sniffer)
3776 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3777 (get_thread_current_frame): Use scoped_restore_current_thread and
3778 switch_to_thread.
3779 (get_thread_current_frame): Use thread pointer directly.
3780 (record_btrace_replay_at_breakpoint): Use thread's inferior
3781 pointer directly.
3782 * record-full.c: Include "inferior.h".
3783 * regcache.c: Include "gdbthread.h".
3784 (get_thread_arch_regcache): Use the inferior's address space
3785 directly.
3786 (get_thread_regcache, registers_changed_thread): New.
3787 * regcache.h (get_thread_regcache(thread_info *thread)): New
3788 overload.
3789 (registers_changed_thread): New.
3790 (remote_target) <remote_detach_1>: Swap order of parameters.
3791 (remote_add_thread): <remote_add_thread>: Return the new thread.
3792 (get_remote_thread_info(ptid_t)): New overload.
3793 (remote_target::remote_notice_new_inferior): Use thread pointers
3794 directly.
3795 (remote_target::process_initial_stop_replies): Use
3796 thread_info::set_running.
3797 (remote_target::remote_detach_1, remote_target::detach)
3798 (extended_remote_target::detach): Adjust.
3799 * stack.c (frame_show_address): Use inferior_thread.
3800 * target-debug.h (target_debug_print_thread_info_pp): New.
3801 * target-delegates.c: Regenerate.
3802 * target.c (default_thread_address_space): Delete.
3803 (memory_xfer_partial_1): Use current_inferior.
3804 (target_detach): Use current_inferior.
3805 (target_thread_address_space): Delete.
3806 (generic_mourn_inferior): Use current_inferior.
3807 * target.h (struct target_ops) <thread_address_space>: Delete.
3808 (target_thread_address_space): Delete.
3809 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3810 pointers directly.
3811 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3812 thread pointer instead of a ptid_t. Adjust all callers.
3813 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3814 (first_thread_of_process): Delete, replaced by ...
3815 (first_thread_of_inferior): ... this new function. All callers
3816 adjusted.
3817 (any_thread_of_process): Rename to ...
3818 (any_thread_of_inferior): ... this, and take an inferior pointer.
3819 (any_live_thread_of_process): Rename to ...
3820 (any_live_thread_of_inferior): ... this, and take an inferior
3821 pointer.
3822 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3823 (value_in_thread_stack_temporaries)
3824 (get_last_thread_stack_temporary): Take a thread pointer instead
3825 of a ptid_t. Adjust all callers.
3826 (thread_info::set_running): New.
3827 (validate_registers_access): Use inferior_thread.
3828 (can_access_registers_ptid): Rename to ...
3829 (can_access_registers_thread): ... this, and take a thread
3830 pointer.
3831 (print_thread_info_1): Adjust to compare thread pointers instead
3832 of ptids.
3833 (switch_to_no_thread, switch_to_thread): Make extern.
3834 (scoped_restore_current_thread::~scoped_restore_current_thread):
3835 Use m_thread pointer directly.
3836 (scoped_restore_current_thread::scoped_restore_current_thread):
3837 Use inferior_thread.
3838 (thread_command): Use thread pointer directly.
3839 (thread_num_make_value_helper): Use inferior_thread.
3840 * top.c (execute_command): Use inferior_thread.
3841 * tui/tui-interp.c: Include "inferior.h".
3842 * varobj.c (varobj_create): Use inferior_thread.
3843 (value_of_root_1): Use find_thread_global_id instead of
3844 global_thread_id_to_ptid.
3845
3846 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3847
3848 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3849 possible.
3850 (regcache::write_part): Likewise.
3851 (readable_regcache::cooked_read_part): Update comment.
3852 (readable_regcache::cooked_write_part): Likewise.
3853 * regcache.h: (readable_regcache::read_part): Likewise.
3854 (regcache::write_part): Likewise.
3855
3856 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3857 Dirk Schubert <dirk.schubert@arm.com>
3858
3859 * aarch64-linux-nat.c (post_attach): New.
3860 (aarch64_linux_nat_target::post_attach): Override post_attach to
3861 record the number of hardware debug registers.
3862
3863 2018-06-20 Tom Tromey <tom@tromey.com>
3864
3865 * python/py-param.c (add_setshow_generic): Make parameters const.
3866 (parmpy_init): Update.
3867
3868 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3869
3870 * regcache.h (regcache_cooked_read_ftype): Rename to...
3871 (register_read_ftype): ...this, change type to function_view.
3872 (class reg_buffer) <save>: Remove src parameter.
3873 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3874 parameter non-const in first overload. Remove src parameter in
3875 second overload.
3876 * regcache.c (do_cooked_read): Remove.
3877 (readonly_detached_regcache::readonly_detached_regcache): Make
3878 parameter non-const, adjust call to other constructor.
3879 (reg_buffer::save): Remove src parameter.
3880 * frame.c (do_frame_register_read): Remove.
3881 (frame_save_as_regcache): Use lambda function.
3882 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3883 parameter to ppu2spu_data *.
3884 (ppu2spu_sniffer): Use lambda function.
3885
3886 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3887
3888 * record-full.c (record_full_target::insert_breakpoint): Remove
3889 "struct" keyword, add const.
3890
3891 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3892
3893 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3894 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3895 * configure.ac: Remove AC_PREREQ, add missing quoting.
3896 * gnulib/configure.ac: Modernize usage of
3897 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3898 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3899 (AUTOMAKE_VERSION): Bump to 1.15.1.
3900 * configure: Re-generate.
3901 * config.in: Re-generate.
3902 * aclocal.m4: Re-generate.
3903 * gnulib/aclocal.m4: Re-generate.
3904 * gnulib/config.in: Re-generate.
3905 * gnulib/configure: Re-generate.
3906 * gnulib/import/Makefile.in: Re-generate.
3907
3908 2018-06-19 Pedro Alves <palves@redhat.com>
3909
3910 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3911 (lookup_minimal_symbol_by_pc_section): ... here with
3912 gdb_assert_not_reached added.
3913
3914 2018-06-19 Pedro Alves <palves@redhat.com>
3915
3916 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3917 parameter with a block parameter. Compare location's block symbol
3918 with the frame's block instead of addresses.
3919 (skip_inline_frames): Pass the current block instead of the
3920 frame's address. Break out as soon as we determine the frame
3921 should not be skipped.
3922
3923 2018-06-18 Tom Tromey <tom@tromey.com>
3924
3925 * solib-aix.c (solib_aix_get_section_offsets): Return
3926 unique_xmalloc_ptr.
3927 (solib_aix_solib_create_inferior_hook): Update.
3928
3929 2018-06-18 Tom Tromey <tom@tromey.com>
3930
3931 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3932
3933 2018-06-18 Tom Tromey <tom@tromey.com>
3934
3935 * solib-frv.c (frv_relocate_main_executable): Use
3936 unique_xmalloc_ptr.
3937 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3938 unique_xmalloc_ptr.
3939
3940 2018-06-18 Tom Tromey <tom@tromey.com>
3941
3942 * objfiles.h (inhibit_section_map_updates): Update.
3943 (resume_section_map_updates, resume_section_map_updates_cleanup):
3944 Remove.
3945 * solib-svr4.c (svr4_handle_solib_event): Update.
3946 * objfiles.c (inhibit_section_map_updates): Return
3947 scoped_restore_tmpl<int>.
3948 (resume_section_map_updates, resume_section_map_updates_cleanup):
3949 Remove.
3950
3951 2018-06-18 Tom Tromey <tom@tromey.com>
3952
3953 * valprint.h (read_string): Update.
3954 * valprint.c (read_string): Change type of "buffer".
3955 (val_print_string): Update.
3956 * python/py-value.c (valpy_string): Update.
3957 * language.h (struct language_defn) <la_get_string>: Change
3958 type of "buffer".
3959 (default_get_string, c_get_string): Update.
3960 * language.c (default_get_string): Change type of "buffer".
3961 * guile/scm-value.c (gdbscm_value_to_string): Update.
3962 * c-lang.c (c_get_string): Change type of "buffer".
3963
3964 2018-06-18 Tom Tromey <tom@tromey.com>
3965
3966 * ser-mingw.c (struct pipe_state_destroyer): New.
3967 (pipe_state_up): New typedef.
3968 (cleanup_pipe_state): Remove.
3969 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3970
3971 2018-06-18 Tom Tromey <tom@tromey.com>
3972
3973 * rust-lang.h (rust_yyerror): Don't declare.
3974 * rust-lang.c (rust_language_defn): Update.
3975 * rust-exp.y (yyerror): Now static.
3976 * parse.c (parse_exp_in_context_1): Update.
3977 * p-lang.h (p_yyerror): Don't declare.
3978 * p-lang.c (p_language_defn): Update.
3979 * p-exp.y (yyerror): Now static.
3980 * opencl-lang.c (opencl_language_defn): Update.
3981 * objc-lang.c (objc_language_defn): Update.
3982 * m2-lang.h (m2_yyerror): Don't declare.
3983 * m2-lang.c (m2_language_defn): Update.
3984 * m2-exp.y (yyerror): Now static.
3985 * language.h (struct language_defn) <la_error>: Remove.
3986 * language.c (unk_lang_error): Remove.
3987 (unknown_language_defn, auto_language_defn): Remove.
3988 * go-lang.h (go_yyerror): Don't declare.
3989 * go-lang.c (go_language_defn): Update.
3990 * go-exp.y (yyerror): Now static.
3991 * f-lang.h (f_yyerror): Don't declare.
3992 * f-lang.c (f_language_defn): Update.
3993 * f-exp.y (yyerror): Now static.
3994 * d-lang.h (d_yyerror): Don't declare.
3995 * d-lang.c (d_language_defn): Update.
3996 * d-exp.y (yyerror): Now static.
3997 * c-lang.h (c_yyerror): Don't declare.
3998 * c-lang.c (c_language_defn, cplus_language_defn)
3999 (asm_language_defn, minimal_language_defn): Update.
4000 * c-exp.y (yyerror): Now static.
4001 * ada-lang.h (ada_yyerror): Don't declare.
4002 * ada-lang.c (ada_language_defn): Update.
4003 * ada-exp.y (yyerror): Now static.
4004
4005 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4006
4007 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4008 (store_sveregs_to_thread): Likewise.
4009 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4010 (aarch64_linux_store_inferior_registers): Likewise.
4011 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4012 function.
4013 (aarch64_sve_regs_copy_to_regcache): Likewise.
4014 (aarch64_sve_regs_copy_from_regcache): Likewise.
4015 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4016 declaration.
4017 (aarch64_sve_regs_copy_to_regcache): Likewise.
4018 (aarch64_sve_regs_copy_from_regcache): Likewise.
4019 (sve_context): Structure from Linux headers.
4020 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4021 (SVE_SIG_ZREG_SIZE): Likewise.
4022 (SVE_SIG_PREG_SIZE): Likewise.
4023 (SVE_SIG_FFR_SIZE): Likewise.
4024 (SVE_SIG_REGS_OFFSET): Likewise.
4025 (SVE_SIG_ZREGS_OFFSET): Likewise.
4026 (SVE_SIG_ZREG_OFFSET): Likewise.
4027 (SVE_SIG_ZREGS_SIZE): Likewise.
4028 (SVE_SIG_PREGS_OFFSET): Likewise.
4029 (SVE_SIG_PREG_OFFSET): Likewise.
4030 (SVE_SIG_PREGS_SIZE): Likewise.
4031 (SVE_SIG_FFR_OFFSET): Likewise.
4032 (SVE_SIG_REGS_SIZE): Likewise.
4033 (SVE_SIG_CONTEXT_SIZE): Likewise.
4034 (SVE_PT_REGS_MASK): Likewise.
4035 (SVE_PT_REGS_FPSIMD): Likewise.
4036 (SVE_PT_REGS_SVE): Likewise.
4037 (SVE_PT_VL_INHERIT): Likewise.
4038 (SVE_PT_VL_ONEXEC): Likewise.
4039 (SVE_PT_REGS_OFFSET): Likewise.
4040 (SVE_PT_FPSIMD_OFFSET): Likewise.
4041 (SVE_PT_FPSIMD_SIZE): Likewise.
4042 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4043 (SVE_PT_SVE_PREG_SIZE): Likewise.
4044 (SVE_PT_SVE_FFR_SIZE): Likewise.
4045 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4046 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4047 (__SVE_SIG_TO_PT): Likewise.
4048 (SVE_PT_SVE_OFFSET): Likewise.
4049 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4050 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4051 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4052 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4053 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4054 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4055 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4056 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4057 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4058 (SVE_PT_SVE_SIZE): Likewise.
4059 (SVE_PT_SIZE): Likewise.
4060 (HAS_SVE_STATE): New define.
4061
4062 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4063
4064 * nat/aarch64-sve-linux-sigcontext.h: New file.
4065 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4066 new files.
4067 (SVE_VQ_MIN): Likewise.
4068 (SVE_VQ_MAX): Likewise.
4069 (SVE_VL_MIN): Likewise.
4070 (SVE_VL_MAX): Likewise.
4071 (SVE_NUM_ZREGS): Likewise.
4072 (SVE_NUM_PREGS): Likewise.
4073 (sve_vl_valid): Likewise.
4074 (struct user_sve_header): Likewise.
4075
4076 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4077 Richard Bunt <Richard.Bunt@arm.com>
4078
4079 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4080 was requested by GDB.
4081
4082 2018-06-15 Tom de Vries <tdevries@suse.de>
4083
4084 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4085
4086 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4087
4088 * gnulib/update-gnulib.sh: Print expected versions of
4089 autoconf/aclocal.
4090
4091 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4092
4093 * arch-utils.c (default_type_align): Use type_length_units.
4094 * gdbtypes.c (type_align): Use type_length_units.
4095
4096 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4097
4098 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4099 of 'define' command.
4100
4101 2018-06-14 Tom de Vries <tdevries@suse.de>
4102
4103 PR cli/22573
4104 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4105 get_no_prettyformat_print_options.
4106
4107 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4108
4109 * sparc-nat.h: Include target.h.
4110 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4111 <fetch_registers>: Remove this argument in function call.
4112 <store_registers>: Remove this argument in function call, remove
4113 extra semicolon.
4114 <low_forget_process>: Call sparc64_forget_process instead of
4115 sparc_forget_process.
4116
4117 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4118
4119 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4120 (procfs_target::make_corefile_notes): Adjust to new
4121 target_read_alloc return type.
4122
4123 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4124 Stephen Roberts <stephen.roberts@arm.com>
4125
4126 PR gdb/22882
4127 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4128 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4129 Move should_notify_stop local into more inner scope.
4130
4131 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4132 Stephen Roberts <stephen.roberts@arm.com>
4133
4134 PR gdb/22882
4135 * infrun.c (resume_1): Add call to mark_async_event_handler.
4136
4137 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4138
4139 * infrun.c (do_target_wait): Change old version of $pc printed.
4140
4141 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4142
4143 * dwarf2read.c (read_index_from_section): Rename to...
4144 (read_gdb_index_from_section): ... this, update all callers.
4145 (dwarf2_read_index): Rename to...
4146 (dwarf2_read_gdb_index): ... this, update all callers.
4147
4148 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4149
4150 * gdb/hppa-linux-nat.c
4151 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4152 hppa_linux_nat_target::fetch_registers.
4153
4154 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4155
4156 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4157 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4158 (AARCH64_DWARF_SVE_FFR): Likewise.
4159 (AARCH64_DWARF_SVE_P0): Likewise.
4160 (AARCH64_DWARF_SVE_Z0): Likewise.
4161
4162 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4163
4164 * common/common-regcache.h (raw_compare): New function.
4165 * regcache.c (regcache::raw_compare): Likewise.
4166 * regcache.h (regcache::raw_compare): New declaration.
4167
4168 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4169
4170 * common/common-regcache.h (reg_buffer_common): New structure.
4171 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4172 (reg_buffer::raw_supply): Likewise.
4173 (reg_buffer::raw_supply_integer): Likewise.
4174 (reg_buffer::raw_supply_zeroed): Likewise.
4175 (reg_buffer::raw_collect): Likewise.
4176 (reg_buffer::raw_collect_integer): Likewise.
4177 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4178 (reg_buffer::raw_supply): Likewise.
4179 (reg_buffer::raw_supply_integer): Likewise.
4180 (reg_buffer::raw_supply_zeroed): Likewise.
4181 (reg_buffer::raw_collect): Likewise.
4182 (reg_buffer::raw_collect_integer): Likewise.
4183
4184 2018-06-10 Tom Tromey <tom@tromey.com>
4185
4186 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4187 (class remote_state) <stop_reply_queue>: Now std::vector.
4188 (remote_state::~remote_state)
4189 (remote_target::stop_reply_queue_length): Update.
4190 (struct queue_iter_param, remove_child_of_pending_fork)
4191 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4192 (check_pending_event_prevents_wildcard_vcont_callback)
4193 (remove_stop_reply_for_inferior)
4194 (remove_stop_reply_of_remote_state)
4195 (remote_notif_remove_once_on_match)
4196 (stop_reply_match_ptid_and_ws)
4197 (remote_kill_child_of_pending_fork): Remove.
4198 (remote_target::remove_new_fork_children)
4199 (remote_target::check_pending_events_prevent_wildcard_vcont)
4200 (remote_target::discard_pending_stop_replies)
4201 (remote_target::discard_pending_stop_replies_in_queue)
4202 (remote_target::remote_notif_remove_queued_reply)
4203 (remote_target::queued_stop_reply)
4204 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4205 (remote_target::wait, remote_target::kill_new_fork_children)
4206 (remote_target::async): Update.
4207
4208 2018-06-10 Tom Tromey <tom@tromey.com>
4209
4210 * record-full.c (record_full_arch_list_cleanups): Remove.
4211 (record_full_message): Use try/catch.
4212 (record_full_wait_cleanups): Remove.
4213 (record_full_wait_1): Use try/catch.
4214 (record_full_restore): Likewise.
4215
4216 2018-06-10 Tom Tromey <tom@tromey.com>
4217
4218 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4219 declare VEC. Add constructor.
4220 <in_target_beneath>: Now bool.
4221 (record_full_breakpoints): Now a std::vector, static.
4222 (record_full_sync_record_breakpoints)
4223 (record_full_init_record_breakpoints)
4224 (record_full_target::insert_breakpoint)
4225 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4226
4227 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4228
4229 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4230 * serial.c (serial_interface_lookup): Remove struct keyword.
4231
4232 2018-06-10 Tom Tromey <tom@tromey.com>
4233
4234 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4235 method.
4236 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4237 a method.
4238 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4239 method.
4240 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4241 "beneath" as a method.
4242 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4243 Use "beneath" as a method.
4244
4245 2018-06-10 Tom Tromey <tom@tromey.com>
4246
4247 * tracefile.c (struct trace_file_writer_deleter): New.
4248 <operator()>: Rename from trace_file_writer_xfree.
4249 (trace_file_writer_up): New typedef.
4250 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4251
4252 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4253
4254 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4255 <m_registers, m_register_status>: Change type to
4256 std::unique_ptr.
4257 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4258 XCNEWVEC.
4259
4260 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4261
4262 * common/common-regcache.h (enum register_status): Add
4263 underlying type "signed char".
4264 * regcache.h (reg_buffer) <m_register_status>: Change type to
4265 register_status *.
4266 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4267 register_status instead of signed char.
4268 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4269 (reg_buffer::get_register_status): Remove cast.
4270 (readable_regcache::raw_read): Remove cast.
4271 (readable_regcache::cooked_read): Remove cast.
4272
4273 2018-06-09 Tom Tromey <tom@tromey.com>
4274
4275 * source.c (reverse_search_command, forward_search_command): Use
4276 scoped_fd.
4277
4278 2018-06-09 Tom Tromey <tom@tromey.com>
4279
4280 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4281 (serial_ops_list): Now static, std::vector.
4282 (serial_interface_lookup, serial_add_interface): Update.
4283
4284 2018-06-09 Tom Tromey <tom@tromey.com>
4285
4286 * dwarf2read.c (process_cu_includes): Update.
4287 (process_full_comp_unit): Update.
4288 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4289 std::vector.
4290
4291 2018-06-08 Paul Koning <paul_koning@dell.com>
4292
4293 PR gdb/23252
4294
4295 * python/python.c (do_start_initialization):
4296 Avoid call to internal Python API.
4297 (init__gdb_module): New function.
4298
4299 2018-06-08 Gary Benson <gbenson@redhat.com>
4300
4301 * linux-thread-db.c (valprint.h): New include.
4302 (struct check_thread_db_info): New structure.
4303 (check_thread_db_on_load, tdb_testinfo): New static globals.
4304 (check_thread_db, check_thread_db_callback): New functions.
4305 (try_thread_db_load_1): Run integrity checks if requested.
4306 (maintenance_check_libthread_db): New function.
4307 (_initialize_thread_db): Register "maint check libthread-db"
4308 and "maint set/show check-libthread-db".
4309 * NEWS: Mention the above new commands.
4310
4311 2018-06-08 Tom Tromey <tom@tromey.com>
4312
4313 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4314 now a method.
4315
4316 2018-06-08 Tom Tromey <tom@tromey.com>
4317
4318 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4319
4320 2018-06-08 Tom Tromey <tom@tromey.com>
4321
4322 * common/btrace-common.h (struct btrace_data): Add constructor,
4323 destructor, move assignment operator.
4324 <empty, clear, fini>: New methods.
4325 <format>: Initialize.
4326 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4327 (btrace_data_empty): Don't declare.
4328 * common/btrace-common.c (btrace_data_init): Remove.
4329 (btrace_data::fini): Rename from btrace_data_fini.
4330 (btrace_data::empty): Rename from btrace_data_empty.
4331 (btrace_data::clear): Rename from btrace_data_clear. Return
4332 bool.
4333 * btrace.h (make_cleanup_btrace_data): Don't declare.
4334 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4335 (parse_xml_btrace): Update.
4336 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4337 (maint_btrace_clear_packet_history_cmd): Update.
4338
4339 2018-06-07 Pedro Alves <palves@redhat.com>
4340
4341 * target.h (target_ops) <beneath>: Now a method. All references
4342 updated.
4343 (class target_stack): New.
4344 * target.c (g_target_stack): New.
4345 (g_current_top_target): Delete.
4346 (current_top_target): Get the top target out of g_target_stack.
4347 (target_stack::push, target_stack::unpush): New.
4348 (push_target, unpush_target): Reimplement.
4349 (target_is_pushed): Reimplement in terms of g_target_stack.
4350 (target_ops::beneath, target_stack::find_beneath): New.
4351
4352 2018-06-07 Pedro Alves <palves@redhat.com>
4353
4354 * target.h (find_target_beneath): Delete declaration.
4355 * target.c (find_target_beneath): Delete definition.
4356 * aix-thread.c: All callers of find_target_beneath adjusted to
4357 call target_ops::beneath instead.
4358 * bsd-uthread.c: Likewise.
4359 * linux-thread-db.c: Likewise.
4360 * ravenscar-thread.c: Likewise.
4361 * sol-thread.c: Likewise.
4362 * spu-multiarch.c: Likewise.
4363
4364 2018-06-07 Pedro Alves <palves@redhat.com>
4365
4366 * target.h (target_ops) <beneath>: Now a method. All references
4367 updated.
4368 (target_ops) <m_beneath>: New.
4369 * target.c (target_ops::beneath): New.
4370 * corelow.c: Adjust all references to target_ops::beneath.
4371 * linux-thread-db.c: Likewise.
4372 * make-target-delegates: Likewise.
4373 * record-btrace.c: Likewise.
4374 * record-full.c: Likewise.
4375 * remote.c: Likewise.
4376 * target.c: Likewise.
4377 * target-delegates.c: Regenerate.
4378
4379 2018-06-07 Pedro Alves <palves@redhat.com>
4380
4381 * target.h (target_stack): Delete.
4382 (current_top_target): Declare function.
4383 * target.c (target_stack): Delete.
4384 (g_current_top_target): New.
4385 (current_top_target): New function.
4386 * auxv.c: Use current_top_target instead of target_stack
4387 throughout.
4388 * avr-tdep.c: Likewise.
4389 * breakpoint.c: Likewise.
4390 * corefile.c: Likewise.
4391 * elfread.c: Likewise.
4392 * eval.c: Likewise.
4393 * exceptions.c: Likewise.
4394 * frame.c: Likewise.
4395 * gdbarch-selftests.c: Likewise.
4396 * gnu-v3-abi.c: Likewise.
4397 * ia64-tdep.c: Likewise.
4398 * ia64-vms-tdep.c: Likewise.
4399 * infcall.c: Likewise.
4400 * infcmd.c: Likewise.
4401 * infrun.c: Likewise.
4402 * linespec.c: Likewise.
4403 * linux-tdep.c: Likewise.
4404 * minsyms.c: Likewise.
4405 * ppc-linux-nat.c: Likewise.
4406 * ppc-linux-tdep.c: Likewise.
4407 * procfs.c: Likewise.
4408 * regcache.c: Likewise.
4409 * remote.c: Likewise.
4410 * rs6000-tdep.c: Likewise.
4411 * s390-linux-nat.c: Likewise.
4412 * s390-tdep.c: Likewise.
4413 * solib-aix.c: Likewise.
4414 * solib-darwin.c: Likewise.
4415 * solib-dsbt.c: Likewise.
4416 * solib-spu.c: Likewise.
4417 * solib-svr4.c: Likewise.
4418 * solib-target.c: Likewise.
4419 * sparc-tdep.c: Likewise.
4420 * sparc64-tdep.c: Likewise.
4421 * spu-tdep.c: Likewise.
4422 * symfile.c: Likewise.
4423 * symtab.c: Likewise.
4424 * target-descriptions.c: Likewise.
4425 * target-memory.c: Likewise.
4426 * target.c: Likewise.
4427 * target.h: Likewise.
4428 * tracefile-tfile.c: Likewise.
4429 * tracepoint.c: Likewise.
4430 * valops.c: Likewise.
4431 * valprint.c: Likewise.
4432 * value.c: Likewise.
4433 * windows-tdep.c: Likewise.
4434 * mi/mi-main.c: Likewise.
4435
4436 2018-06-07 Tom Tromey <tom@tromey.com>
4437
4438 * valprint.h (build_address_symbolic): Declare.
4439 * printcmd.c (print_address_symbolic): Update.
4440 (build_address_symbolic): Change "name" and "filename" to
4441 std::string.
4442 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4443 Update.
4444 * defs.h (build_address_symbolic): Remove declaration.
4445
4446 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4447
4448 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4449 (aarch64_vnv_type): Add function.
4450 (aarch64_pseudo_register_name): Add V regs for SVE.
4451 (aarch64_pseudo_register_type): Likewise.
4452 (aarch64_pseudo_register_reggroup_p): Likewise.
4453 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4454 (aarch64_pseudo_read_value): Add V regs for SVE.
4455 (aarch64_pseudo_write_2): Use V0 offset for SVE
4456 (aarch64_pseudo_write): Add V regs for SVE.
4457 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4458
4459 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4460
4461 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4462 (sve_vl_from_vq): Likewise.
4463
4464 2018-06-05 Tom Tromey <tom@tromey.com>
4465
4466 * cli/cli-cmds.c (show_version): Update.
4467 * top.c (print_gdb_version): Add "interactive" parameter.
4468 Update.
4469 * main.c (captured_main_1): Update.
4470 * top.h (print_gdb_version): Add "interactive" parameter and a
4471 comment.
4472
4473 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4474
4475 * common/enum-flags.h: Add trailing semicolon to example in
4476 comment.
4477
4478 2018-06-05 Tom Tromey <tom@tromey.com>
4479
4480 PR cli/12326:
4481 * NEWS: Add entry about pager.
4482 * utils.c (pagination_disabled_for_command): New global.
4483 (prompt_for_continue): Allow "c" response to prompt.
4484 (reinitialize_more_filter): Clear
4485 pagination_disabled_for_command.
4486 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4487
4488 2018-06-04 Tom Tromey <tom@tromey.com>
4489
4490 * ada-lang.h (ada_lookup_symbol_list): Update.
4491 * ada-lang.c (resolve_subexp): Update.
4492 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4493 parameter.
4494 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4495 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4496 results parameter to std::vector.
4497 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4498 Update.
4499 * ada-exp.y (block_lookup): Update.
4500 (select_possible_type_sym): Change type of syms. Remove nsyms
4501 parameter.
4502 (write_var_or_type, write_name_assoc): Update.
4503
4504 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4505
4506 * windows-nat.c (windows_nat_target::xfer_partial): Return
4507 TARGET_XFER_E_IO if we need to delegate to the target beneath
4508 but BENEATH is NULL.
4509
4510 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4511
4512 * Makefile.in (config.status): Add configure.nat as a
4513 dependency.
4514
4515 2018-06-04 Tom Tromey <tom@tromey.com>
4516
4517 * cp-name-parser.y (cpname_state): Add method declarations.
4518 (HANDLE_QUAL): Update.
4519 (cpname_state::d_grab, cpname_state::fill_comp)
4520 (cpname_state::make_operator, cpname_state::make_dtor)
4521 (cpname_state::make_builtin_type, cpname_state::make_name)
4522 (cpname_state::d_qualify, cpname_state::d_int_type)
4523 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4524 (%union): Move earlier.
4525
4526 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4527
4528 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4529
4530 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4531
4532 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4533 (aarch64_pseudo_write_1): Likewise.
4534 (aarch64_pseudo_read_value): Use helper.
4535 (aarch64_pseudo_write): Likewise.
4536
4537 2018-06-04 Pedro Alves <palves@redhat.com>
4538
4539 * darwin-nat.c (darwin_ops): Delete.
4540 (darwin_attach_pid): Use get_native_target.
4541
4542 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4543
4544 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4545 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4546
4547 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4548
4549 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4550 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4551 (aarch64_gdbarch_init): Check for SVE.
4552 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4553
4554 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4555
4556 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4557 * aarch64-tdep.h (aarch64_read_description): Likewise.
4558 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4559 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4560 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4561 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4562 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4563
4564 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4565
4566 * value.c (value_fetch_lazy_bitfield): New.
4567 (value_fetch_lazy_memory): New.
4568 (value_fetch_lazy_register): New.
4569 (value_fetch_lazy): Factor out to smaller functions.
4570
4571 2018-06-01 Tom Tromey <tom@tromey.com>
4572
4573 * cp-name-parser.y (backslashable, represented): Now const.
4574
4575 2018-06-01 Tom Tromey <tom@tromey.com>
4576
4577 * cp-name-parser.y: Include parser-defs.h.
4578 (parser_fprintf): Remove declaration.
4579
4580 2018-06-01 Tom Tromey <tom@tromey.com>
4581
4582 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4583 %parse-param.
4584 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4585 (global_result): Remove globals.
4586 (struct cpname_state): New.
4587 (yyparse): Don't declare.
4588 (yylex, yyerror): Move declarations after %union.
4589 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4590 (make_name): Add state parameter.
4591 Update all callers.
4592 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4593 parameter.
4594 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4595 Update.
4596 (yylex): Add lvalp, state parameters.
4597 (yyerror): Add state parameter.
4598 (cp_demangled_name_to_comp): Update.
4599
4600 2018-06-01 Tom Tromey <tom@tromey.com>
4601
4602 * cp-name-parser.y (parser_fprintf): Declare.
4603 (GDB_YY_REMAP_PREFIX): Define.
4604 Include yy-remap.h. Don't redefine yy* identifiers.
4605
4606 2018-06-01 Tom Tromey <tom@tromey.com>
4607
4608 * python/py-type.c (typy_legacy_template_argument): Update.
4609 * cp-support.h (cp_demangled_name_to_comp): Update.
4610 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4611 parameter to be a "std::string *".
4612 (main): Update.
4613
4614 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4615
4616 * ada-lex.l: Include "diagnostics.h" instead of
4617 "common/diagnostics.h".
4618 * unittests/environ-selftests.c: Likewise.
4619 * common/diagnostics.h: Moved to ../include.
4620
4621 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4622
4623 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4624 to language_mode_manual while calling breakpoint_re_set_one.
4625
4626 2018-06-01 Tom Tromey <tom@tromey.com>
4627
4628 * valops.c (value_cast_structs, destructor_name_p): Update.
4629 * symtab.c (gdb_mangle_name): Update.
4630 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4631 Update.
4632 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4633 (pascal_object_print_value_fields, pascal_object_print_value):
4634 Update.
4635 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4636 * linespec.c (find_methods): Update.
4637 * gdbtypes.h (type_name_no_tag): Remove.
4638 (type_name_or_error): Rename from type_name_no_tag_or_error.
4639 * gdbtypes.c (type_name_no_tag): Remove.
4640 (type_name_or_error): Rename from type_name_no_tag_or_error.
4641 (lookup_struct_elt_type, check_typedef): Update.
4642 * expprint.c (print_subexp_standard): Update.
4643 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4644 * d-namespace.c (d_lookup_nested_symbol): Update.
4645 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4646 (cp_print_class_member): Update.
4647 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4648 * completer.c (add_struct_fields): Update.
4649 * c-typeprint.c (cp_type_print_derivation_info)
4650 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4651 Update.
4652 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4653 (ada_prefer_type, ada_is_exception_sym): Update.
4654
4655 2018-06-01 Tom Tromey <tom@tromey.com>
4656
4657 * valops.c (enum_constant_from_type, value_namespace_elt)
4658 (value_maybe_namespace_elt): Update.
4659 * valarith.c (find_size_for_pointer_math): Update.
4660 * target-descriptions.c (make_gdb_type): Update.
4661 * symmisc.c (print_symbol): Update.
4662 * stabsread.c (define_symbol, read_type)
4663 (complain_about_struct_wipeout, add_undefined_type)
4664 (cleanup_undefined_types_1): Update.
4665 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4666 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4667 (rust_internal_print_type, rust_composite_type)
4668 (rust_evaluate_funcall, rust_evaluate_subexp)
4669 (rust_inclusive_range_type_p): Update.
4670 * python/py-type.c (typy_get_tag): Update.
4671 * p-typeprint.c (pascal_type_print_base): Update.
4672 * mdebugread.c (parse_symbol, parse_type): Update.
4673 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4674 Update.
4675 * guile/scm-type.c (gdbscm_type_tag): Update.
4676 * go-lang.c (sixg_string_p): Update.
4677 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4678 Update.
4679 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4680 (TYPE_TAG_NAME): Remove.
4681 * gdbtypes.c (type_name_no_tag): Simplify.
4682 (check_typedef, check_types_equal, recursive_dump_type)
4683 (copy_type_recursive, arch_composite_type): Update.
4684 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4685 in summary mode when needed.
4686 * eval.c (evaluate_funcall): Update.
4687 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4688 (process_structure_scope, read_enumeration_type)
4689 (read_namespace_type, read_module_type, determine_prefix): Update.
4690 * cp-support.c (inspect_type): Update.
4691 * coffread.c (process_coff_symbol, decode_base_type): Update.
4692 * c-varobj.c (c_is_path_expr_parent): Update.
4693 * c-typeprint.c (c_type_print_base_struct_union): Update.
4694 (c_type_print_base_1): Update. Print struct/class/union/enum in
4695 summary when using C language.
4696 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4697 (gen_maybe_namespace_elt): Update.
4698 * ada-lang.c (ada_type_name): Simplify.
4699 (empty_record, ada_template_to_fixed_record_type_1)
4700 (template_to_static_fixed_type)
4701 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4702
4703 2018-06-01 Tom Tromey <tom@tromey.com>
4704
4705 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4706 c_print_type.
4707 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4708 (c_print_type): Update.
4709 (c_print_type): New overload.
4710 (c_type_print_varspec_prefix, c_type_print_args)
4711 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4712 (c_type_print_base_struct_union, c_type_print_base_1)
4713 (cp_type_print_method_args): Add "language" parameter.
4714 (c_type_print_base): Update.
4715 * c-lang.h (c_print_type): Add new overload.
4716
4717 2018-06-01 Tom Tromey <tom@tromey.com>
4718
4719 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4720 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4721
4722 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4723
4724 * aarch64-tdep.c (aarch64_sve_register_names): New const
4725 var.
4726 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4727 (AARCH64_SVE_Z_REGS_NUM): New define.
4728 (AARCH64_SVE_P_REGS_NUM): Likewise.
4729 (AARCH64_SVE_NUM_REGS): Likewise.
4730
4731 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4732
4733 * nat/linux-ptrace.h [__alpha__]
4734 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4735 definitions.
4736
4737 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4738
4739 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4740 the endianness selected.
4741 * NEWS: Document `set endian auto' mode operation update.
4742
4743 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4744
4745 * Makefile.in: Add new header.
4746 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4747 (sve_vl_from_vg): Likewise.
4748 (sve_vq_from_vl): Likewise.
4749 (sve_vl_from_vq): Likewise.
4750 (sve_vq_from_vg): Likewise.
4751 (sve_vg_from_vq): Likewise.
4752 * configure.nat: Add new c file.
4753 * nat/aarch64-sve-linux-ptrace.c: New file.
4754 * nat/aarch64-sve-linux-ptrace.h: New file.
4755
4756 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4757
4758 * aarch64-linux-nat.c (aarch64_linux_read_description):
4759 Add parmeter zero.
4760 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4761 Likewise.
4762 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4763 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4764 (aarch64_gdbarch_init): Add parmeter zero.
4765 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4766 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4767 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4768 parmeter.
4769 * doc/gdb.texinfo: Describe SVE feature
4770 * features/aarch64-sve.c: New file.
4771
4772 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4773
4774 PR gdb/23210
4775 * gdbarch.sh (significant_addr_bit): Default to zero when
4776 not set by target architecture.
4777 * gdbarch.c: Re-generated.
4778 * utils.c (address_significant): Update.
4779
4780 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4781
4782 * stack.c (func_command): Remove trailing newline in call to error.
4783
4784 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4785
4786 * regcache.h (regcache_raw_collect): Remove, update callers to
4787 use regcache::raw_collect.
4788 * regcache.c (regcache_raw_collect): Remove.
4789
4790 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4791
4792 * regcache.h (regcache_raw_supply): Remove, update callers to
4793 use detached_regcache::raw_supply.
4794 * regcache.c (regcache_raw_supply): Remove.
4795
4796 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4797
4798 * regcache.h (regcache_cooked_write_part): Remove, update
4799 callers to use regcache::cooked_write_part.
4800 * regcache.c (regcache_cooked_write_part): Remove.
4801
4802 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4803
4804 * regcache.h (regcache_cooked_read_part): Remove, update callers
4805 to use readable_regcache::cooked_read_part.
4806 * regcache.c (regcache_cooked_read_part): Remove.
4807
4808 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4809
4810 * regcache.h (regcache_cooked_read_value): Remove, update
4811 callers to use readable_regcache::cooked_read_value.
4812 * regcache.c (regcache_cooked_read_value): Remove.
4813
4814 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4815
4816 * regcache.h (regcache_cooked_write): Remove, update callers to
4817 use regcache::cooked_write.
4818 * regcache.c (regcache_cooked_write): Remove.
4819
4820 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4821
4822 * regcache.h (regcache_invalidate): Remove, update callers to
4823 use detached_regcache::invalidate instead.
4824 * regcache.c (regcache_invalidate): Remove.
4825
4826 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4827
4828 * regcache.h (regcache_raw_write_part): Remove, update callers
4829 to use regcache::raw_write_part instead.
4830 * regcache.c (regcache_raw_write_part): Remove.
4831
4832 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4833
4834 * regcache.h (regcache_raw_read_part): Remove, update callers to
4835 use readable_regcache::raw_read_part instead.
4836 * regcache.c (regcache_raw_read_part): Remove.
4837
4838 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4839
4840 * regcache.h (regcache_cooked_read): Remove, update callers to
4841 use readable_regcache::cooked_read instead.
4842 * regcache.c (regcache_cooked_read): Remove.
4843
4844 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4845
4846 * regcache.h (regcache_raw_write): Remove, update callers to use
4847 regcache::raw_write instead.
4848 * regcache.c (regcache_raw_write): Remove.
4849
4850 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4851
4852 * regcache.h (regcache_raw_read): Remove, update callers to use
4853 readable_regcache::raw_read instead.
4854 * regcache.c (regcache_raw_read): Remove.
4855
4856 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4857
4858 * regcache.h (regcache_raw_update): Remove, update callers to
4859 use readable_regcache::raw_update instead.
4860 * regcache.c (regcache_raw_update): Remove.
4861
4862 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4863
4864 * regcache.h (regcache_register_status): Remove, update callers
4865 to use reg_buffer::get_register_status directly instead.
4866 * regcache.c (regcache_register_status): Remove.
4867
4868 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4869
4870 * regcache.h (regcache_get_ptid): Remove, update all callers to
4871 call regcache::ptid instead.
4872 * regcache.c (regcache_get_ptid): Remove.
4873
4874 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4875
4876 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4877
4878 2018-05-30 Pedro Alves <palves@redhat.com>
4879
4880 * common/common-exceptions.h (exception_rethrow): Use
4881 ATTRIBUTE_NORETURN.
4882
4883 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4884
4885 * breakpoint.c (print_solib_event, check_status_catch_solib):
4886 Remove struct keyword in range-based for loops.
4887 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4888 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4889 Likewise.
4890 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4891 Likewise.
4892 * symfile.c (addr_info_make_relative): Likewise.
4893 * thread.c (value_in_thread_stack_temporaries): Likewise.
4894
4895 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4896
4897 PR gdb/16841
4898 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4899 aggregate type to get its real type before accessing it.
4900
4901 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4902
4903 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4904 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4905 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4906 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4907 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4908 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4909 * printcmd.c (info_address_command): Likewise.
4910
4911 2018-05-29 Tom Tromey <tom@tromey.com>
4912
4913 * windows-nat.c (handle_exception): Update fall-through comment.
4914
4915 2018-05-29 Tom Tromey <tom@tromey.com>
4916
4917 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4918 (struct program_space) <added_solibs>: Now a std::vector.
4919 * breakpoint.c (print_solib_event): Update.
4920 (check_status_catch_solib): Update.
4921 * progspace.c (clear_program_space_solib_cache): Update.
4922 * solib.c (update_solib_list): Update.
4923
4924 2018-05-29 Tom Tromey <tom@tromey.com>
4925
4926 * python/py-type.c (typy_richcompare): Update.
4927 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4928 * gdbtypes.h (types_deeply_equal): Return bool.
4929 (types_equal): Likewise.
4930 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4931 declare VEC.
4932 (check_types_equal): Change worklist to std::vector. Return
4933 bool.
4934 (struct type_equality_entry): Add constructor.
4935 (compare_maybe_null_strings): Return bool.
4936 (check_types_worklist): Return bool. Change worklist to
4937 std::vector.
4938 (types_deeply_equal): Use std::vector.
4939 (types_equal): Return bool.
4940 (compare_maybe_null_strings): Simplify.
4941
4942 2018-05-29 Tom Tromey <tom@tromey.com>
4943
4944 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4945
4946 2018-05-29 Tom Tromey <tom@tromey.com>
4947
4948 * objc-lang.h: Don't include cp-support.h.
4949 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4950 declare VEC.
4951
4952 2018-05-27 Tom Tromey <tom@tromey.com>
4953
4954 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4955
4956 2018-05-25 Tom Tromey <tom@tromey.com>
4957
4958 * value.c (value::location): Initialize.
4959
4960 2018-05-25 Tom Tromey <tom@tromey.com>
4961
4962 * dbxread.c (init_bincl_list): Remove.
4963 (bincl_list): Now a std::vector.
4964 (bincls_allocated, next_bincl): Remove.
4965 (free_bincl_list, do_free_bincl_list_cleanup)
4966 (make_cleanup_free_bincl_list): Remove.
4967 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4968 unique_xmalloc_ptr.
4969 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4970 (struct header_file_location): Add constructor.
4971 (add_bincl_to_list): Remove.
4972
4973 2018-05-25 Tom Tromey <tom@tromey.com>
4974
4975 * tui/tui.c (tui_enable): Update.
4976 * mi/mi-interp.c (mi_interp::init): Update.
4977 * interps.h (class interp) <name>: New method.
4978 <m_name>: Rename from name.
4979 (~scoped_restore_interp): Update.
4980 * interps.c (interp::interp): Update.
4981 (interp_add, interp_set, interp_lookup_existing)
4982 (current_interp_named_p): Update.
4983
4984 2018-05-25 Tom Tromey <tom@tromey.com>
4985
4986 * interps.c (interp_name): Remove.
4987 * mi/mi-interp.c (mi_interp::init): Update.
4988 * interps.h (interp_name): Remove.
4989 (~scoped_restore_interp): Update.
4990 * tui/tui.c (tui_enable): Update.
4991
4992 2018-05-25 Tom Tromey <tom@tromey.com>
4993
4994 * utils.c (fputs_maybe_filtered): Update.
4995 * linespec.c (decode_line_full): Update.
4996 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4997 (mi_print_breakpoint_for_event, mi_solib_loaded)
4998 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4999 (mi_user_selected_context_changed): Update.
5000 * mi/mi-main.c (mi_execute_command): Update.
5001 * cli/cli-script.c (execute_control_command): Update.
5002 * python/python.c (execute_gdb_command): Update.
5003 * solib.c (info_sharedlibrary_command): Update.
5004 * interps.c (interp_ui_out): Remove.
5005 * interps.h (interp_ui_out): Remove.
5006
5007 2018-05-25 Tom Tromey <tom@tromey.com>
5008
5009 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5010 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5011 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5012
5013 2018-05-25 Tom Tromey <tom@tromey.com>
5014
5015 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5016 * interps.c (interp_exec): Use scoped_restore.
5017
5018 2018-05-25 Tom Tromey <tom@tromey.com>
5019
5020 * remote.c (remote_target::remote_file_get): Use
5021 gdb::byte_vector.
5022 (remote_target::remote_file_put): Likewise.
5023
5024 2018-05-25 Tom Tromey <tom@tromey.com>
5025
5026 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5027 a std::string.
5028 (get_pe_section_index, add_pe_exported_sym): Update.
5029 (read_pe_exported_syms): Use gdb::def_vector.
5030
5031 2018-05-25 Tom Tromey <tom@tromey.com>
5032
5033 * frame.c (remove_prev_frame): Remove.
5034 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5035
5036 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5037
5038 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5039 Remove prototypes.
5040 * mips-linux-nat.c (supply_fpregset): Always call
5041 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5042 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5043 `mips_fill_fpregset'.
5044 * mips-linux-tdep.c (mips_supply_fpregset)
5045 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5046 (mips_fill_fpregset_wrapper): Remove functions.
5047 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5048 (mips_linux_fpregset): Remove variable.
5049 (mips_linux_iterate_over_regset_sections): Use
5050 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5051 (mips_linux_o32_sigframe_init): Remove comment.
5052
5053 2018-05-25 Pedro Alves <palves@redhat.com>
5054
5055 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5056 (struct readahead_cache, struct packet_reg, struct
5057 remote_arch_state, class remote_state): Move higher up in the
5058 file.
5059 (remote_target::m_remote_state): Now an object instead of a pointer.
5060 (remote_target::get_remote_state): Adjust.
5061
5062 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5063
5064 * stack.c (select_and_print_frame): Delete.
5065 (struct function_bounds): Move struct within function.
5066 (func_command): Most content moved into new function
5067 find_frame_for_function, use new function, print result, add
5068 function comment.
5069 (find_frame_for_function): New function, now returns a result.
5070
5071 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5072
5073 * stack.c (iterate_over_block_arg_vars): Fix comment.
5074 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5075
5076 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5077
5078 PR gdb/23203
5079 * frame.c
5080 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5081 Define.
5082 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5083 Define.
5084 * frame.h (class scoped_restore_selected_frame): New class.
5085 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5086 of any exception, use scoped_restore_selected_frame to restore the
5087 frame instead.
5088
5089 2018-05-24 Pedro Alves <palves@redhat.com>
5090
5091 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5092 override.
5093
5094 2018-05-23 Tom Tromey <tom@tromey.com>
5095
5096 * complaints.c (struct complaints): Remove.
5097 (symfile_complaint_book): Remove.
5098 (series): New global.
5099 (complaint_internal): Update.
5100 (clear_complaints): Update.
5101
5102 2018-05-23 Tom Tromey <tom@tromey.com>
5103
5104 * complaints.c (counters): New global.
5105 (struct complain): Remove.
5106 (struct complaints) <root>: Remove.
5107 (complaint_sentinel): Remove.
5108 (symfile_complaint_book): Update.
5109 (find_complaint) Remove.
5110 (complaint_internal, clear_complaints): Update.
5111
5112 2018-05-23 Tom Tromey <tom@tromey.com>
5113
5114 * complaints.c (struct complain) <file, line>: Remove.
5115 (find_complaint): Remove file, line parameters.
5116 (complaint_internal): Update.
5117
5118 2018-05-23 Tom Tromey <tom@tromey.com>
5119
5120 * complaints.c (vcomplaint): Remove.
5121 (complaint_internal) Merge in contents of vcomplaint.
5122
5123 2018-05-23 Tom Tromey <tom@tromey.com>
5124
5125 * complaints.c (struct complaints) <explanation>: Remove.
5126 (symfile_explanations): Remove.
5127 (symfile_complaint_book): Update.
5128 (vcomplaint): Update.
5129 (struct explanation): Remove.
5130
5131 2018-05-23 Tom Tromey <tom@tromey.com>
5132
5133 * complaints.c (symfile_complaints): Remove.
5134 (complaint_internal): Remove "complaints" parameter.
5135 (clear_complaints, vcomplaint): Remove "c" parameter.
5136 (get_complaints): Remove.
5137 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5138 (dwarf2_debug_line_missing_file_complaint)
5139 (dwarf2_debug_line_missing_end_sequence_complaint)
5140 (dwarf2_complex_location_expr_complaint)
5141 (dwarf2_const_value_length_mismatch_complaint)
5142 (dwarf2_section_buffer_overflow_complaint)
5143 (dwarf2_macro_malformed_definition_complaint)
5144 (dwarf2_invalid_attrib_class_complaint)
5145 (create_addrmap_from_index, dw2_symtab_iter_next)
5146 (dw2_expand_marked_cus)
5147 (dw2_debug_names_iterator::find_vec_in_debug_names)
5148 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5149 (create_debug_type_hash_table, init_cutu_and_read_dies)
5150 (partial_die_parent_scope, add_partial_enumeration)
5151 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5152 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5153 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5154 (create_cus_hash_table, create_dwp_hash_table)
5155 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5156 (dwarf2_rnglists_process, dwarf2_ranges_process)
5157 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5158 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5159 (handle_struct_member_die, process_structure_scope)
5160 (read_array_type, read_common_block, read_module_type)
5161 (read_tag_pointer_type, read_typedef, read_base_type)
5162 (read_subrange_type, load_partial_dies, partial_die_info::read)
5163 (partial_die_info::read, partial_die_info::read)
5164 (partial_die_info::read, read_checked_initial_length_and_offset)
5165 (dwarf2_string_attr, read_formatted_entries)
5166 (dwarf_decode_line_header)
5167 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5168 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5169 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5170 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5171 (get_signatured_type, get_DW_AT_signature_type)
5172 (decode_locdesc, file_file_name, consume_improper_spaces)
5173 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5174 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5175 (dwarf2_symbol_mark_computed, set_die_type)
5176 (read_attribute_value): Update.
5177 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5178 Update.
5179 * dbxread.c (unknown_symtype_complaint)
5180 (lbrac_mismatch_complaint, repeated_header_complaint)
5181 (set_namestring, function_outside_compilation_unit_complaint)
5182 (read_dbx_symtab, process_one_symbol): Update.
5183 * gdbtypes.c (stub_noname_complaint): Update.
5184 * windows-nat.c (handle_unload_dll): Update.
5185 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5186 (decode_base_type): Update.
5187 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5188 (eb_complaint, record_include_begin, record_include_end)
5189 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5190 (process_xcoff_symbol, read_symbol)
5191 (function_outside_compilation_unit_complaint)
5192 (scan_xcoff_symtab): Update.
5193 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5194 * buildsym.c (finish_block_internal, make_blockvector)
5195 (end_symtab_get_static_block, augment_type_symtab): Update.
5196 * dtrace-probe.c (dtrace_process_dof)
5197 (dtrace_static_probe_ops::get_probes): Update.
5198 * complaints.h (struct complaint): Don't declare.
5199 (symfile_complaints): Remove.
5200 (complaint_internal): Remove "complaints" parameter.
5201 (complaint): Likewise.
5202 (clear_complaints): Likewise.
5203 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5204 (reread_symbols): Update.
5205 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5206 (dwarf2_frame_cache, decode_frame_entry): Update.
5207 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5208 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5209 (info_selectors_command): Update.
5210 * macrotab.c (macro_include, check_for_redefinition)
5211 (macro_undef): Update.
5212 * objfiles.c (filter_overlapping_sections): Update.
5213 * stabsread.c (invalid_cpp_abbrev_complaint)
5214 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5215 (define_symbol, error_type, read_type, rs6000_builtin_type)
5216 (stabs_method_name_from_physname, read_member_functions)
5217 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5218 (attach_fields_to_type, complain_about_struct_wipeout)
5219 (read_range_type, read_args, common_block_start)
5220 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5221 Update.
5222 * mdebugread.c (index_complaint, unknown_ext_complaint)
5223 (basic_type_complaint, bad_tag_guess_complaint)
5224 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5225 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5226 (parse_procedure, parse_lines)
5227 (function_outside_compilation_unit_complaint)
5228 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5229 (bad_tag_guess_complaint, reg_value_complaint): Update.
5230 * cp-support.c (demangled_name_complaint): Update.
5231 * macroscope.c (sal_macro_scope): Update.
5232 * dwarf-index-write.c (class debug_names): Update.
5233
5234 2018-05-23 Tom Tromey <tom@tromey.com>
5235
5236 * complaints.c (clear_complaints): Remove "noisy" parameter.
5237 * complaints.h (clear_complaints): Update.
5238 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5239 (reread_symbols): Update.
5240
5241 2018-05-23 Tom Tromey <tom@tromey.com>
5242
5243 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5244 SUBSEQUENT_MESSAGE.
5245 (vcomplaint, clear_complaints): Update.
5246 (symfile_explanations): Remove some messages.
5247
5248 2018-05-23 Tom Tromey <tom@tromey.com>
5249
5250 * complaints.c (internal_complaint): Remove.
5251 * complaints.h (internal_complaint): Remove.
5252
5253 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5254
5255 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5256
5257 2018-05-22 Pedro Alves <palves@redhat.com>
5258
5259 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5260 (remote_fileio_badfd, remote_fileio_return_errno)
5261 (remote_fileio_return_success, remote_fileio_func_open)
5262 (remote_fileio_func_open, remote_fileio_func_close)
5263 (remote_fileio_func_read, remote_fileio_func_write)
5264 (remote_fileio_func_lseek, remote_fileio_func_rename)
5265 (remote_fileio_func_unlink, remote_fileio_func_stat)
5266 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5267 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5268 remote_target parameter.
5269 (remote_fio_func_map) <func>: Add remote_target parameter.
5270 (do_remote_fileio_request, remote_fileio_request):
5271 * remote-fileio.h (remote_fileio_request):
5272 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5273 remote_target parameter.
5274 (remote_notif_process, handle_notification): Adjust to pass down
5275 the remote.
5276 (remote_notif_state_allocate): Add remote_target parameter. Save
5277 it.
5278 * remote-notif.h (struct remote_target): Forward declare.
5279 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5280 remote_target parameter.
5281 (struct remote_notif_state) <remote>: New field.
5282 (remote_notif_ack, remote_notif_parse): Add remote_target
5283 parameter.
5284 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5285 remote_target parameter.
5286 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5287 (threads_listing_context, rmt_thread_action, protocol_feature)
5288 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5289 (packet_result, struct threads_listing_context, remote_state):
5290 Move definitions and declarations higher up.
5291 (remote_target) <~remote_target>: Declare.
5292 (remote_download_command_source, remote_file_put, remote_file_get)
5293 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5294 (remote_hostio_pread_vFile, remote_hostio_send_command)
5295 (remote_hostio_set_filesystem, remote_hostio_open)
5296 (remote_hostio_close, remote_hostio_unlink, remote_state)
5297 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5298 (get_memory_write_packet_size, get_memory_read_packet_size)
5299 (append_pending_thread_resumptions, remote_detach_1)
5300 (append_resumption, remote_resume_with_vcont)
5301 (add_current_inferior_and_thread, wait_ns, wait_as)
5302 (process_stop_reply, remote_notice_new_inferior)
5303 (process_initial_stop_replies, remote_add_thread)
5304 (btrace_sync_conf, remote_btrace_maybe_reopen)
5305 (remove_new_fork_children, kill_new_fork_children)
5306 (discard_pending_stop_replies, stop_reply_queue_length)
5307 (check_pending_events_prevent_wildcard_vcont)
5308 (discard_pending_stop_replies_in_queue, stop_reply)
5309 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5310 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5311 (remote_interrupt_as, remote_interrupt_ns)
5312 (remote_get_noisy_reply, remote_query_attached)
5313 (remote_add_inferior, remote_current_thread, get_current_thread)
5314 (set_thread, set_general_thread, set_continue_thread)
5315 (set_general_process, write_ptid)
5316 (remote_unpack_thread_info_response, remote_get_threadinfo)
5317 (parse_threadlist_response, remote_get_threadlist)
5318 (remote_threadlist_iterator, remote_get_threads_with_ql)
5319 (remote_get_threads_with_qxfer)
5320 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5321 (get_offsets, remote_check_symbols, remote_supported_packet)
5322 (remote_query_supported, remote_packet_size)
5323 (remote_serial_quit_handler, remote_detach_pid)
5324 (remote_vcont_probe, remote_resume_with_hc)
5325 (send_interrupt_sequence, interrupt_query)
5326 (remote_notif_get_pending_events, fetch_register_using_p)
5327 (send_g_packet, process_g_packet, fetch_registers_using_g)
5328 (store_register_using_P, store_registers_using_G)
5329 (set_remote_traceframe, check_binary_download)
5330 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5331 (remote_xfer_live_readonly_partial, remote_read_bytes)
5332 (remote_send_printf, remote_flash_write, readchar)
5333 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5334 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5335 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5336 (extended_remote_disable_randomization, extended_remote_run)
5337 (send_environment_packet, extended_remote_environment_support)
5338 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5339 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5340 (packet_command): Now methods of ...
5341 (remote_target): ... this class.
5342 (m_remote_state) <remote_target>: New field.
5343 (struct remote_state) <stop_reply_queue,
5344 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5345 fields.
5346 (remote_state::remote_state): Allocate stop_reply_queue.
5347 (remote_state): Delete global.
5348 (get_remote_state_raw): Delete.
5349 (remote_target::get_remote_state): Allocate m_remote_state on
5350 demand.
5351 (get_current_remote_target): New.
5352 (remote_ops, extended_remote_ops): Delete.
5353 (wait_forever_enabled_p, remote_async_inferior_event_token):
5354 Delete, moved to struct remote_state.
5355 (remote_target::close): Delete self. Destruction bits split to
5356 ...
5357 (remote_target::~remote_target): ... this.
5358 (show_memory_packet_size): Adjust to use
5359 get_current_remote_target.
5360 (struct protocol_feature) <func>: Add remote_target parameter.
5361 All callers adjusted.
5362 (curr_quit_handler_target): New.
5363 (remote_serial_quit_handler): Reimplement.
5364 (remote_target::open_1): Adjust to use get_current_remote_target.
5365 Heap-allocate remote_target/extended_remote_target instances.
5366 (vcont_builder::vcont_builder): Add remote_target parameter, and
5367 save it in m_remote. All callers adjusted.
5368 (vcont_builder::m_remote): New field.
5369 (vcont_builder::restart, vcont_builder::flush)
5370 (vcont_builder::push_action): Use it.
5371 (remote_target::commit_resume): Use it.
5372 (struct queue_iter_param) <remote>: New field.
5373 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5374 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5375 (check_pending_event_prevents_wildcard_vcont_callback)
5376 (remote_target::check_pending_events_prevent_wildcard_vcont)
5377 (remote_target::discard_pending_stop_replies)
5378 (remote_target::discard_pending_stop_replies_in_queue)
5379 (remote_target::remote_notif_remove_queued_reply): Fill in
5380 'remote' field.
5381 (remote_notif_get_pending_events): New.
5382 (remote_target::readchar, remote_target::remote_serial_write):
5383 Save/restore curr_quit_handler_target.
5384 (putpkt): New.
5385 (kill_new_fork_children): Fill in 'remote' field.
5386 (packet_command): Use get_current_remote_target, defer to
5387 remote_target method of same name.
5388 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5389 parameter, and save it in m_remote. All callers adjusted.
5390 (scoped_remote_fd::release): Use m_remote.
5391 (scoped_remote_fd::m_remote): New field.
5392 (remote_file_put, remote_file_get, remote_file_delete): Use
5393 get_current_remote_target, defer to remote_target method of same
5394 name.
5395 (remote_btrace_reset): Add remote_state paremeter. Update all
5396 callers.
5397 (remote_async_inferior_event_handler). Pass down 'data'.
5398 (remote_new_objfile): Use get_current_remote_target.
5399 (remote_target::vcont_r_supported): New.
5400 (set_range_stepping): Use get_current_remote_target and
5401 remote_target::vcont_r_supported.
5402 (_initialize_remote): Don't allocate 'remote_state' and
5403 'stop_reply_queue' globals.
5404 * remote.h (struct remote_target): Forward declare.
5405 (getpkt, putpkt, remote_notif_get_pending_events): Add
5406 'remote_target' parameter.
5407
5408 2018-05-22 Pedro Alves <palves@redhat.com>
5409
5410 * remote.c (vcont_builder): Now a class. Make all data members
5411 private.
5412 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5413 Declare methods.
5414 (vcont_builder_restart): Rename to ...
5415 (vcont_builder::restart): ... this.
5416 (vcont_builder_flush): Rename to ...
5417 (vcont_builder::flush): ... this.
5418 (vcont_builder_push_action): Rename to ...
5419 (vcont_builder::push_action): ... this.
5420 (remote_target::commit_resume): Adjust.
5421
5422 2018-05-22 Pedro Alves <palves@redhat.com>
5423
5424 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5425 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5426 (get_fixed_memory_packet_size): New.
5427 (get_memory_packet_size): Use it.
5428 (set_memory_packet_size): Don't override the config size with
5429 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5430 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5431 Don't refer to get_memory_packet_size if not connected to a remote
5432 target. Show "(default)" if configured size is 0.
5433
5434 2018-05-22 Pedro Alves <palves@redhat.com>
5435
5436 * remote.c (remote_target::mourn_inferior): Move
5437 discard_pending_stop_replies call here from ...
5438 (_initialize_remote): ... here.
5439
5440 2018-05-22 Pedro Alves <palves@redhat.com>
5441
5442 * remote.c (compare_section_command): Remove set_general_process
5443 call.
5444
5445 2018-05-22 Pedro Alves <palves@redhat.com>
5446
5447 * remote.c (struct packet_reg, struct remote_arch_state):
5448 Move higher up in the file.
5449 (remote_state) <m_arch_states>: Store remote_arch_state values
5450 instead of remote_arch_state pointers.
5451 (remote_state::get_remote_arch_state): Adjust.
5452
5453 2018-05-22 Pedro Alves <palves@redhat.com>
5454
5455 * remote.c: Include <unordered_map>.
5456 (remote_state): Now a class.
5457 (remote_state) <get_remote_arch_state>: Declare method.
5458 <get_remote_arch_state>: New field.
5459 (remote_arch_state) <remote_arch_state>: Declare ctor.
5460 <regs>: Now a unique_ptr.
5461 (remote_gdbarch_data_handle): Delete.
5462 (get_remote_arch_state): Delete.
5463 (remote_state::get_remote_arch_state): New.
5464 (get_remote_state): Adjust to call remote_state's
5465 get_remote_arch_state method.
5466 (init_remote_state): Delete, bits factored out to ...
5467 (remote_arch_state::remote_arch_state): ... this new method.
5468 (get_remote_packet_size, get_memory_packet_size)
5469 (process_g_packet, remote_target::fetch_registers)
5470 (remote_target::prepare_to_store, store_registers_using_G)
5471 (remote_target::store_registers, remote_target::get_trace_status):
5472 Adjust to call remote_state's method.
5473 (_initialize_remote): Remove reference to
5474 remote_gdbarch_data_handle.
5475
5476 2018-05-22 Pedro Alves <palves@redhat.com>
5477
5478 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5479 pread>: New method declarations.
5480 (remote_target::open_1): Adjust.
5481 (readahead_cache_invalidate): Rename to ...
5482 (readahead_cache::invalidate): ... this, and adjust to be a class
5483 method.
5484 (readahead_cache_invalidate_fd): Rename to ...
5485 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5486 class method.
5487 (remote_hostio_pwrite): Adjust.
5488 (remote_hostio_pread_from_cache): Rename to ...
5489 (readahead_cache::pread): ... this, and adjust to be a class
5490 method.
5491 (remote_hostio_close): Adjust.
5492
5493 2018-05-22 Pedro Alves <palves@redhat.com>
5494
5495 * remote.c (remote_hostio_close_cleanup): Delete.
5496 (class scoped_remote_fd): New.
5497 (remote_file_put, remote_file_get): Use it.
5498
5499 2018-05-22 Pedro Alves <palves@redhat.com>
5500
5501 (struct vCont_action_support): Use bool and initialize all fields.
5502 (struct readahead_cache): Initialize all fields.
5503 (remote_state): Use bool and initialize all fields.
5504 (remote_state::remote_state, remote_state::~remote_state): New.
5505 (new_remote_state): Delete.
5506 (_initialize_remote): Use new to allocate remote_state.
5507
5508 2018-05-22 Pedro Alves <palves@redhat.com>
5509 張俊芝 <zjz@zjz.name>
5510
5511 PR gdb/22973
5512 * c-exp.y: Include "c-support.h".
5513 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5514 of tolower. Use c_ident_is_alpha to scan names.
5515 * c-lang.c: Include "c-support.h".
5516 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5517 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5518 * c-support.h: New file, with bits factored out from ...
5519 * cp-name-parser.y: ... this file.
5520 Include "c-support.h".
5521 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5522 c-support.h and renamed.
5523 (symbol_end, yylex): Adjust.
5524
5525 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5526
5527 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5528 parameter type to CORE_ADDR.
5529 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5530 parameter type in declaration to CORE_ADDR.
5531 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5532 target_auxv_search to get AT_HWCAP and use the result to get the
5533 target description.
5534 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5535 to CORE_ADDR. Remove the cast of the return value to unsigned
5536 long. Fix error predicate of target_auxv_search.
5537 (ppc_linux_nat_target::read_description): Change the type of the
5538 hwcap variable to CORE_ADDR.
5539
5540 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5541
5542 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5543 if the size of fpscr is larger than 32 bits.
5544
5545 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5546
5547 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5548 (ppc32_linux_vsxregmap): New global.
5549 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5550 regcache_supply_regset, and regcache_collect_regset.
5551 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5552 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5553 (fetch_vsx_register, store_vsx_register): Remove.
5554 (fetch_vsx_registers): Add regno parameter. Get regset using
5555 ppc_linux_vsxregset. Use regset to supply registers.
5556 (store_vsx_registers): Add regno parameter. Get regset using
5557 ppc_linux_vsxregset. Use regset to collect registers.
5558 (fetch_register): Call fetch_vsx_registers instead of
5559 fetch_vsx_register.
5560 (store_register): Call store_vsx_registers instead of
5561 store_vsx_register.
5562 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5563 new regno parameter.
5564 (store_ppc_registers): Call store_vsx_registers with -1 for the
5565 new regno parameter.
5566 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5567 (ppc_collect_vsxregset): Remove.
5568
5569 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5570
5571 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5572 offset fields.
5573 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5574 for vector register offset fields.
5575 (ppc64_fbsd_reg_offsets): Likewise.
5576 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5577 to vector register offset fields.
5578 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5579 to vector register offset fields.
5580 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5581 vector register offset fields.
5582 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5583 initializers for vector register offset fields.
5584 (rs6000_aix64_reg_offsets): Likewise.
5585 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5586 (ppc_supply_vrregset): Remove.
5587 (ppc_collect_vrregset): Remove.
5588 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5589 (ppc_linux_vrregset) : New function.
5590 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5591 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5592 (ppc32_linux_vrregset): Remove.
5593 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5594 and use result instead of ppc32_linux_vrregset.
5595 (ppc32_linux_reg_offsets): Remove initializers for vector register
5596 offset fields.
5597 (ppc64_linux_reg_offsets): Likewise.
5598 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5599 * ppc-linux-nat.c: Include regset.h.
5600 (gdb_vrregset_t): Adjust comment to account for little-endian
5601 mode.
5602 (supply_vrregset, fill_vrregset): Remove.
5603 (fetch_altivec_register, store_altivec_register): Remove.
5604 (fetch_altivec_registers): Add regno parameter. Get regset using
5605 ppc_linux_vrregset. Use regset to supply registers.
5606 (store_altivec_registers): Add regno parameter. Get regset using
5607 ppc_linux_vrregset. Use regset to collect registers.
5608 (fetch_register): Call fetch_altivec_registers instead of
5609 fetch_altivec_register.
5610 (store_register): Call store_altivec_registers instead of
5611 store_altivec_register.
5612 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5613 the new regno parameter.
5614 (store_ppc_registers): Call store_altivec_registers with -1 for
5615 the new regno parameter.
5616
5617 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5618
5619 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5620 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5621 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5622 (gdb_vrregset_t): Change array type size to
5623 PPC_LINUX_SIZEOF_VRREGSET.
5624 (gdb_vsxregset_t): Change array type size to
5625 PPC_LINUX_SIZEOF_VSXREGSET.
5626 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5627 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5628 PPC_LINUX_SIZEOF_VSXREGSET.
5629
5630 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5631
5632 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5633 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5634 nat/ppc-linux.c.
5635 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5636 ppc_linux_target_wordsize with tid.
5637 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5638 wordsize with tid.
5639 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5640 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5641 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5642 tid parameter. Remove static specifier.
5643 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5644 (ppc_linux_target_wordsize): New declaration.
5645
5646 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5647
5648 * arch/ppc-linux-common.c: New file.
5649 * arch/ppc-linux-common.h: New file.
5650 * arch/ppc-linux-tdesc.h: New file.
5651 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5652 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5653 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5654 arch/ppc-linux-tdesc.h.
5655 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5656 arch/ppc-linux-tdesc.h.
5657 (ppc_linux_nat_target::read_description): Remove target
5658 description matching code. Fill a ppc_linux_features struct and
5659 call ppc_linux_match_description with it. Move comment about ISA
5660 2.05 to ppc-linux-common.c.
5661 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5662 arch/ppc-linux-tdesc.h.
5663 (ppc_linux_core_read_description): Remove target description
5664 matching code. Fill a ppc_linux_features struct and call
5665 ppc_linux_match_description with it.
5666 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5667 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5668 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5669 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5670 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5671 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5672 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5673 (tdesc_powerpc_e500l): Remove.
5674
5675 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5676
5677 * ada-lang.c (catch_assert_command): Pass empty string instead
5678 of NULL for excep_string argument.
5679
5680 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5681
5682 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5683 the width of the requested register exceeds the width of the
5684 `ptrace' data type.
5685
5686 2018-05-21 Tom Tromey <tom@tromey.com>
5687
5688 * printcmd.c (output_command): Remove.
5689 (output_command_const): Rename to output_command.
5690 * valprint.h (output_command): Rename from output_command_const.
5691 * tracepoint.c (trace_dump_actions): Call output_command.
5692
5693 2018-05-21 Tom Tromey <tom@tromey.com>
5694
5695 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5696 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5697 * ada-lang.h (create_ada_exception_catchpoint): Update.
5698 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5699 std::string.
5700 (create_excep_cond_exprs, ~ada_catchpoint)
5701 (should_stop_exception, print_one_exception)
5702 (print_mention_exception, print_recreate_exception): Update.
5703 (ada_get_next_arg): Remove.
5704 (catch_ada_exception_command_split): Use std::string. Change type
5705 of "excep_string", "cond_string".
5706 (catch_ada_exception_command): Update.
5707 (create_ada_exception_catchpoint): Change type of excep_string.
5708 (ada_exception_sal): Remove excep_string parameter.
5709 (~ada_catchpoint): Remove.
5710
5711 2018-05-21 Tom Tromey <tom@tromey.com>
5712
5713 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5714 cleanup.
5715
5716 2018-05-21 Tom Tromey <tom@tromey.com>
5717
5718 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5719 Return unique_xmalloc_ptr.
5720 (print_it_exception): Update.
5721
5722 2018-05-21 Tom Tromey <tom@tromey.com>
5723
5724 * tracepoint.c (trace_dump_actions): Use std::string.
5725
5726 2018-05-21 Tom Tromey <tom@tromey.com>
5727
5728 * symfile.c (reread_symbols): Use std::string for original_name.
5729
5730 2018-05-21 Tom Tromey <tom@tromey.com>
5731
5732 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5733 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5734 constructor.
5735
5736 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5737
5738 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5739 instance to...
5740 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5741 * objfiles.c (get_objfile_bfd_data): Allocate
5742 objfile_per_bfd_storage with obstack_new when allocating on
5743 obstack.
5744
5745 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5746
5747 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5748 OBSTACK_ZALLOC.
5749 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5750 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5751 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5752 (add_pending): Likewise.
5753 (parse_symbol): Likewise.
5754 (parse_partial_symbols): Likewise.
5755 (psymtab_to_symtab_1): Likewise.
5756 (new_psymtab): Likewise.
5757 (elfmdebug_build_psymtabs): Likewise.
5758 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5759 * objfiles.c (get_objfile_bfd_data): Likewise.
5760 (objfile_register_static_link): Likewise.
5761 * psymtab.c (allocate_psymtab): Likewise.
5762 * stabsread.c (read_member_functions): Likewise.
5763 * xcoffread.c (xcoff_end_psymtab): Likewise.
5764
5765 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5766
5767 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5768 compiler supports std::is_trivially_constructible.
5769 * common/poison.h: Include obstack.h.
5770 (IsMallocable): Define to is_trivially_constructible if the
5771 compiler supports it, define to true_type otherwise.
5772 (xobnew): New.
5773 (XOBNEW): Redefine.
5774 (xobnewvec): New.
5775 (XOBNEWVEC): Redefine.
5776 * gdb_obstack.h (obstack_zalloc): New.
5777 (OBSTACK_ZALLOC): Redefine.
5778 (obstack_calloc): New.
5779 (OBSTACK_CALLOC): Redefine.
5780 (obstack_new): New.
5781 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5782 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5783 gdbarch.c.
5784 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5785 obstack_calloc/obstack_zalloc.
5786 (gdbarch_obstack_zalloc): Remove.
5787 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5788
5789 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5790
5791 * stack.c (backtrace_command_1): Remove useless variable int i.
5792
5793 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5794
5795 * stack.c (print_frame_info): Fix comment.
5796
5797 2018-05-18 Tom Tromey <tom@tromey.com>
5798
5799 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5800 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5801 (~dwarf2_per_objfile): Update
5802 (dwarf2_get_dwz_file): Use new.
5803 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5804 unique_ptr.
5805
5806 2018-05-18 Tom Tromey <tom@tromey.com>
5807
5808 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5809 unique_ptr.
5810 * dwarf2read.c (struct dwp_file): Add constructor and
5811 initializers.
5812 (open_and_init_dwp_file): Return a unique_ptr.
5813 (dwarf2_per_objfile, create_dwp_hash_table)
5814 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5815 (lookup_dwo_unit_in_dwp): Update.
5816 (open_and_init_dwp_file, get_dwp_file): Update.
5817
5818 2018-05-18 Tom Tromey <tom@tromey.com>
5819
5820 * dwarf2read.c (dwarf2_per_objfile): Update.
5821 (struct mapped_index): Add initializers.
5822 (dwarf2_read_index): Use new.
5823 (dw2_symtab_iter_init): Update.
5824 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5825 unique_ptr.
5826
5827 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5828
5829 * dwarf2read.c (mapped_index) <total_size>: Remove.
5830
5831 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5832
5833 * unittests/format_pieces-selftests.c (test_format_specifier):
5834 Add ARI comments.
5835
5836 2018-05-18 Tom Tromey <tom@tromey.com>
5837
5838 * c-typeprint.c (maybe_print_hole): New function.
5839 (c_print_type_struct_field_offset): Update.
5840 (c_type_print_base_struct_union): Call maybe_print_hole.
5841
5842 2018-05-17 Keith Seitz <keiths@redhat.com>
5843
5844 * breakpoint.c (build_bpstat_chain): New function, moved from
5845 bpstat_stop_status.
5846 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5847 If no stop chain is passed, call build_bpstat_chain to build it.
5848 * breakpoint.h (build_bpstat_chain): Declare.
5849 (bpstat_stop_status): Move documentation here from breakpoint.c.
5850 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5851 build the stop chain and pass it to skip_inline_frames.
5852 Pass this stop chain to bpstat_stop_status.
5853 * inline-frame.c: Include breakpoint.h.
5854 (stopped_by_user_bp_inline_frame): New function.
5855 (skip_inline_frames): Add parameter `stop_chain'.
5856 Move documention to inline-frame.h.
5857 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5858 whether the frame should be elided.
5859 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5860 Add moved documentation and update for new parameter.
5861
5862 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5863
5864 PR cli/14975
5865 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5866 unittests/format_pieces-selftests.c.
5867 * common/format.h (format_piece) <operator==>: New.
5868 (format_pieces) <operator[]>: Remove.
5869 * common/format.c (format_pieces::format_pieces): Handle \e.
5870 * unittests/format_pieces-selftests.c: New.
5871
5872 2018-05-17 Tom Tromey <tom@tromey.com>
5873
5874 PR symtab/23010:
5875 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5876 (dw2_instantiate_symtab): Add skip_partial parameter.
5877 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5878 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5879 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5880 (dw2_expand_symtabs_matching_one)
5881 (dw2_find_pc_sect_compunit_symtab)
5882 (dw2_debug_names_lookup_symbol)
5883 (dw2_debug_names_expand_symtabs_for_function): Update.
5884 (init_cutu_and_read_dies): Add skip_partial parameter.
5885 (process_psymtab_comp_unit, build_type_psymtabs_1)
5886 (process_skeletonless_type_unit, load_partial_comp_unit)
5887 (psymtab_to_symtab_1): Update.
5888 (load_full_comp_unit): Add skip_partial parameter.
5889 (process_imported_unit_die, dwarf2_read_addr_index)
5890 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5891 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5892 (read_signatured_type): Update.
5893
5894 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5895
5896 * value.c (release_value): Remove unused variable.
5897 (record_latest_value): Likewise.
5898 (access_value_history): Likewise.
5899 (preserve_values): Likewise.
5900
5901 2018-05-17 Tom Tromey <tom@tromey.com>
5902
5903 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5904 Initialize.
5905
5906 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5907
5908 PR gdb/22286
5909 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5910 Also handle registers whose width is not a multiple of
5911 PTRACE_TYPE_RET.
5912 (linux_nat_trad_target::store_register): Likewise.
5913
5914 2018-05-16 Tom Tromey <tom@tromey.com>
5915
5916 * gdbcore.h (core_bfd): Redefine.
5917 * corelow.c (core_target::close): Update.
5918 (core_target_open): Update.
5919 * progspace.h (struct program_space) <cbfd>: Now a
5920 gdb_bfd_ref_ptr.
5921
5922 2018-05-16 Tom Tromey <tom@tromey.com>
5923
5924 PR cli/19551:
5925 * symfile-add-flags.h (enum symfile_add_flags)
5926 <SYMFILE_NOT_FILENAME>: New constant.
5927 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5928 objfile name from BFD.
5929 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5930 * minidebug.c (find_separate_debug_file_in_section): Put
5931 ".gnu_debugdata" into BFD's file name.
5932
5933 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5934
5935 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5936 Remove.
5937
5938 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5939
5940 PR binutils/21446
5941 * aarch64-tdep.c (aarch64_analyze_prologue,
5942 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5943 Indicate not interested in errors.
5944
5945 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5946
5947 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5948 Supply the MIPS_ZERO_REGNUM register.
5949
5950 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5951
5952 * mips-tdep.c (mask_address_var): Make variable static.
5953
5954 2018-05-14 Tom Tromey <tom@tromey.com>
5955
5956 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5957
5958 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5959
5960 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5961 FXSAVE_ADDR for the mxcsr register.
5962
5963 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5964
5965 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5966
5967 2018-05-11 Pedro Alves <palves@redhat.com>
5968
5969 * corelow.c (core_target) <core_target>: No longer inline.
5970 Initialize m_core_gdbarch, m_core_vec and build the section table
5971 here.
5972 <~core_target>: New.
5973 <core_gdbarch, get_core_register_section>: New methods.
5974 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5975 factored out from ...
5976 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5977 (core_ops): Delete.
5978 (sniff_core_bfd): Add gdbarch parameter.
5979 (core_close): Delete, merged into ...
5980 (core_target::close): ... here. Delete self.
5981 (core_close_cleanup): Delete.
5982 (core_target_open): Allocate a core_target on the heap. Use a
5983 unique_ptr instead of a cleanup. Bits moved into the core_target
5984 ctor. Adjust to use core_target methods instead of globals.
5985 (get_core_register_section): Rename to ...
5986 (core_target::get_core_register_section): ... this and adjust.
5987 (struct get_core_registers_cb_data): New.
5988 (get_core_registers_cb): Use it. Use bool.
5989 (core_target::fetch_registers, core_target::files_info)
5990 (core_target::xfer_partial, core_target::read_description)
5991 (core_target::pid_to, core_target::thread_name): Adjust to
5992 reference class fields instead of globals.
5993 * target.h (struct target_ops_deleter, target_ops_up): New.
5994
5995 2018-05-11 Pedro Alves <palves@redhat.com>
5996
5997 * corefile.c (core_file_command): Move to corelow.c.
5998 * corelow.c (the_core_target): Delete.
5999 (core_file_command): Moved from corefile.c. Check exec_bfd
6000 instead of the_core_target. Use target_detach instead of calling
6001 into the_core_target directly.
6002 (maybe_say_no_core_file_now): New.
6003 (core_target::detach): Use it.
6004 (_initialize_corelow): Remove references to the_core_target.
6005 * gdbcore.h (the_core_target): Delete.
6006
6007 2018-05-11 Tom Tromey <tromey@redhat.com>
6008 Pedro Alves <palves@redhat.com>
6009
6010 * corefile.c (core_bfd): Remove.
6011 * gdbcore.h (core_bfd): Now a macro.
6012 * progspace.h (struct program_space) <cbfd>: New field.
6013
6014 2018-05-11 Tom Tromey <tom@tromey.com>
6015
6016 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6017 gdb::def_vector.
6018
6019 2018-05-10 Tom Tromey <tom@tromey.com>
6020
6021 * configure: Rebuild.
6022 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6023
6024 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6025
6026 PR server/23158:
6027 * regformats/regdat.sh: Adjust script, following the addition
6028 of the new expedite_regs parameter to init_target_desc.
6029
6030 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6031
6032 PR gdb/23127
6033 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6034 set_gdbarch_significant_addr_bit.
6035 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6036 set_gdbarch_significant_addr_bit.
6037 * utils.c (address_significant): Update to sign extend addr.
6038
6039 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6040
6041 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6042 (xtensa_linux_init_abi): Limit tdep->num_regs by
6043 tdep->num_nopriv_regs.
6044 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6045 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6046 not initialized.
6047
6048 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6049
6050 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6051
6052 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6053
6054 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6055 (I387_MXCSR_INIT_VAL): New constant.
6056 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6057 buffer if it was supplied by the inferior.
6058 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6059 (i387_xsave_get_clear_bv): New function.
6060 (i387_supply_xsave): Only read x87 control registers from the
6061 xsave buffer if the feature is enabled, and the state will have
6062 been written, otherwise, provide a suitable default.
6063 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6064 including x87 control registers. Update control registers if they
6065 have changed from the default value, and mark features as enabled
6066 as required.
6067 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6068
6069 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6070
6071 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6072
6073 2018-05-07 Tom Tromey <tom@tromey.com>
6074
6075 * configure: Rebuild.
6076 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6077
6078 2018-05-07 Tom Tromey <tom@tromey.com>
6079
6080 PR tdep/20362:
6081 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6082 bit. Use correct value for VDIV.
6083
6084 2018-05-04 Tom Tromey <tom@tromey.com>
6085
6086 * configure: Rebuild.
6087 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6088
6089 2018-05-04 Tom Tromey <tom@tromey.com>
6090
6091 * linux-record.c (record_linux_system_call) <case
6092 RECORD_SYS_RECVFROM>: Add "break".
6093
6094 2018-05-04 Tom Tromey <tom@tromey.com>
6095
6096 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6097 Add missing "break".
6098 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6099 Add missing "break".
6100
6101 2018-05-04 Tom Tromey <tom@tromey.com>
6102
6103 * rs6000-tdep.c (ppc_process_record_op4)
6104 (ppc_process_record_op63): Add fall-through comment.
6105
6106 2018-05-04 Tom Tromey <tom@tromey.com>
6107
6108 * i386-tdep.c (i386_process_record): Add fall-through comment.
6109
6110 2018-05-04 Tom Tromey <tom@tromey.com>
6111
6112 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6113 comment.
6114
6115 2018-05-04 Tom Tromey <tom@tromey.com>
6116
6117 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6118 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6119 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6120 comment.
6121 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6122 comment.
6123 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6124 comment.
6125
6126 2018-05-04 Tom Tromey <tom@tromey.com>
6127
6128 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6129
6130 2018-05-04 Tom Tromey <tom@tromey.com>
6131
6132 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6133 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6134 * symfile.c (section_is_mapped): Fix fall-through comment.
6135 * stabsread.c (define_symbol, read_member_functions): Fix
6136 fall-through comment.
6137 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6138 comment.
6139 * remote.c (remote_wait_as): Fix fall-through comment.
6140 * p-exp.y (yylex): Fix fall-through comment.
6141 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6142 comment.
6143 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6144 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6145 * jv-exp.y (yylex): Fix fall-through comment.
6146 * go-exp.y (lex_one_token): Fix fall-through comment.
6147 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6148 fall-through comment.
6149 * f-exp.y (yylex): Fix fall-through comment.
6150 * dwarf2read.c (process_die): Fix fall-through comments.
6151 * dbxread.c (process_one_symbol): Fix fall-through comment.
6152 * d-exp.y (lex_one_token): Fix fall-through comment.
6153 * cp-name-parser.y (yylex): Fix fall-through comment.
6154 * coffread.c (coff_symtab_read): Fix fall-through comment.
6155 * c-exp.y (lex_one_token): Fix fall-through comment.
6156 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6157 comment.
6158 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6159 comment.
6160
6161 2018-05-04 Tom Tromey <tom@tromey.com>
6162
6163 PR python/22730:
6164 * NEWS: Mention gdb.execute change.
6165 * gdbcmd.h (execute_control_command): Don't declare.
6166 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6167 execute_control_commands, execute_control_commands_to_string.
6168 * cli/cli-script.h (execute_control_commands)
6169 (execute_control_commands_to_string): Declare.
6170 (execute_control_command): Add from_tty parameter.
6171 * cli/cli-script.c (execute_control_commands)
6172 (execute_control_commands_to_string): New functions.
6173 (execute_user_command): Use execute_control_commands.
6174 (execute_control_command_1): Add "from_tty" parameter. Update.
6175 (execute_control_command): Likewise.
6176
6177 2018-05-04 Tom Tromey <tom@tromey.com>
6178
6179 PR python/22731:
6180 * NEWS: Mention that breakpoint commands are writable.
6181 * python/py-breakpoint.c (bppy_set_commands): New function.
6182 (breakpoint_object_getset) <"commands">: Use it.
6183
6184 2018-05-04 Tom Tromey <tom@tromey.com>
6185
6186 * tracepoint.c (actions_command): Update.
6187 * mi/mi-cmd-break.c (mi_command_line_array)
6188 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6189 (mi_read_next_line): Remove.
6190 (mi_cmd_break_commands): Update.
6191 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6192 function_view.
6193 * cli/cli-script.c (get_command_line): Update.
6194 (process_next_line): Use function_view. Constify.
6195 (recurse_read_control_structure, read_command_lines)
6196 (read_command_lines_1): Change argument types to function_view.
6197 (do_define_command, document_command): Update.
6198 * breakpoint.h (check_tracepoint_command): Don't declare.
6199 * breakpoint.c (check_tracepoint_command): Remove.
6200 (commands_command_1, create_tracepoint_from_upload): Update.
6201
6202 2018-05-04 Tom Tromey <tom@tromey.com>
6203
6204 PR gdb/11750:
6205 * cli/cli-script.h (enum command_control_type) <define_control>:
6206 New constant.
6207 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6208 (build_command_line, execute_control_command_1)
6209 (process_next_line): Likewise.
6210 (do_define_command): New function, extracted from define_command.
6211 (define_command): Use it.
6212
6213 2018-05-04 Tom Tromey <tom@tromey.com>
6214
6215 * tracepoint.c (actions_command): Update.
6216 * cli/cli-script.h (read_command_lines): Update.
6217 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6218 (MAX_TMPBUF): Remove define.
6219 (define_command): Use string_printf.
6220 (document_command): Likewise.
6221 * breakpoint.c (commands_command_1): Update.
6222
6223 2018-05-04 Tom Tromey <tom@tromey.com>
6224
6225 * top.c (execute_command): Update.
6226 * cli/cli-script.h (print_command_lines): Now varargs.
6227 * cli/cli-script.c (print_command_lines): Now varargs.
6228 (execute_control_command_1) <case while_control, case if_control>:
6229 Update.
6230
6231 2018-05-04 Tom Tromey <tom@tromey.com>
6232
6233 * tracepoint.c (all_tracepoint_actions): Rename from
6234 all_tracepoint_actions_and_cleanup. Change return type.
6235 (actions_command, encode_actions_1, encode_actions)
6236 (trace_dump_actions, tdump_command): Update.
6237 * remote.c (remote_download_command_source): Update.
6238 * python/python.c (gdbpy_eval_from_control_command)
6239 (python_command, python_interactive_command): Update.
6240 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6241 * guile/guile.c (guile_command)
6242 (gdbscm_eval_from_control_command, guile_command): Update.
6243 * compile/compile.c (compile_code_command)
6244 (compile_print_command, compile_to_object): Update.
6245 * cli/cli-script.h (struct command_lines_deleter): New.
6246 (counted_command_line): New typedef.
6247 (struct command_line): Add constructor, destructor.
6248 <body_list>: Remove.
6249 <body_list_0, body_list_1>: New members.
6250 (command_line_up): Remove typedef.
6251 (read_command_lines, read_command_lines_1, get_command_line):
6252 Update.
6253 (copy_command_lines): Don't declare.
6254 * cli/cli-script.c (build_command_line): Use "new".
6255 (get_command_line): Return counted_command_line.
6256 (print_command_lines, execute_user_command)
6257 (execute_control_command_1, while_command, if_command): Update.
6258 (realloc_body_list): Remove.
6259 (process_next_line, recurse_read_control_structure): Update.
6260 (read_command_lines, read_command_lines_1): Return counted_command_line.
6261 (free_command_lines): Use "delete".
6262 (copy_command_lines): Remove.
6263 (define_command, document_command, show_user_1): Update.
6264 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6265 a counted_command_line.
6266 * breakpoint.h (counted_command_line): Remove typedef.
6267 (breakpoint_set_commands): Update.
6268 * breakpoint.c (check_no_tracepoint_commands)
6269 (validate_commands_for_breakpoint): Update.
6270 (breakpoint_set_commands): Change commands to be a
6271 counted_command_line.
6272 (commands_command_1, update_dprintf_command_list)
6273 (create_tracepoint_from_upload): Update.
6274
6275 2018-05-04 Tom Tromey <tom@tromey.com>
6276
6277 * cli/cli-decode.h (cmd_list_element): New constructor.
6278 (~cmd_list_element): New destructor.
6279 (struct cmd_list_element): Add initializers.
6280 * cli/cli-decode.c (do_add_cmd): Use "new".
6281 (delete_cmd): Use "delete".
6282
6283 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6284 Pedro Alves <palves@redhat.com>
6285
6286 PR breakpoints/19806 and support for PR external/20207.
6287 * NEWS: Mention Aarch64 watchpoint improvements.
6288 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6289 watchpoints and PR external/20207 watchpoints.
6290 * nat/aarch64-linux-hw-point.c
6291 (kernel_supports_any_contiguous_range): New.
6292 (aarch64_watchpoint_offset): New.
6293 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6294 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6295 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6296 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6297 next_addr_orig_p. Support PR external/20207 watchpoints.
6298 (aarch64_downgrade_regs): New.
6299 (aarch64_dr_state_insert_one_point): New parameters offset and
6300 addr_orig.
6301 (aarch64_dr_state_remove_one_point): Likewise.
6302 (aarch64_handle_breakpoint): Update caller.
6303 (aarch64_handle_aligned_watchpoint): Likewise.
6304 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6305 aligned_offset.
6306 (aarch64_linux_set_debug_regs): Remove const from state. Call
6307 aarch64_downgrade_regs.
6308 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6309 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6310 (DR_CONTROL_MASK): ... this.
6311 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6312 (unsigned int aarch64_watchpoint_offset): New prototype.
6313 (aarch64_linux_set_debug_regs): Remove const from state.
6314 * utils.c (align_up, align_down): Move to ...
6315 * common/common-utils.c (align_up, align_down): ... here.
6316 * utils.h (align_up, align_down): Move to ...
6317 * common/common-utils.h (align_up, align_down): ... here.
6318
6319 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6320
6321 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6322 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6323 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6324 Re-implement to match the ABI as summarized in GCC's
6325 gcc/config/sparc/sparc.c. All callers updated.
6326 (sparc32_store_arguments): Remove assertion.
6327
6328 2018-05-04 Tom Tromey <tom@tromey.com>
6329
6330 * printcmd.c: Don't include tui.h.
6331 (decode_format): Use skip_spaces.
6332
6333 2018-05-04 Tom Tromey <tom@tromey.com>
6334
6335 PR gdb/22619:
6336 * printcmd.c (last_count): New global.
6337 (x_command): Use saved count when repeating.
6338
6339 2018-05-04 Tom Tromey <tom@tromey.com>
6340
6341 * nto-procfs.c (do_closedir_cleanup): Remove.
6342 (procfs_pidlist): Use gdb_dir_up.
6343 * procfs.c (do_closedir_cleanup): Remove.
6344 (proc_update_threads): Use gdb_dir_up.
6345 * common/filestuff.h (struct gdb_dir_deleter): New.
6346 (gdb_dir_up): New typedef.
6347
6348 2018-05-04 Tom Tromey <tom@tromey.com>
6349
6350 * ada-lang.c (print_mention_exception): Use std::string.
6351
6352 2018-05-04 Tom Tromey <tom@tromey.com>
6353
6354 * ada-lang.c (create_excep_cond_exprs): Update.
6355 (ada_exception_catchpoint_cond_string): Use std::string.
6356
6357 2018-05-04 Tom Tromey <tom@tromey.com>
6358
6359 * ada-lang.c (xget_renaming_scope): Return std::string.
6360 (old_renaming_is_invisible): Update.
6361
6362 2018-05-04 Tom Tromey <tom@tromey.com>
6363
6364 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6365 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6366
6367 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6368
6369 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6370
6371 2018-05-04 Tom Tromey <tom@tromey.com>
6372
6373 * remote.c (remote_query_supported_append): Change type.
6374 (remote_check_symbols): Update.
6375
6376 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6377
6378 PR gdb/11420
6379 * configure.ac: Prepend libpython.
6380 * python/python-config.py: Likewise.
6381 * configure: Regenerate.
6382
6383 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6384
6385 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6386
6387 2018-05-03 Pedro Alves <palves@redhat.com>
6388
6389 * s390-linux-nat.c
6390 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6391 override. Write 'true' instead of '1'.
6392 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6393 declaration.
6394
6395 2018-05-02 Pedro Alves <palves@redhat.com>
6396
6397 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6398 add_inf_child_target.
6399 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6400 add_inf_child_target.
6401 * aix-thread.c (aix_thread_target_info): New.
6402 (aix_thread_target) <shortname, longname, doc>: Delete.
6403 <info>: New.
6404 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6405 add_inf_child_target.
6406 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6407 add_inf_child_target.
6408 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6409 add_inf_child_target.
6410 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6411 add_inf_child_target.
6412 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6413 add_inf_child_target.
6414 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6415 add_inf_child_target.
6416 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6417 add_inf_child_target.
6418 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6419 add_inf_child_target.
6420 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6421 add_inf_child_target.
6422 * bfd-target.c (target_bfd_target_info): New.
6423 (target_bfd) <shortname, longname, doc>: Delete.
6424 <info>: New.
6425 * bsd-kvm.c (bsd_kvm_target_info): New.
6426 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6427 <info>: New.
6428 (bsd_kvm_target::open): Rename to ...
6429 (bsd_kvm_target_open): ... this. Adjust.
6430 * bsd-uthread.c (bsd_uthread_target_info): New.
6431 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6432 <info>: New.
6433 * corefile.c (core_file_command): Adjust.
6434 * corelow.c (core_target_info): New.
6435 (core_target) <shortname, longname, doc>: Delete.
6436 <info>: New.
6437 (core_target::open): Rename to ...
6438 (core_target_open): ... this. Adjust.
6439 * ctf.c (ctf_target_info): New.
6440 (ctf_target) <shortname, longname, doc>: Delete.
6441 <info>: New.
6442 (ctf_target::open): Rename to ...
6443 (ctf_target_open): ... this.
6444 (_initialize_ctf): Adjust.
6445 * exec.c (exec_target_info): New.
6446 (exec_target) <shortname, longname, doc>: Delete.
6447 <info>: New.
6448 (exec_target::open): Rename to ...
6449 (exec_target_open): ... this.
6450 * gdbcore.h (core_target_open): Declare.
6451 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6452 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6453 add_inf_child_target.
6454 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6455 add_inf_child_target.
6456 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6457 add_inf_child_target.
6458 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6459 add_inf_child_target.
6460 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6461 add_inf_child_target.
6462 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6463 add_inf_child_target.
6464 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6465 add_inf_child_target.
6466 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6467 add_inf_child_target.
6468 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6469 add_inf_child_target.
6470 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6471 add_inf_child_target.
6472 * inf-child.c (inf_child_target_info): New.
6473 (inf_child_target::info): New.
6474 (inf_child_open_target): Remove 'target' parameter. Use
6475 get_native_target instead.
6476 (inf_child_target::open): Delete.
6477 (add_inf_child_target): New.
6478 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6479 Delete.
6480 <info>: New.
6481 (add_inf_child_target): Declare.
6482 (inf_child_open_target): Declare.
6483 * linux-thread-db.c (thread_db_target_info): New.
6484 (thread_db_target) <shortname, longname, doc>: Delete.
6485 <info>: New.
6486 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6487 add_inf_child_target.
6488 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6489 add_inf_child_target.
6490 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6491 add_inf_child_target.
6492 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6493 add_inf_child_target.
6494 * make-target-delegates (print_class): Adjust.
6495 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6496 add_inf_child_target.
6497 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6498 add_inf_child_target.
6499 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6500 add_inf_child_target.
6501 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6502 add_inf_child_target.
6503 * nto-procfs.c (nto_native_target_info): New.
6504 (nto_procfs_target_native) <shortname, longname, doc>:
6505 Delete.
6506 <info>: New.
6507 (nto_procfs_target_info): New.
6508 (nto_procfs_target_procfs) <shortname, longname, doc>:
6509 Delete.
6510 <info>: New.
6511 (init_procfs_targets): Adjust.
6512 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6513 add_inf_child_target.
6514 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6515 add_inf_child_target.
6516 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6517 add_inf_child_target.
6518 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6519 add_inf_child_target.
6520 * ravenscar-thread.c (ravenscar_target_info): New.
6521 (ravenscar_thread_target) <shortname, longname, doc>:
6522 Delete.
6523 <info>: New.
6524 * record-btrace.c (record_btrace_target_info):
6525 (record_btrace_target) <shortname, longname, doc>: Delete.
6526 <info>: New.
6527 (record_btrace_target::open): Rename to ...
6528 (record_btrace_target_open): ... this. Adjust.
6529 * record-full.c (record_longname, record_doc): New.
6530 (record_full_base_target) <shortname, longname, doc>: Delete.
6531 <info>: New.
6532 (record_full_target_info): New.
6533 (record_full_target): <shortname>: Delete.
6534 <info>: New.
6535 (record_full_core_open_1, record_full_open_1): Update comments.
6536 (record_full_base_target::open): Rename to ...
6537 (record_full_open): ... this.
6538 (cmd_record_full_restore): Update.
6539 (_initialize_record_full): Update.
6540 * remote-sim.c (remote_sim_target_info): New.
6541 (gdbsim_target) <shortname, longname, doc>: Delete.
6542 <info>: New.
6543 (gdbsim_target::open): Rename to ...
6544 (gdbsim_target_open): ... this.
6545 (_initialize_remote_sim): Adjust.
6546 * remote.c (remote_doc): New.
6547 (remote_target_info): New.
6548 (remote_target) <shortname, longname, doc>: Delete.
6549 <info>: New.
6550 (extended_remote_target_info): New.
6551 (extended_remote_target) <shortname, longname, doc>: Delete.
6552 <info>: New.
6553 (remote_target::open_1): Make static. Adjust.
6554 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6555 * s390-linux-nat.c (_initialize_s390_nat): Use
6556 add_inf_child_target.
6557 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6558 add_inf_child_target.
6559 * sol-thread.c (thread_db_target_info): New.
6560 (sol_thread_target) <shortname, longname, doc>: Delete.
6561 <info>: New.
6562 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6563 add_inf_child_target.
6564 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6565 add_inf_child_target.
6566 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6567 add_inf_child_target.
6568 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6569 add_inf_child_target.
6570 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6571 add_inf_child_target.
6572 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6573 add_inf_child_target.
6574 * spu-linux-nat.c (_initialize_spu_nat): Use
6575 add_inf_child_target.
6576 * spu-multiarch.c (spu_multiarch_target_info): New.
6577 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6578 <info>: New.
6579 * target-delegates.c: Regenerate.
6580 * target.c: Include <unordered_map>.
6581 (target_ops_p): Delete.
6582 (DEF_VEC_P(target_ops_p)): Delete.
6583 (target_factories): New.
6584 (test_target_info): New.
6585 (test_target_ops::info): New.
6586 (open_target): Adjust to use target_factories.
6587 (add_target_with_completer): Rename to ...
6588 (add_target): ... this. Change prototype. Register target_info
6589 and open callback in target_factories. Register target_info in
6590 command context instead of target_ops.
6591 (add_target): Delete old implementation.
6592 (add_deprecated_target_alias): Change prototype. Adjust.
6593 (the_native_target): New.
6594 (set_native_target, get_native_target): New.
6595 (find_default_run_target): Use the_native_target.
6596 (find_attach_target, find_run_target): Simplify.
6597 (target_ops::open): Delete.
6598 (dummy_target_info): New.
6599 (dummy_target::shortname, dummy_target::longname)
6600 (dummy_target::doc): Delete.
6601 (dummy_target::info): New.
6602 (debug_target::shortname, debug_target::longname)
6603 (debug_target::doc): Delete.
6604 (debug_target::info): New.
6605 * target.h (struct target_info): New.
6606 (target_ops::~target_ops): Add comment.
6607 (target_ops::info): New.
6608 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6609 longer virtual. Implement in terms of target_info.
6610 (set_native_target, get_native_target): Declare.
6611 (target_open_ftype): New.
6612 (add_target, add_target_with_completer)
6613 (add_deprecated_target_alias): Change prototype.
6614 (test_target) <shortname, longname, doc>: Delete.
6615 <info>: New.
6616 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6617 add_inf_child_target.
6618 * tracefile-tfile.c (tfile_target_info): New.
6619 (tfile_target) <shortname, longname, doc>: Delete.
6620 <info>: New.
6621 (tfile_target::open): Rename to ...
6622 (tfile_target_open): ... this.
6623 (_initialize_tracefile_tfile): Adjust.
6624 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6625 add_inf_child_target.
6626 * windows-nat.c (_initialize_windows_nat): Use
6627 add_inf_child_target.
6628 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6629 add_inf_child_target.
6630
6631 2018-05-02 Pedro Alves <palves@redhat.com>
6632
6633 * linux-nat.h (linux_nat_target) <low_new_thread,
6634 low_delete_thread, low_new_fork, low_forget_process,
6635 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6636 New virtual methods.
6637 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6638 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6639 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6640 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6641 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6642 Delete.
6643 * linux-fork.c (delete_fork): Adjust to call low method.
6644 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6645 (linux_nat_new_fork, linux_nat_forget_process_hook)
6646 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6647 (linux_nat_status_is_event):
6648 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6649 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6650 to call low method.
6651 (sigtrap_is_event): Rename to ...
6652 (linux_nat_target::low_status_is_event): ... this.
6653 (linux_nat_set_status_is_event): Delete.
6654 (save_stop_reason, linux_nat_wait_1)
6655 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6656 low methods.
6657 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6658 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6659 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6660 (linux_nat_set_prepare_to_resume): Delete.
6661 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6662 low virtual methods.
6663 * amd64-linux-nat.c: Likewise.
6664 * arm-linux-nat.c: Likewise.
6665 * i386-linux-nat.c: Likewise.
6666 * ia64-linux-nat.c: Likewise.
6667 * mips-linux-nat.c: Likewise.
6668 * ppc-linux-nat.c: Likewise.
6669 * s390-linux-nat.c: Likewise.
6670 * sparc64-linux-nat.c: Likewise.
6671 * x86-linux-nat.c: Likewise.
6672 * x86-linux-nat.h: Include "nat/x86-linux.h".
6673 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6674 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6675 Override methods.
6676
6677 2018-05-02 Pedro Alves <palves@redhat.com>
6678
6679 * target.h (target_ops)
6680 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6681 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6682 stopped_by_watchpoint, have_continuable_watchpoint,
6683 stopped_data_address, watchpoint_addr_within_range,
6684 can_accel_watchpoint_condition, can_run, thread_alive,
6685 has_all_memory, has_memory, has_stack, has_registers,
6686 has_execution, can_async_p, is_async_p, supports_non_stop,
6687 always_non_stop_p, can_execute_reverse, supports_multi_process,
6688 supports_enable_disable_tracepoint,
6689 supports_disable_randomization, supports_string_tracing,
6690 supports_evaluation_of_breakpoint_conditions,
6691 can_run_breakpoint_commands, filesystem_is_local,
6692 can_download_tracepoint, get_trace_state_variable_value,
6693 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6694 record_is_replaying, record_will_replay,
6695 augmented_libraries_svr4_read>: Adjust to return bool.
6696 * aarch64-linux-nat.c: All implementations adjusted.
6697 * aix-thread.c: All implementations adjusted.
6698 * arm-linux-nat.c: All implementations adjusted.
6699 * breakpoint.c: All implementations adjusted.
6700 * bsd-kvm.c: All implementations adjusted.
6701 * bsd-uthread.c: All implementations adjusted.
6702 * corelow.c: All implementations adjusted.
6703 * ctf.c: All implementations adjusted.
6704 * darwin-nat.c: All implementations adjusted.
6705 * darwin-nat.h: All implementations adjusted.
6706 * exec.c: All implementations adjusted.
6707 * fbsd-nat.c: All implementations adjusted.
6708 * fbsd-nat.h: All implementations adjusted.
6709 * gnu-nat.c: All implementations adjusted.
6710 * gnu-nat.h: All implementations adjusted.
6711 * go32-nat.c: All implementations adjusted.
6712 * ia64-linux-nat.c: All implementations adjusted.
6713 * inf-child.c: All implementations adjusted.
6714 * inf-child.h: All implementations adjusted.
6715 * inf-ptrace.c: All implementations adjusted.
6716 * inf-ptrace.h: All implementations adjusted.
6717 * linux-nat.c: All implementations adjusted.
6718 * linux-nat.h: All implementations adjusted.
6719 * mips-linux-nat.c: All implementations adjusted.
6720 * nto-procfs.c: All implementations adjusted.
6721 * ppc-linux-nat.c: All implementations adjusted.
6722 * procfs.c: All implementations adjusted.
6723 * ravenscar-thread.c: All implementations adjusted.
6724 * record-btrace.c: All implementations adjusted.
6725 * record-full.c: All implementations adjusted.
6726 * remote-sim.c: All implementations adjusted.
6727 * remote.c: All implementations adjusted.
6728 * s390-linux-nat.c: All implementations adjusted.
6729 * sol-thread.c: All implementations adjusted.
6730 * spu-multiarch.c: All implementations adjusted.
6731 * target-delegates.c: All implementations adjusted.
6732 * target.c: All implementations adjusted.
6733 * target.h: All implementations adjusted.
6734 * tracefile-tfile.c: All implementations adjusted.
6735 * tracefile.c: All implementations adjusted.
6736 * tracefile.h: All implementations adjusted.
6737 * windows-nat.c: All implementations adjusted.
6738 * x86-linux-nat.h: All implementations adjusted.
6739 * x86-nat.h: All implementations adjusted.
6740
6741 2018-05-02 Pedro Alves <palves@redhat.com>
6742
6743 * make-target-delegates (scan_target_h): Don't trim lines here.
6744 Replace sequences of tabs and/or whitespace with a single
6745 whitespace.
6746 (top level, parsing methods): Trim each line before processing it
6747 here.
6748
6749 2018-05-02 Pedro Alves <palves@redhat.com>
6750 John Baldwin <jhb@freebsd.org>
6751
6752 * target.h (enum strata) <debug_stratum>: New.
6753 (struct target_ops) <all delegation methods>: Replace by C++
6754 virtual methods, and drop "to_" prefix. All references updated
6755 throughout.
6756 <to_shortname, to_longname, to_doc, to_data,
6757 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6758 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6759 virtual methods. All references updated throughout.
6760 <can_attach, supports_terminal_ours, can_create_inferior,
6761 get_thread_control_capabilities, attach_no_wait>: New
6762 virtual methods.
6763 <insert_breakpoint, remove_breakpoint>: Now
6764 TARGET_DEFAULT_NORETURN methods.
6765 <info_proc>: Now returns bool.
6766 <to_magic>: Delete.
6767 (OPS_MAGIC): Delete.
6768 (current_target): Delete. All references replaced by references
6769 to ...
6770 (target_stack): ... this. New.
6771 (target_shortname, target_longname): Adjust.
6772 (target_can_run): Now a function declaration.
6773 (default_child_has_all_memory, default_child_has_memory)
6774 (default_child_has_stack, default_child_has_registers)
6775 (default_child_has_execution): Remove target_ops parameter.
6776 (complete_target_initialization): Delete.
6777 (memory_breakpoint_target): New template class.
6778 (test_target_ops): Refactor as a C++ class with virtual methods.
6779 * make-target-delegates (NAME_PART): Tighten.
6780 (POINTER_PART, CP_SYMBOL): New.
6781 (SIMPLE_RETURN_PART): Reimplement.
6782 (VEC_RETURN_PART): Expect less.
6783 (RETURN_PART, VIRTUAL_PART): New.
6784 (METHOD): Adjust to C++ virtual methods.
6785 (scan_target_h): Remove reference to C99.
6786 (dname): Output "target_ops::" prefix.
6787 (write_function_header): Adjust to output a C++ class method.
6788 (write_declaration): New.
6789 (write_delegator): Adjust to output a C++ class method.
6790 (tdname): Output "dummy_target::" prefix.
6791 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6792 method.
6793 (tdefault_names, debug_names): Delete.
6794 (return_types, tdefaults, styles, argtypes_array): New.
6795 (top level): All methods are delegators.
6796 (print_class): New.
6797 (top level): Print dummy_target and debug_target classes.
6798 * target-delegates.c: Regenerate.
6799 * target-debug.h (target_debug_print_enum_info_proc_what)
6800 (target_debug_print_thread_control_capabilities)
6801 (target_debug_print_thread_info_p): New.
6802 * target.c (dummy_target): Delete.
6803 (the_dummy_target, the_debug_target): New.
6804 (target_stack): Now extern.
6805 (set_targetdebug): Push/unpush debug target.
6806 (default_child_has_all_memory, default_child_has_memory)
6807 (default_child_has_stack, default_child_has_registers)
6808 (default_child_has_execution): Remove target_ops parameter.
6809 (complete_target_initialization): Delete.
6810 (add_target_with_completer): No longer call
6811 complete_target_initialization.
6812 (target_supports_terminal_ours): Use regular delegation.
6813 (update_current_target): Delete.
6814 (push_target): No longer check magic number. Don't call
6815 update_current_target.
6816 (unpush_target): Don't call update_current_target.
6817 (target_is_pushed): No longer check magic number.
6818 (target_require_runnable): Skip for all stratums over
6819 process_stratum.
6820 (target_ops::info_proc): New.
6821 (target_info_proc): Use find_target_at and
6822 find_default_run_target.
6823 (target_supports_disable_randomization): Use regular delegation.
6824 (target_get_osdata): Use find_target_at.
6825 (target_ops::open, target_ops::close, target_ops::can_attach)
6826 (target_ops::attach, target_ops::can_create_inferior)
6827 (target_ops::create_inferior, target_ops::can_run)
6828 (target_can_run): New.
6829 (default_fileio_target): Use regular delegation.
6830 (target_ops::fileio_open, target_ops::fileio_pwrite)
6831 (target_ops::fileio_pread, target_ops::fileio_fstat)
6832 (target_ops::fileio_close, target_ops::fileio_unlink)
6833 (target_ops::fileio_readlink): New.
6834 (target_fileio_open_1, target_fileio_unlink)
6835 (target_fileio_readlink): Always call the target method. Handle
6836 FILEIO_ENOSYS.
6837 (return_zero, return_zero_has_execution): Delete.
6838 (init_dummy_target): Delete.
6839 (dummy_target::dummy_target, dummy_target::shortname)
6840 (dummy_target::longname, dummy_target::doc)
6841 (debug_target::debug_target, debug_target::shortname)
6842 (debug_target::longname, debug_target::doc): New.
6843 (target_supports_delete_record): Use regular delegation.
6844 (setup_target_debug): Delete.
6845 (maintenance_print_target_stack): Skip debug_stratum.
6846 (initialize_targets): Instantiate the_dummy_target and
6847 the_debug_target.
6848 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6849 use target_stack.
6850 (target_auxv_search, fprint_target_auxv): Adjust.
6851 (info_auxv_command): Adjust to use target_stack.
6852 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6853 * exceptions.c (print_flush): Handle a NULL target_stack.
6854 * regcache.c (target_ops_no_register): Refactor as class with
6855 virtual methods.
6856
6857 * exec.c (exec_target): New class.
6858 (exec_ops): Now an exec_target.
6859 (exec_open, exec_close_1, exec_get_section_table)
6860 (exec_xfer_partial, exec_files_info, exec_has_memory)
6861 (exec_make_note_section): Refactor as exec_target methods.
6862 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6863 Delete.
6864 (exec_target::find_memory_regions): New.
6865 (_initialize_exec): Don't call init_exec_ops.
6866 * gdbcore.h (exec_file_clear): Delete.
6867
6868 * corefile.c (core_target): Delete.
6869 (core_file_command): Adjust.
6870 * corelow.c (core_target): New class.
6871 (the_core_target): New.
6872 (core_close): Remove target_ops parameter.
6873 (core_close_cleanup): Adjust.
6874 (core_target::close): New.
6875 (core_open, core_detach, get_core_registers, core_files_info)
6876 (core_xfer_partial, core_thread_alive, core_read_description)
6877 (core_pid_to_str, core_thread_name, core_has_memory)
6878 (core_has_stack, core_has_registers, core_info_proc): Rework as
6879 core_target methods.
6880 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6881 (_initialize_corelow): Initialize the_core_target.
6882 * gdbcore.h (core_target): Delete.
6883 (the_core_target): New.
6884
6885 * ctf.c: (ctf_target): New class.
6886 (ctf_ops): Now a ctf_target.
6887 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6888 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6889 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6890 methods.
6891 (init_ctf_ops): Delete.
6892 (_initialize_ctf): Don't call it.
6893 * tracefile-tfile.c (tfile_target): New class.
6894 (tfile_ops): Now a tfile_target.
6895 (tfile_open, tfile_close, tfile_files_info)
6896 (tfile_get_tracepoint_status, tfile_trace_find)
6897 (tfile_fetch_registers, tfile_xfer_partial)
6898 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6899 Refactor as tfile_target methods.
6900 (tfile_xfer_partial_features): Remove target_ops parameter.
6901 (init_tfile_ops): Delete.
6902 (_initialize_tracefile_tfile): Don't call it.
6903 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6904 (tracefile_has_stack, tracefile_has_registers)
6905 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6906 tracefile_target methods.
6907 (init_tracefile_ops): Delete.
6908 (tracefile_target::tracefile_target): New.
6909 * tracefile.h: Include "target.h".
6910 (tracefile_target): New class.
6911 (init_tracefile_ops): Delete.
6912
6913 * spu-multiarch.c (spu_multiarch_target): New class.
6914 (spu_ops): Now a spu_multiarch_target.
6915 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6916 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6917 (spu_search_memory, spu_mourn_inferior): Refactor as
6918 spu_multiarch_target methods.
6919 (init_spu_ops): Delete.
6920 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6921 complete_target_initialization.
6922
6923 * ravenscar-thread.c (ravenscar_thread_target): New class.
6924 (ravenscar_ops): Now a ravenscar_thread_target.
6925 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6926 (ravenscar_thread_alive, ravenscar_pid_to_str)
6927 (ravenscar_fetch_registers, ravenscar_store_registers)
6928 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6929 (ravenscar_stopped_by_hw_breakpoint)
6930 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6931 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6932 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6933 methods.
6934 (init_ravenscar_thread_ops): Delete.
6935 (_initialize_ravenscar): Remove references to
6936 init_ravenscar_thread_ops and complete_target_initialization.
6937
6938 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6939 (bsd_uthread_target): New class.
6940 (bsd_uthread_ops): Now a bsd_uthread_target.
6941 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6942 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6943 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6944 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6945 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6946 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6947 (bsd_uthread_target): Delete function.
6948 (_initialize_bsd_uthread): Remove reference to
6949 complete_target_initialization.
6950
6951 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6952 (target_bfd): ... this new class.
6953 (target_bfd_xfer_partial, target_bfd_get_section_table)
6954 (target_bfd_close): Refactor as target_bfd methods.
6955 (target_bfd::~target_bfd): New.
6956 (target_bfd_reopen): Adjust.
6957 (target_bfd::close): New.
6958
6959 * record-btrace.c (record_btrace_target): New class.
6960 (record_btrace_ops): Now a record_btrace_target.
6961 (record_btrace_open, record_btrace_stop_recording)
6962 (record_btrace_disconnect, record_btrace_close)
6963 (record_btrace_async, record_btrace_info)
6964 (record_btrace_insn_history, record_btrace_insn_history_range)
6965 (record_btrace_insn_history_from, record_btrace_call_history)
6966 (record_btrace_call_history_range)
6967 (record_btrace_call_history_from, record_btrace_record_method)
6968 (record_btrace_is_replaying, record_btrace_will_replay)
6969 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6970 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6971 (record_btrace_store_registers, record_btrace_prepare_to_store)
6972 (record_btrace_to_get_unwinder)
6973 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6974 (record_btrace_commit_resume, record_btrace_wait)
6975 (record_btrace_stop, record_btrace_can_execute_reverse)
6976 (record_btrace_stopped_by_sw_breakpoint)
6977 (record_btrace_supports_stopped_by_sw_breakpoint)
6978 (record_btrace_stopped_by_hw_breakpoint)
6979 (record_btrace_supports_stopped_by_hw_breakpoint)
6980 (record_btrace_update_thread_list, record_btrace_thread_alive)
6981 (record_btrace_goto_begin, record_btrace_goto_end)
6982 (record_btrace_goto, record_btrace_stop_replaying_all)
6983 (record_btrace_execution_direction)
6984 (record_btrace_prepare_to_generate_core)
6985 (record_btrace_done_generating_core): Refactor as
6986 record_btrace_target methods.
6987 (init_record_btrace_ops): Delete.
6988 (_initialize_record_btrace): Remove reference to
6989 init_record_btrace_ops.
6990 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6991 the execution_direction global.
6992 (record_full_base_target, record_full_target)
6993 (record_full_core_target): New classes.
6994 (record_full_ops): Now a record_full_target.
6995 (record_full_core_ops): Now a record_full_core_target.
6996 (record_full_target::detach, record_full_target::disconnect)
6997 (record_full_core_target::disconnect)
6998 (record_full_target::mourn_inferior, record_full_target::kill):
6999 New.
7000 (record_full_open, record_full_close, record_full_async): Refactor
7001 as methods of the record_full_base_target class.
7002 (record_full_resume, record_full_commit_resume): Refactor
7003 as methods of the record_full_target class.
7004 (record_full_wait, record_full_stopped_by_watchpoint)
7005 (record_full_stopped_data_address)
7006 (record_full_stopped_by_sw_breakpoint)
7007 (record_full_supports_stopped_by_sw_breakpoint)
7008 (record_full_stopped_by_hw_breakpoint)
7009 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7010 methods of the record_full_base_target class.
7011 (record_full_store_registers, record_full_xfer_partial)
7012 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7013 Refactor as methods of the record_full_target class.
7014 (record_full_can_execute_reverse, record_full_get_bookmark)
7015 (record_full_goto_bookmark, record_full_execution_direction)
7016 (record_full_record_method, record_full_info, record_full_delete)
7017 (record_full_is_replaying, record_full_will_replay)
7018 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7019 (record_full_stop_replaying): Refactor as methods of the
7020 record_full_base_target class.
7021 (record_full_core_resume, record_full_core_kill)
7022 (record_full_core_fetch_registers)
7023 (record_full_core_prepare_to_store)
7024 (record_full_core_store_registers, record_full_core_xfer_partial)
7025 (record_full_core_insert_breakpoint)
7026 (record_full_core_remove_breakpoint)
7027 (record_full_core_has_execution): Refactor
7028 as methods of the record_full_core_target class.
7029 (record_full_base_target::supports_delete_record): New.
7030 (init_record_full_ops): Delete.
7031 (init_record_full_core_ops): Delete.
7032 (record_full_save): Refactor as method of the
7033 record_full_base_target class.
7034 (_initialize_record_full): Remove references to
7035 init_record_full_ops and init_record_full_core_ops.
7036
7037 * remote.c (remote_target, extended_remote_target): New classes.
7038 (remote_ops): Now a remote_target.
7039 (extended_remote_ops): Now an extended_remote_target.
7040 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7041 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7042 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7043 (remote_pass_signals, remote_set_syscall_catchpoint)
7044 (remote_program_signals, )
7045 (remote_thread_always_alive): Remove target_ops parameter.
7046 (remote_thread_alive, remote_thread_name)
7047 (remote_update_thread_list, remote_threads_extra_info)
7048 (remote_static_tracepoint_marker_at)
7049 (remote_static_tracepoint_markers_by_strid)
7050 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7051 (remote_open): Refactor as methods of remote_target.
7052 (extended_remote_open, extended_remote_detach)
7053 (extended_remote_attach, extended_remote_post_attach):
7054 (extended_remote_supports_disable_randomization)
7055 (extended_remote_create_inferior): : Refactor as method of
7056 extended_remote_target.
7057 (remote_set_permissions, remote_open_1, remote_detach)
7058 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7059 (remote_resume, remote_commit_resume, remote_stop)
7060 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7061 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7062 (remote_prepare_to_store, remote_store_registers)
7063 (remote_flash_erase, remote_flash_done, remote_files_info)
7064 (remote_kill, remote_mourn, remote_insert_breakpoint)
7065 (remote_remove_breakpoint, remote_insert_watchpoint)
7066 (remote_watchpoint_addr_within_range)
7067 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7068 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7069 (remote_supports_stopped_by_sw_breakpoint)
7070 (remote_stopped_by_hw_breakpoint)
7071 (remote_supports_stopped_by_hw_breakpoint)
7072 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7073 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7074 (remote_verify_memory): Refactor as methods of remote_target.
7075 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7076 parameter.
7077 (remote_xfer_partial, remote_get_memory_xfer_limit)
7078 (remote_search_memory, remote_rcmd, remote_memory_map)
7079 (remote_pid_to_str, remote_get_thread_local_address)
7080 (remote_get_tib_address, remote_read_description): Refactor as
7081 methods of remote_target.
7082 (remote_target::fileio_open, remote_target::fileio_pwrite)
7083 (remote_target::fileio_pread, remote_target::fileio_close): New.
7084 (remote_hostio_readlink, remote_hostio_fstat)
7085 (remote_filesystem_is_local, remote_can_execute_reverse)
7086 (remote_supports_non_stop, remote_supports_disable_randomization)
7087 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7088 (remote_supports_enable_disable_tracepoint)
7089 (remote_supports_string_tracing)
7090 (remote_can_run_breakpoint_commands, remote_trace_init)
7091 (remote_download_tracepoint, remote_can_download_tracepoint)
7092 (remote_download_trace_state_variable, remote_enable_tracepoint)
7093 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7094 (remote_trace_start, remote_get_trace_status)
7095 (remote_get_tracepoint_status, remote_trace_stop)
7096 (remote_trace_find, remote_get_trace_state_variable_value)
7097 (remote_save_trace_data, remote_get_raw_trace_data)
7098 (remote_set_disconnected_tracing, remote_core_of_thread)
7099 (remote_set_circular_trace_buffer, remote_traceframe_info)
7100 (remote_get_min_fast_tracepoint_insn_len)
7101 (remote_set_trace_buffer_size, remote_set_trace_notes)
7102 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7103 (remote_disable_btrace, remote_teardown_btrace)
7104 (remote_read_btrace, remote_btrace_conf)
7105 (remote_augmented_libraries_svr4_read, remote_load)
7106 (remote_pid_to_exec_file, remote_can_do_single_step)
7107 (remote_execution_direction, remote_thread_handle_to_thread_info):
7108 Refactor as methods of remote_target.
7109 (init_remote_ops, init_extended_remote_ops): Delete.
7110 (remote_can_async_p, remote_is_async_p, remote_async)
7111 (remote_thread_events, remote_upload_tracepoints)
7112 (remote_upload_trace_state_variables): Refactor as methods of
7113 remote_target.
7114 (_initialize_remote): Remove references to init_remote_ops and
7115 init_extended_remote_ops.
7116
7117 * remote-sim.c (gdbsim_target): New class.
7118 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7119 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7120 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7121 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7122 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7123 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7124 Refactor as methods of gdbsim_target.
7125 (gdbsim_ops): Now a gdbsim_target.
7126 (init_gdbsim_ops): Delete.
7127 (gdbsim_cntrl_c): Adjust.
7128 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7129
7130 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7131 (the_amd64_linux_nat_target): New.
7132 (amd64_linux_fetch_inferior_registers)
7133 (amd64_linux_store_inferior_registers): Refactor as methods of
7134 amd64_linux_nat_target.
7135 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7136 * i386-linux-nat.c: Don't include "linux-nat.h".
7137 (i386_linux_nat_target): New class.
7138 (the_i386_linux_nat_target): New.
7139 (i386_linux_fetch_inferior_registers)
7140 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7141 as methods of i386_linux_nat_target.
7142 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7143 * inf-child.c (inf_child_ops): Delete.
7144 (inf_child_fetch_inferior_registers)
7145 (inf_child_store_inferior_registers): Delete.
7146 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7147 methods of inf_child_target.
7148 (inf_child_target::supports_terminal_ours)
7149 (inf_child_target::terminal_init)
7150 (inf_child_target::terminal_inferior)
7151 (inf_child_target::terminal_ours_for_output)
7152 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7153 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7154 New.
7155 (inf_child_open, inf_child_disconnect, inf_child_close)
7156 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7157 (inf_child_post_startup_inferior, inf_child_can_run)
7158 (inf_child_pid_to_exec_file): Refactor as methods of
7159 inf_child_target.
7160 (inf_child_follow_fork): Delete.
7161 (inf_child_target::can_create_inferior)
7162 (inf_child_target::can_attach): New.
7163 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7164 (inf_child_target::has_stack, inf_child_target::has_registers)
7165 (inf_child_target::has_execution): New.
7166 (inf_child_fileio_open, inf_child_fileio_pwrite)
7167 (inf_child_fileio_pread, inf_child_fileio_fstat)
7168 (inf_child_fileio_close, inf_child_fileio_unlink)
7169 (inf_child_fileio_readlink, inf_child_use_agent)
7170 (inf_child_can_use_agent): Refactor as methods of
7171 inf_child_target.
7172 (return_zero, inf_child_target): Delete.
7173 (inf_child_target::inf_child_target): New.
7174 * inf-child.h: Include "target.h".
7175 (inf_child_target): Delete function prototype.
7176 (inf_child_target): New class.
7177 (inf_child_open_target, inf_child_mourn_inferior)
7178 (inf_child_maybe_unpush_target): Delete.
7179 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7180 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7181 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7182 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7183 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7184 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7185 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7186 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7187 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7188 methods of inf_ptrace_target.
7189 (inf_ptrace_target): Delete function.
7190 * inf-ptrace.h: Include "inf-child.h".
7191 (inf_ptrace_target): Delete function declaration.
7192 (inf_ptrace_target): New class.
7193 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7194 * linux-nat.c (linux_target): New.
7195 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7196 (linux_nat_target::~linux_nat_target): New.
7197 (linux_child_post_attach, linux_child_post_startup_inferior)
7198 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7199 (linux_child_remove_fork_catchpoint)
7200 (linux_child_insert_vfork_catchpoint)
7201 (linux_child_remove_vfork_catchpoint)
7202 (linux_child_insert_exec_catchpoint)
7203 (linux_child_remove_exec_catchpoint)
7204 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7205 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7206 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7207 (linux_nat_stopped_data_address)
7208 (linux_nat_stopped_by_sw_breakpoint)
7209 (linux_nat_supports_stopped_by_sw_breakpoint)
7210 (linux_nat_stopped_by_hw_breakpoint)
7211 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7212 (linux_nat_kill, linux_nat_mourn_inferior)
7213 (linux_nat_xfer_partial, linux_nat_thread_alive)
7214 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7215 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7216 (linux_child_static_tracepoint_markers_by_strid)
7217 (linux_nat_is_async_p, linux_nat_can_async_p)
7218 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7219 (linux_nat_supports_multi_process)
7220 (linux_nat_supports_disable_randomization, linux_nat_async)
7221 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7222 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7223 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7224 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7225 methods of linux_nat_target.
7226 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7227 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7228 parameter.
7229 (check_stopped_by_watchpoint): Adjust.
7230 (linux_xfer_partial): Delete.
7231 (linux_target_install_ops, linux_target, linux_nat_add_target):
7232 Delete.
7233 (linux_nat_target::linux_nat_target): New.
7234 * linux-nat.h: Include "inf-ptrace.h".
7235 (linux_nat_target): New.
7236 (linux_target, linux_target_install_ops, linux_nat_add_target):
7237 Delete function declarations.
7238 (linux_target): Declare global.
7239 * linux-thread-db.c (thread_db_target): New.
7240 (thread_db_target::thread_db_target): New.
7241 (thread_db_ops): Delete.
7242 (the_thread_db_target): New.
7243 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7244 (thread_db_update_thread_list, thread_db_pid_to_str)
7245 (thread_db_extra_thread_info)
7246 (thread_db_thread_handle_to_thread_info)
7247 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7248 (thread_db_resume): Refactor as methods of thread_db_target.
7249 (init_thread_db_ops): Delete.
7250 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7251 * x86-linux-nat.c: Don't include "linux-nat.h".
7252 (super_post_startup_inferior): Delete.
7253 (x86_linux_nat_target::~x86_linux_nat_target): New.
7254 (x86_linux_child_post_startup_inferior)
7255 (x86_linux_read_description, x86_linux_enable_btrace)
7256 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7257 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7258 methods of x86_linux_nat_target.
7259 (x86_linux_create_target): Delete. Bits folded ...
7260 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7261 pointer.
7262 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7263 (x86_linux_nat_target): New class.
7264 (x86_linux_create_target): Delete.
7265 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7266 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7267 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7268 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7269 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7270 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7271 make extern.
7272 (x86_use_watchpoints): Delete.
7273 * x86-nat.h: Include "breakpoint.h" and "target.h".
7274 (x86_use_watchpoints): Delete.
7275 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7276 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7277 (x86_insert_watchpoint, x86_remove_watchpoint)
7278 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7279 (x86_stopped_by_hw_breakpoint): New declarations.
7280 (x86_nat_target): New template class.
7281
7282 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7283 (the_ppc_linux_nat_target): New.
7284 (ppc_linux_fetch_inferior_registers)
7285 (ppc_linux_can_use_hw_breakpoint)
7286 (ppc_linux_region_ok_for_hw_watchpoint)
7287 (ppc_linux_ranged_break_num_registers)
7288 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7289 (ppc_linux_insert_mask_watchpoint)
7290 (ppc_linux_remove_mask_watchpoint)
7291 (ppc_linux_can_accel_watchpoint_condition)
7292 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7293 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7294 (ppc_linux_watchpoint_addr_within_range)
7295 (ppc_linux_masked_watch_num_registers)
7296 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7297 (ppc_linux_read_description): Refactor as methods of
7298 ppc_linux_nat_target.
7299 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7300
7301 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7302 (procfs_target): New class.
7303 (the_procfs_target): New.
7304 (procfs_target): Delete function.
7305 (procfs_auxv_parse, procfs_attach, procfs_detach)
7306 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7307 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7308 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7309 (procfs_create_inferior, procfs_update_thread_list)
7310 (procfs_thread_alive, procfs_pid_to_str)
7311 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7312 (procfs_stopped_data_address, procfs_insert_watchpoint)
7313 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7314 (proc_find_memory_regions, procfs_info_proc)
7315 (procfs_make_note_section): Refactor as methods of procfs_target.
7316 (_initialize_procfs): Adjust.
7317 * sol-thread.c (sol_thread_target): New class.
7318 (sol_thread_ops): Now a sol_thread_target.
7319 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7320 (sol_thread_fetch_registers, sol_thread_store_registers)
7321 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7322 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7323 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7324 (init_sol_thread_ops): Delete.
7325 (_initialize_sol_thread): Adjust. Remove references to
7326 init_sol_thread_ops and complete_target_initialization.
7327
7328 * windows-nat.c (windows_nat_target): New class.
7329 (windows_fetch_inferior_registers)
7330 (windows_store_inferior_registers, windows_resume, windows_wait)
7331 (windows_attach, windows_detach, windows_pid_to_exec_file)
7332 (windows_files_info, windows_create_inferior)
7333 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7334 (windows_close, windows_pid_to_str, windows_xfer_partial)
7335 (windows_get_tib_address, windows_get_ada_task_ptid)
7336 (windows_thread_name, windows_thread_alive): Refactor as
7337 windows_nat_target methods.
7338 (do_initial_windows_stuff): Adjust.
7339 (windows_target): Delete function.
7340 (_initialize_windows_nat): Adjust.
7341
7342 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7343 (darwin_mourn_inferior, darwin_kill_inferior)
7344 (darwin_create_inferior, darwin_attach, darwin_detach)
7345 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7346 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7347 (darwin_supports_multi_process): Refactor as darwin_nat_target
7348 methods.
7349 (darwin_resume_to, darwin_files_info): Delete.
7350 (_initialize_darwin_inferior): Rename to ...
7351 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7352 * darwin-nat.h: Include "inf-child.h".
7353 (darwin_nat_target): New class.
7354 (darwin_complete_target): Delete.
7355 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7356 (darwin_target): New.
7357 (i386_darwin_fetch_inferior_registers)
7358 (i386_darwin_store_inferior_registers): Refactor as methods of
7359 darwin_nat_target.
7360 (darwin_complete_target): Delete, with ...
7361 (_initialize_i386_darwin_nat): ... bits factored out here.
7362
7363 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7364 (the_alpha_linux_nat_target): New.
7365 (alpha_linux_register_u_offset): Refactor as
7366 alpha_linux_nat_target method.
7367 (_initialize_alpha_linux_nat): Adjust.
7368 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7369 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7370 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7371 methods of linux_nat_trad_target.
7372 (linux_trad_target): Delete.
7373 * linux-nat-trad.h (linux_trad_target): Delete function.
7374 (linux_nat_trad_target): New class.
7375 * mips-linux-nat.c (mips_linux_nat_target): New class.
7376 (super_fetch_registers, super_store_registers, super_close):
7377 Delete.
7378 (the_mips_linux_nat_target): New.
7379 (mips64_linux_regsets_fetch_registers)
7380 (mips64_linux_regsets_store_registers)
7381 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7382 (mips_linux_register_u_offset, mips_linux_read_description)
7383 (mips_linux_can_use_hw_breakpoint)
7384 (mips_linux_stopped_by_watchpoint)
7385 (mips_linux_stopped_data_address)
7386 (mips_linux_region_ok_for_hw_watchpoint)
7387 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7388 (mips_linux_close): Refactor as methods of mips_linux_nat.
7389 (_initialize_mips_linux_nat): Adjust to C++ification.
7390
7391 * aix-thread.c (aix_thread_target): New class.
7392 (aix_thread_ops): Now an aix_thread_target.
7393 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7394 (aix_thread_fetch_registers, aix_thread_store_registers)
7395 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7396 (aix_thread_thread_alive, aix_thread_pid_to_str)
7397 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7398 Refactor as methods of aix_thread_target.
7399 (init_aix_thread_ops): Delete.
7400 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7401 and complete_target_initialization.
7402 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7403 (rs6000_nat_target): New class.
7404 (the_rs6000_nat_target): New.
7405 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7406 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7407 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7408 (super_create_inferior): Delete.
7409 (_initialize_rs6000_nat): Adjust to C++ification.
7410
7411 * arm-linux-nat.c (arm_linux_nat_target): New class.
7412 (the_arm_linux_nat_target): New.
7413 (arm_linux_fetch_inferior_registers)
7414 (arm_linux_store_inferior_registers, arm_linux_read_description)
7415 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7416 (arm_linux_remove_hw_breakpoint)
7417 (arm_linux_region_ok_for_hw_watchpoint)
7418 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7419 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7420 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7421 arm_linux_nat_target.
7422 (_initialize_arm_linux_nat): Adjust to C++ification.
7423
7424 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7425 (the_aarch64_linux_nat_target): New.
7426 (aarch64_linux_fetch_inferior_registers)
7427 (aarch64_linux_store_inferior_registers)
7428 (aarch64_linux_child_post_startup_inferior)
7429 (aarch64_linux_read_description)
7430 (aarch64_linux_can_use_hw_breakpoint)
7431 (aarch64_linux_insert_hw_breakpoint)
7432 (aarch64_linux_remove_hw_breakpoint)
7433 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7434 (aarch64_linux_region_ok_for_hw_watchpoint)
7435 (aarch64_linux_stopped_data_address)
7436 (aarch64_linux_stopped_by_watchpoint)
7437 (aarch64_linux_watchpoint_addr_within_range)
7438 (aarch64_linux_can_do_single_step): Refactor as methods of
7439 aarch64_linux_nat_target.
7440 (super_post_startup_inferior): Delete.
7441 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7442
7443 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7444 (the_hppa_linux_nat_target): New.
7445 (hppa_linux_fetch_inferior_registers)
7446 (hppa_linux_store_inferior_registers): Refactor as methods of
7447 hppa_linux_nat_target.
7448 (_initialize_hppa_linux_nat): Adjust to C++ification.
7449
7450 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7451 (the_ia64_linux_nat_target): New.
7452 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7453 (ia64_linux_stopped_data_address)
7454 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7455 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7456 ia64_linux_nat_target methods.
7457 (super_xfer_partial): Delete.
7458 (_initialize_ia64_linux_nat): Adjust to C++ification.
7459
7460 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7461 (the_m32r_linux_nat_target): New.
7462 (m32r_linux_fetch_inferior_registers)
7463 (m32r_linux_store_inferior_registers): Refactor as
7464 m32r_linux_nat_target methods.
7465 (_initialize_m32r_linux_nat): Adjust to C++ification.
7466
7467 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7468 (the_m68k_linux_nat_target): New.
7469 (m68k_linux_fetch_inferior_registers)
7470 (m68k_linux_store_inferior_registers): Refactor as
7471 m68k_linux_nat_target methods.
7472 (_initialize_m68k_linux_nat): Adjust to C++ification.
7473
7474 * s390-linux-nat.c (s390_linux_nat_target): New class.
7475 (the_s390_linux_nat_target): New.
7476 (s390_linux_fetch_inferior_registers)
7477 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7478 (s390_insert_watchpoint, s390_remove_watchpoint)
7479 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7480 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7481 (s390_auxv_parse, s390_read_description): Refactor as methods of
7482 s390_linux_nat_target.
7483 (_initialize_s390_nat): Adjust to C++ification.
7484
7485 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7486 (the_sparc_linux_nat_target): New.
7487 (_initialize_sparc_linux_nat): Adjust to C++ification.
7488 * sparc-nat.c (sparc_fetch_inferior_registers)
7489 (sparc_store_inferior_registers): Remove target_ops parameter.
7490 * sparc-nat.h (sparc_fetch_inferior_registers)
7491 (sparc_store_inferior_registers): Remove target_ops parameter.
7492 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7493 (the_sparc64_linux_nat_target): New.
7494 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7495
7496 * spu-linux-nat.c (spu_linux_nat_target): New class.
7497 (the_spu_linux_nat_target): New.
7498 (spu_child_post_startup_inferior, spu_child_post_attach)
7499 (spu_child_wait, spu_fetch_inferior_registers)
7500 (spu_store_inferior_registers, spu_xfer_partial)
7501 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7502 methods.
7503 (_initialize_spu_nat): Adjust to C++ification.
7504
7505 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7506 (the_tilegx_linux_nat_target): New.
7507 (fetch_inferior_registers, store_inferior_registers):
7508 Refactor as methods.
7509 (_initialize_tile_linux_nat): Adjust to C++ification.
7510
7511 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7512 (the_xtensa_linux_nat_target): New.
7513 (xtensa_linux_fetch_inferior_registers)
7514 (xtensa_linux_store_inferior_registers): Refactor as
7515 xtensa_linux_nat_target methods.
7516 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7517
7518 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7519 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7520 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7521 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7522 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7523 (fbsd_stopped_by_sw_breakpoint)
7524 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7525 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7526 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7527 (fbsd_post_startup_inferior, fbsd_post_attach)
7528 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7529 (fbsd_set_syscall_catchpoint)
7530 (super_xfer_partial, super_resume, super_wait)
7531 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7532 (fbsd_handle_debug_trap): Remove target_ops parameter.
7533 (fbsd_nat_add_target): Delete.
7534 * fbsd-nat.h: Include "inf-ptrace.h".
7535 (fbsd_nat_add_target): Delete.
7536 (USE_SIGTRAP_SIGINFO): Define.
7537 (fbsd_nat_target): New class.
7538
7539 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7540 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7541 (amd64bsd_target): Delete.
7542 * amd64-bsd-nat.h: New file.
7543 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7544 "x86-bsd-nat.h".
7545 (amd64_fbsd_nat_target): New class.
7546 (the_amd64_fbsd_nat_target): New.
7547 (amd64fbsd_read_description): Refactor as method of
7548 amd64_fbsd_nat_target.
7549 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7550 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7551 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7552 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7553 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7554 (i386bsd_target): Delete.
7555 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7556 (i386bsd_fetch_inferior_registers)
7557 (i386bsd_store_inferior_registers): Declare.
7558 (i386_bsd_nat_target): New class.
7559 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7560 (the_i386_fbsd_nat_target): New.
7561 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7562 i386_fbsd_nat_target methods.
7563 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7564 (_initialize_i386fbsd_nat): Adjust to C++ification.
7565 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7566 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7567 (_initialize_x86_bsd_nat): Adjust to C++ification.
7568 * x86-bsd-nat.h: Include "x86-nat.h".
7569 (x86bsd_target): Delete declaration.
7570 (x86bsd_nat_target): New class.
7571
7572 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7573 (the_aarch64_fbsd_nat_target): New.
7574 (aarch64_fbsd_fetch_inferior_registers)
7575 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7576 aarch64_fbsd_nat_target.
7577 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7578 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7579 (the_alpha_bsd_nat_target): New.
7580 (alphabsd_fetch_inferior_registers)
7581 (alphabsd_store_inferior_registers): Refactor as
7582 alpha_bsd_nat_target methods.
7583 (_initialize_alphabsd_nat): Refactor as methods of
7584 alpha_bsd_nat_target.
7585 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7586 (the_amd64_nbsd_nat_target): New.
7587 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7588 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7589 (the_amd64_obsd_nat_target): New.
7590 (_initialize_amd64obsd_nat): Adjust to C++ification.
7591 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7592 (the_arm_fbsd_nat_target): New.
7593 (arm_fbsd_fetch_inferior_registers)
7594 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7595 (_initialize_arm_fbsd_nat): Refactor as methods of
7596 arm_fbsd_nat_target.
7597 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7598 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7599 (the_arm_netbsd_nat_target): New.
7600 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7601 arm_netbsd_nat_target.
7602 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7603 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7604 (the_hppa_nbsd_nat_target): New.
7605 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7606 hppa_nbsd_nat_target methods.
7607 (_initialize_hppanbsd_nat): Adjust to C++ification.
7608 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7609 (the_hppa_obsd_nat_target): New.
7610 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7611 methods of hppa_obsd_nat_target.
7612 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7613 add_target.
7614 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7615 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7616 add_target.
7617 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7618 (_initialize_i386obsd_nat): Use add_target.
7619 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7620 (the_m68k_bsd_nat_target): New.
7621 (m68kbsd_fetch_inferior_registers)
7622 (m68kbsd_store_inferior_registers): Refactor as methods of
7623 m68k_bsd_nat_target.
7624 (_initialize_m68kbsd_nat): Adjust to C++ification.
7625 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7626 (the_mips_fbsd_nat_target): New.
7627 (mips_fbsd_fetch_inferior_registers)
7628 (mips_fbsd_store_inferior_registers): Refactor as methods of
7629 mips_fbsd_nat_target.
7630 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7631 add_target.
7632 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7633 (the_mips_nbsd_nat_target): New.
7634 (mipsnbsd_fetch_inferior_registers)
7635 (mipsnbsd_store_inferior_registers): Refactor as methods of
7636 mips_nbsd_nat_target.
7637 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7638 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7639 (the_mips64_obsd_nat_target): New.
7640 (mips64obsd_fetch_inferior_registers)
7641 (mips64obsd_store_inferior_registers): Refactor as methods of
7642 mips64_obsd_nat_target.
7643 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7644 add_target.
7645 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7646 nbsd_nat_target.
7647 * nbsd-nat.h: Include "inf-ptrace.h".
7648 (nbsd_nat_target): New class.
7649 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7650 (obsd_wait): Refactor as methods of obsd_nat_target.
7651 (obsd_add_target): Delete.
7652 * obsd-nat.h: Include "inf-ptrace.h".
7653 (obsd_nat_target): New class.
7654 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7655 (the_ppc_fbsd_nat_target): New.
7656 (ppcfbsd_fetch_inferior_registers)
7657 (ppcfbsd_store_inferior_registers): Refactor as methods of
7658 ppc_fbsd_nat_target.
7659 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7660 add_target.
7661 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7662 (the_ppc_nbsd_nat_target): New.
7663 (ppcnbsd_fetch_inferior_registers)
7664 (ppcnbsd_store_inferior_registers): Refactor as methods of
7665 ppc_nbsd_nat_target.
7666 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7667 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7668 (the_ppc_obsd_nat_target): New.
7669 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7670 methods of ppc_obsd_nat_target.
7671 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7672 add_target.
7673 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7674 (the_sh_nbsd_nat_target): New.
7675 (shnbsd_fetch_inferior_registers)
7676 (shnbsd_store_inferior_registers): Refactor as methods of
7677 sh_nbsd_nat_target.
7678 (_initialize_shnbsd_nat): Adjust to C++ification.
7679 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7680 (inf_ptrace_xfer_partial): Delete.
7681 (sparc_xfer_partial, sparc_target): Delete.
7682 * sparc-nat.h (sparc_fetch_inferior_registers)
7683 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7684 (sparc_target): Delete function declaration.
7685 (sparc_target): New template class.
7686 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7687 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7688 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7689 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7690 add_target.
7691 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7692 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7693 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7694 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7695 add_target.
7696 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7697 (the_vax_bsd_nat_target): New.
7698 (vaxbsd_fetch_inferior_registers)
7699 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7700 methods.
7701 (_initialize_vaxbsd_nat): Adjust to C++ification.
7702
7703 * bsd-kvm.c (bsd_kvm_target): New class.
7704 (bsd_kvm_ops): Now a bsd_kvm_target.
7705 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7706 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7707 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7708 bsd_kvm_target.
7709 (bsd_kvm_return_one): Delete.
7710 (bsd_kvm_add_target): Adjust to C++ification.
7711
7712 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7713 (nto_procfs_target_procfs): New classes.
7714 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7715 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7716 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7717 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7718 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7719 (procfs_remove_hw_breakpoint, procfs_resume)
7720 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7721 (procfs_kill_inferior, procfs_store_registers)
7722 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7723 as methods of nto_procfs_target.
7724 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7725 (nto_native_ops): Delete.
7726 (procfs_open, procfs_native_open): Delete.
7727 (nto_native_ops): Now an nto_procfs_target_native.
7728 (init_procfs_targets): Adjust to C++ification.
7729 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7730 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7731 Refactor as methods of nto_procfs_target.
7732
7733 * go32-nat.c (go32_nat_target): New class.
7734 (the_go32_nat_target): New.
7735 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7736 (go32_store_registers, go32_xfer_partial, go32_files_info)
7737 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7738 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7739 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7740 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7741 (go32_target): Delete.
7742 (_initialize_go32_nat): Adjust to C++ification.
7743
7744 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7745 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7746 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7747 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7748 gnu_nat_target.
7749 (gnu_target): Delete.
7750 * gnu-nat.h (gnu_target): Delete.
7751 (gnu_nat_target): New class.
7752 * i386-gnu-nat.c (gnu_base_target): New.
7753 (i386_gnu_nat_target): New class.
7754 (the_i386_gnu_nat_target): New.
7755 (_initialize_i386gnu_nat): Adjust to C++ification.
7756
7757 2018-05-02 Pedro Alves <palves@redhat.com>
7758
7759 * bfd-target.c (target_bfd_xclose): Rename to ...
7760 (target_bfd_close): ... this.
7761 (target_bfd_reopen): Adjust.
7762 * target.c (target_close): Remove references to to_xclose.
7763 * target.h (target_ops::to_xclose): Delete.
7764 (target_ops::to_close): Update comments.
7765
7766 2018-05-02 Pedro Alves <palves@redhat.com>
7767
7768 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7769 "linux-nat.h".
7770 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7771 * inf-ptrace.c (inf_ptrace_register_u_offset)
7772 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7773 (inf_ptrace_store_register, inf_ptrace_store_registers)
7774 (inf_ptrace_trad_target): Move to ...
7775 * linux-nat-trad.c: ... this new file.
7776 * linux-nat-trad.h: New file.
7777 * linux-nat.c (linux_target_install_ops): Make extern.
7778 (linux_trad_target): Delete.
7779 * linux-nat.h (linux_trad_target): Delete declaration.
7780 (linux_target_install_ops): Declare.
7781 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7782 "linux-nat.h".
7783
7784 2018-05-02 Pedro Alves <palves@redhat.com>
7785
7786 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7787 procfs_target/add_target here.
7788 * procfs.c (procfs_target): Make static.
7789 (_initialize_procfs): Call add_target here.
7790 * procfs.h (struct target_ops): Remove forward declaration.
7791 (procfs_target): Remove declaration.
7792 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7793
7794 2018-05-02 Pedro Alves <palves@redhat.com>
7795
7796 * procfs.c (procfs_stopped_by_watchpoint)
7797 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7798 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7799 Forward declare.
7800 (procfs_use_watchpoints): Delete, move contents...
7801 (procfs_target): ... here.
7802 * procfs.h (procfs_use_watchpoints): Delete declaration.
7803 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7804 procfs_use_watchpoints.
7805 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7806 procfs_use_watchpoints.
7807
7808 2018-05-02 Tom Tromey <tom@tromey.com>
7809
7810 PR python/20084:
7811 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7812 and var_zuinteger_unlimited.
7813 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7814 and PARAM_ZUINTEGER_UNLIMITED.
7815 (set_parameter_value): Handle var_zuinteger and
7816 var_zuinteger_unlimited.
7817 (add_setshow_generic): Likewise.
7818 (parmpy_init): Likewise.
7819
7820 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7821
7822 PR rust/23124
7823 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7824 pointer is not null before dereferencing it.
7825
7826 2018-04-30 Tom Tromey <tom@tromey.com>
7827
7828 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7829 is_mi_like_p.
7830
7831 2018-04-30 Tom Tromey <tom@tromey.com>
7832
7833 * breakpoint.c (mention): Remove use of is_mi_like_p.
7834 (print_mention_ranged_breakpoint): Likewise.
7835 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7836 of is_mi_like_p.
7837
7838 2018-04-30 Tom Tromey <tom@tromey.com>
7839
7840 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7841
7842 2018-04-30 Tom Tromey <tom@tromey.com>
7843
7844 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7845 (info_spu_event_command): Remove some uses of is_mi_like_p.
7846
7847 2018-04-30 Tom Tromey <tom@tromey.com>
7848
7849 * python/py-framefilter.c (py_print_single_arg)
7850 (enumerate_locals, py_print_args, py_print_frame): Remove some
7851 uses of is_mi_like_p.
7852
7853 2018-04-30 Tom Tromey <tom@tromey.com>
7854
7855 * ui-out.c: Update.
7856 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7857 * ui-out.h (ui_out::is_mi_like_p): Now const.
7858 (ui_out::do_is_mi_like_p): Now const.
7859 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7860
7861 2018-04-30 Tom Tromey <tom@tromey.com>
7862
7863 * varobj.c (varobj_set_visualizer): Use new_reference.
7864 * python/python.c (gdbpy_decode_line): Use new_reference.
7865 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7866 new_reference.
7867
7868 2018-04-30 Tom Tromey <tom@tromey.com>
7869
7870 * varobj.c (install_new_value): Use new_reference.
7871 * value.h (value_incref): Return void. Swap intro comment with
7872 value_decref.
7873 * value.c (set_value_parent): Use new_reference.
7874 (value_incref): Return void. Update intro comment.
7875 (release_value): Use new_reference.
7876 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7877
7878 2018-04-30 Tom Tromey <tom@tromey.com>
7879
7880 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7881 * gdb_bfd.h (new_bfd_ref): Remove.
7882 (gdb_bfd_open): Update comment.
7883 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7884 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7885 (gdb_bfd_fdopenr): Use new_reference.
7886 * exec.c (exec_file_attach): Use new_reference.
7887
7888 2018-04-30 Tom Tromey <tom@tromey.com>
7889
7890 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7891 method.
7892
7893 2018-04-30 Tom Tromey <tom@tromey.com>
7894
7895 * jit.c (jit_read_code_entry): Use type_align.
7896 * i386-tdep.c (i386_gdbarch_init): Don't call
7897 set_gdbarch_long_long_align_bit.
7898 * gdbarch.sh: Remove long_long_align_bit.
7899 * gdbarch.c, gdbarch.h: Rebuild.
7900 * arc-tdep.c (arc_type_align): New function.
7901 (arc_gdbarch_init): Use arc_type_align. Don't call
7902 set_gdbarch_long_long_align_bit.
7903
7904 2018-04-30 Tom Tromey <tom@tromey.com>
7905
7906 * rust-lang.c (rust_type_alignment): Remove.
7907 (rust_composite_type): Use type_align.
7908
7909 2018-04-30 Tom Tromey <tom@tromey.com>
7910
7911 * NEWS: Mention Type.align.
7912 * python/py-type.c (typy_get_alignof): New function.
7913 (type_object_getset): Add "alignof".
7914
7915 2018-04-30 Tom Tromey <tom@tromey.com>
7916
7917 PR exp/17095:
7918 * NEWS: Update.
7919 * std-operator.def (UNOP_ALIGNOF): New operator.
7920 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7921 New.
7922 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7923 * c-lang.c (c_op_print_tab): Add alignof.
7924 * c-exp.y (ALIGNOF): New token.
7925 (exp): Add "ALIGNOF" production.
7926 (ident_tokens): Add _Alignof and alignof.
7927
7928 2018-04-30 Tom Tromey <tom@tromey.com>
7929
7930 * i386-tdep.c (i386_type_align): New function.
7931 (i386_gdbarch_init): Update.
7932 * gdbarch.sh (type_align): New method.
7933 * gdbarch.c, gdbarch.h: Rebuild.
7934 * arch-utils.h (default_type_align): Declare.
7935 * arch-utils.c (default_type_align): New function.
7936 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7937 (struct type) <align_log2>: New field.
7938 <instance_flags>: Now a bitfield.
7939 (TYPE_RAW_ALIGN): New macro.
7940 (type_align, type_raw_align, set_type_align): Declare.
7941 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7942 functions.
7943 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7944 (get_alignment, maybe_set_alignment): New functions.
7945 (read_structure_type, read_enumeration_type, read_array_type)
7946 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7947 (read_subrange_type, read_base_type): Set type alignment.
7948
7949 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7950
7951 * dwarf2read.c (read_index_from_section): Use bool.
7952
7953 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7954
7955 PR gdb/22950
7956 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7957 with #ifdef.
7958
7959 2018-04-29 John Reiser <jreiser@BitWagon.com>
7960
7961 PR build/22873
7962 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7963 last step, and do it atomically.
7964
7965 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7966
7967 * compile/compile-c-types.c (convert_int, convert_float):
7968 Update for C FE v1.
7969
7970 2018-04-27 Tom Tromey <tom@tromey.com>
7971
7972 PR rust/22545:
7973 * rust-lang.c (rust_inclusive_range_type_p): New function.
7974 (rust_range): Handle inclusive ranges.
7975 (rust_compute_range): Likewise.
7976 * rust-exp.y (struct rust_op) <inclusive>: New field.
7977 (DOTDOTEQ): New constant.
7978 (range_expr): Add "..=" productions.
7979 (operator_tokens): Add "..=" token.
7980 (ast_range): Add "inclusive" parameter.
7981 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7982 ranges.
7983 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7984 bounds values.
7985 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7986 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7987 Update comments.
7988 * expprint.c (print_subexp_standard): Handle new bounds values.
7989 (dump_subexp_body_standard): Likewise.
7990
7991 2018-04-27 Tom Tromey <tom@tromey.com>
7992
7993 * configure: Rebuild.
7994 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7995 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7996 "OVERRIDE".
7997 (class symbol_needs_eval_context): Likewise.
7998 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7999 (mock_mapped_index::symbol_name_at): Use "override". Remove
8000 "virtual".
8001 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8002 "override".
8003 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8004 * aarch64-tdep.c (instruction_reader::read): Use "override".
8005 (instruction_reader_test::read): Likewise.
8006 * arm-tdep.c (instruction_reader::read): Use "override".
8007 (instruction_reader_thumb::read): Likewise.
8008
8009 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8010
8011 PR remote/9665
8012 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8013 instead of remote_send.
8014 (remote_send): Remove.
8015
8016 2018-04-26 Pedro Alves <palves@redhat.com>
8017
8018 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8019 find_function_start_sal instead of find_pc_line.
8020
8021 2018-04-26 Pedro Alves <palves@redhat.com>
8022
8023 * breakpoint.c (set_breakpoint_location_function): Handle
8024 mst_data_gnu_ifunc.
8025 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8026 * elfread.c (elf_symtab_read): Give data symbols with
8027 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8028 (elf_rel_plt_read): Update comment.
8029 * linespec.c (convert_linespec_to_sals): Handle
8030 mst_data_gnu_ifunc.
8031 (minsym_found): Handle mst_data_gnu_ifunc.
8032 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8033 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8034 * parse.c (find_minsym_type_and_address): Handle
8035 mst_data_gnu_ifunc.
8036 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8037 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8038 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8039 comment.
8040 <mst_data_gnu_ifunc>: New enumerator.
8041
8042 2018-04-26 Pedro Alves <palves@redhat.com>
8043
8044 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8045 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8046 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8047 Handle it.
8048 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8049 (lookup_minimal_symbol_by_pc): Adjust.
8050 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8051 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8052 * minsyms.h (lookup_msym_prefer): New enum.
8053 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8054 parameter by a lookup_msym_prefer parameter.
8055
8056 2018-04-26 Pedro Alves <palves@redhat.com>
8057
8058 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8059 ends in "@plt" instead of looking at the symbol's section.
8060
8061 2018-04-26 Pedro Alves <palves@redhat.com>
8062
8063 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8064 all references.
8065 (find_pc_partial_function_gnu_ifunc): Rename to ...
8066 (find_pc_partial_function): ... this, and remove references to
8067 'is_gnu_ifunc_p'.
8068 (find_pc_partial_function): Delete old implementation.
8069 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8070
8071 2018-04-26 Pedro Alves <palves@redhat.com>
8072
8073 * linespec.c (struct bound_minimal_symbol_search_key): New.
8074 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8075 skip first line if we found a GNU ifunc minimal symbol by name.
8076 (compare_msymbols): Change parameters to work with a destructured
8077 lhs minsym.
8078 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8079 functions.
8080
8081 2018-04-26 Pedro Alves <palves@redhat.com>
8082
8083 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8084 ifunc targets here. Instead, if we have an ifunc minsym, use its
8085 address/name.
8086 (add_location_to_breakpoint): Store the minsym and the objfile in
8087 the breakpoint location.
8088 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8089 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8090 Record the minsym in the sal.
8091 * symtab.h (symtab_and_line) <msymbol>: New field.
8092
8093 2018-04-26 Pedro Alves <palves@redhat.com>
8094
8095 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8096 unless we actually resolved the ifunc.
8097
8098 2018-04-26 Pedro Alves <palves@redhat.com>
8099
8100 * c-exp.y (variable production): Prefer ifunc minsyms over
8101 regular function symbols.
8102 * symtab.c (find_gnu_ifunc): New function.
8103 * minsyms.h (lookup_msym_prefer): New enum.
8104 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8105 parameter by a lookup_msym_prefer parameter.
8106 * symtab.h (find_gnu_ifunc): New declaration.
8107
8108 2018-04-26 Pedro Alves <palves@redhat.com>
8109
8110 * blockframe.c (find_gnu_ifunc_target_type): New function.
8111 (find_function_type): New.
8112 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8113 return a value with a memory address.
8114 (eval_call): For calls to GNU ifunc functions, try to find the
8115 type of the target function from the type that the resolver
8116 returns.
8117 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8118 symbols.
8119 * infcall.c (find_function_return_type): Delete.
8120 (find_function_addr): Add 'function_type' parameter. For calls to
8121 GNU ifunc functions, try to find the type of the target function
8122 from the type that the resolver returns, and return it via
8123 FUNCTION_TYPE.
8124 (call_function_by_hand_dummy): Adjust to use the function type
8125 returned by find_function_addr.
8126 (find_function_addr): Add 'function_type' parameter and move
8127 description here.
8128 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8129 declarations.
8130
8131 2018-04-26 Pedro Alves <palves@redhat.com>
8132
8133 * c-exp.y (variable production): Skip finding an alias for ifunc
8134 symbols.
8135
8136 2018-04-26 Pedro Alves <palves@redhat.com>
8137
8138 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8139
8140 2018-04-25 Pedro Alves <palves@redhat.com>
8141
8142 * infcmd.c (kill_command): Print the pid as string, not the whole
8143 thread's ptid. Add comment. s/has been killed/killed/ in output
8144 message.
8145 * remote.c (remote_detach_1): Print the pid as string, not the
8146 whole thread's ptid.
8147
8148 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8149 Sergio Durigan Junior <sergiodj@redhat.com>
8150 Pedro Alves <palves@redhat.com>
8151
8152 * infcmd.c (kill_command): Print message when inferior has
8153 been killed.
8154 * inferior.c (print_inferior_events): Remove 'static'. Set as
8155 '1'.
8156 (add_inferior): Improve message printed when
8157 'print_inferior_events' is on.
8158 (exit_inferior): Remove message printed when
8159 'print_inferior_events' is on.
8160 (detach_inferior): Improve message printed when
8161 'print_inferior_events' is on.
8162 (initialize_inferiors): Use 'add_inferior_silent' to set
8163 'current_inferior_'.
8164 * inferior.h (print_inferior_events): Declare here as
8165 'extern'.
8166 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8167 '[Detaching...]' messages when 'print_inferior_events' is on.
8168 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8169 as prefix/suffix for messages. Remove periods. Fix erroneous
8170 'Detaching after fork from child...', replace it by '... from
8171 parent...'.
8172 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8173 prefix/suffix when printing 'Detaching...' messages. Print
8174 them when 'print_inferior_events' is on.
8175 * remote.c (remote_detach_1): Print message when detaching
8176 from inferior and '!is_fork_parent'.
8177
8178 2018-04-24 Tom Tromey <tom@tromey.com>
8179
8180 * cli-out.h: Reindent.
8181
8182 2018-04-24 Tom Tromey <tom@tromey.com>
8183
8184 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8185 (cli_ui_out::do_field_string): Use fputs_filtered.
8186 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8187
8188 2018-04-23 Tom Tromey <tom@tromey.com>
8189
8190 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8191 gdb::unique_xmalloc_ptr.
8192
8193 2018-04-23 Tom Tromey <tom@tromey.com>
8194
8195 * configure: Rebuild.
8196
8197 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8198
8199 PR gdb/23095
8200 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8201 prepare_for_testing. Set normal_bp to r_debug_state if target
8202 is bsd.
8203
8204 2018-04-21 Pedro Alves <palves@redhat.com>
8205 Rajendra SY <rajendra.sy@gmail.com>
8206
8207 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8208 * remote.c (extended_remote_attach): In all-stop mode, mark the
8209 thread as executing.
8210
8211 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8212
8213 * thread.c (thread_apply_all_command): Fix comment.
8214 (thread_command): Fix comment.
8215
8216 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8217
8218 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8219 parameter.
8220 * features/aarch64-core.c (create_feature_aarch64_core):
8221 Regenerate.
8222 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8223 Likewise.
8224 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8225 Likewise.
8226 * features/i386/32bit-avx512.c
8227 (create_feature_i386_32bit_avx512): Likewise.
8228 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8229 Likewise.
8230 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8231 Likewise.
8232 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8233 Likewise.
8234 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8235 Likewise.
8236 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8237 Likewise.
8238 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8239 Likewise.
8240 * features/i386/64bit-avx512.c
8241 (create_feature_i386_64bit_avx512): Likewise.
8242 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8243 Likewise.
8244 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8245 Likewise.
8246 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8247 Likewise.
8248 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8249 Likewise.
8250 * features/i386/64bit-segments.c
8251 (create_feature_i386_64bit_segments): Likewise.
8252 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8253 Likewise.
8254 * features/i386/x32-core.c
8255 (create_feature_i386_x32_core): Likewise.
8256 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8257 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8258 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8259 * target-descriptions.c: In generated code, don't pass xml
8260 filename.
8261
8262 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8263
8264 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8265 (print_xml_feature::visit_post): Likewise.
8266 (print_xml_feature::visit): Likewise.
8267 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8268 (print_xml_feature): Add new class.
8269 * regformats/regdat.sh: Null xmltarget on feature targets.
8270 * target-descriptions.c (struct target_desc): Add xmltarget.
8271 (maintenance_check_tdesc_xml_convert): Add unittest function.
8272 (tdesc_get_features_xml): Add function to get xml.
8273 (maintenance_check_xml_descriptions): Test xml generation.
8274 * xml-tdesc.c (string_read_description_xml): Add function.
8275 * xml-tdesc.h (string_read_description_xml): Add declaration.
8276
8277 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8278
8279 * features/Makefile: Add feature marker to targets with new style
8280 target descriptions.
8281 * regformats/aarch64.dat: Regenerate.
8282 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8283 * regformats/i386/amd64-avx-linux.dat: Likewise.
8284 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8285 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8286 * regformats/i386/amd64-linux.dat: Likewise.
8287 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8288 * regformats/i386/amd64.dat: Likewise.
8289 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8290 * regformats/i386/i386-avx-linux.dat: Likewise.
8291 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8292 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8293 * regformats/i386/i386-linux.dat: Likewise.
8294 * regformats/i386/i386-mmx-linux.dat: Likewise.
8295 * regformats/i386/i386-mpx-linux.dat: Likewise.
8296 * regformats/i386/i386.dat: Likewise.
8297 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8298 * regformats/i386/x32-avx-linux.dat: Likewise.
8299 * regformats/i386/x32-linux.dat: Likewise.
8300 * regformats/tic6x-c62x-linux.dat: Likewise.
8301 * regformats/tic6x-c64x-linux.dat: Likewise.
8302 * regformats/tic6x-c64xp-linux.dat: Likewise.
8303 * regformats/regdat.sh: Parse feature marker.
8304
8305 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8306
8307 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8308 (tdesc_osabi_name): Likewise.
8309 * target-descriptions.c (tdesc_architecture_name): Add new
8310 function.
8311 (tdesc_osabi_name): Likewise.
8312
8313 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8314
8315 * common/tdesc.c (tdesc_predefined_type): Move to here.
8316 (tdesc_named_type): Likewise.
8317 (tdesc_create_vector): Likewise.
8318 (tdesc_create_struct): Likewise.
8319 (tdesc_set_struct_size): Likewise.
8320 (tdesc_create_union): Likewise.
8321 (tdesc_create_flags): Likewise.
8322 (tdesc_create_enum): Likewise.
8323 (tdesc_add_field): Likewise.
8324 (tdesc_add_typed_bitfield): Likewise.
8325 (tdesc_add_bitfield): Likewise.
8326 (tdesc_add_flag): Likewise.
8327 (tdesc_add_enum_value): Likewise.
8328 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8329 (struct tdesc_type_vector): Likewise.
8330 (struct tdesc_type_field): Likewise.
8331 (struct tdesc_type_with_fields): Likewise.
8332 (tdesc_create_enum): Add declaration.
8333 (tdesc_add_typed_bitfield): Likewise.
8334 (tdesc_add_enum_value): Likewise.
8335 * target-descriptions.c (tdesc_type_field): Move from here.
8336 (tdesc_type_builtin): Likewise.
8337 (tdesc_type_vector): Likewise.
8338 (tdesc_type_with_fields): Likewise.
8339 (tdesc_predefined_types): Likewise.
8340 (tdesc_named_type): Likewise.
8341 (tdesc_create_vector): Likewise.
8342 (tdesc_create_struct): Likewise.
8343 (tdesc_set_struct_size): Likewise.
8344 (tdesc_create_union): Likewise.
8345 (tdesc_create_flags): Likewise.
8346 (tdesc_create_enum): Likewise.
8347 (tdesc_add_field): Likewise.
8348 (tdesc_add_typed_bitfield): Likewise.
8349 (tdesc_add_bitfield): Likewise.
8350 (tdesc_add_flag): Likewise.
8351 (tdesc_add_enum_value): Likewise.
8352 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8353 (tdesc_add_typed_bitfield): Likewise.
8354 (tdesc_add_enum_value): Likewise.
8355
8356 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8357
8358 * common/tdesc.c (tdesc_feature::accept): Move to here.
8359 (tdesc_feature::operator==): Likewise.
8360 (tdesc_create_reg): Likewise.
8361 * common/tdesc.h (tdesc_type_kind): Likewise.
8362 (struct tdesc_type): Likewise.
8363 (struct tdesc_feature): Likewise.
8364 * regformats/regdat.sh: Create a feature.
8365 * target-descriptions.c (tdesc_type_kind): Move from here.
8366 (tdesc_type): Likewise.
8367 (tdesc_type_up): Likewise.
8368 (tdesc_feature): Likewise.
8369 (tdesc_create_reg): Likewise.
8370
8371 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8372
8373 * Makefile.in: Add arch/tdesc.c
8374 * common/tdesc.c: New file.
8375 * common/tdesc.h (tdesc_element_visitor): Move to here.
8376 (tdesc_element): Likewise.
8377 (tdesc_reg): Likewise.
8378 (tdesc_reg_up): Likewise.
8379 * regformats/regdef.h (reg): Add offset to constructors.
8380 * target-descriptions.c (tdesc_element_visitor): Move from here.
8381 (tdesc_element): Likewise.
8382 (tdesc_reg): Likewise.
8383 (tdesc_reg_up): Likewise.
8384
8385 2018-04-17 Tom Tromey <tom@tromey.com>
8386
8387 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8388 discriminant field.
8389
8390 2018-04-17 Tom Tromey <tom@tromey.com>
8391
8392 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8393
8394 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8395
8396 * symtab.c (print_symbol_info): Skip printing filename and line
8397 number when `last' is NULL.
8398 (symtab_symbol_info): Use empty string instead of NULL for first
8399 invocation of print_symbol_info.
8400 (rbreak_command): Pass NULL to `last' parameter of
8401 print_symbol_info.
8402
8403 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8404
8405 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8406 instead of nullptr.
8407
8408 2018-04-16 Pedro Alves <palves@redhat.com>
8409
8410 * MAINTAINERS (sh): Remove.
8411 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8412 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8413 (ALLDEPFILES): Remove sh64-tdep.c.
8414 * NEWS: Mentions that support for SH-5/SH64 is removed.
8415 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8416 (sh*-*-openbsd*): Ditto.
8417 (sh64-*-elf*): Remove.
8418 (sh*): Remove.
8419 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8420 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8421 * sh-tdep.c: No longer include "sh64-tdep.h".
8422 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8423 * sh64-tdep.c, sh64-tdep.h: Remove files.
8424
8425 2018-04-16 Pedro Alves <palves@redhat.com>
8426
8427 * MAINTAINERS: Remove m88k.
8428 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8429 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8430 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8431 * NEWS: Mention that support for m88k was removed.
8432 * configure.host (m88*-*-*): Remove support.
8433 * configure.nat (m88k-*-*): Remove support.
8434 * configure.tgt (m88*-*-openbsd*): Remove.
8435 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8436
8437 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8438
8439 * configure.tgt (x86_tobjs): New variable.
8440 (amd64_tobjs, i386_tobjs): Use it.
8441
8442 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8443
8444 * symtab.c (print_symbol_info): Precede the symbol definition by
8445 the line number when available.
8446 * NEWS: Advertise this enhancement.
8447
8448 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8449
8450 * NEWS (New options): announce set/show record btrace cpu.
8451 * btrace.c: Include record-btrace.h.
8452 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8453 the vendor is unknown.
8454 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8455 Maybe overwrite the btrace configuration's cpu.
8456 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8457 (btrace_fetch): Add cpu parameter. Update callers.
8458 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8459 Maybe overwrite the btrace configuration's cpu. Skip enabling
8460 errata workarounds if the vendor is unknown.
8461 * python/py-record-btrace.c: Include record-btrace.h.
8462 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8463 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8464 * record-btrace.c (record_btrace_cpu_state_kind): New.
8465 (record_btrace_cpu): New.
8466 (set_record_btrace_cpu_cmdlist): New.
8467 (record_btrace_get_cpu): New.
8468 (require_btrace_thread, record_btrace_info)
8469 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8470 (cmd_set_record_btrace_cpu_none): New.
8471 (cmd_set_record_btrace_cpu_auto): New.
8472 (cmd_set_record_btrace_cpu): New.
8473 (cmd_show_record_btrace_cpu): New.
8474 (_initialize_record_btrace): Initialize set/show record btrace cpu
8475 commands.
8476 * record-btrace.h (record_btrace_get_cpu): New.
8477
8478 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8479
8480 * record.c (set_record_command): Fix typo in message.
8481
8482 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8483
8484 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8485
8486 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8487
8488 * infrun.c (process_event_stop_test): Call
8489 gdbarch_in_indirect_branch_thunk.
8490 * gdbarch.sh (in_indirect_branch_thunk): New.
8491 * gdbarch.c: Regenerated.
8492 * gdbarch.h: Regenerated.
8493 * x86-tdep.h: New.
8494 * x86-tdep.c: New.
8495 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8496 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8497 (ALLDEPFILES): Add x86-tdep.c.
8498 * arch-utils.h (default_in_indirect_branch_thunk): New.
8499 * arch-utils.c (default_in_indirect_branch_thunk): New.
8500 * i386-tdep: Include x86-tdep.h.
8501 (i386_in_indirect_branch_thunk): New.
8502 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8503 function.
8504 * amd64-tdep: Include x86-tdep.h.
8505 (amd64_in_indirect_branch_thunk): New.
8506 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8507
8508 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8509
8510 PR gdb/23053
8511 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8512 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8513 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8514 regression.
8515
8516 2018-04-12 Tom Tromey <tom@tromey.com>
8517
8518 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8519 (rust_evaluate_subexp): Likewise.
8520
8521 2018-04-12 Pedro Alves <palves@redhat.com>
8522
8523 * procfs.c (procfs_detach): Make forward declaration's prototype
8524 match definition's protototype.
8525 (proc_get_LDT_entry): Remove stale do_cleanups call.
8526
8527 2018-04-12 Pedro Alves <palves@redhat.com>
8528
8529 * target.h (target_ops::to_has_exited): Delete.
8530 (target_has_exited): Delete.
8531 * target-delegates.c: Regenerate.
8532
8533 2018-04-11 Pedro Alves <palves@redhat.com>
8534
8535 * target.c (fileio_fh_t::t): Add comment.
8536 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8537 (target_fileio_close): Handle a NULL target.
8538 (invalidate_fileio_fh): New.
8539 (target_close): Call it.
8540 * remote.c (remote_hostio_send_command): No longer check whether
8541 remote_desc is open.
8542
8543 2018-04-11 Pedro Alves <palves@redhat.com>
8544
8545 * target.c (fileio_fh_t): Make it a named struct instead of a
8546 typedef.
8547 (fileio_fh_t::is_closed): New method.
8548 (DEF_VEC_O (fileio_fh_t)): Remove.
8549 (fileio_fhandles): Now a std::vector.
8550 (is_closed_fileio_fh): Delete.
8551 (acquire_fileio_fd): Adjust. Rename parameters.
8552 (release_fileio_fd): Adjust.
8553 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8554 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8555 (target_fileio_close): Adjust.
8556
8557 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8558
8559 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8560 index.
8561
8562 2018-04-10 Pedro Alves <palves@redhat.com>
8563
8564 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8565 (scoped_finish_thread_state): New class.
8566 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8567 cleanup.
8568 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8569 (fetch_inferior_event, normal_stop): Likewise.
8570 * thread.c (finish_thread_state_cleanup): Delete.
8571
8572 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8573 Pedro Alves <palves@redhat.com>
8574
8575 * value.c: Include "selftest.h" and "common/array-view.h".
8576 (struct range) <operator ==>: New.
8577 (test_ranges_contain): New.
8578 (check_ranges_vector): New.
8579 (test_insert_into_bit_range_vector): New.
8580 (_initialize_values): Register selftests.
8581 * common/array-view.h (operator==, operator!=): New.
8582
8583 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8584
8585 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8586 an iterator.
8587 * inline-frame.c: Include <algorithm>.
8588 (struct inline_state): Add constructor.
8589 (inline_state_s): Remove.
8590 (DEF_VEC_O(inline_state_s)): Remove.
8591 (inline_states): Change type to std::vector.
8592 (find_inline_frame_state): Adjust to std::vector.
8593 (allocate_inline_frame_state): Remove.
8594 (clear_inline_frame_state): Adjust to std::vector.
8595 (skip_inline_frames): Adjust to std::vector.
8596
8597 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8598
8599 * tracepoint.h (struct trace_state_variable): Add constructor.
8600 <name>: Change type to std::string.
8601 * tracepoint.c (tsv_s): Remove.
8602 (DEF_VEC_O(tsv_s)): Remove.
8603 (tvariables): Change to std::vector.
8604 (create_trace_state_variable): Adjust to std::vector.
8605 (find_trace_state_variable): Likewise.
8606 (find_trace_state_variable_by_number): Likewise.
8607 (delete_trace_state_variable): Likewise.
8608 (trace_variable_command): Adjust to std::string.
8609 (delete_trace_variable_command): Likewise.
8610 (tvariables_info_1): Adjust to std::vector.
8611 (save_trace_state_variables): Likewise.
8612 (start_tracing): Likewise.
8613 (merge_uploaded_trace_state_variables): Adjust to std::vector
8614 and std::string.
8615 * target.h (struct target_ops)
8616 <to_download_trace_state_variable>: Pass reference to
8617 trace_state_variable.
8618 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8619 * target-delegates.c: Re-generate.
8620 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8621 (mi_tsv_deleted): Likewise.
8622 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8623 * remote.c (remote_download_trace_state_variable): Change
8624 pointer to reference and adjust.
8625 * make-target-delegates (parse_argtypes): Handle references.
8626 (write_function_header): Likewise.
8627 (munge_type): Likewise.
8628
8629 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8630
8631 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8632 string_view-selftests.c.
8633 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8634 testsuite.
8635 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8636 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8637 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8638 * unittests/basic_string_view/element_access/char/1.cc:
8639 Likewise.
8640 * unittests/basic_string_view/element_access/char/empty.cc:
8641 Likewise.
8642 * unittests/basic_string_view/element_access/char/front_back.cc:
8643 Likewise.
8644 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8645 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8646 Likewise.
8647 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8648 Likewise.
8649 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8650 Likewise.
8651 * unittests/basic_string_view/operations/compare/char/1.cc:
8652 Likewise.
8653 * unittests/basic_string_view/operations/compare/char/13650.cc:
8654 Likewise.
8655 * unittests/basic_string_view/operations/copy/char/1.cc:
8656 Likewise.
8657 * unittests/basic_string_view/operations/data/char/1.cc:
8658 Likewise.
8659 * unittests/basic_string_view/operations/find/char/1.cc:
8660 Likewise.
8661 * unittests/basic_string_view/operations/find/char/2.cc:
8662 Likewise.
8663 * unittests/basic_string_view/operations/find/char/3.cc:
8664 Likewise.
8665 * unittests/basic_string_view/operations/find/char/4.cc:
8666 Likewise.
8667 * unittests/basic_string_view/operations/rfind/char/1.cc:
8668 Likewise.
8669 * unittests/basic_string_view/operations/rfind/char/2.cc:
8670 Likewise.
8671 * unittests/basic_string_view/operations/rfind/char/3.cc:
8672 Likewise.
8673 * unittests/basic_string_view/operations/substr/char/1.cc:
8674 Likewise.
8675 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8676 * unittests/string_view-selftests.c: New file.
8677
8678 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8679
8680 * unittests/basic_string_view/capacity/1.cc: New file.
8681 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8682 * unittests/basic_string_view/cons/char/1.cc: New file.
8683 * unittests/basic_string_view/cons/char/2.cc: New file.
8684 * unittests/basic_string_view/cons/char/3.cc: New file.
8685 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8686 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8687 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8688 * unittests/basic_string_view/element_access/char/1.cc: New file.
8689 * unittests/basic_string_view/element_access/char/2.cc: New file.
8690 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8691 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8692 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8693 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8694 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8695 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8696 * unittests/basic_string_view/include.cc: New file.
8697 * unittests/basic_string_view/inserters/char/1.cc: New file.
8698 * unittests/basic_string_view/inserters/char/2.cc: New file.
8699 * unittests/basic_string_view/inserters/char/3.cc: New file.
8700 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8701 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8702 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8703 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8704 * unittests/basic_string_view/literals/types.cc: New file.
8705 * unittests/basic_string_view/literals/values.cc: New file.
8706 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8707 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8708 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8709 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8710 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8711 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8712 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8713 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8714 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8715 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8716 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8717 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8718 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8719 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8720 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8721 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8722 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8723 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8724 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8725 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8726 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8727 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8728 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8729 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8730 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8731 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8732 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8733 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8734 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8735 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8736 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8737 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8738 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8739 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8740 * unittests/basic_string_view/operators/char/2.cc: New file.
8741 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8742 * unittests/basic_string_view/range_access/char/1.cc: New file.
8743 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8744 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8745 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8746 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8747 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8748 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8749 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8750 * unittests/basic_string_view/typedefs.cc: New file.
8751 * unittests/basic_string_view/types/1.cc: New file.
8752
8753 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8754
8755 * common/gdb_string_view.h: Remove libstdc++ implementation
8756 details, adjust to gdb reality.
8757 * common/gdb_string_view.tcc: Likewise.
8758 * cli/cli-script.c (struct string_view): Remove.
8759 (user_args) <m_args>: Change element type to gdb::string_view.
8760 (user_args::insert_args): Adjust.
8761
8762 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8763
8764 * common/gdb_string_view.h: New file.
8765 * common/gdb_string_view.tcc: New file.
8766
8767 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8768
8769 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8770 * configure: Re-generate.
8771
8772 2018-04-09 Pedro Alves <palves@redhat.com>
8773
8774 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8775 (set_target_gdbarch): Call
8776 gdb::observers::architecture_changed.notify instead of
8777 observer_notify_architecture_changed.
8778
8779 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8780
8781 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8782 (do_restore_current_traceframe_cleanup): Remove.
8783 (restore_current_traceframe_cleanup_dtor): Remove.
8784 (make_cleanup_restore_current_traceframe): Remove.
8785 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8786 New.
8787 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8788 * infrun.c (fetch_inferior_event): Use
8789 scoped_restore_current_traceframe.
8790
8791 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8792
8793 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8794 Remove.
8795 <n_allocated_type_units>: Remove.
8796 <all_type_units>: Change to std::vector.
8797 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8798 to std::vector change.
8799 (dwarf2_per_objfile::get_cutu): Likewise.
8800 (dwarf2_per_objfile::get_tu): Likewise.
8801 (create_signatured_type_table_from_index): Likewise.
8802 (create_signatured_type_table_from_debug_names): Likewise.
8803 (dw2_symtab_iter_next): Likewise.
8804 (dw2_print_stats): Likewise.
8805 (dw2_expand_all_symtabs): Likewise.
8806 (dw2_expand_marked_cus): Likewise.
8807 (dw2_debug_names_iterator::next): Likewise.
8808 (dwarf2_initialize_objfile): Likewise.
8809 (add_signatured_type_cu_to_table): Likewise.
8810 (create_all_type_units): Likewise.
8811 (add_type_unit): Likewise.
8812 (struct tu_abbrev_offset): Add constructor.
8813 (build_type_psymtabs_1): Adjust to std::vector change.
8814 (print_tu_stats): Likewise.
8815 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8816 (write_debug_names): Likewise.
8817
8818 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8819
8820 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8821 Make an std::vector.
8822 <n_comp_units>: Remove.
8823 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8824 to std::vector change.
8825 (dwarf2_per_objfile::get_cutu): Likewise.
8826 (dwarf2_per_objfile::get_cu): Likewise.
8827 (create_cus_from_index): Likewise.
8828 (create_addrmap_from_index): Likewise.
8829 (create_addrmap_from_aranges): Likewise.
8830 (dwarf2_read_index): Likewise.
8831 (dw2_find_last_source_symtab): Likewise.
8832 (dw2_map_symtabs_matching_filename): Likewise.
8833 (dw2_symtab_iter_next): Likewise.
8834 (dw2_print_stats): Likewise.
8835 (dw2_expand_all_symtabs): Likewise.
8836 (dw2_expand_symtabs_with_fullname): Likewise.
8837 (dw2_expand_marked_cus): Likewise.
8838 (dw2_map_symbol_filenames): Likewise.
8839 (create_cus_from_debug_names): Likewise.
8840 (dwarf2_read_debug_names): Likewise.
8841 (dw2_debug_names_iterator::next): Likewise.
8842 (dwarf2_initialize_objfile): Likewise.
8843 (set_partial_user): Likewise.
8844 (dwarf2_build_psymtabs_hard): Likewise.
8845 (read_comp_units_from_section): Remove arguments, adjust to
8846 std::vector change.
8847 (create_all_comp_units): Adjust to std::vector and
8848 read_comp_units_from_section changes.
8849 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8850 change.
8851 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8852 (psyms_seen_size): Likewise.
8853 (write_gdbindex): Likewise.
8854 (write_debug_names): Likewise.
8855
8856 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8857
8858 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8859 with dwarf2_per_objfile.
8860 (create_cus_from_index): Likewise.
8861 (create_signatured_type_table_from_index): Likewise.
8862 (dwarf2_read_index): Likewise.
8863 (dwarf2_initialize_objfile): Likewise.
8864 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8865 per_cu rather than get_dwarf2_per_objfile.
8866
8867 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8868
8869 * dwarf2read.h (struct signatured_type): Forward declare.
8870 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8871 New methods.
8872 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8873 (dw2_get_cutu): ...this.
8874 (dwarf2_per_objfile::get_cu): Rename from...
8875 (dw2_get_cu): ...this.
8876 (dwarf2_per_objfile::get_tu): New.
8877 (create_addrmap_from_index): Adjust.
8878 (create_addrmap_from_aranges): Adjust.
8879 (dw2_find_last_source_symtab): Adjust.
8880 (dw2_map_symtabs_matching_filename): Adjust.
8881 (dw2_symtab_iter_next): Adjust.
8882 (dw2_print_stats): Adjust.
8883 (dw2_expand_all_symtabs): Adjust.
8884 (dw2_expand_symtabs_with_fullname): Adjust.
8885 (dw2_expand_marked_cus): Adjust.
8886 (dw_expand_symtabs_matching_file_matcher): Adjust.
8887 (dw2_map_symbol_filenames): Adjust.
8888 (dw2_debug_names_iterator::next): Adjust.
8889 (dwarf2_initialize_objfile): Adjust.
8890 (set_partial_user): Adjust.
8891 (dwarf2_build_psymtabs_hard): Adjust.
8892
8893 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8894
8895 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8896 Remove unused variables.
8897 (dw2_map_symtabs_matching_filename): Likewise.
8898 (dwarf2_record_block_ranges): Likewise.
8899 (dwarf2_read_addr_index): Likewise.
8900 (follow_die_offset): Likewise.
8901
8902 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8903
8904 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8905 to symbol_file_add_main.
8906
8907 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8908
8909 PR mi/22299
8910 * mi/mi-console.c (do_fputc_async_safe): New.
8911 (mi_console_file::write_async_safe): New.
8912 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8913 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8914 New.
8915 * ui-file.c (ui_file::putstrn): Adjust call to
8916 fputstrn_unfiltered.
8917 * utils.c (printchar): Replace do_fputs and do_fprintf
8918 parameters by do_fputc.
8919 (fputstr_filtered): Adjust call to printchar.
8920 (fputstr_unfiltered): Likewise.
8921 (fputstrn_filtered): Likewise.
8922 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8923 printchar.
8924 * utils.h (do_fputc_ftype): New typedef.
8925 (fputstrn_unfiltered): Add do_fputc parameter.
8926
8927 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8928
8929 * regformats/i386/i386-avx.dat: Remove.
8930
8931 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8932
8933 PR gdb/22979
8934 * amd64-tdep.c (amd64_none_init_abi): New function.
8935 (amd64_x32_none_init_abi): New function.
8936 (_initialize_amd64_tdep): Register handlers for x86-64 and
8937 x64_32 with GDB_OSABI_NONE.
8938 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8939 GDB_OSABI_NONE osabi.
8940
8941 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8942
8943 PR gdb/22980
8944 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8945 GDB_OSABI_NONE.
8946 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8947 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8948
8949 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8950
8951 * common/byte-vector.h (char_vector): New type.
8952 * target.h (target_read_alloc): Return
8953 gdb::optional<byte_vector>.
8954 (target_read_stralloc): Return gdb::optional<char_vector>.
8955 (target_get_osdata): Return gdb::optional<char_vector>.
8956 * target.c (target_read_alloc_1): Templatize. Replacement
8957 manual memory management with vector.
8958 (target_read_alloc): Change return type, adjust.
8959 (target_read_stralloc): Change return type, adjust.
8960 (target_get_osdata): Change return type, adjust.
8961 * auxv.c (struct auxv_info) <length>: Remove.
8962 <data>: Change type to gdb::optional<byte_vector>.
8963 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8964 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8965 (target_auxv_search): Adjust.
8966 (fprint_target_auxv): Adjust.
8967 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8968 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8969 (linux_make_corefile_notes): Adjust.
8970 * osdata.c (get_osdata): Adjust.
8971 * remote.c (remote_get_threads_with_qxfer): Adjust.
8972 (remote_memory_map): Adjust.
8973 (remote_traceframe_info): Adjust.
8974 (btrace_read_config): Adjust.
8975 (remote_read_btrace): Adjust.
8976 (remote_pid_to_exec_file): Adjust.
8977 * solib-aix.c (solib_aix_get_library_list): Adjust.
8978 * solib-dsbt.c (decode_loadmap): Don't free buf.
8979 (dsbt_get_initial_loadmaps): Adjust.
8980 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8981 * solib-target.c (solib_target_current_sos): Adjust.
8982 * tracepoint.c (sdata_make_value): Adjust.
8983 * xml-support.c (xinclude_start_include): Adjust.
8984 (xml_fetch_content_from_file): Adjust.
8985 * xml-support.h (xml_fetch_another): Change return type.
8986 (xml_fetch_content_from_file): Change return type.
8987 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8988 * xml-tdesc.c (file_read_description_xml): Adjust.
8989 (fetch_available_features_from_target): Change return type.
8990 (target_fetch_description_xml): Adjust.
8991 (target_read_description_xml): Adjust.
8992
8993 2018-04-06 Tom Tromey <tom@tromey.com>
8994
8995 * value.c (~value): Update.
8996 (struct value) <contents>: Now unique_xmalloc_ptr.
8997 (value_contents_bits_eq, allocate_value_contents)
8998 (value_contents_raw, value_contents_all_raw)
8999 (value_contents_for_printing, value_contents_for_printing_const)
9000 (set_value_enclosing_type): Update.
9001
9002 2018-04-06 Tom Tromey <tom@tromey.com>
9003
9004 * value.c (range_s): Remove typedef, VEC.
9005 (struct range): Add operator<.
9006 (range_lessthan): Remove.
9007 (ranges_contain): Change type.
9008 (~value): Update.
9009 (struct value) <unavailable, optimized_out>: Now std::vector.
9010 (value_entirely_available)
9011 (value_entirely_covered_by_range_vector)
9012 (value_entirely_unavailable, value_entirely_optimized_out):
9013 Update.
9014 (insert_into_bit_range_vector): Change argument type.
9015 (find_first_range_overlap): Likewise.
9016 (struct ranges_and_idx, value_contents_bits_eq)
9017 (require_not_optimized_out, require_available): Update.
9018 (ranges_copy_adjusted): Change argument types.
9019 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9020
9021 2018-04-06 Tom Tromey <tom@tromey.com>
9022
9023 * value.c (~value): Update.
9024 (struct value) <parent>: Now a value_ref_ptr.
9025 (value_parent, set_value_parent, value_address, value_copy):
9026 Update.
9027
9028 2018-04-06 Tom Tromey <tom@tromey.com>
9029
9030 * value.c (struct value): Add constructor, destructor, and member
9031 initializers.
9032 (allocate_value_lazy, value_decref): Update.
9033
9034 2018-04-06 Tom Tromey <tom@tromey.com>
9035
9036 * value.c (struct value) <released, next>: Remove.
9037 (all_values): Now a std::vector.
9038 (allocate_value_lazy): Update.
9039 (value_next): Remove.
9040 (value_mark, value_free_to_mark, release_value)
9041 (value_release_to_mark): Update.
9042
9043 2018-04-06 Tom Tromey <tom@tromey.com>
9044
9045 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9046 (free_value_chain): Remove.
9047 * value.c (free_value_chain): Remove.
9048 (value_release_to_mark): Return a std::vector.
9049 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9050 std::vector.
9051 (check_condition): Update.
9052 * eval.c (fetch_subexp_value): Change "val_chain" to a
9053 std::vector.
9054 * breakpoint.c (update_watchpoint): Update.
9055 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9056
9057 2018-04-06 Tom Tromey <tom@tromey.com>
9058
9059 * value.h (free_all_values): Remove.
9060 * value.c (free_all_values): Remove.
9061
9062 2018-04-06 Tom Tromey <tom@tromey.com>
9063
9064 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9065 (value_history_chain, value_history_count): Remove.
9066 (value_history): New global.
9067 (record_latest_value, access_value_history, show_values)
9068 (preserve_values): Update.
9069
9070 2018-04-06 Tom Tromey <tom@tromey.com>
9071
9072 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9073 * varobj.c (varobj_set_display_format, varobj_set_value)
9074 (install_default_visualizer, construct_visualizer)
9075 (install_new_value, ~varobj, varobj_get_value_type)
9076 (my_value_of_variable, varobj_editable_p): Update.
9077 * c-varobj.c (c_describe_child, c_value_of_variable)
9078 (cplus_number_of_children, cplus_describe_child): Update.
9079 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9080 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9081 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9082
9083 2018-04-06 Tom Tromey <tom@tromey.com>
9084
9085 * printcmd.c (last_examine_address): Change type to
9086 value_ref_ptr.
9087 (do_examine, x_command): Update.
9088
9089 2018-04-06 Tom Tromey <tom@tromey.com>
9090
9091 * value.c (release_value): Update.
9092 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9093 (struct bpstats) <val>: Now a value_ref_ptr.
9094 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9095 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9096 (~watchpoint, print_it_watchpoint, watch_command_1)
9097 (invalidate_bp_value_on_memory_change): Update.
9098
9099 2018-04-06 Tom Tromey <tom@tromey.com>
9100
9101 * varobj.c (varobj_clear_saved_item)
9102 (update_dynamic_varobj_children, install_new_value, ~varobj):
9103 Update.
9104 * value.h (value_incref): Move declaration earlier.
9105 (value_decref): Rename from value_free.
9106 (struct value_ref_policy): New.
9107 (value_ref_ptr): New typedef.
9108 (struct value_deleter): Remove.
9109 (gdb_value_up): Remove typedef.
9110 (release_value): Change return type.
9111 (release_value_or_incref): Remove.
9112 * value.c (set_value_parent): Update.
9113 (value_incref): Change return type.
9114 (value_decref): Rename from value_free.
9115 (value_free_to_mark, free_all_values, free_value_chain): Update.
9116 (release_value): Return value_ref_ptr.
9117 (release_value_or_incref): Remove.
9118 (record_latest_value, set_internalvar, clear_internalvar):
9119 Update.
9120 * stack.c (info_frame_command): Don't call value_free.
9121 * python/py-value.c (valpy_dealloc, valpy_new)
9122 (value_to_value_object): Update.
9123 * printcmd.c (do_examine): Update.
9124 * opencl-lang.c (lval_func_free_closure): Update.
9125 * mi/mi-main.c (register_changed_p): Don't call value_free.
9126 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9127 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9128 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9129 value_free.
9130 * guile/scm-value.c (vlscm_free_value_smob)
9131 (vlscm_scm_from_value): Update.
9132 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9133 (frame_unwind_register_unsigned, get_frame_register_bytes)
9134 (put_frame_register_bytes): Don't call value_free.
9135 * findvar.c (address_from_register): Don't call value_free.
9136 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9137 * dwarf2loc.c (entry_data_value_free_closure)
9138 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9139 (dwarf2_evaluate_loc_desc_full): Update.
9140 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9141 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9142 (~watchpoint, watch_command_1)
9143 (invalidate_bp_value_on_memory_change): Update.
9144 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9145
9146 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9147
9148 PR gdb/23022
9149 * warning.m4: Add -Wno-error=deprecated-register.
9150 * configure: Re-generate.
9151
9152 2018-04-05 Tom Tromey <tom@tromey.com>
9153
9154 * linespec.h: Remove include of "vec.h".
9155
9156 2018-04-05 Tom Tromey <tom@tromey.com>
9157
9158 * linespec.c (typep): Remove typedef.
9159 (find_methods, find_superclass_methods): Take a std::vector.
9160 (find_method): Use std::vector.
9161
9162 2018-04-05 Tom Tromey <tom@tromey.com>
9163
9164 * utils.c (compare_strings): Remove.
9165 * utils.h (compare_strings): Remove.
9166 * objc-lang.h (find_imps): Update.
9167 * objc-lang.c (find_methods): Take a std::vector.
9168 (uniquify_strings, find_imps): Likewise.
9169 * linespec.c (find_methods): Take a std::vector.
9170 (decode_objc): Use std::vector.
9171 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9172 a std::vector.
9173 (find_method, find_function_symbols): Use std::vector.
9174
9175 2018-04-05 Tom Tromey <tom@tromey.com>
9176
9177 * completer.c (completion_tracker::completion_tracker): Remove
9178 cast.
9179 (completion_tracker::discard_completions): Likewise.
9180 * breakpoint.c (ambiguous_names_p): Remove cast.
9181 * ada-lang.c (_initialize_ada_language): Remove cast.
9182 * utils.h (streq): Update.
9183 (streq_hash): Add new declaration.
9184 * utils.c (streq): Return bool.
9185 (streq_hash): New function.
9186
9187 2018-04-05 Tom Tromey <tom@tromey.com>
9188
9189 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9190 Remove a string copy.
9191
9192 2018-04-05 Tom Tromey <tom@tromey.com>
9193
9194 * linespec.c (filter_results): Use std::vector.
9195 (decode_line_2, decode_line_full): Update.
9196
9197 2018-04-05 Tom Tromey <tom@tromey.com>
9198
9199 * linespec.c (canonical_to_fullform): Return std::string.
9200 (filter_results): Update.
9201 (struct decode_line_2_item): Add constructor.
9202 <fullform, displayform>: Now std::string.
9203 (decode_line_2_compare_items): Now a std::sort comparator.
9204 (decode_line_2): Update.
9205
9206 2018-04-05 Tom Tromey <tom@tromey.com>
9207
9208 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9209 (unexpected_linespec_error): Update.
9210 (linespec_parse_basic, parse_linespec): Update.
9211
9212 2018-04-05 Tom Tromey <tom@tromey.com>
9213
9214 * linespec.c (linespec_parse_basic): Reindent.
9215
9216 2018-04-05 Tom Tromey <tom@tromey.com>
9217
9218 * minsyms.h (iterate_over_minimal_symbols): Update.
9219 * minsyms.c (iterate_over_minimal_symbols): Take a
9220 gdb::function_view.
9221 * linespec.c (struct collect_minsyms): Remove.
9222 (compare_msyms): Now a std::sort comparator.
9223 (add_minsym): Add parameters.
9224 (search_minsyms_for_name): Update. Use std::vector.
9225
9226 2018-04-03 Tom Tromey <tom@tromey.com>
9227
9228 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9229 gdb::byte_vector.
9230
9231 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9232
9233 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9234
9235 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9236
9237 PR gdb/16959
9238 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9239 printing static type.
9240
9241 2018-04-01 Tom Tromey <tom@tromey.com>
9242
9243 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9244 (rs6000_xfer_shared_libraries): Update.
9245
9246 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9247
9248 * common/gdb_vecs.h (char_ptr): Remove.
9249 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9250
9251 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9252
9253 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9254 with std::vector.
9255 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9256
9257 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9258
9259 * tracepoint.h (struct uploaded_tp): Initialize fields.
9260 <actions, step_actions, cmd_strings>: Change type to
9261 std::vector<char *>.
9262 * tracepoint.c (get_uploaded_tp): Allocate with new.
9263 (free_uploaded_tps): Free with delete.
9264 (parse_tracepoint_definition): Adjust to std::vector change.
9265 * breakpoint.c (read_uploaded_action): Likewise.
9266 (create_tracepoint_from_upload): Likewise.
9267 * ctf.c (ctf_write_uploaded_tp): Likewise.
9268 (SET_ARRAY_FIELD): Likewise.
9269 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9270
9271 2018-03-30 Tom Tromey <tom@tromey.com>
9272
9273 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9274 std::unique_ptr.
9275 (svr4_keep_data_in_core): Update.
9276 (svr4_read_so_list): Update.
9277
9278 2018-03-30 Tom Tromey <tom@tromey.com>
9279
9280 * windows-nat.c (handle_output_debug_string, handle_exception):
9281 Update.
9282 * target.h (target_read_string): Update.
9283 * target.c (target_read_string): Change "string" to
9284 unique_xmalloc_ptr.
9285 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9286 Update.
9287 * solib-frv.c (frv_current_sos): Update.
9288 * solib-dsbt.c (dsbt_current_sos): Update.
9289 * solib-darwin.c (darwin_current_sos): Update.
9290 * linux-thread-db.c (inferior_has_bug): Update.
9291 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9292 Update. Remove alloca.
9293 * ada-lang.c (ada_main_name): Update.
9294
9295 2018-03-30 Tom Tromey <tom@tromey.com>
9296
9297 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9298 (struct dwo_file_deleter): New.
9299 (dwo_file_up): New typedef.
9300 (open_and_init_dwo_file): Use dwo_file_up.
9301 (free_dwo_file_cleanup): Remove.
9302
9303 2018-03-30 Tom Tromey <tom@tromey.com>
9304
9305 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9306 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9307
9308 2018-03-30 Tom Tromey <tom@tromey.com>
9309
9310 * dwarf2read.c (class free_cached_comp_units): New class.
9311 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9312 (free_cached_comp_units): Remove function.
9313
9314 2018-03-30 Tom Tromey <tom@tromey.com>
9315
9316 * utils.h (make_cleanup_unpush_target): Remove.
9317 * inf-ptrace.c (struct target_unpusher): New.
9318 (target_unpush_up) New typedef.
9319 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9320 target_unpush_up.
9321 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9322
9323 2018-03-27 Tom Tromey <tom@tromey.com>
9324
9325 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9326
9327 2018-03-27 Pedro Alves <palves@redhat.com>
9328 Tom Tromey <tom@tromey.com>
9329
9330 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9331 destructor. Now a class.
9332 (gdb_readline_wrapper_cleanup): Remove function.
9333 (gdb_readline_wrapper): Remove cleanups.
9334
9335 2018-03-27 Tom Tromey <tom@tromey.com>
9336
9337 * typeprint.h (struct type_print_options) <local_typedefs,
9338 global_typedefs>: Remove "struct" keyword.
9339 (class typedef_hash_table): New class.
9340 (recursively_update_typedef_hash, add_template_parameters)
9341 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9342 (find_typedef_in_hash): Don't declare.
9343 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9344 (typedef_hash_table::recursively_update): Rename from
9345 recursively_update_typedef_hash. Now a member.
9346 (typedef_hash_table::add_template_parameters): Rename from
9347 add_template_parameters. Now a member.
9348 (typedef_hash_table::typedef_hash_table): Now a constructor;
9349 rename from create_typedef_hash.
9350 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9351 rename from free_typedef_hash.
9352 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9353 (do_free_global_table): Remove.
9354 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9355 from copy_type_recursive.
9356 (create_global_typedef_table): Remove.
9357 (typedef_hash_table::find_global_typedef): Now a member of
9358 typedef_hash_table.
9359 (typedef_hash_table::find_typedef): Rename from
9360 find_typedef_in_hash; now a member.
9361 (whatis_exp): Update.
9362 * extension.h (struct ext_lang_type_printers): Add constructor and
9363 destructor.
9364 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9365 declare.
9366 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9367 Now a constructor; rename from start_ext_lang_type_printers.
9368 (ext_lang_type_printers): Now a destructor; rename from
9369 free_ext_lang_type_printers.
9370 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9371 Update.
9372 (c_type_print_base_struct_union): Update. Remove cleanups.
9373
9374 2018-03-27 Tom Tromey <tom@tromey.com>
9375
9376 * dwarf-index-write.c: Include <cmath>.
9377
9378 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9379
9380 * NEWS: Add entry describing new "set|show varsize-limit" command.
9381 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9382 command.
9383 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9384 "set variable".
9385
9386 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9387
9388 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9389 dwarf-index-write.c
9390 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9391 * dwarf-index-common.c: New file.
9392 * dwarf-index-common.h: New file.
9393 * dwarf-index-write.c: New file.
9394 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9395 (struct dwarf2_section_info): Move from here.
9396 (dwarf2_section_info_def): Likewise.
9397 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9398 (offset_type): Likewise.
9399 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9400 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9401 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9402 (byte_swap): Likewise.
9403 (MAYBE_SWAP): Likewise.
9404 (dwarf2_per_cu_ptr): Likewise.
9405 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9406 (struct tu_stats): Likewise.
9407 (struct dwarf2_per_objfile): Likewise.
9408 (struct dwarf2_per_cu_data): Likewise.
9409 (struct signatured_type): Likewise.
9410 (sig_type_ptr): Likewise.
9411 (DEF_VEC_P (sig_type_ptr)): Likewise.
9412 (INDEX4_SUFFIX): Likewise.
9413 (INDEX5_SUFFIX): Likewise.
9414 (DEBUG_STR_SUFFIX): Likewise.
9415 (dwarf2_read_section): Make non-static.
9416 (mapped_index_string_hash): Move from here.
9417 (dwarf5_djb_hash): Likewise.
9418 (file_write): Likewise.
9419 (class data_buf): Likewise.
9420 (struct symtab_index_entry): Likewise.
9421 (struct mapped_symtab): Likewise.
9422 (find_slot): Likewise.
9423 (hash_expand): Likewise.
9424 (add_index_entry): Likewise.
9425 (uniquify_cu_indices): Likewise.
9426 (class c_str_view): Likewise.
9427 (class c_str_view_hasher): Likewise.
9428 (class vector_hasher): Likewise.
9429 (write_hash_table): Likewise.
9430 (psym_index_map): Likewise.
9431 (struct addrmap_index_data): Likewise.
9432 (add_address_entry): Likewise.
9433 (add_address_entry_worker): Likewise.
9434 (write_address_map): Likewise.
9435 (symbol_kind): Likewise.
9436 (write_psymbols): Likewise.
9437 (struct signatured_type_index_data): Likewise.
9438 (write_one_signatured_type): Likewise.
9439 (recursively_count_psymbols): Likewise.
9440 (recursively_write_psymbols): Likewise.
9441 (class debug_names): Likewise.
9442 (check_dwarf64_offsets): Likewise.
9443 (psyms_seen_size): Likewise.
9444 (write_gdbindex): Likewise.
9445 (write_debug_names): Likewise.
9446 (assert_file_size): Likewise.
9447 (write_psymtabs_to_index): Likewise.
9448 (save_gdb_index_command): Likewise.
9449 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9450 command.
9451 * dwarf2read.h: New file.
9452
9453 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9454
9455 PR gdb/22670
9456 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9457 symbol name if the CU's language stores symbol names in linkage
9458 format.
9459 * language.h (struct language_defn)
9460 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9461 all instances of this struct.
9462
9463 2018-03-26 Tom Tromey <tom@tromey.com>
9464
9465 * stack.c (backtrace_command_1): Remove verbose code.
9466
9467 2018-03-26 Tom Tromey <tom@tromey.com>
9468
9469 * python/py-framefilter.c (py_print_type): Don't catch
9470 exceptions. Return void.
9471 (py_print_value): Likewise.
9472 (py_print_single_arg): Likewise.
9473 (enumerate_args): Don't catch exceptions.
9474 (py_print_args): Likewise.
9475 (py_print_frame): Likewise.
9476 (gdbpy_apply_frame_filter): Catch exceptions here.
9477
9478 2018-03-26 Tom Tromey <tom@tromey.com>
9479
9480 * stack.c (_initialize_stack): Remove trailing newlines from help
9481 text. Add "Usage" line to "backtrace" help.
9482
9483 2018-03-26 Tom Tromey <tom@tromey.com>
9484
9485 PR python/16486:
9486 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9487
9488 2018-03-26 Tom Tromey <tom@tromey.com>
9489
9490 * python/py-framefilter.c (py_print_single_arg): Return
9491 EXT_LANG_BT_ERROR from catch.
9492
9493 2018-03-26 Tom Tromey <tom@tromey.com>
9494
9495 PR backtrace/15584:
9496 * stack.c (backtrace_command_1): Move some code into no-filters
9497 "if".
9498
9499 2018-03-26 Tom Tromey <tom@tromey.com>
9500
9501 * python/py-framefilter.c (throw_quit_or_print_exception): New
9502 function.
9503 (gdbpy_apply_frame_filter): Use it.
9504
9505 2018-03-26 Tom Tromey <tom@tromey.com>
9506
9507 PR cli/17716:
9508 * python/py-framefilter.c (py_print_type, py_print_value)
9509 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9510 RETURN_MASK_ERROR.
9511
9512 2018-03-26 Tom Tromey <tom@tromey.com>
9513
9514 * python/py-framefilter.c (enumerate_args): Use
9515 gdb::unique_xmalloc_ptr.
9516
9517 2018-03-26 Tom Tromey <tom@tromey.com>
9518
9519 * python/py-framefilter.c (py_print_frame): Return
9520 EXT_LANG_BT_OK.
9521 (gdbpy_apply_frame_filter): Update comment.
9522 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9523 Remove.
9524 <EXT_LANG_BT_NO_FILTERS>: Change value.
9525
9526 2018-03-26 Tom Tromey <tom@tromey.com>
9527
9528 PR backtrace/15582:
9529 * stack.c (backtrace_command): Parse "hide" argument.
9530 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9531 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9532 constant.
9533
9534 2018-03-26 Tom Tromey <tom@tromey.com>
9535
9536 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9537 add "flags".
9538 (backtrace_command): Remove "fulltrace", add "flags".
9539
9540 2018-03-26 Tom Tromey <tom@tromey.com>
9541
9542 * stack.c (backtrace_command): Rewrite command line parsing.
9543
9544 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9545
9546 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9547
9548 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9549
9550 * filename-seen-cache.h: Add include guard.
9551
9552 2018-03-26 Keith Seitz <keiths@redhat.com>
9553
9554 * symfile.c (place_section): Remove "struct" from section_addr_info
9555 in comment.
9556 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9557 "struct" keyword from section_addr_info.
9558
9559 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9560
9561 * regformats/regdef.h (reg): Add constructors.
9562
9563 2018-03-25 Pedro Alves <palves@redhat.com>
9564
9565 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9566 if then/else bodies in var_func_name extraction.
9567
9568 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9569
9570 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9571 lookup_minimal_symbol() to find symbol entry.
9572 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9573
9574 2018-03-23 Keith Seitz <keiths@redhat.com>
9575
9576 PR c++/22968
9577 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9578 nested type definitions for C++, too.
9579
9580 2018-03-23 Tom Tromey <tom@tromey.com>
9581
9582 * machoread.c (struct oso_el): Add a constructor. Don't define as
9583 a typedef.
9584 (macho_register_oso): Remove.
9585 (macho_symtab_read): Take a std::vector.
9586 (oso_el_compare_name): Now a std::sort comparator.
9587 (macho_symfile_read_all_oso): Take a std::vector.
9588 (macho_symfile_read): Use std::vector. Remove cleanups.
9589
9590 2018-03-22 Tom Tromey <tom@tromey.com>
9591
9592 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9593 (record_full_goto_bookmark): Use std::string.
9594
9595 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9596
9597 PR tdep/18295
9598 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9599 a single mask.
9600
9601 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9602
9603 * rs6000-tdep.c (store_insn_p): New function.
9604 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9605 and cr_reg to their unshifted values. Use store_insn_p to
9606 match LR saves using either R1 or fdata->alloca_reg. Use
9607 store_insn_p to match CR saves. Set alloca_reg_offset
9608 when alloca_reg and framep are set. Remove lr_reg shift
9609 when assigning to fdata->lr_register.
9610
9611 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9612
9613 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9614 command line args instead of emitting a warning.
9615
9616 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9617
9618 * tracepoint.h (struct static_tracepoint_marker): Initialize
9619 fields, define default constructor, move constructor and move
9620 assignment, disable the rest.
9621 <str_id, extra>: Make std::string.
9622 (release_static_tracepoint_marker): Remove.
9623 (free_current_marker): Remove.
9624 * tracepoint.c (free_current_marker): Remove.
9625 (parse_static_tracepoint_marker_definition): Adjust to
9626 std::string, use new hex2str overload.
9627 (release_static_tracepoint_marker): Remove.
9628 (print_one_static_tracepoint_marker): Get marker by reference
9629 and adjust to std::string.
9630 (info_static_tracepoint_markers_command): Adjust to std::vector
9631 changes
9632 * target.h (static_tracepoint_marker_p): Remove typedef.
9633 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9634 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9635 bool.
9636 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9637 * target-debug.h
9638 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9639 (target_debug_print_std_vector_static_tracepoint_marker): New.
9640 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9641 to...
9642 (target_debug_print_static_tracepoint_marker_p): ... this.
9643 * target-delegates.c: Re-generate.
9644 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9645 Make std::string.
9646 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9647 (decode_static_tracepoint_spec): Adjust to std::vector.
9648 (tracepoint_print_one_detail): Adjust to std::string.
9649 (strace_marker_decode_location): Adjust to std::string.
9650 (update_static_tracepoint): Adjust to std::string, remove call
9651 to release_static_tracepoint_marker.
9652 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9653 Adjust to std::vector.
9654 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9655 (remote_static_tracepoint_markers_by_strid): Adjust to
9656 std::vector.
9657 * common/rsp-low.h (hex2str): New overload with explicit count
9658 of bytes.
9659 * common/rsp-low.c (hex2str): New overload with explicit count
9660 of bytes.
9661 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9662 (_initialize_rsp_low_selftests): Add test_hex2str test.
9663 * unittests/tracepoint-selftests.c
9664 (test_parse_static_tracepoint_marker_definition): Adjust to
9665 std::string.
9666
9667 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9668
9669 * tracepoint.c (parse_static_tracepoint_marker_definition):
9670 Consider case where the definition is followed by more
9671 definitions.
9672 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9673 tracepoint-selftests.c.
9674 * unittests/tracepoint-selftests.c: New.
9675
9676 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9677
9678 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9679 Carvalho.
9680
9681 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9682
9683 * symtab.c (find_pc_sect_line): fixed indentation.
9684
9685 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9686
9687 * symtab.c (find_pc_sect_line): now uses binary search.
9688
9689 2018-03-19 Tom Tromey <tom@tromey.com>
9690
9691 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9692 "IDENT" production.
9693
9694 2018-03-19 Pedro Alves <palves@redhat.com>
9695 Tom Tromey <tom@tromey.com>
9696
9697 * unittests/observable-selftests.c: New file.
9698 * common/observable.h: New file.
9699 * observable.h: New file.
9700 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9701 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9702 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9703 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9704 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9705 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9706 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9707 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9708 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9709 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9710 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9711 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9712 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9713 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9714 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9715 tui/tui-interp.c, valops.c: Update all users.
9716 * tui/tui-hooks.c (tui_bp_created_observer)
9717 (tui_bp_deleted_observer, tui_bp_modified_observer)
9718 (tui_inferior_exit_observer, tui_before_prompt_observer)
9719 (tui_normal_stop_observer, tui_register_changed_observer):
9720 Remove.
9721 (tui_observers_token): New global.
9722 (attach_or_detach, tui_attach_detach_observers): New functions.
9723 (tui_install_hooks, tui_remove_hooks): Use
9724 tui_attach_detach_observers.
9725 * record-btrace.c (record_btrace_thread_observer): Remove.
9726 (record_btrace_thread_observer_token): New global.
9727 * observer.sh: Remove.
9728 * observer.c: Rename to observable.c.
9729 * observable.c (namespace gdb_observers): Define new objects.
9730 (observer_debug): Move into gdb_observers namespace.
9731 (struct observer, struct observer_list, xalloc_observer_list_node)
9732 (xfree_observer_list_node, generic_observer_attach)
9733 (generic_observer_detach, generic_observer_notify): Remove.
9734 (_initialize_observer): Update.
9735 Don't include observer.inc.
9736 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9737 (clean mostlyclean): Likewise.
9738 (observer.h, observer.inc): Remove targets.
9739 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9740 (COMMON_SFILES): Use observable.c, not observer.c.
9741 * .gitignore: Remove observer.h.
9742
9743 2018-03-18 Tom Tromey <tom@tromey.com>
9744
9745 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9746 gdb::def_vector.
9747 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9748
9749 2018-03-17 Tom Tromey <tom@tromey.com>
9750
9751 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9752
9753 2018-03-17 Tom Tromey <tom@tromey.com>
9754
9755 * target.c (class scoped_target_fd): New.
9756 (target_fileio_close_cleanup): Remove.
9757 (target_fileio_read_alloc_1): Use scoped_target_fd.
9758
9759 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9760
9761 * silent-rules.mk: New.
9762 * Makefile.in: Include silent-rules.mk
9763 (srcdir, VPATH, top_srcdir): Move up.
9764 (COMPILE): Add ECHO_CXX.
9765 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9766 (init.c): Add ECHO_INIT_C.
9767 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9768 (version.c): Add ECHO_GEN.
9769 (printcmd.o): Add ECHO_CXX.
9770 (target-float.o): Add ECHO_CXX.
9771 (ada-exp.o): Add ECHO_CXX.
9772 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9773 (insight$(EXEEXT)): Add ECHO_CXXLD.
9774 * gnulib/configure.ac: Add AM_SILENT_RULES.
9775 * gnulib/aclocal.m4: Re-generate.
9776 * gnulib/configure: Re-generate.
9777 * gnulib/import/Makefile.in: Re-generate.
9778
9779 2018-03-16 Tom Tromey <tom@tromey.com>
9780
9781 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9782 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9783 * utils.c (do_free_section_addr_info)
9784 (make_cleanup_free_section_addr_info): Remove.
9785 * symfile.h (struct other_sections): Add constructor.
9786 (struct section_addr_info): Remove.
9787 (section_addr_info): New typedef.
9788 (struct sym_fns) <sym_offsets>: Change type of parameter.
9789 (build_section_addr_info_from_objfile)
9790 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9791 (default_symfile_offsets, symbol_file_add)
9792 (symbol_file_add_from_bfd)
9793 (build_section_addr_info_from_section_table): Update.
9794 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9795 * symfile.c (alloc_section_addr_info): Remove.
9796 (build_section_addr_info_from_section_table): Change return type.
9797 Update.
9798 (build_section_addr_info_from_bfd)
9799 (build_section_addr_info_from_objfile): Likewise.
9800 (free_section_addr_info): Remove.
9801 (relative_addr_info_to_section_offsets): Change type of "addrs".
9802 (addrs_section_compar): Now a std::sort comparator.
9803 (addrs_section_sort): Change return type.
9804 (addr_info_make_relative): Change type of "addrs". Update.
9805 (default_symfile_offsets, syms_from_objfile_1)
9806 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9807 (symbol_file_add_separate): Update.
9808 (symbol_file_add): Change type of "addrs". Update.
9809 (add_symbol_file_command): Update. Remove cleanups.
9810 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9811 cleanups.
9812 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9813 * solib.c (solib_read_symbols): Update.
9814 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9815 * machoread.c (macho_symfile_offsets): Update.
9816 * jit.c (jit_bfd_try_read_symtab): Update.
9817
9818 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9819
9820 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9821 unittests/utils-selftests.c.
9822 * unittests/utils-selftests.c: New file.
9823
9824 2018-03-14 Tom Tromey <tom@tromey.com>
9825
9826 PR cli/14977:
9827 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9828 for NULL.
9829
9830 2018-03-14 Tom Tromey <tom@tromey.com>
9831
9832 PR cli/19918:
9833 * printcmd.c (printf_pointer): Allow "-" in format.
9834
9835 2018-03-14 Tom Tromey <tom@tromey.com>
9836
9837 * printcmd.c (_initialize_printcmd): Add usage to printf.
9838
9839 2018-03-14 Yao Qi <qiyao@sourceware.org>
9840
9841 * MAINTAINERS: Update my email address.
9842
9843 2018-03-13 Tom Tromey <tom@tromey.com>
9844
9845 * machoread.c (macho_check_dsym): Change filenamep to a
9846 std::string*.
9847 (macho_symfile_read): Update.
9848 * symfile.c (load_command): Use std::string.
9849
9850 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9851
9852 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9853 to error message string.
9854 (riscv_register_name): Use xsnprintf instead of sprintf.
9855 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9856 internal_error.
9857 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9858 error.
9859 (riscv_push_dummy_call): Likewise.
9860
9861 2018-03-12 Tom Tromey <tom@tromey.com>
9862
9863 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9864 Use gdb::byte_vector.
9865 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9866
9867 2018-03-12 Yao Qi <yao.qi@linaro.org>
9868
9869 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9870 parameter type to readable_regcache.
9871 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9872 the declaration.
9873
9874 2018-03-11 Tom Tromey <tom@tromey.com>
9875
9876 * dwarf2read.c (struct nextfield): Add initializers.
9877 (struct nextfnfield): Remove.
9878 (struct fnfieldlist): Add initializers. Remove "length" and
9879 "head", use std::vector.
9880 (struct decl_field_list): Remove.
9881 (struct field_info): Add initializers.
9882 <fields, baseclasses>: Now std::vector.
9883 <nbaseclasses, nfnfields, typedef_field_list_count,
9884 nested_types_list_count>: Remove.
9885 (dwarf2_add_field, dwarf2_add_type_defn)
9886 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9887 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9888 (process_structure_scope): Update.
9889
9890 2018-03-11 Tom Tromey <tom@tromey.com>
9891
9892 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9893 for use by std::sort.
9894 (build_type_psymtabs_1): Use std::vector.
9895
9896 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9897
9898 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9899 and LIBMPFR in the printed configuration.
9900
9901 2018-03-08 Tom Tromey <tom@tromey.com>
9902
9903 * source.c (get_filename_and_charpos): Use scoped_fd.
9904 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9905 (procfs_pidlist): Likewise.
9906 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9907 (iterate_over_mappings): Likewise.
9908
9909 2018-03-08 Tom Tromey <tom@tromey.com>
9910
9911 * infcall.c (struct call_return_meta_info)
9912 <stack_temporaries_enabled>: Remove.
9913 (get_call_return_value, call_function_by_hand_dummy): Update.
9914 * thread.c (disable_thread_stack_temporaries): Remove.
9915 (enable_thread_stack_temporaries): Remove.
9916 (thread_stack_temporaries_enabled_p): Return bool.
9917 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9918 (get_last_thread_stack_temporary): Update.
9919 * eval.c (evaluate_subexp): Update.
9920 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9921 class, not a function.
9922 (value_ptr, value_vec): Remove typedefs.
9923 (class thread_info) <stack_temporaries_enabled>: Now bool.
9924 <stack_temporaries>: Now a std::vector.
9925 (thread_stack_temporaries_enabled_p)
9926 (value_in_thread_stack_temporaries): Return bool.
9927
9928 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9929
9930 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9931 (getpkt_or_notif_sane_1): Likewise.
9932
9933 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9934
9935 * build-id.c (build_id_to_debug_bfd): Use std::string.
9936
9937 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9938
9939 * build-id.c (find_separate_debug_file_by_buildid): Return
9940 std::string.
9941 * build-id.h (find_separate_debug_file_by_buildid): Return
9942 std::string.
9943 * coffread.c (coff_symfile_read): Adjust to std::string.
9944 * elfread.c (elf_symfile_read): Adjust to std::string.
9945 * symfile.c (separate_debug_file_exists): Change parameter to
9946 std::string.
9947 (find_separate_debug_file): Return std::string.
9948 (find_separate_debug_file_by_debuglink): Return std::string.
9949 * symfile.h (find_separate_debug_file_by_debuglink): Return
9950 std::string.
9951
9952 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9953
9954 * common/xml-utils.c (xml_escape_text): Move code to...
9955 (xml_escape_text_append): ... this new function.
9956 * common/xml-utils.h (xml_escape_text_append): New declaration.
9957 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9958 New function.
9959 (_initialize_xml_utils): register test_xml_escape_text_append as
9960 a selftest.
9961
9962 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9963
9964 * defs.h: Remove MAX_REGISTER_SIZE.
9965 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9966 asserts.
9967 * python/py-unwind.c (pyuw_sniffer): Likewise.
9968
9969 2018-03-07 Tom Tromey <tom@tromey.com>
9970
9971 * linux-tdep.c (linux_info_proc): Update.
9972 * target.h (struct target_ops) <to_fileio_readlink>: Return
9973 optional<string>.
9974 (target_fileio_readlink): Return optional<string>.
9975 * remote.c (remote_hostio_readlink): Return optional<string>.
9976 * inf-child.c (inf_child_fileio_readlink): Return
9977 optional<string>.
9978 * target.c (target_fileio_readlink): Return optional<string>.
9979
9980 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9981
9982 * regcache.c (cooked_read_test): Add riscv to the list of
9983 architectures that have a save_reggroup.
9984
9985 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9986
9987 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9988 value is not a dynamic class object.
9989
9990 2018-03-06 Tom Tromey <tom@tromey.com>
9991
9992 * rust-exp.y: Formatting fixes.
9993
9994 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9995
9996 * riscv-tdep.c (riscv_register_name): Remove target description
9997 support.
9998 (riscv_gdbarch_init): Remove target description check.
9999
10000 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10001
10002 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10003 comment.
10004 * riscv-tdep.h: Likewise.
10005
10006 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10007
10008 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10009 (riscv_pseudo_register_write): Delete.
10010 (riscv_gdbarch_init): Remove all use of pseudo registers.
10011
10012 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10013
10014 * record-btrace.c (btrace_print_lines): Replace cleanup
10015 parameter with RAII equivalents.
10016 (btrace_insn_history): Replace cleanup with RAII equivalents.
10017 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10018 make_cleanup_ui_out_tuple_begin_end): Remove.
10019 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10020 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10021 make_cleanup_ui_out_list_begin_end): Remove.
10022
10023 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10024
10025 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10026 parameter types to std::vector. Use bool.
10027 (record_btrace_wait): Replace VEC(tp_t) with
10028 std::vector<thread_info *>.
10029 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10030
10031 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10032
10033 * record-btrace.c (record_btrace_disable_callback): Remove.
10034 (struct scoped_btrace_disable): New.
10035 (record_btrace_open): Use scoped_btrace_disable.
10036
10037 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10038
10039 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10040 reading values from registers.
10041
10042 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10043
10044 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10045 where appropriate.
10046
10047 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10048
10049 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10050 change parameter type. Use GDB's print functions, and use
10051 core_addr_to_string where appropriate.
10052 (riscv_push_dummy_call): Use core_addr_to_string where
10053 appropriate, update call to riscv_print_arg_location, and reindent
10054 a few lines.
10055 (riscv_return_value): Update call to riscv_print_arg_location.
10056
10057 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10058 Tim Newsome <tim@sifive.com>
10059 Albert Ou <a0u@eecs.berkeley.edu>
10060 Darius Rad <darius@bluespec.com>
10061
10062 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10063 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10064 (ALLDEPFILES): Add riscv-tdep.c
10065 * configure.tgt: Add riscv support.
10066 * riscv-tdep.c: New file.
10067 * riscv-tdep.h: New file.
10068 * NEWS: Mention new target.
10069 * MAINTAINERS: Add entry for riscv.
10070
10071 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10072
10073 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10074 fields within aggregates.
10075
10076 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10077
10078 * record-btrace.c (btrace_print_lines): Change type of flags to
10079 gdb_disassembly_flags.
10080
10081 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10082
10083 * fbsd-nat.c: Include "inf-ptrace.h".
10084 (USE_SIGTRAP_SIGINFO): Conditionally define.
10085 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10086 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10087 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10088 function.
10089 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10090 Likewise.
10091 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10092 Likewise.
10093 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10094 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10095 "supports_stopped_by_hw_breakpoint" target methods.
10096
10097 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10098
10099 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10100 * fbsd-nat.c (debug_fbsd_nat): New variable.
10101 (show_fbsd_nat_debug): New function.
10102 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10103 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10104
10105 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10106
10107 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10108 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10109 prototype.
10110 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10111 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10112 method.
10113
10114 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10115
10116 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10117 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10118
10119 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10120
10121 * charset.c (struct charset_vector): New.
10122 (charsets): Change type to charset_vector.
10123 (find_charset_names): Adjust.
10124 (add_one): Adjust.
10125 (_initialize_charset): Adjust.
10126
10127 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10128
10129 * progspace.h (struct program_space) <deleted_solibs>: Change
10130 type to std::vector<std::string>.
10131 * progspace.c (clear_program_space_solib_cache): Adjust.
10132 * breakpoint.c (print_solib_event): Adjust.
10133 (check_status_catch_solib): Adjust.
10134 * solib.c (update_solib_list): Adjust.
10135 * ui-out.h (class ui_out) <field_string>: New overload.
10136 * ui-out.c (ui_out::field_string): New overload.
10137
10138 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10139
10140 * progspace.h (struct program_space): Add constructor and
10141 destructor, initialize fields.
10142 (add_program_space): Remove.
10143 * progspace.c (add_program_space): Rename to...
10144 (program_space::program_space): ... this.
10145 (release_program_space): Rename to...
10146 (program_space::~program_space): ... this.
10147 (delete_program_space): Use delete to delete program_space.
10148 (initialize_progspace): Use new to allocate program_space.
10149 * inferior.c (add_inferior_with_spaces): Likewise.
10150 (clone_inferior_command): Likewise.
10151 * infrun.c (follow_fork_inferior): Likewise.
10152 (handle_vfork_child_exec_or_exit): Likewise.
10153
10154 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10155
10156 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10157 (delim_string_to_char_ptr_vec): Return std::vector of
10158 gdb::unique_xmalloc_ptr.
10159 (dirnames_to_char_ptr_vec_append): Take std::vector of
10160 gdb::unique_xmalloc_ptr.
10161 (dirnames_to_char_ptr_vec): Return std::vector of
10162 gdb::unique_xmalloc_ptr.
10163 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10164 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10165 (delim_string_to_char_ptr_vec): Return an std::vector of
10166 gdb::unique_xmalloc_ptr, adjust the code.
10167 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10168 gdb::unique_xmalloc_ptr, adjust the code.
10169 (dirnames_to_char_ptr_vec): Return an std::vector of
10170 gdb::unique_xmalloc_ptr, adjust the code.
10171 * auto-load.c (auto_load_safe_path_vec): Change type to
10172 std::vector of gdb::unique_xmalloc_ptr.
10173 (auto_load_expand_dir_vars): Return an std::vector of
10174 gdb::unique_xmalloc_ptr, adjust the code.
10175 (auto_load_safe_path_vec_update): Adjust.
10176 (filename_is_in_auto_load_safe_path_vec): Adjust.
10177 (auto_load_objfile_script_1): Adjust.
10178 * build-id.c (build_id_to_debug_bfd): Adjust.
10179 * linux-thread-db.c (thread_db_load_search): Adjust.
10180 * source.c (add_path): Adjust.
10181 (openp): Adjust.
10182 * symfile.c (find_separate_debug_file): Adjust.
10183 * utils.c (do_free_char_ptr_vec): Remove.
10184 (make_cleanup_free_char_ptr_vec): Remove.
10185
10186 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10187
10188 PR gdb/22907
10189 * common/pathstuff.c: Conditionally include "<windows.h>".
10190
10191 2018-03-01 Georg Sauthoff <mail@georg.so>
10192
10193 PR gdb/22888
10194 * gcore.in: Quote variables and switch interpreter to bash.
10195
10196 2018-03-01 Tom Tromey <tom@tromey.com>
10197
10198 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10199 assertion. Add assertion for discriminant_index.
10200 (quirk_rust_enum): Use correct base type name in univariant case.
10201
10202 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10203
10204 * record.c (get_call_history_modifiers): Return a
10205 record_print_flags.
10206 (cmd_record_call_history): Adjust.
10207 * record-btrace.c (record_btrace_call_history): Adjust.
10208 (record_btrace_call_history_range): Adjust.
10209 (record_btrace_call_history_from): Adjust.
10210 * target-debug.h (target_debug_print_record_print_flags): New.
10211 * target-delegates.c: Re-generate.
10212 * target.c (target_call_history): Change flags type.
10213 (target_call_history_from): Likewise.
10214 (target_call_history_range): Likewise.
10215 * target.h (struct target_ops) <target_call_history>: Likewise.
10216 (target_call_history_from): Likewise.
10217 (target_call_history_range): Likewise.
10218
10219 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10220 Simon Marchi <simon.marchi@polymtl.ca>
10221
10222 * common/common-utils.c: Include "sys/stat.h".
10223 (is_regular_file): Move here from "source.c"; change return
10224 type to "bool".
10225 * common/common-utils.h (is_regular_file): New prototype.
10226 * common/pathstuff.c (contains_dir_separator): New function.
10227 * common/pathstuff.h (contains_dir_separator): New prototype.
10228 * source.c: Don't include "sys/stat.h".
10229 (is_regular_file): Move to "common/common-utils.c".
10230
10231 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10232
10233 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10234 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10235 * auto-load.c: Include "common/pathstuff.h".
10236 * common/common-def.h (current_directory): Move here.
10237 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10238 function.
10239 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10240 prototype.
10241 * common/pathstuff.c: New file.
10242 * common/pathstuff.h: New file.
10243 * compile/compile.c: Include "common/pathstuff.h".
10244 * defs.h (current_directory): Move to "common/common-defs.h".
10245 * dwarf2read.c: Include "common/pathstuff.h".
10246 * exec.c: Likewise.
10247 * guile/scm-safe-call.c: Likewise.
10248 * linux-thread-db.c: Likewise.
10249 * main.c: Likewise.
10250 * nto-tdep.c: Likewise.
10251 * objfiles.c: Likewise.
10252 * source.c: Likewise.
10253 * symtab.c: Likewise.
10254 * utils.c: Include "common/pathstuff.h".
10255 (gdb_realpath): Move to "common/pathstuff.c".
10256 (gdb_realpath_keepfile): Likewise.
10257 (gdb_abspath): Likewise.
10258 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10259 (gdb_realpath_keepfile): Likewise.
10260 (gdb_abspath): Likewise.
10261
10262 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10263
10264 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10265 wildcard process pid for super_resume for kernels with a
10266 specific bug.
10267
10268 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10269
10270 * compile/compile.c (get_args): Add additional comments
10271 explaining function.
10272
10273 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10274 Tom Tromey <tom@tromey.com>
10275
10276 * target.h (memory_write_request_s): Remove typedef. Don't define
10277 VEC.
10278 (target_write_memory_blocks): Change argument to std::vector.
10279 (struct memory_write_request): Add constructor.
10280 * target-memory.c (compare_block_starting_address): Return bool.
10281 Change argument types.
10282 (claim_memory): Change arguments to use std::vector.
10283 (split_regular_and_flash_blocks, blocks_to_erase)
10284 (compute_garbled_blocks): Likewise.
10285 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10286 (target_write_memory_blocks): Change argument to std::vector.
10287 * symfile.c (struct load_section_data): Add constructor and
10288 destructor. Use std::vector for "requests".
10289 (struct load_progress_data): Add initializers.
10290 (load_section_callback): Update. Use "new".
10291 (clear_memory_write_data): Remove.
10292 (generic_load): Update.
10293
10294 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10295
10296 * arch/aarch64.h: Use common/tdesc.h.
10297
10298 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10299
10300 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10301 architecture with a 64-bit ABI.
10302
10303 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10304
10305 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10306 ahead of target description loading.
10307
10308 2018-02-26 Tom Tromey <tom@tromey.com>
10309
10310 * stack.c (backtrace_command_1): Update.
10311 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10312 of "flags".
10313 * python/py-framefilter.c (py_print_frame)
10314 (gdbpy_apply_frame_filter): Change type of "flags".
10315 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10316 of "flags".
10317 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10318 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10319 * extension.h (enum frame_filter_flag): Rename from
10320 frame_filter_flags.
10321 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10322 (apply_ext_lang_frame_filter): Change type of "flags".
10323 * extension.c (apply_ext_lang_frame_filter): Change type of
10324 "flags".
10325 * extension-priv.h (struct extension_language_ops)
10326 <apply_frame_filter>: Change type of "flags".
10327
10328 2018-02-26 Tom Tromey <tom@tromey.com>
10329
10330 PR python/16497:
10331 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10332 off-by-one in py_end computation.
10333 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10334 PRINT_MORE_FRAMES.
10335 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10336 constant.
10337
10338 2018-02-26 Tom Tromey <tom@tromey.com>
10339
10340 * dwarf2read.c (struct variant_field): New.
10341 (struct nextfield) <variant>: New field.
10342 (dwarf2_add_field): Handle DW_TAG_variant_part.
10343 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10344 discriminated union.
10345 (read_structure_type): Handle DW_TAG_variant_part.
10346 (handle_struct_member_die): New function, extracted from
10347 process_structure_scope. Handle DW_TAG_variant.
10348 (process_structure_scope): Handle discriminated unions. Call
10349 handle_struct_member_die.
10350
10351 2018-02-26 Tom Tromey <tom@tromey.com>
10352
10353 * rust-lang.h (rust_last_path_segment): Declare.
10354 * rust-lang.c (rust_last_path_segment): Now public. Change
10355 contract.
10356 (struct disr_info): Remove.
10357 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10358 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10359 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10360 (rust_enum_p, rust_enum_variant): New function.
10361 (rust_underscore_fields): Remove "offset" parameter.
10362 (rust_print_enum): New function.
10363 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10364 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10365 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10366 enums.
10367 (rust_internal_print_type): New function, from rust_print_type.
10368 Remove enum code.
10369 (rust_print_type): Call rust_internal_print_type.
10370 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10371 Update enum handling.
10372 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10373 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10374 (rust_union_quirks): New functions.
10375 (process_full_comp_unit, process_full_type_unit): Call
10376 rust_union_quirks.
10377 (process_structure_scope): Update rust_unions if necessary.
10378
10379 2018-02-26 Tom Tromey <tom@tromey.com>
10380
10381 * value.h (value_union_variant): Declare.
10382 * valops.c (value_union_variant): New function.
10383 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10384 (struct discriminant_info): New.
10385 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10386 enumerator.
10387 (struct main_type) <flag_discriminated_union>: New field.
10388
10389 2018-02-26 Tom Tromey <tom@tromey.com>
10390
10391 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10392 unittests/unpack-selftests.c.
10393 * unittests/unpack-selftests.c: New file.
10394 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10395
10396 2018-02-26 Yao Qi <yao.qi@linaro.org>
10397
10398 * dwarf2read.c (struct partial_die_info) <read>: New method.
10399 (read_partial_die): Remove the declaration.
10400 (load_partial_dies): Update.
10401 (partial_die_info::partial_die_info):
10402 (read_partial_die): Change it to partial_die_info::read.
10403
10404 2018-02-26 Yao Qi <yao.qi@linaro.org>
10405
10406 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10407 (fixup_partial_die): Remove declaration.
10408 (scan_partial_symbols): Update.
10409 (partial_die_parent_scope): Likewise.
10410 (partial_die_full_name): Likewise.
10411 (fixup_partial_die): Change it to partial_die_info::fixup.
10412
10413 2018-02-26 Yao Qi <yao.qi@linaro.org>
10414
10415 * dwarf2read.c (read_partial_die): Update the declaration.
10416 (load_partial_dies): Caller update.
10417 (read_partial_die): Remove one argument abbrev_len.
10418
10419 2018-02-26 Yao Qi <yao.qi@linaro.org>
10420
10421 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10422 assignment operator.
10423 (load_partial_dies): Use ctor and copy ctor.
10424 (read_partial_die): Update.
10425 (dwarf2_cu::find_partial_die): Use ctor.
10426
10427 2018-02-26 Yao Qi <yao.qi@linaro.org>
10428
10429 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10430 (find_partial_die_in_comp_unit): Change it to
10431 dwarf2_cu::find_partial_die.
10432 (find_partial_die): Update.
10433
10434 2018-02-26 Yao Qi <yao.qi@linaro.org>
10435
10436 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10437 is NULL.
10438
10439 2018-02-26 Yao Qi <yao.qi@linaro.org>
10440
10441 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10442
10443 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10444
10445 * arch/amd64.h: Use common/tdesc.h.
10446 * arch/i386.c: Likewise.
10447 * arch/i386.h: Likewise.
10448 * arch/tic6x.c: Likewise.
10449 * arch/tdesc.h: Move file from here...
10450 * common/tdesc.h: ...to here.
10451 * features/aarch64-core.c: Regenerate.
10452 * features/aarch64-fpu.c: Regenerate.
10453 * features/i386/32bit-avx.c: Regenerate.
10454 * features/i386/32bit-avx512.c: Regenerate.
10455 * features/i386/32bit-core.c: Regenerate.
10456 * features/i386/32bit-linux.c: Regenerate.
10457 * features/i386/32bit-mpx.c: Regenerate.
10458 * features/i386/32bit-pkeys.c: Regenerate.
10459 * features/i386/32bit-sse.c: Regenerate.
10460 * features/i386/64bit-avx.c: Regenerate.
10461 * features/i386/64bit-avx512.c: Regenerate.
10462 * features/i386/64bit-core.c: Regenerate.
10463 * features/i386/64bit-linux.c: Regenerate.
10464 * features/i386/64bit-mpx.c: Regenerate.
10465 * features/i386/64bit-pkeys.c: Regenerate.
10466 * features/i386/64bit-segments.c: Regenerate.
10467 * features/i386/64bit-sse.c: Regenerate.
10468 * features/i386/x32-core.c: Regenerate.
10469 * features/tic6x-c6xp.c: Regenerate.
10470 * features/tic6x-core.c: Regenerate.
10471 * features/tic6x-gp.c: Regenerate.
10472 * target-descriptions.c: Use common/tdesc.h.
10473 * target-descriptions.h: Likewise.
10474
10475 2018-02-24 Tom Tromey <tom@tromey.com>
10476
10477 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10478 (try_thread_db_load_from_dir, thread_db_load_search): Use
10479 std::string.
10480 (info_auto_load_libthread_db_compare): Return bool. Change
10481 argument types.
10482 (info_auto_load_libthread_db): Use std::vector, std::string.
10483 Remove cleanups.
10484
10485 2018-02-24 Tom Tromey <tom@tromey.com>
10486
10487 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10488 std::string.
10489 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10490 std::string*.
10491 * gdbarch.c: Rebuild.
10492 * gdbarch.h: Rebuild.
10493 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10494 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10495 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10496 std::string*.
10497
10498 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10499
10500 * gdbtypes.h (sect_offset): Change type to uint64_t.
10501 (sect_offset_str): New function.
10502 * dwarf2read.c (create_addrmap_from_aranges): Use
10503 sect_offset_str.
10504 (error_check_comp_unit_head): Likewise.
10505 (create_debug_type_hash_table): Likewise.
10506 (read_cutu_die_from_dwo): Likewise.
10507 (init_cutu_and_read_dies): Likewise.
10508 (init_cutu_and_read_dies_no_follow): Likewise.
10509 (process_psymtab_comp_unit_reader): Likewise.
10510 (partial_die_parent_scope): Likewise.
10511 (peek_die_abbrev): Likewise.
10512 (process_queue): Likewise.
10513 (dwarf2_physname): Likewise.
10514 (read_namespace_alias): Likewise.
10515 (read_import_statement): Likewise.
10516 (create_dwo_cu_reader): Likewise.
10517 (create_cus_hash_table): Likewise.
10518 (lookup_dwo_cutu): Likewise.
10519 (inherit_abstract_dies): Likewise.
10520 (read_func_scope): Likewise.
10521 (read_call_site_scope): Likewise.
10522 (dwarf2_add_member_fn): Likewise.
10523 (read_common_block): Likewise.
10524 (read_module_type): Likewise.
10525 (read_typedef): Likewise.
10526 (read_subrange_type): Likewise.
10527 (load_partial_dies): Likewise.
10528 (read_partial_die): Likewise.
10529 (find_partial_die): Likewise.
10530 (read_str_index): Likewise.
10531 (dwarf2_string_attr): Likewise.
10532 (build_error_marker_type): Likewise.
10533 (lookup_die_type): Likewise.
10534 (dump_die_shallow): Likewise.
10535 (follow_die_ref): Likewise.
10536 (dwarf2_fetch_die_loc_sect_off): Likewise.
10537 (dwarf2_fetch_constant_bytes): Likewise.
10538 (follow_die_sig): Likewise.
10539 (get_signatured_type): Likewise.
10540 (get_DW_AT_signature_type): Likewise.
10541 (dwarf2_find_containing_comp_unit): Likewise.
10542 (set_die_type): Likewise.
10543
10544 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10545
10546 * arch/aarch64.c: Include "common-defs.h".
10547 * arch/amd64.c: Likewise.
10548 * arch/i386.c: Likewise.
10549
10550 2018-02-21 Tom Tromey <tom@tromey.com>
10551
10552 * value.h: (extract_field_op): Update.
10553 * eval.c (extract_field_op): Return a const char *.
10554 * expression.h (parse_expression_for_completion): Update.
10555 * completer.c (complete_expression): Update.
10556 (add_struct_fields): Make fieldname const.
10557 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10558 (mark_completion_tag, parse_exp_in_context_1): Update.
10559 (parse_expression_for_completion): Change "name" to
10560 unique_xmalloc_ptr*.
10561
10562 2018-02-21 Tom Tromey <tom@tromey.com>
10563
10564 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10565
10566 2018-02-21 Yao Qi <yao.qi@linaro.org>
10567
10568 * avr-tdep.c (avr_read_pc): Change parameter type to
10569 readable_regcache.
10570 * gdbarch.sh (read_pc): Likewise.
10571 * gdbarch.c: Re-generated.
10572 * gdbarch.h: Re-generated.
10573 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10574 readable_regcache.
10575 * ia64-tdep.c (ia64_read_pc): Likewise.
10576 * mips-tdep.c (mips_read_pc): Likewise.
10577 * spu-tdep.c (spu_read_pc): Likewise.
10578
10579 2018-02-21 Yao Qi <yao.qi@linaro.org>
10580
10581 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10582 * regcache-dump.c: New file.
10583 * regcache.c: Move register_dump to regcache-dump.c.
10584 (maintenance_print_registers): Likewise.
10585 (maintenance_print_raw_registers): Likewise.
10586 (maintenance_print_cooked_registers): Likewise.
10587 (maintenance_print_register_groups): Likewise.
10588 (maintenance_print_remote_registers): Likewise.
10589 (_initialize_regcache): Likewise.
10590 * regcache.h (register_dump): Moved from regcache.c.
10591
10592 2018-02-21 Yao Qi <yao.qi@linaro.org>
10593
10594 * regcache.c (regcache::regcache): Update.
10595 (regcache::invalidate): Move it to detached_regcache::invalidate.
10596 (get_thread_arch_aspace_regcache): Update.
10597 (regcache::raw_update): Update.
10598 (regcache::cooked_read): Remove some code.
10599 (regcache::cooked_read_value): Likewise.
10600 (regcache::raw_write): Remove assert on m_readonly_p.
10601 (regcache::raw_supply_integer): Move it to
10602 detached_regcache::raw_supply_integer.
10603 (regcache::raw_supply_zeroed): Likewise.
10604 * regcache.h (detached_regcache) <raw_supply_integer>: New
10605 declaration.
10606 <raw_supply_zeroed, invalidate>: Likewise.
10607 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10608 <invalidate>: Likewise.
10609 <m_readonly_p>: Removed.
10610
10611 2018-02-21 Yao Qi <yao.qi@linaro.org>
10612
10613 * infcmd.c (get_return_value): Let stop_regs point to
10614 get_current_regcache.
10615 * regcache.c (regcache::regcache): Remove.
10616 (register_dump_reg_buffer): New class.
10617 (regcache_print): Adjust.
10618 * regcache.h (regcache): Remove constructors.
10619
10620 2018-02-21 Yao Qi <yao.qi@linaro.org>
10621
10622 * regcache.c (class register_dump): New class.
10623 (register_dump_regcache, register_dump_none): New class.
10624 (register_dump_remote, register_dump_groups): New class.
10625 (regcache_print): Update.
10626 * regcache.h (regcache_dump_what): Move it to regcache.c.
10627 (regcache) <dump>: Remove.
10628
10629 2018-02-21 Yao Qi <yao.qi@linaro.org>
10630
10631 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10632 reg_buffer_rw *.
10633 (jit_unwind_reg_set_impl): Call raw_supply.
10634 (jit_frame_sniffer): Use reg_buffer_rw.
10635 * record-full.c (record_full_core_regbuf): Change its type.
10636 (record_full_core_open_1): Use reg_buffer_rw.
10637 (record_full_close): Likewise.
10638 (record_full_core_fetch_registers): Use regcache->raw_supply.
10639 (record_full_core_store_registers): Likewise.
10640 * regcache.c (regcache::get_register_status): Move it to
10641 reg_buffer.
10642 (regcache_raw_set_cached_value): Remove.
10643 (regcache::raw_set_cached_value): Remove.
10644 (regcache::raw_write): Call raw_supply.
10645 (regcache::raw_supply): Move it to reg_buffer_rw.
10646 * regcache.h (regcache_raw_set_cached_value): Remove.
10647 (reg_buffer_rw): New class.
10648
10649 2018-02-21 Yao Qi <yao.qi@linaro.org>
10650
10651 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10652 readonly_detached_regcache.
10653 (dummy_frame_prev_register): Use regcache->cooked_read.
10654 * frame.c (frame_save_as_regcache): Change return type.
10655 (frame_pop): Update.
10656 * frame.h (frame_save_as_regcache): Update declaration.
10657 * inferior.h (get_infcall_suspend_state_regcache): Update
10658 declaration.
10659 * infrun.c (infcall_suspend_state) <registers>: use
10660 readonly_detached_regcache.
10661 (save_infcall_suspend_state): Don't use regcache_dup.
10662 (get_infcall_suspend_state_regcache): Change return type.
10663 * linux-fork.c (struct fork_info) <savedregs>: Change to
10664 readonly_detached_regcache.
10665 <pc>: New field.
10666 (fork_save_infrun_state): Don't use regcache_dup.
10667 (info_checkpoints_command): Adjust.
10668 * mi/mi-main.c (register_changed_p): Update declaration.
10669 (mi_cmd_data_list_changed_registers): Use
10670 readonly_detached_regcache.
10671 (register_changed_p): Change parameter type to
10672 readonly_detached_regcache.
10673 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10674 readonly_detached_regcache.
10675 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10676 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10677 New.
10678 (regcache::save): Move it to reg_buffer.
10679 (regcache::restore): Change parameter type.
10680 (regcache_dup): Remove.
10681 * regcache.h (reg_buffer) <save>: New method.
10682 (readonly_detached_regcache): New class.
10683 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10684 readonly_detached_regcache.
10685 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10686
10687 2018-02-21 Yao Qi <yao.qi@linaro.org>
10688
10689 * frame.c (frame_save_as_regcache): Use regcache method save.
10690 (frame_pop): Use regcache method restore.
10691 * infrun.c (restore_infcall_suspend_state): Likewise.
10692 * linux-fork.c (fork_load_infrun_state): Likewise.
10693 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10694 save.
10695 * regcache.c (regcache_save): Remove.
10696 (regcache::restore): More asserts.
10697 (regcache_cpy): Remove.
10698 * regcache.h (regcache_save): Remove the declaration.
10699 (regcache::restore): Move from private to public.
10700 Remove the friend declaration of regcache_cpy.
10701 (regcache_cpy): Remove declaration.
10702
10703 2018-02-21 Yao Qi <yao.qi@linaro.org>
10704
10705 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10706 parameter type to 'readable_regcache *'.
10707 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10708 * arm-tdep.c (arm_neon_quad_read): Likewise.
10709 (arm_pseudo_read): Likewise.
10710 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10711 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10712 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10713 * gdbarch.c: Re-generated.
10714 * gdbarch.h: Re-generated.
10715 * gdbarch.sh (pseudo_register_read): Change parameter type to
10716 'readable_regcache *'.
10717 (pseudo_register_read_value): Likewise.
10718 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10719 (h8300_pseudo_register_read): Likewise.
10720 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10721 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10722 (i386_pseudo_register_read_into_value): Likewise.
10723 (i386_pseudo_register_read_value): Likewise.
10724 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10725 declaration.
10726 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10727 * m32c-tdep.c (m32c_raw_read): Likewise.
10728 (m32c_read_flg): Likewise.
10729 (m32c_banked_register): Likewise.
10730 (m32c_banked_read): Likewise.
10731 (m32c_sb_read): Likewise.
10732 (m32c_part_read): Likewise.
10733 (m32c_cat_read): Likewise.
10734 (m32c_r3r2r1r0_read): Likewise.
10735 (m32c_pseudo_register_read): Likewise.
10736 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10737 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10738 (mep_pseudo_cr64_read): Likewise.
10739 (mep_pseudo_register_read): Likewise.
10740 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10741 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10742 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10743 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10744 (regcache::cooked_read): Likewise.
10745 (regcache::cooked_read_value): Likewise.
10746 (regcache_cooked_read_signed):
10747 (regcache::cooked_read): Likewise.
10748 * regcache.h (readable_regcache): New class.
10749 (regcache): Inherit readable_regcache. Move some methods to
10750 readable_regcache.
10751 * rl78-tdep.c (rl78_pseudo_register_read): Change
10752 parameter type to 'readable_regcache *'.
10753 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10754 (e500_pseudo_register_read): Change parameter type to
10755 'readable_regcache *'.
10756 (dfp_pseudo_register_read): Likewise.
10757 (vsx_pseudo_register_read): Likewise.
10758 (efpr_pseudo_register_read): Likewise.
10759 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10760 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10761 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10762 (sh64_pseudo_register_read): Likewise.
10763 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10764 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10765 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10766 (spu_pseudo_register_read): Likewise.
10767 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10768 (xtensa_pseudo_register_read): Likewise.
10769
10770 2018-02-21 Yao Qi <yao.qi@linaro.org>
10771
10772 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10773 (regcache::arch): Move it to reg_buffer::arch.
10774 (regcache::register_buffer): Likewise.
10775 (regcache::assert_regnum): Likewise.
10776 (regcache::num_raw_registers): Likewise.
10777 * regcache.h (reg_buffer): New class.
10778 (regcache): Inherit reg_buffer.
10779
10780 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10781
10782 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10783 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10784
10785 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10786
10787 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10788
10789 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10790
10791 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10792 (SFILES): Remove common/*.c files.
10793 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10794 * common/common.host: Add common reference.
10795 * configure.ac: Likewise.
10796 * configure: Regenerate.
10797
10798 2018-02-16 Yao Qi <yao.qi@linaro.org>
10799
10800 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10801 (block_initialize_namespace): Use new.
10802 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10803 (dwarf2_free_objfile): Use delete.
10804 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10805 (copy_type_recursive): Use new.
10806 * gdb_obstack.h (allocate_on_obstack): New.
10807
10808 2018-02-15 Yao Qi <yao.qi@linaro.org>
10809
10810 PR gdb/22849
10811 * inferior.c (exit_inferior_1): Reset inf->control.
10812
10813 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10814
10815 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10816 declaration.
10817
10818 2018-02-14 Pedro Alves <palves@redhat.com>
10819
10820 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10821 frame_cleanup_after_sniffer on exception.
10822
10823 2018-02-14 Tom Tromey <tom@tromey.com>
10824
10825 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10826 const.
10827 (solib_bfd_open): Make pathname const.
10828 * solib.c (solib_bfd_open): Make pathname const.
10829 * solib-spu.c (spu_bfd_fopen): Make name const.
10830 (spu_bfd_open): Make pathname const.
10831 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10832 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10833
10834 2018-02-14 Tom Tromey <tom@tromey.com>
10835
10836 * symfile.c (symfile_bfd_open): Update.
10837 * source.h (openp, source_full_path_of, find_and_open_source):
10838 Change argument type to unique_xmalloc_ptr.
10839 * source.c (openp): Take a unique_xmalloc_ptr.
10840 (source_full_path_of, find_and_open_source): Likewise.
10841 (open_source_file, symtab_to_fullname): Update.
10842 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10843 unique_xmalloc_ptr.
10844 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10845 (exec_file_find): Update.
10846 * psymtab.c (psymtab_to_fullname): Update.
10847 * nto-tdep.h (nto_find_and_open_solib): Update.
10848 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10849 unique_xmalloc_ptr.
10850 * exec.c (exec_file_attach): Update.
10851 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10852 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10853
10854 2018-02-14 Tom Tromey <tom@tromey.com>
10855
10856 * solib.c: Include source.h.
10857 * nto-tdep.c: Include source.h.
10858 * mi/mi-cmd-env.c: Include source.h.
10859 * infcmd.c: Include source.h.
10860 * exec.c: Include source.h.
10861 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10862 (add_path, directory_switch, source_path, init_source_path): Move
10863 declarations...
10864 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10865 (add_path, directory_switch, source_path, init_source_path):
10866 ...here.
10867
10868 2018-02-14 Tom Tromey <tom@tromey.com>
10869
10870 * solist.h (exec_file_find, solib_find): Return
10871 unique_xmalloc_ptr.
10872 (solib_bfd_fopen): Take a const char *.
10873 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10874 (exec_file_find, solib_find): Likewise.
10875 (solib_bfd_fopen): Do not take ownership of "pathname".
10876 (solib_bfd_open): Use unique_xmalloc_ptr.
10877 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10878 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10879 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10880 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10881
10882 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10883
10884 * ada-lang.c (name_match_type_from_name): Remove reference to
10885 ada_name_for_lookup in function's documentation.
10886 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10887
10888 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10889
10890 * defs.h (enum openp_flags): New enum.
10891 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10892 Move to enum openp_flags.
10893 (openp_flags): New enum flags.
10894 (openp): Change parameter type to openp_flags.
10895 * source.c (openp): Change parameter type to openp_flags.
10896 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10897 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10898
10899 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10900
10901 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10902 per-command.
10903
10904 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10905
10906 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10907 into...
10908 (class dwarf2_queue_guard): ...the destructor of this new class.
10909 (dw2_do_instantiate_symtab): Create instance of the new class
10910 dwarf2_queue_guard, remove cleanup.
10911
10912 2018-02-09 Tom Tromey <tom@tromey.com>
10913
10914 * source.c (find_source_lines): Don't reference past the end of
10915 the vector.
10916
10917 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10918
10919 * remote.c (remote_btrace_maybe_reopen): Change error message.
10920 * btrace.c (btrace_enable): Likewise.
10921 (parse_xml_btrace): Likewise.
10922 (parse_xml_btrace_conf): Likewise.
10923
10924 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10925
10926 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10927 (linux_enable_pt, linux_enable_bts): Call
10928 diagnose_perf_event_open_fail.
10929
10930 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10931
10932 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10933 Remove parameter and change return type. Update callers. Move it.
10934 (linux_enable_bts, linux_enable_pt): Improve error message.
10935 (linux_enable_pt): Remove zero buffer size check.
10936 (linux_enable_btrace): Improve error messages. Remove NULL return
10937 check.
10938
10939 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10940
10941 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10942 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10943 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10944 (linux_supports_pt, linux_supports_btrace): Remove.
10945 (linux_enable_bts): Call cpu_supports_bts.
10946 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10947 * remote.c (remote_supports_btrace): Remove.
10948 (init_remote_ops): Remove remote_supports_btrace.
10949 * target-delegates.c: Regenerated.
10950 * target.c (target_supports_btrace): Remove.
10951 * target.h (target_ops) <to_supports_btrace>: Remove
10952 (target_supports_btrace): Remove.
10953 * x86-linux-nat.c (x86_linux_create_target): Remove
10954 linux_supports_btrace.
10955
10956 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10957
10958 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10959 btrace failed.
10960 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10961 exception and use message in own exception.
10962
10963 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10964
10965 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10966 (perf_event_pt_event_type): Use gdb_file_up.
10967 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10968 scoped_fd, and scoped_mmap.
10969
10970 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10971
10972 * common/scoped_mmap.h: New.
10973 * unittests/scoped_mmap-selftest.c: New.
10974 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10975 unittests/scoped_mmap-selftest.c.
10976
10977 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10978
10979 * common/scoped_fd.h: New.
10980 * unittests/scoped_fd-selftest.c: New.
10981 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10982 unittests/scoped_fd-selftest.c.
10983
10984 2018-02-09 Tom Tromey <tom@tromey.com>
10985
10986 * auto-load.c (auto_load_section_scripts): Use
10987 gdb::unique_xmalloc_ptr.
10988
10989 2018-02-09 Tom Tromey <tom@tromey.com>
10990
10991 * auto-load.c (execute_script_contents): Use std::string.
10992
10993 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10994
10995 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10996 Python function, rather than a new command.
10997
10998 2018-02-08 Tom Tromey <tom@tromey.com>
10999
11000 * solib.c (solib_find_1): Use std::string.
11001 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11002
11003 2018-02-08 Tom Tromey <tom@tromey.com>
11004
11005 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11006
11007 2018-02-08 Tom Tromey <tom@tromey.com>
11008
11009 * source.c (find_source_lines): Use gdb::def_vector.
11010
11011 2018-02-08 Tom Tromey <tom@tromey.com>
11012
11013 * macrocmd.c (struct temporary_macro_definition): New.
11014 (macro_define_command): Use temporary_macro_definition. Remove
11015 cleanups.
11016 (free_macro_definition_ptr): Remove.
11017
11018 2018-02-08 Tom Tromey <tom@tromey.com>
11019
11020 * macroexp.c (maybe_expand): Use std::string.
11021
11022 2018-02-08 Tom Tromey <tom@tromey.com>
11023
11024 * macroexp.c (struct macro_buffer): Add initializers for some
11025 members.
11026 (init_buffer, init_shared_buffer, free_buffer)
11027 (free_buffer_return_text): Remove.
11028 (macro_buffer): New constructors.
11029 (~macro_buffer): New destructor.
11030 (macro_buffer::set_shared): New method.
11031 (macro_buffer::resize_buffer, macro_buffer::appendc)
11032 (macro_buffer::appendmem): Now methods, not free functions.
11033 (set_token, append_tokens_without_splicing, stringify)
11034 (macro_stringify): Update.
11035 (gather_arguments): Change return type. Remove argc_p argument,
11036 add args_ptr argument. Use std::vector.
11037 (substitute_args): Remove argc argument. Accept std::vector.
11038 (expand): Update. Use std::vector.
11039 (scan, macro_expand, macro_expand_next): Update.
11040
11041 2018-02-08 Tom Tromey <tom@tromey.com>
11042
11043 * symtab.c (default_collect_symbol_completion_matches_break_on):
11044 Use unique_xmalloc_ptr.
11045 * macroscope.h: (sal_macro_scope, user_macro_scope)
11046 (default_macro_scope): Return unique_xmalloc_ptr.
11047 * macroscope.c (sal_macro_scope, user_macro_scope)
11048 (default_macro_scope): Return unique_xmalloc_ptr.
11049 * macroexp.h (macro_expand, macro_expand_once): Return
11050 unique_xmalloc_ptr.
11051 * macroexp.c (macro_expand, macro_expand_once): Return
11052 unique_xmalloc_ptr.
11053 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11054 (info_macro_command, info_macros_command): Use
11055 unique_xmalloc_ptr.
11056 * compile/compile-c-support.c (write_macro_definitions): Use
11057 unique_xmalloc_ptr.
11058 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11059
11060 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11061
11062 * value.c (value_static_field): Assign field type instead of
11063 containing type when returning an optimized out value.
11064
11065 2018-02-06 Yao Qi <yao.qi@linaro.org>
11066
11067 * ft32-tdep.c (ft32_read_pc): Remove.
11068 (ft32_write_pc): Remove.
11069 (ft32_gdbarch_init): Update.
11070 * m32r-tdep.c (m32r_read_pc): Remove.
11071 (m32r_gdbarch_init): Update.
11072 * mep-tdep.c (mep_read_pc): Remove.
11073 (mep_gdbarch_init): Update.
11074 * microblaze-tdep.c (microblaze_write_pc): Remove.
11075 (microblaze_gdbarch_init): Update.
11076 * mn10300-tdep.c (mn10300_read_pc): Remove.
11077 (mn10300_write_pc): Remove.
11078 (mn10300_gdbarch_init): Update.
11079 * moxie-tdep.c (moxie_read_pc): Remove.
11080 (moxie_write_pc): Remove.
11081 (moxie_gdbarch_init): Update.
11082
11083 2018-02-06 Yao Qi <yao.qi@linaro.org>
11084
11085 * expprint.c (print_subexp_standard): Handle
11086 OP_F77_UNDETERMINED_ARGLIST.
11087 (dump_subexp_body_standard): Likewise.
11088
11089 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11090
11091 * target-descriptions.c (tdesc_element_visitor) Add empty
11092 implementations.
11093 (tdesc_type): Move make_gdb_type from here.
11094 (tdesc_type_builtin): Likewise.
11095 (tdesc_type_vector): Likewise.
11096 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11097 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11098 (make_gdb_type_union): Likewise.
11099 (make_gdb_type_flags): Likewise.
11100 (make_gdb_type_enum): Likewise.
11101 (make_gdb_type): New function.
11102 (tdesc_register_type): Use static make_gdb_type.
11103
11104 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11105
11106 * infcmd.c (default_print_one_register_info): Align natural-format
11107 column values consistently one under another.
11108 (pad_to_column): New function.
11109
11110 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11111
11112 * dwarf2read.c (dwarf2_physname): Move commment.
11113
11114 2018-02-01 Leszek Swirski <leszeks@google.com>
11115
11116 * varobj.c (varobj_formatted_print_options): Allow recursive
11117 pretty printing if pretty printing is enabled.
11118
11119 2018-02-01 Leszek Swirski <leszeks@google.com>
11120
11121 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11122 names after a structop as a filename.
11123
11124 2018-02-01 Yao Qi <yao.qi@linaro.org>
11125
11126 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11127 (arm_record_coproc_data_proc): Likewise.
11128
11129 2018-02-01 Yao Qi <yao.qi@linaro.org>
11130
11131 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11132
11133 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11134
11135 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11136 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11137
11138 2018-01-31 Pedro Alves <palves@redhat.com>
11139
11140 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11141 * inflow.c (child_terminal_save_inferior): Wrap reference to
11142 tcgetpgrp in HAVE_TERMIOS_H.
11143 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11144 _WIN32.
11145 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11146 always iterate over all inferiors.
11147 (gdbsim_cntrl_c): Adjust.
11148 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11149
11150 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11151
11152 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11153 index type is objfile-owned if the element type is as well.
11154
11155 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11156
11157 GDB 8.1 released.
11158
11159 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11160
11161 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11162 "features/s390x-linux64.c".
11163 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11164 s390_linux32 and s390x_linux64.
11165 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11166 default tdesc.
11167 * s390-tdep.c: Include "features/s390-linux32.c" and
11168 "features/s390x-linux64.c".
11169 (s390_tdesc_valid): Add check for tdesc_has_registers.
11170 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11171 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11172 tdesc_s390x_linux64.
11173 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11174 tdesc_s390x_linux64 to...
11175 * s390-tdep.h: ...here.
11176
11177 2018-01-30 Pedro Alves <palves@redhat.com>
11178
11179 PR gdb/13211
11180 * config.in, configure: Regenerate.
11181 * configure.ac: Check for getpgid.
11182 * go32-nat.c (go32_pass_ctrlc): New.
11183 (go32_target): Install it.
11184 * inf-child.c (inf_child_target): Install
11185 child_terminal_save_inferior, child_pass_ctrlc and
11186 child_interrupt.
11187 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11188 (inf_ptrace_target): No longer install it.
11189 * infcmd.c (interrupt_target_1): Adjust.
11190 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11191 (child_interrupt): Declare.
11192 (inferior::terminal_state): New.
11193 * inflow.c (struct terminal_info): Update comments.
11194 (inferior_process_group): Delete.
11195 (terminal_is_ours): Delete.
11196 (gdb_tty_state): New.
11197 (child_terminal_init): Adjust.
11198 (is_gdb_terminal, sharing_input_terminal_1)
11199 (sharing_input_terminal): New functions.
11200 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11201 Set the process's actual process group in the foreground if
11202 possible. Handle is_ours_for_output/is_ours distinction. Don't
11203 mark terminal as the inferior's if not sharing GDB's terminal.
11204 Don't check attach_flag.
11205 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11206 pass down a target_terminal_state.
11207 (child_terminal_save_inferior): New, factored out from ...
11208 (child_terminal_ours_1): ... this. Handle
11209 target_terminal_state::is_ours_for_output.
11210 (child_interrupt, child_pass_ctrlc): New.
11211 (inflow_inferior_exit): Clear the inferior's terminal_state.
11212 (copy_terminal_info): Copy the inferior's terminal state.
11213 (_initialize_inflow): Remove reference to terminal_is_ours.
11214 * inflow.h (inferior_process_group): Delete.
11215 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11216 * procfs.c (procfs_target): Don't install procfs_interrupt.
11217 (procfs_interrupt): Delete.
11218 * remote.c (remote_serial_quit_handler): Adjust.
11219 (remote_interrupt): Remove ptid parameter. Adjust.
11220 * target-delegates.c: Regenerate.
11221 * target.c: Include "terminal.h".
11222 (target_terminal::terminal_state): Rename to ...
11223 (target_terminal::m_terminal_state): ... this.
11224 (target_terminal::init): Adjust.
11225 (target_terminal::inferior): Adjust to per-inferior
11226 terminal_state.
11227 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11228 (target_terminal::ours, target_terminal::ours_for_output): Use
11229 target_terminal_is_ours_kind.
11230 (target_interrupt): Remove ptid parameter. Adjust.
11231 (default_target_pass_ctrlc): Adjust.
11232 * target.h (target_ops::to_terminal_save_inferior): New field.
11233 (target_ops::to_interrupt): Remove ptid_t parameter.
11234 (target_interrupt): Remove ptid_t parameter. Update comment.
11235 (target_pass_ctrlc): Update comment.
11236 * target/target.h (target_terminal_state): New scoped enum,
11237 factored out of ...
11238 (target_terminal::terminal_state): ... here.
11239 (target_terminal::inferior): Update comments.
11240 (target_terminal::restore_inferior): New.
11241 (target_terminal::is_inferior, target_terminal::is_ours)
11242 (target_terminal::is_ours_for_output): Adjust.
11243 (target_terminal::scoped_restore_terminal_state): Adjust to
11244 rename, and call restore_inferior() instead of inferior().
11245 (target_terminal::scoped_restore_terminal_state::m_state): Change
11246 type.
11247 (target_terminal::terminal_state): Rename to ...
11248 (target_terminal::m_terminal_state): ... this and change type.
11249
11250 2018-01-30 Pedro Alves <palves@redhat.com>
11251
11252 * linux-nat.c (wait_for_signal): New function.
11253 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11254 directly.
11255 (async_terminal_is_ours)
11256 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11257 (linux_nat_add_target): Don't override
11258 to_terminal_inferior/to_terminal_ours.
11259
11260 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11261
11262 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11263
11264 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11265
11266 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11267 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11268 dwarf2_per_objfile_free here.
11269 (dwarf2_per_objfile_free): Remove.
11270 (_initialize_dwarf2_read): Don't register
11271 dwarf2_per_objfile_free as a registry cleanup.
11272
11273 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11274
11275 Avoid compilation errors in MinGW native builds
11276
11277 The error is triggered by including python-internal.h, and the
11278 error message is:
11279
11280 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11281 from build-gnulib/import/math.h:27,
11282 from d:/usr/Python26/include/pyport.h:235,
11283 from d:/usr/Python26/include/Python.h:58,
11284 from python/python-internal.h:94,
11285 from python/py-arch.c:24:
11286 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11287 using ::hypot;
11288 ^~~~~
11289
11290 This happens because Python headers define 'hypot' to expand t
11291 '_hypot' in the Windows builds.
11292 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11293 'hypoth'. This avoids a compilation error.
11294
11295 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11296
11297 * MAINTAINERS (Write After Approval): Fix ordering.
11298
11299 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11300
11301 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11302
11303 2018-01-26 Alan Modra <amodra@gmail.com>
11304
11305 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11306 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11307 Remove nop. Make const. Comment.
11308 (powerpc32_plt_stub_so_2): New.
11309 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11310 Correct count. Update uses.
11311 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11312 Move common code reading PLT entry word. Correct
11313 powerpc32_plt_stub PLT address calculation.
11314 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11315 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11316 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11317 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11318 (ppc64_standard_linkage8): Likewise.
11319 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11320 Correct insns description.
11321 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11322
11323 2018-01-24 Pedro Alves <palves@redhat.com>
11324
11325 GCC PR libstdc++/83906
11326 * gdbtypes.c (operator==(const dynamic_prop &,
11327 const dynamic_prop &)): New.
11328 (operator==(const range_bounds &, const range_bounds &)): New.
11329 (check_types_equal): Use them instead of memcmp.
11330 * gdbtypes.h (operator==(const dynamic_prop &,
11331 const dynamic_prop &)): Declare.
11332 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11333 (operator==(const range_bounds &, const range_bounds &)): Declare.
11334 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11335
11336 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11337
11338 * s390-linux-tdep.c (s390_record_address_mask)
11339 (s390_record_calc_disp_common, s390_record_calc_disp)
11340 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11341 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11342 (s390_process_record): Move to s390-tdep.c.
11343 (s390_linux_init_abi_any): Adjust.
11344 * s390-tdep.c (s390_record_address_mask)
11345 (s390_record_calc_disp_common, s390_record_calc_disp)
11346 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11347 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11348 (s390_process_record): Moved from s390-linux-tdep.c
11349 (s390_gdbarch_init): Adjust.
11350
11351 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11352
11353 * s390-linux-nat.c (s390-tdep.h): New include.
11354 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11355 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11356 (ALLDEPFILES): Add s390-tdep.c.
11357 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11358 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11359 * s390-tdep.h: ...this. New file.
11360 * s390-linux-tdep.c (s390-tdep.h): New include.
11361 (_initialize_s390_tdep): Rename to...
11362 (_initialize_s390_linux_tdep): ...this and adjust.
11363 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11364 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11365 s390-tdep.h.
11366 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11367 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11368 (s390_is_partial_instruction, s390_software_single_step)
11369 (is_non_branch_ril, s390_displaced_step_copy_insn)
11370 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11371 (s390_prologue_data, s390_addr, s390_store, s390_load)
11372 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11373 (s390_register_call_saved, s390_guess_tracepoint_registers)
11374 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11375 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11376 (s390_pseudo_register_name, s390_pseudo_register_type)
11377 (s390_pseudo_register_read, s390_pseudo_register_write)
11378 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11379 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11380 (s390_addr_bits_remove, s390_address_class_type_flags)
11381 (s390_address_class_type_flags_to_name)
11382 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11383 (s390_function_arg_float, s390_function_arg_vector)
11384 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11385 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11386 (s390_frame_align, s390_register_return_value, s390_return_value)
11387 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11388 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11389 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11390 (s390_trad_frame_prev_register, s390_unwind_cache)
11391 (s390_prologue_frame_unwind_cache)
11392 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11393 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11394 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11395 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11396 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11397 (s390_frame_base_address, s390_local_base_address)
11398 (s390_frame_base, s390_gcc_target_options)
11399 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11400 (s390_validate_reg_range, s390_tdesc_valid)
11401 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11402 * s390-tdep.c: ...this. New file.
11403
11404 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11405
11406 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11407 (s390_process_record, s390_gdbarch_tdep_alloc)
11408 (s390_linux_init_abi_any): Use/set new hook.
11409
11410 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11411
11412 * s390-linux-tdep.c (osabi.h): New include.
11413 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11414 (s390_linux_init_abi_any): New functions.
11415 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11416
11417 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11418
11419 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11420 tdesc_has_registers check
11421
11422 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11423
11424 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11425 (s390_validate_reg_range): New macro.
11426 (s390_gdbarch_init): Adjust.
11427
11428 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11429
11430 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11431 (s390_gdbarch_tdep_alloc): Adjust.
11432 (s390_gdbarch_init): Adjust.
11433
11434 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11435
11436 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11437 <have_tdb>: Change type to bool.
11438 (s390_gdbarch_tdep_alloc): Adjust.
11439 (s390_gdbarch_init): Adjust.
11440
11441 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11442
11443 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11444 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11445 (s390_gdbarch_tdep_alloc): New function.
11446 (s390_gdbarch_init): Allocate tdep at start and use its fields
11447 instead of separate variables.
11448
11449 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11450
11451 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11452 when looking for cached gdbarch and add comment for remaining.
11453
11454 2018-01-22 Pedro Alves <palves@redhat.com>
11455 Sergio Durigan Junior <sergiodj@redhat.com>
11456
11457 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11458 case.
11459
11460 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11461
11462 * MAINTAINERS: Update my company e-mail address.
11463
11464 2018-01-22 Yao Qi <yao.qi@linaro.org>
11465
11466 * regcache.c (cooked_write_test): New function.
11467 (_initialize_regcache): Register the test.
11468
11469 2018-01-22 Yao Qi <yao.qi@linaro.org>
11470
11471 * ia64-tdep.c (ia64_pseudo_register_read): Call
11472 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11473 * m32c-tdep.c (m32c_cat_read): Likewise.
11474 (m32c_r3r2r1r0_read): Likewise.
11475 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11476 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11477
11478 2018-01-22 Yao Qi <yao.qi@linaro.org>
11479
11480 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11481 method raw_read instead of regcache_raw_read.
11482 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11483 * arm-tdep.c (arm_neon_quad_read): Likewise.
11484 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11485 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11486 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11487 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11488 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11489 (i386_pseudo_register_read_into_value): Likewise.
11490 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11491 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11492 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11493 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11494 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11495 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11496 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11497 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11498 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11499
11500 2018-01-22 Yao Qi <yao.qi@linaro.org>
11501
11502 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11503 * configure.tgt: Remove target mt.
11504 * mt-tdep.c: Remove.
11505 * regcache.c (cooked_read_test): Remove the check for mt.
11506
11507 2018-01-22 Yao Qi <yao.qi@linaro.org>
11508
11509 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11510 instead of gdbarch_pseudo_register_read_value.
11511
11512 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11513
11514 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11515 language is Ada.
11516
11517 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11518
11519 * linespec.c (create_sals_line_offset): Remove code that preserved
11520 the symtab_and_line's line number.
11521
11522 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11523
11524 * varobj.c (varobj_create): Don't set valid_block when creating a
11525 floating varobj.
11526
11527 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11528
11529 * varobj.c (varobj_create): Remove out of date comment.
11530
11531 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11532
11533 PR mi/20395
11534 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11535 updating innermost block.
11536 * parse.c (innermost_block_tracker::update): Take extra type
11537 parameter, and check types match before updating innermost block.
11538 (write_dollar_variable): Update innermost block for registers.
11539 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11540 (innermost_block_tracker::innermost_block_tracker): Initialise
11541 m_types member.
11542 (innermost_block_tracker::reset): Take type parameter.
11543 (innermost_block_tracker::update): Take type parameter, and pass
11544 type through as needed.
11545 (innermost_block_tracker::m_types): New member.
11546 * varobj.c (varobj_create): Pass type when reseting innermost
11547 block.
11548
11549 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11550
11551 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11552 * ada-lang.c (resolve_subexp): Likewise.
11553 * breakpoint.c (set_breakpoint_condition) Likewise.
11554 (watch_command_1) Likewise.
11555 * c-exp.y (variable): Likewise.
11556 * d-exp.y (PrimaryExpression): Likewise.
11557 * f-exp.y (variable): Likewise.
11558 * go-exp.y (variable): Likewise.
11559 * m2-exp.y (variable): Likewise.
11560 * objfiles.c (objfile::~objfile): Likewise.
11561 * p-exp.y (variable): Likewise.
11562 * parse.c (innermost_block): Change type.
11563 * parser-defs.h (class innermost_block_tracker): New.
11564 (innermost_block): Change to innermost_block_tracker.
11565 * printcmd.c (display_command): Switch to innermost_block API.
11566 (do_one_display): Likewise.
11567 * rust-exp.y (do_one_display): Likewise.
11568 * symfile.c (clear_symtab_users): Likewise.
11569 * varobj.c (varobj_create): Switch to innermost_block API, replace
11570 use of innermost_block with block stored on varobj object.
11571
11572 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11573
11574 * expression.h (innermost_block): Remove declaration.
11575 * varobj.c: Add 'parser-defs.h' include.
11576
11577 2018-01-19 Tom Tromey <tom@tromey.com>
11578
11579 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11580 symbols in the static and global blocks.
11581
11582 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11583
11584 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11585 gdb_ptrace.h, and move including gdb_wait.h ...
11586 * nat/linux-ptrace.h: ... to here.
11587
11588 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11589
11590 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11591 inf_ptrace_detach_success.
11592 (inf_ptrace_detach_success): Add inferior parameter, use it
11593 instead of inferior_ptid, pass it to detach_inferior.
11594 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11595 parameter.
11596 * inferior.c (detach_inferior): Add overload that takes an
11597 inferior object.
11598 * inferior.h (detach_inferior): Likewise.
11599 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11600 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11601 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11602
11603 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11604
11605 * target.h (struct target_ops) <to_detach>: Add inferior
11606 parameter.
11607 (target_detach): Likewise.
11608 * target.c (dispose_inferior): Pass inferior down.
11609 (target_detach): Pass inferior down. Assert that it is equal to
11610 the current inferior.
11611 * aix-thread.c (aix_thread_detach): Pass inferior down.
11612 * corefile.c (core_file_command): Pass current_inferior() down.
11613 * corelow.c (core_detach): Add inferior parameter.
11614 * darwin-nat.c (darwin_detach): Likewise.
11615 * gnu-nat.c (gnu_detach): Likewise.
11616 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11617 * infcmd.c (detach_command): Pass current_inferior() down to
11618 target_detach.
11619 * infrun.c (follow_fork_inferior): Pass parent_inf to
11620 target_detach.
11621 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11622 target_detach.
11623 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11624 * linux-thread-db.c (thread_db_detach): Likewise.
11625 * nto-procfs.c (procfs_detach): Likewise.
11626 * procfs.c (procfs_detach): Likewise.
11627 * record.c (record_detach): Likewise.
11628 * record.h (struct inferior): Forward-declare.
11629 (record_detach): Add inferior parameter.
11630 * remote-sim.c (gdbsim_detach): Likewise.
11631 * remote.c (remote_detach_1): Likewise.
11632 (remote_detach): Likewise.
11633 (extended_remote_detach): Likewise.
11634 * sol-thread.c (sol_thread_detach): Likewise.
11635 * target-debug.h (target_debug_print_inferior_p): New macro.
11636 * target-delegates.c: Re-generate.
11637 * top.c (kill_or_detach): Pass inferior down to target_detach.
11638 * windows-nat.c (windows_detach): Add inferior parameter.
11639
11640 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11641
11642 * target.h (struct target_ops) <to_detach>: Remove args
11643 parameter.
11644 (target_detach): Likewise.
11645 * target.c (dispose_inferior): Adjust.
11646 (target_detach): Remove args parameter, adjust.
11647 * aix-thread.c (aix_thread_detach): Adjust.
11648 * corefile.c (core_file_command): Adjust.
11649 * corelow.c (core_detach): Adjust.
11650 * darwin-nat.c (darwin_detach): Adjust.
11651 * gnu-nat.c (gnu_detach): Adjust.
11652 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11653 * infcmd.c (detach_command): Adjust
11654 * infrun.c (follow_fork_inferior): Adjust.
11655 (handle_vfork_child_exec_or_exit): Adjust.
11656 * linux-fork.c (linux_fork_detach): Remove args parameter.
11657 * linux-fork.h (linux_fork_detach): Likewise.
11658 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11659 * linux-thread-db.c (thread_db_detach): Likewise.
11660 * nto-procfs.c (procfs_detach): Likewise.
11661 * procfs.c (procfs_detach): Likewise.
11662 (do_detach): Remove signo parameter.
11663 * record.c (record_detach): Remove args parameter.
11664 * record.h (record_detach): Likewise.
11665 * remote-sim.c (gdbsim_detach): Likewise.
11666 * remote.c (remote_detach_1): Likewise.
11667 (remote_detach): Likewise.
11668 (extended_remote_detach): Likewise.
11669 * sol-thread.c (sol_thread_detach): Likewise.
11670 * target-delegates.c: Re-generate.
11671 * top.c (struct qt_args) <args>: Remove field.
11672 (kill_or_detach): Don't pass args.
11673 (quit_force): Don't set args.
11674 * windows-nat.c (windows_detach): Remove args parameter.
11675
11676 2018-01-19 Yao Qi <yao.qi@linaro.org>
11677
11678 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11679 (arm_linux_init_abi): Install it.
11680
11681 2018-01-19 Yao Qi <yao.qi@linaro.org>
11682
11683 * osabi.c (gdb_osabi_names): Extend the regexp for
11684 arm-linux-gnueabihf.
11685
11686 2018-01-18 Yao Qi <yao.qi@linaro.org>
11687
11688 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11689 m_abbrevs.
11690 (abbrev_table::add_abbrev): Update.
11691 (abbrev_table::lookup_abbrev): Update.
11692
11693 2018-01-18 Yao Qi <yao.qi@linaro.org>
11694
11695 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11696
11697 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11698
11699 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11700 to "std::string".
11701
11702 2018-01-17 Tom Tromey <tom@tromey.com>
11703
11704 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11705
11706 2018-01-17 Tom Tromey <tom@tromey.com>
11707
11708 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11709 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11710 (create_array_type_with_stride): Update.
11711 * dwarf2read.c (set_die_type): Update.
11712
11713 2018-01-17 Tom Tromey <tom@tromey.com>
11714
11715 * dwarf2read.c (delayed_method_info): Remove typedef.
11716 (dwarf2_cu::method_info): Now a std::vector.
11717 (add_to_method_list): Update.
11718 (free_delayed_list): Remove.
11719 (compute_delayed_physnames): Update.
11720 (process_full_comp_unit, process_full_type_unit): Clear the method
11721 list. Remove cleanups.
11722 (psymtab_include_file_name): Add name_holder parameter. Use
11723 unique_xmalloc_ptr.
11724 (dwarf_decode_lines): Update.
11725
11726 2018-01-17 Tom Tromey <tom@tromey.com>
11727 Simon Marchi <simon.marchi@ericsson.com>
11728
11729 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11730 (dwarf2_per_objfile::free_cached_comp_units)
11731 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11732 (init_cutu_and_read_dies_no_follow): Update.
11733 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11734 (dwarf2_cu::~dwarf2_cu): New.
11735 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11736 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11737
11738 2018-01-17 Tom Tromey <tom@tromey.com>
11739 Simon Marchi <simon.marchi@ericsson.com>
11740
11741 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11742 (struct die_reader_specs) <abbrev_table>: New member.
11743 (struct abbrev_table): Add constructor.
11744 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11745 <abbrev_obstack>: Now an auto_obstack.
11746 (abbrev_table_up): New typedef.
11747 (init_cu_die_reader): Add abbrev_table parameter.
11748 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11749 Add result_dwo_abbrev_table.
11750 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11751 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11752 Update.
11753 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11754 parameter.
11755 (skip_children): Update.
11756 (abbrev_table::alloc_abbrev): Rename from
11757 abbrev_table_alloc_abbrev.
11758 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11759 (abbrev_table::lookup_abbrev): Rename from
11760 abbrev_table_lookup_abbrev.
11761 (abbrev_table_read_table): Return abbrev_table_up.
11762 (abbrev_table_free, abbrev_table_free_cleanup)
11763 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11764 (load_partial_dies): Update.
11765
11766 2018-01-17 Tom Tromey <tom@tromey.com>
11767
11768 * dwarf2read.c (dwarf2_compute_name): Update comment.
11769 (read_func_scope, read_variable): Update.
11770 (new_symbol): Remove.
11771 (new_symbol_full): Rename to new_symbol.
11772
11773 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11774
11775 PR gdb/16577
11776 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11777 a warning instead of throwing an error, set section size to 0 and return
11778 NULL.
11779 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11780
11781 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11782
11783 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11784 std::string.
11785 (linux_ptrace_attach_fail_reason_string): Likewise.
11786 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11787 Likewise.
11788 (linux_ptrace_attach_fail_reason_string): Likewise.
11789 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11790
11791 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11792
11793 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11794
11795 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11796
11797 PR gdb/21559
11798 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11799 checking for fs_base/gs_base fields in struct user_regs_struct.
11800 * configure: Regenerate.
11801
11802 2018-01-17 Yao Qi <yao.qi@linaro.org>
11803
11804 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11805 function.
11806 (aarch64_linux_init_abi): Install it to gdbarch hook
11807 gcc_target_options.
11808
11809 2018-01-15 Pedro Alves <palves@redhat.com>
11810
11811 * common/signals-state-save-restore.c
11812 (save_original_signals_state): Fix typos.
11813
11814 2017-01-12 Tom Tromey <tom@tromey.com>
11815 Sergio Durigan Junior <sergiodj@redhat.com>
11816
11817 * Makefile.in (install-only): Install gdb-add-index.
11818
11819 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11820
11821 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11822
11823 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11824
11825 * infrun.c (keep_going_pass_signal): Clear step-over info when
11826 insert_breakpoints fails.
11827
11828 2018-01-11 Pedro Alves <palves@redhat.com>
11829
11830 PR gdb/22583
11831 * infrun.c (resume): Rename to ...
11832 (resume_1): ... this.
11833 (resume): Reimplement as wrapper around resume_1.
11834
11835 2018-01-11 Pedro Alves <palves@redhat.com>
11836
11837 PR remote/22597
11838 * remote.c (remote_parse_stop_reply): Default to the last-set
11839 general thread instead of to 'magic_null_ptid'.
11840
11841 2018-01-10 Pedro Alves <palves@redhat.com>
11842
11843 * language.h (language_get_symbol_name_matcher): Rename ...
11844 (get_symbol_name_matcher): ... this.
11845 * language.c (language_get_symbol_name_matcher): Ditto.
11846 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11847 callers adjusted.
11848
11849 2018-01-10 Pedro Alves <palves@redhat.com>
11850
11851 PR gdb/22670
11852 * dwarf2read.c
11853 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11854 Adjust to use language_get_symbol_name_matcher instead of
11855 language_defn::la_get_symbol_name_matcher.
11856 * language.c (language_get_symbol_name_matcher): If in Ada mode
11857 and the lookup name is a verbatim match, return Ada's matcher.
11858 * language.h (language_get_symbol_name_matcher): Adjust comment.
11859 (ada_lookup_name_info::verbatim_p):: New method.
11860
11861 2018-01-10 Pedro Alves <palves@redhat.com>
11862
11863 PR gdb/22670
11864 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11865 minsym's language is language_auto or language_cplus, pass down
11866 language_ada instead.
11867 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11868
11869 2018-01-10 Pedro Alves <palves@redhat.com>
11870
11871 PR gdb/22670
11872 * minsyms.c (linkage_name_str): New function.
11873 (iterate_over_minimal_symbols): Use it.
11874
11875 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11876
11877 * NEWS: Document that 'info proc' now works on FreeBSD.
11878
11879 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11880
11881 * configure.ac: Check for kinfo_getfile in libutil.
11882 * configure: Regenerate.
11883 * config.in: Regenerate.
11884 * fbsd-nat.c: Include "fbsd-tdep.h".
11885 (fbsd_fetch_cmdline): New.
11886 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11887 rather than calling error.
11888 (fbsd_info_proc): New.
11889 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11890 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11891 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11892
11893 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11894
11895 * fbsd-nat.c (struct free_deleter): Remove.
11896 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11897
11898 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11899
11900 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11901 NULL for an empty pathname.
11902
11903 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11904
11905 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11906 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11907 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11908 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11909 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11910 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11911 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11912 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11913 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11914 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11915 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11916 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11917 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11918 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11919 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11920
11921 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11922
11923 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11924 (gnu_xfer_auxv): New function.
11925 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11926 TARGET_OBJECT_AUXV.
11927
11928 2018-01-08 Yao Qi <yao.qi@linaro.org>
11929 Simon Marchi <simon.marchi@ericsson.com>
11930
11931 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11932 common/selftest.c.
11933 (COMMON_OBS): Remove selftest.o.
11934 * configure.ac: Append selftest-arch.c and common/selftest.c to
11935 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11936 * configure: Re-generated.
11937 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11938 GDB_SELF_TEST.
11939 (maintenance_info_selftests): Likewise.
11940
11941 2018-01-08 Xavier Roirand <roirand@adacore.com>
11942
11943 * ada-valprint.c (val_print_packed_array_elements): Use
11944 proper number of elements when printing an array indexed
11945 by an enumeration type.
11946
11947 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11948
11949 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11950 (dw2_get_file_names_reader): Adjust.
11951 (lookup_dwo_signatured_type): Adjust.
11952 (lookup_dwp_signatured_type): Adjust.
11953 (lookup_signatured_type): Adjust.
11954 (create_type_unit_group): Adjust.
11955 (get_type_unit_group): Adjust.
11956 (process_psymtab_comp_unit_reader): Adjust.
11957 (build_type_psymtabs_reader): Adjust.
11958 (scan_partial_symbols): Adjust.
11959 (add_partial_symbol): Adjust.
11960 (add_partial_subprogram): Adjust.
11961 (peek_die_abbrev): Adjust.
11962 (fixup_go_packaging): Adjust.
11963 (process_imported_unit_die): Adjust.
11964 (dwarf2_compute_name): Adjust.
11965 (dwarf2_physname): Adjust.
11966 (read_import_statement): Adjust.
11967 (handle_DW_AT_stmt_list): Adjust.
11968 (read_file_scope): Adjust.
11969 (read_func_scope): Adjust.
11970 (read_lexical_block_scope): Adjust.
11971 (read_call_site_scope): Adjust.
11972 (read_variable): Adjust.
11973 (dwarf2_rnglists_process): Adjust.
11974 (dwarf2_ranges_process): Adjust.
11975 (dwarf2_ranges_read): Adjust.
11976 (dwarf2_get_pc_bounds): Adjust.
11977 (dwarf2_record_block_ranges): Adjust.
11978 (dwarf2_add_field): Adjust.
11979 (dwarf2_add_member_fn): Adjust.
11980 (read_structure_type): Adjust.
11981 (process_structure_scope): Adjust.
11982 (read_enumeration_type): Adjust.
11983 (read_array_type): Adjust.
11984 (mark_common_block_symbol_computed): Adjust.
11985 (read_common_block): Adjust.
11986 (read_namespace_type): Adjust.
11987 (read_namespace): Adjust.
11988 (read_module_type): Adjust.
11989 (read_tag_pointer_type): Adjust.
11990 (read_tag_ptr_to_member_type): Adjust.
11991 (read_tag_string_type): Adjust.
11992 (read_subroutine_type): Adjust.
11993 (read_typedef): Adjust.
11994 (read_base_type): Adjust.
11995 (attr_to_dynamic_prop): Adjust.
11996 (read_subrange_type): Adjust.
11997 (read_unspecified_type): Adjust.
11998 (dwarf2_read_abbrevs): Adjust.
11999 (load_partial_dies): Adjust.
12000 (read_partial_die): Adjust.
12001 (find_partial_die): Adjust.
12002 (guess_partial_die_structure_name): Adjust.
12003 (fixup_partial_die): Adjust.
12004 (read_attribute_value): Adjust.
12005 (read_addr_index): Adjust.
12006 (read_addr_index_from_leb128): Adjust.
12007 (read_str_index): Adjust.
12008 (dwarf2_string_attr): Adjust.
12009 (get_debug_line_section): Adjust.
12010 (dwarf_decode_line_header): Adjust.
12011 (lnp_state_machine::check_line_address): Adjust.
12012 (dwarf_decode_lines_1): Adjust.
12013 (dwarf_decode_lines): Adjust.
12014 (dwarf2_start_symtab): Adjust.
12015 (var_decode_location): Adjust.
12016 (new_symbol_full): Adjust.
12017 (dwarf2_const_value_data): Adjust.
12018 (dwarf2_const_value_attr): Adjust.
12019 (dwarf2_const_value): Adjust.
12020 (die_type): Adjust.
12021 (die_containing_type): Adjust.
12022 (build_error_marker_type): Adjust.
12023 (lookup_die_type): Adjust.
12024 (guess_full_die_structure_name): Adjust.
12025 (anonymous_struct_prefix): Adjust.
12026 (determine_prefix): Adjust.
12027 (dwarf2_name): Adjust.
12028 (follow_die_ref_or_sig): Adjust.
12029 (follow_die_offset): Adjust.
12030 (follow_die_ref): Adjust.
12031 (follow_die_sig_1): Adjust.
12032 (follow_die_sig): Adjust.
12033 (get_signatured_type): Adjust.
12034 (get_DW_AT_signature_type): Adjust.
12035 (decode_locdesc): Adjust.
12036 (dwarf_decode_macros): Adjust.
12037 (cu_debug_loc_section): Adjust.
12038 (fill_in_loclist_baton): Adjust.
12039 (dwarf2_symbol_mark_computed): Adjust.
12040 (init_one_comp_unit): Don't assign
12041 dwarf2_cu::dwarf2_per_objfile.
12042 (set_die_type): Adjust.
12043
12044 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12045
12046 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12047 <dwarf2_per_objfile>: New field.
12048 (dwarf2_per_objfile): Remove global.
12049 (get_dwarf2_per_objfile): New function.
12050 (set_dwarf2_per_objfile): New function.
12051 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12052 dwarf2_per_objfile.
12053 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12054 (read_abbrev_offset): Likewise.
12055 (read_indirect_string): Likewise.
12056 (read_indirect_line_string): Likewise.
12057 (read_indirect_string_at_offset): Likewise.
12058 (read_indirect_string_from_dwz): Likewise.
12059 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12060 dwarf2_per_objfile.
12061 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12062 (create_all_comp_units): Change objfile parameter to
12063 dwarf2_per_objfile.
12064 (create_all_type_units): Likewise.
12065 (process_queue): Add dwarf2_per_objfile parameter.
12066 (read_and_check_comp_unit_head): Likewise.
12067 (lookup_dwo_unit_in_dwp): Likewise.
12068 (get_dwp_file): Likewise.
12069 (process_cu_includes): Likewise.
12070 (struct free_dwo_file_cleanup_data): New struct.
12071 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12072 set_dwarf2_per_objfile.
12073 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12074 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12075 context, adjust calls.
12076 (dw2_instantiate_symtab): Likewise.
12077 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12078 (dw2_get_cu): Likewise.
12079 (create_cu_from_index_list): Change objfile parameter to
12080 dwarf2_per_objfile.
12081 (create_cus_from_index_list): Get dwarf2_per_objfile from
12082 context, adjust calls.
12083 (create_cus_from_index): Likewise.
12084 (create_signatured_type_table_from_index): Change objfile
12085 parameter to dwarf2_per_objfile.
12086 (create_signatured_type_table_from_debug_names): Change objfile
12087 parameter to dwarf2_per_objfile.
12088 (create_addrmap_from_index): Likewise.
12089 (create_addrmap_from_aranges): Likewise.
12090 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12091 (dw2_setup): Remove.
12092 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12093 context.
12094 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12095 get_dwarf2_per_objfile.
12096 (dw2_forget_cached_source_info): Likewise.
12097 (dw2_map_symtabs_matching_filename): Likewise.
12098 (struct dw2_symtab_iterator) <index>: Remove.
12099 <dwarf2_per_objfile>: New field.
12100 (dw2_symtab_iter_init): Replace index parameter with
12101 dwarf2_per_objfile.
12102 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12103 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12104 (dw2_print_stats): Likewise.
12105 (dw2_dump): Likewise.
12106 (dw2_expand_symtabs_for_function): Likewise.
12107 (dw2_expand_all_symtabs): Likewise.
12108 (dw2_expand_symtabs_with_fullname): Likewise.
12109 (dw2_expand_marked_cus): Replace index and objfile parameters
12110 with dwarf2_per_objfile.
12111 (dw_expand_symtabs_matching_file_matcher): Add
12112 dwarf2_per_objfile parameter and adjust calls.
12113 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12114 adjust calls.
12115 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12116 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12117 adjust calls.
12118 (create_cus_from_debug_names_list): Replace objfile parameter
12119 with dwarf2_per_objfile and adjust calls.
12120 (create_cus_from_debug_names): Likewise.
12121 (dwarf2_read_debug_names): Likewise.
12122 (mapped_debug_names::namei_to_name): Adjust call.
12123 (dw2_debug_names_iterator::next): Likewise.
12124 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12125 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12126 (dw2_debug_names_dump): Likewise.
12127 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12128 (dw2_debug_names_expand_symtabs_matching): Likewise.
12129 (dwarf2_initialize_objfile): Likewise.
12130 (dwarf2_build_psymtabs): Likewise.
12131 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12132 this_cu.
12133 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12134 (read_and_check_comp_unit_head): Likewise.
12135 (read_abbrev_offset): Likewise.
12136 (create_debug_type_hash_table): Likewise.
12137 (create_debug_types_hash_table): Likewise.
12138 (create_all_type_units): Replace objfile parameter with
12139 dwarf2_per_objfile.
12140 (add_type_unit): Add dwarf2_per_objfile parameter.
12141 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12142 with dwarf2_per_objfile.
12143 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12144 (lookup_dwp_signatured_type): Likewise.
12145 (lookup_signatured_type): Likewise.
12146 (read_cutu_die_from_dwo): Likewise.
12147 (init_tu_and_read_dwo_dies): Likewise.
12148 (init_cutu_and_read_dies): Likewise.
12149 (init_cutu_and_read_dies_no_follow): Likewise.
12150 (allocate_type_unit_groups_table): Add objfile parameter.
12151 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12152 (get_type_unit_group): Likewise.
12153 (process_psymtab_comp_unit): Update call.
12154 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12155 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12156 (print_tu_stats): Likewise.
12157 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12158 in void* parameter.
12159 (build_type_psymtabs): Change objfile parameter to
12160 dwarf2_per_objfile.
12161 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12162 passed in void* parameter.
12163 (process_skeletonless_type_units): Change objfile parameter to
12164 dwarf2_per_objfile.
12165 (set_partial_user): Likewise.
12166 (dwarf2_build_psymtabs_hard): Likewise.
12167 (read_comp_units_from_section): Likewise.
12168 (create_all_comp_units): Likewise.
12169 (scan_partial_symbols): Update calls.
12170 (add_partial_symbol): Likewise.
12171 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12172 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12173 (process_queue): Add dwarf2_per_objfile parameter.
12174 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12175 (compute_compunit_symtab_includes): Likewise.
12176 (process_cu_includes): Add dwarf2_per_objfile parameter.
12177 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12178 (process_full_type_unit): Likewise.
12179 (process_imported_unit_die): Update call.
12180 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12181 (read_file_scope): Likewise.
12182 (allocate_dwo_file_hash_table): Add objfile parameter.
12183 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12184 (create_cus_hash_table): Likewise.
12185 (create_dwp_hash_table): Likewise.
12186 (create_dwo_unit_in_dwp_v1): Likewise.
12187 (create_dwp_v2_section): Likewise.
12188 (create_dwo_unit_in_dwp_v2): Likewise.
12189 (lookup_dwo_unit_in_dwp): Likewise.
12190 (try_open_dwop_file): Likewise.
12191 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12192 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12193 cleanup to include a reference to dwarf2_per_objfile.
12194 (open_dwp_file): Add dwarf2_per_objfile parameter.
12195 (open_and_init_dwp_file): Likewise.
12196 (get_dwp_file): Likewise.
12197 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12198 (queue_and_load_all_dwo_tus): Update call.
12199 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12200 data.
12201 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12202 (dwarf2_ranges_process): Likewise.
12203 (dwarf2_get_pc_bounds): Likewise.
12204 (mark_common_block_symbol_computed): Likewise.
12205 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12206 (dwarf2_read_abbrevs): Update call.
12207 (read_partial_die): Use dwarf2_per_objfile from cu.
12208 (find_partial_die): Likewise.
12209 (fixup_partial_die): Likewise.
12210 (read_attribute_value): Likewise.
12211 (read_indirect_string_at_offset_from): Add objfile parameter.
12212 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12213 parameter.
12214 (read_indirect_string_from_dwz): Add objfile parameter.
12215 (read_indirect_string): Add objfile parameter.
12216 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12217 (read_addr_index): Use dwarf2_per_objfile from cu.
12218 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12219 call dw2_setup.
12220 (read_str_index): Use dwarf2_per_objfile from cu.
12221 (get_debug_line_section): Likewise.
12222 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12223 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12224 (new_symbol_full): Use dwarf2_per_objfile from cu.
12225 (build_error_marker_type): Likewise.
12226 (lookup_die_type): Likewise.
12227 (determine_prefix): Likewise.
12228 (follow_die_offset): Likewise.
12229 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12230 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12231 (dwarf2_fetch_die_type_sect_off): Likewise.
12232 (dwarf2_get_die_type): Likewise.
12233 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12234 (get_signatured_type): Likewise.
12235 (get_DW_AT_signature_type): Likewise.
12236 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12237 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12238 (cu_debug_loc_section): Likewise.
12239 (fill_in_loclist_baton): Likewise.
12240 (dwarf2_symbol_mark_computed): Likewise.
12241 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12242 dwarf2_per_objfile.
12243 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12244 parameter.
12245 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12246 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12247 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12248 (set_die_type): Use dwarf2_free_objfile from cu.
12249 (get_die_type_at_offset): Likewise.
12250 (dwarf2_per_objfile_free): Don't assign global variable.
12251 (debug_names) <constructor>: Add dwarf2_per_objfile
12252 parameter, update m_debugstrlookup construction.
12253 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12254 parameter.
12255 <m_dwarf2_per_objfile>: New field.
12256 <lookup>: Use m_dwarf2_per_objfile.
12257 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12258 (psyms_seen_size): Likewise.
12259 (write_gdbindex): Replace objfile parameter with
12260 dwarf2_per_objfile.
12261 (write_debug_names): Likewise.
12262 (write_psymtabs_to_index): Likewise.
12263 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12264 calls.
12265
12266 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12267
12268 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12269 <dwarf2_per_objfile>: New field.
12270 (struct dwarf2_per_cu_data) <objfile>: Remove.
12271 <dwarf2_per_objfile>: New field.
12272 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12273 of objfile.
12274 (create_signatured_type_table_from_index): Likewise.
12275 (create_debug_type_hash_table): Likewise.
12276 (fill_in_sig_entry_from_dwo_entry): Likewise.
12277 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12278 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12279 objfile.
12280 (create_partial_symtab): Access objfile through
12281 dwarf2_per_objfile.
12282 (process_psymtab_comp_unit_reader): Likewise.
12283 (read_comp_units_from_section): Likewise.
12284 (scan_partial_symbols): Likewise.
12285 (add_partial_symbol): Likewise.
12286 (add_partial_subprogram): Likewise.
12287 (peek_die_abbrev): Likewise.
12288 (fixup_go_packaging): Likewise.
12289 (process_full_comp_unit): Likewise.
12290 (process_full_type_unit): Likewise.
12291 (process_imported_unit_die): Likewise.
12292 (dwarf2_compute_name): Likewise.
12293 (dwarf2_physname): Likewise.
12294 (read_import_statement): Likewise.
12295 (create_cus_hash_table): Assign dwarf2_physname instead of
12296 objfile.
12297 (read_func_scope): Access objfile through dwarf2_per_objfile.
12298 (read_lexical_block_scope): Likewise.
12299 (read_call_site_scope): Likewise.
12300 (read_variable): Likewise.
12301 (dwarf2_rnglists_process): Likewise.
12302 (dwarf2_ranges_process): Likewise.
12303 (dwarf2_ranges_read): Likewise.
12304 (dwarf2_record_block_ranges): Likewise.
12305 (dwarf2_add_field): Likewise.
12306 (dwarf2_add_member_fn): Likewise.
12307 (read_structure_type): Likewise.
12308 (process_structure_scope): Likewise.
12309 (read_enumeration_type): Likewise.
12310 (read_array_type): Likewise.
12311 (read_common_block): Likewise.
12312 (read_namespace_type): Likewise.
12313 (read_namespace): Likewise.
12314 (read_module_type): Likewise.
12315 (read_tag_pointer_type): Likewise.
12316 (read_tag_ptr_to_member_type): Likewise.
12317 (read_tag_string_type): Likewise.
12318 (read_subroutine_type): Likewise.
12319 (read_typedef): Likewise.
12320 (read_base_type): Likewise.
12321 (attr_to_dynamic_prop): Likewise.
12322 (read_subrange_type): Likewise.
12323 (read_unspecified_type): Likewise.
12324 (load_partial_dies): Likewise.
12325 (read_partial_die): Likewise.
12326 (find_partial_die): Likewise.
12327 (guess_partial_die_structure_name): Likewise.
12328 (fixup_partial_die): Likewise.
12329 (read_attribute_value): Likewise.
12330 (read_addr_index_from_leb128): Likewise.
12331 (dwarf2_read_addr_index): Likewise.
12332 (dwarf2_string_attr): Likewise.
12333 (lnp_state_machine::check_line_address): Likewise.
12334 (dwarf_decode_lines_1): Likewise.
12335 (dwarf_decode_lines): Likewise.
12336 (dwarf2_start_symtab): Likewise.
12337 (var_decode_location): Likewise.
12338 (new_symbol_full): Likewise.
12339 (dwarf2_const_value_data): Likewise.
12340 (dwarf2_const_value_attr): Likewise.
12341 (dwarf2_const_value): Likewise.
12342 (die_type): Likewise.
12343 (die_containing_type): Likewise.
12344 (lookup_die_type): Likewise.
12345 (guess_full_die_structure_name): Likewise.
12346 (anonymous_struct_prefix): Likewise.
12347 (dwarf2_name): Likewise.
12348 (follow_die_ref_or_sig): Likewise.
12349 (follow_die_offset): Likewise.
12350 (follow_die_ref): Likewise.
12351 (dwarf2_fetch_die_loc_sect_off): Likewise.
12352 (dwarf2_fetch_constant_bytes): Likewise.
12353 (dwarf2_fetch_die_type_sect_off): Likewise.
12354 (dwarf2_get_die_type): Likewise.
12355 (follow_die_sig): Likewise.
12356 (decode_locdesc): Likewise.
12357 (dwarf2_per_cu_objfile): Likewise.
12358 (dwarf2_per_cu_text_offset): Likewise.
12359 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12360 objfile.
12361 (set_die_type): Access objfile through
12362 dwarf2_per_objfile.
12363
12364 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12365
12366 * valprint.c (converted_character_d): Remove typedef.
12367 (DEF_VEC_O (converted_character_d)): Remove.
12368 (count_next_character): Use std::vector.
12369 (print_converted_chars_to_obstack): Likewise.
12370 (generic_printstr): Likewise.
12371
12372 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12373
12374 * xml-support.h (struct gdb_xml_value): Add constructor.
12375 <value>: Change type to unique_xmalloc_ptr.
12376 (gdb_xml_value_s): Remove typedef.
12377 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12378 (gdb_xml_element_start_handler): Change parameter type to
12379 std::vector.
12380 (xml_find_attribute): Likewise.
12381 * xml-support.c (xml_find_attribute): Change parameter type to
12382 std::vector and adjust.
12383 (gdb_xml_values_cleanup): Remove.
12384 (gdb_xml_parser::start_element): Adjust to std::vector.
12385 (xinclude_start_include): Change paraeter type to std::vector
12386 and adjust.
12387 * btrace.c (check_xml_btrace_version): Likewise.
12388 (parse_xml_btrace_block): Likewise.
12389 (parse_xml_btrace_pt_config_cpu): Likewise.
12390 (parse_xml_btrace_pt): Likewise.
12391 (parse_xml_btrace_conf_bts): Likewise.
12392 (parse_xml_btrace_conf_pt): Likewise.
12393 * memory-map.c (memory_map_start_memory): Likewise.
12394 (memory_map_start_property): Likewise.
12395 * osdata.c (osdata_start_osdata): Likewise.
12396 (osdata_start_item): Likewise.
12397 (osdata_start_column): Likewise.
12398 * remote.c (start_thread): Likewise.
12399 * solib-aix.c (library_list_start_library): Likewise.
12400 (library_list_start_list): Likewise.
12401 * solib-svr4.c (library_list_start_library): Likewise.
12402 (svr4_library_list_start_list): Likewise.
12403 * solib-target.c (library_list_start_segment): Likewise.
12404 (library_list_start_section): Likewise.
12405 (library_list_start_library): Likewise.
12406 (library_list_start_list): Likewise.
12407 * tracepoint.c (traceframe_info_start_memory): Likewise.
12408 (traceframe_info_start_tvar): Likewise.
12409 * xml-syscall.c (syscall_start_syscall): Likewise.
12410 * xml-tdesc.c (tdesc_start_target): Likewise.
12411 (tdesc_start_feature): Likewise.
12412 (tdesc_start_reg): Likewise.
12413 (tdesc_start_union): Likewise.
12414 (tdesc_start_struct): Likewise.
12415 (tdesc_start_flags): Likewise.
12416 (tdesc_start_enum): Likewise.
12417 (tdesc_start_field): Likewise.
12418 (tdesc_start_enum_value): Likewise.
12419 (tdesc_start_vector): Likewise.
12420
12421 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12422
12423 * extension.h (struct xmethod_worker) <clone>: Remove.
12424 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12425 Remove.
12426 (python_xmethod_worker::clone): Remove.
12427 * valops.c (find_overload_match): Use std::move instead of
12428 clone.
12429
12430 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12431
12432 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12433 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12434 <free_xmethod_worker_data>: Remove.
12435 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12436 <get_xmethod_arg_types>: Remove.
12437 <get_xmethod_result_type>: Remove.
12438 <invoke_xmethod>: Remove.
12439 * extension.c (new_xmethod_worker): Remove.
12440 (clone_xmethod_worker): Remove.
12441 (get_matching_xmethod_workers): Return void, pass std::vector by
12442 pointer.
12443 (get_xmethod_arg_types): Rename to...
12444 (xmethod_worker::get_arg_types): ... this, and adjust.
12445 (get_xmethod_result_type): Rename to...
12446 (xmethod_worker::get_result_type): ... this, and adjust.
12447 (invoke_xmethod): Remove.
12448 (free_xmethod_worker): Remove.
12449 (free_xmethod_worker_vec): Remove.
12450 * extension.h (enum ext_lang_rc): Move here from
12451 extension-priv.h.
12452 (struct xmethod_worker): Add constructor and destructor.
12453 <data>: Remove.
12454 <value>: Remove.
12455 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12456 virtual pure methods.
12457 <get_arg_types, get_result_type>: New methods.
12458 (xmethod_worker_ptr): Remove typedef.
12459 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12460 (xmethod_worker_vec): Remove typedef.
12461 (xmethod_worker_up): New typedef.
12462 (invoke_xmethod): Remove.
12463 (clone_xmethod_worker): Remove.
12464 (free_xmethod_worker): Remove.
12465 (free_xmethod_worker_vec): Remove.
12466 (get_xmethod_arg_types): Remove.
12467 (get_xmethod_result_type): Remove.
12468 * valops.c (find_method_list): Use std::vector, don't use
12469 intermediate vector.
12470 (value_find_oload_method_list): Use std::vector.
12471 (find_overload_match): Use std::vector.
12472 (find_oload_champ): Use std::vector.
12473 * value.c (value_free): Use operator delete.
12474 (value_of_xmethod): Rename to...
12475 (value_from_xmethod): ... this. Don't assign
12476 xmethod_worker::value, take rvalue-reference.
12477 (result_type_of_xmethod): Adjust.
12478 (call_xmethod): Adjust.
12479 * value.h: Include extension.h.
12480 (struct xmethod_worker): Don't forward-declare.
12481 (value_of_xmethod): Rename to...
12482 (value_from_xmethod): ... this, take rvalue-reference.
12483 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12484 (struct python_xmethod_worker): ... this, add constructor and
12485 destructor.
12486 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12487 (gdbpy_free_xmethod_worker_data): Rename to...
12488 (python_xmethod_worker::~python_xmethod_worker): ... this and
12489 adjust.
12490 (gdbpy_clone_xmethod_worker_data): Rename to...
12491 (python_xmethod_worker::clone): ... this and adjust.
12492 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12493 temporary vector.
12494 (gdbpy_get_xmethod_arg_types): Rename to...
12495 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12496 (gdbpy_get_xmethod_result_type): Rename to...
12497 (python_xmethod_worker::do_get_result_type): ... this and
12498 adjust.
12499 (gdbpy_invoke_xmethod): Rename to...
12500 (python_xmethod_worker::invoke): ... this and adjust.
12501 (new_python_xmethod_worker): Rename to...
12502 (python_xmethod_worker::python_xmethod_worker): ... this and
12503 adjust.
12504 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12505 Remove.
12506 (gdbpy_free_xmethod_worker_data): Remove.
12507 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12508 (gdbpy_get_xmethod_arg_types): Remove.
12509 (gdbpy_get_xmethod_result_type): Remove.
12510 (gdbpy_invoke_xmethod): Remove.
12511 * python/python.c (python_extension_ops): Remove obsolete
12512 callbacks.
12513
12514 2018-01-05 Pedro Alves <palves@redhat.com>
12515
12516 PR gdb/18653
12517 * common/signals-state-save-restore.c
12518 (save_original_signals_state): New parameter 'quiet'. Warn if we
12519 find a custom handler preinstalled, instead of internal erroring.
12520 But only warn if !quiet.
12521 * common/signals-state-save-restore.h
12522 (save_original_signals_state): New parameter 'quiet'.
12523 * main.c (captured_main_1): Move save_original_signals_state call
12524 after option handling, and pass QUIET.
12525
12526 2018-01-05 Pedro Alves <palves@redhat.com>
12527
12528 * spu-tdep.c (spu_catch_start): Pass
12529 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12530
12531 2018-01-05 Pedro Alves <palves@redhat.com>
12532
12533 PR gdb/22670
12534 * ada-lang.c (literal_symbol_name_matcher): New function.
12535 (ada_get_symbol_name_matcher): Use it for
12536 symbol_name_match_type::SEARCH_NAME.
12537 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12538 it down instead of assuming symbol_name_match_type::FULL.
12539 * block.h (block_lookup_symbol): New parameter 'match_type'.
12540 * c-valprint.c (print_unpacked_pointer): Use
12541 lookup_symbol_search_name instead of lookup_symbol.
12542 * compile/compile-object-load.c (get_out_value_type): Pass down
12543 symbol_name_match_type::SEARCH_NAME.
12544 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12545 symbol_name_match_type::FULL.
12546 * cp-support.c (cp_get_symbol_name_matcher): Handle
12547 symbol_name_match_type::SEARCH_NAME.
12548 * infrun.c (insert_exception_resume_breakpoint): Use
12549 lookup_symbol_search_name.
12550 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12551 * psymtab.c (maintenance_check_psymtabs): Use
12552 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12553 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12554 SYMBOL_SEARCH_NAME.
12555 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12556 if symbol_name_match_type::SEARCH_NAME.
12557 (lookup_symbol_in_language): Pass down
12558 symbol_name_match_type::FULL.
12559 (lookup_symbol_search_name): New.
12560 (lookup_language_this): Pass down
12561 symbol_name_match_type::SEARCH_NAME.
12562 (lookup_symbol_aux, lookup_local_symbol): New parameter
12563 'match_type'. Pass it down.
12564 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12565 (lookup_symbol_search_name): New declaration.
12566 (lookup_symbol_in_block): New 'match_type' parameter.
12567
12568 2018-01-05 Pedro Alves <palves@redhat.com>
12569
12570 PR gdb/22670
12571 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12572 ada_lookup_symbol.
12573 (ada_lookup_symbol): Reimplement in terms of
12574 ada_lookup_symbol_list, bits factored out from
12575 ada_lookup_encoded_symbol.
12576
12577 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12578
12579 * ada-exp.y (write_object_renaming): When subscripting an array
12580 using a symbol as the index, pass the block in call to
12581 ada_lookup_encoded_symbol when looking that symbol up.
12582
12583 2018-01-05 Jerome Guitton <guitton@adacore.com>
12584
12585 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12586 TYPE_INDEX_TYPE.
12587
12588 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12589
12590 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12591 the case where VALUE_LVAL (val0) is not lval_memory.
12592
12593 2018-01-05 Xavier Roirand <roirand@adacore.com>
12594
12595 * ada-valprint.c (print_optional_low_bound): Handle
12596 character-indexed array printing like boolean-indexed array
12597 printing.
12598
12599 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12600
12601 * NEWS: Create a new section for the next release branch.
12602 Rename the section of the current branch, now that it has
12603 been cut.
12604
12605 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12606
12607 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12608 * version.in: Bump version to 8.1.50.DATE-git.
12609
12610 2018-01-03 Xavier Roirand <roirand@adacore.com>
12611
12612 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12613 Add field.
12614 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12615 Add field.
12616 (default_exception_support_info) <catch_handlers_sym>: Add field.
12617 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12618 (ada_exception_name_addr_1): Add "catch handlers" handling.
12619 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12620 Update all callers.
12621 (create_excep_cond_exprs) <ex>: Add parameter.
12622 (re_set_exception): Update create_excep_cond_exprs call.
12623 (print_it_exception, print_one_exception, print_mention_exception)
12624 (print_recreate_exception): Add "catch handler" handling.
12625 (allocate_location_catch_handlers, re_set_catch_handlers)
12626 (check_status_catch_handlers, print_it_catch_handlers)
12627 (print_one_catch_handlers, print_mention_catch_handlers)
12628 (print_recreate_catch_handlers): New function.
12629 (catch_handlers_breakpoint_ops): New variable.
12630 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12631 Add parameter. Add "catch handler" handling.
12632 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12633 Add "catch handler" handling.
12634 (ada_exception_catchpoint_cond_string): Add "catch handler"
12635 handling.
12636 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12637 call.
12638 (catch_ada_handlers_command): New function.
12639 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12640 operations structure.
12641 (_initialize_ada_language): Add "catch handlers" command entry.
12642 * NEWS: Document "catch handlers" feature.
12643
12644 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12645
12646 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12647 account when creating the array type of the slice.
12648 (ada_value_slice): Likewise.
12649
12650 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12651
12652 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12653 New enum value.
12654 (create_array_type_with_stride): Add byte_stride_prop parameter.
12655 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12656 New parameter. Update all callers in this file.
12657 (array_type_has_dynamic_stride): New function.
12658 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12659 of arrays with dynamic byte strides.
12660 * dwarf2read.c (read_array_type): Add support for dynamic
12661 DW_AT_byte_stride attributes.
12662
12663 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12664
12665 * dwarf2read.c (read_unspecified_type): Treat
12666 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12667
12668 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12669
12670 Update copyright year range in all GDB files.
12671
12672 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12673
12674 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12675 and gdb/testsuite/gdb.base/step-line.c.
12676
12677 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12678
12679 * copyright.py (main): Dump the contents of
12680 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12681 even if BY_HAND is empty.
12682
12683 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12684
12685 * top.c (print_gdb_version): Update Copyright year in version
12686 message.
12687
12688 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12689
12690 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12691
12692 For older changes see ChangeLog-2017.
12693 \f
12694 Local Variables:
12695 mode: change-log
12696 left-margin: 8
12697 fill-column: 74
12698 version-control: never
12699 coding: utf-8
12700 End:
This page took 0.284802 seconds and 5 git commands to generate.