Fix ARI violations in c++compile
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-01 Keith Seitz <keiths@redhat.com>
2
3 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4 pulongest instead of "%lld".
5 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
6 ATTRIBUTE_UNUSED.
7
8 2018-08-31 Tom Tromey <tom@tromey.com>
9
10 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
11 variant part type.
12
13 2018-08-31 Pedro Alves <palves@redhat.com>
14
15 * gdbarch.h: Regenerate.
16
17 2018-08-31 Pedro Alves <palves@redhat.com>
18
19 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
20 * target.h (Hardware watchpoint interfaces): Describe
21 continuable/steppable/non-steppable watchpoints.
22 * gdbarch.h, gdbarch.c: Regenerate.
23
24 2018-08-31 Pedro Alves <palves@redhat.com>
25
26 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
27 Delete.
28 * s390-linux-nat.c
29 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
30 * target.h (target_ops::have_continuable_watchpoint): Delete.
31 (target_have_continuable_watchpoint): Delete.
32 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
33 * target-delegates.c: Regenerate.
34
35 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
36
37 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
38 the files present in "gnulib/import/m4/".
39
40 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
41
42 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
43 c.sw, c.swsp, and c.sdsp.
44
45 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
46
47 * riscv-tdep.c (struct riscv_inferior_data): Delete.
48 (riscv_read_misa_reg): Don't cache value read into inferior data.
49 (riscv_new_inferior_data): Delete.
50 (riscv_inferior_data_cleanup): Delete.
51 (riscv_inferior_data): Delete.
52 (riscv_invalidate_inferior_data): Delete.
53 (_initialize_riscv_tdep): Remove initialisation of inferior data.
54
55 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
56
57 * compile/compile-cplus-types.c
58 (compile_cplus_instance::leave_scope): Take the address of scope
59 object.
60 (compile_cplus_instance::convert_qualified_base): Compare quals
61 to 0.
62
63 2018-08-30 Keith Seitz <keiths@redhat.com>
64
65 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
66 Use "%s" and host_address_to_string instead of "%p" in printf.
67
68 2018-08-29 Keith Seitz <keiths@redhat.com>
69
70 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
71 and compile-cplus-types.c.
72 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
73 * c-lang.c (cplus_language_defn): Set C++ compile functions.
74 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
75 Declare.
76 * compile/compile-c-support.c: Include compile-cplus.h.
77 (load_libcompile): Templatize.
78 (get_compile_context): "New" function.
79 (c_get_compile_context): Use get_compile_context.
80 (cplus_get_compile_context): New function.
81 (cplus_push_user_expression, cplus_pop_user_expression)
82 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
83 (cplus_compute_program): Define new structs/functions.
84 * compile/compile-cplus-symmbols.c: New file.
85 * compile/compile-cplus-types.c: New file.
86 * compile/compile-cplus.h: New file.
87 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
88 Declare.
89 * compile/compile-object-load.c (get_out_value_type): Use
90 strncmp_iw when comparing symbol names.
91 (compile_object_load): Add mst_bss and mst_data.
92 * compile/compile.c (_initialize_compile): Remove
93 -Wno-implicit-function-declaration from `compile_args'.
94 * compile/gcc-cp-plugin.h: New file.
95 * NEWS: Mention C++ compile support and new debug options.
96
97 2018-08-29 Keith Seitz <keiths@redhat.com>
98
99 * linespec.c (collect_info::add_symbol): Make virtual.
100 (struct symbol_searcher_collect_info): New struct.
101 (symbol_searcher::find_all_symbols): New method.
102 * symtab.h (class symbol_searcher): New class.
103
104 2018-08-29 Keith Seitz <keiths@redhat.com>
105
106 * linespec.c (struct linespec) <function_symbols, label_symbols>:
107 Change to vector of block_symbol. Update all users.
108 (struct collect_info) <symbols>: Likewise.
109 (collect_info::add_symbol): Take block_symbol as argument.
110 Update all callers.
111 (decode_compound_collector) <m_symbols>: Change type to vector
112 of block_symbol. Update all users.
113 (decode_compound_collector::operator ()): Change parameter type
114 to block_symbol.
115 (find_method, find_function_symbols, find_linespec_symbols)
116 (find_label_symbols_in_block, find_label_symbols): Change symbol
117 vectors to block_symbol vectors.
118 * symtab.h (symbol_found_callback_ftype): Change parameter type to
119 block_symbol.
120
121 2018-08-29 Keith Seitz <keiths@redhat.com>
122
123 * linespec.c (symbolp): Remove typedef and VEC definitions.
124 (bound_minimal_symbol_d): Likewise.
125
126 2018-08-29 Keith Seitz <keiths@redhat.com>
127
128 * linespec.c (decode_compound_collector::decode_compound_collector):
129 Remove initialization for `m_symtabs'.
130 (decode_compound_collector::release_symbols): Change return type
131 to std::vector. Update all callers.
132 (class decode_compound_collector) <m_symbols>: Change type to
133 std::vector.
134 (lookup_prefix_sym): Change return type to std::vector. Update all
135 callers.
136 (compare_symbols): Remove.
137 (std_compare_symbols): Rename to `compare_symbols'.
138 (find_method): Change `sym_classes' parameter to std::vector.
139 Update all callers. Use std::sort to sort sym_classes.
140 (find_linespec_symbols): Remove cleanup.
141
142 2018-08-29 Keith Seitz <keiths@redhat.com>
143
144 * linespec.c (struct linespec) <minimal_symbols>: Change type to
145 std::vector. Update all users.
146 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
147 (struct collect_info) <minimal_symbols>: Likewise.
148 (compare_msymbols): Return bool. Change parameters to const
149 bound_minimal_symbol references.
150 (find_method, find_function_symbols, find_linespec_symbols): Change
151 `minsyms' parameter to std::vector. Update all callers.
152
153 2018-08-29 Keith Seitz <keiths@redhat.com>
154
155 * linespec.c (struct linespec) <label_symbols>: Change type to
156 std::vector. Update all users.
157 (find_label_symbols_in_block): Change `result' parameter to
158 std::vector. Update all callers.
159 (find_label_symbols): Return std::vector. Update all callers.
160
161 2018-08-29 Keith Seitz <keiths@redhat.com>
162
163 * linespec.c (struct linespec) <function_symbols>: Change type to
164 std::vector. Update all users.
165 (struct collect_info) <function_symbols>: Likewise.
166 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
167 (std_compare_symbols): New function.
168 (find_method, find_function_symbols, find_linespec_symbols)
169 (find_label_symbols_in_block): Change `symbols' parameter to
170 std::vector. Update all callers.
171 (find_label_symbols): Likewise for `function_symbols' and
172 `label_funcs_ret'.
173
174 2018-08-29 Keith Seitz <keiths@redhat.com>
175
176 * linespec.c (symtab_vector_up): Define.
177 (struct linespec) <file_symtabs>: Change type to std::vector *.
178 Update all uses.
179 (struct collect_info) <file_symtabs>: Likewise.
180 (collect_symtabs_from_filename): Return symtab_vector_up.
181 Update all callers.
182 (decode_objc): Remove cleanup.
183 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
184 (symtab_collector::release_symtabs): Return symtab_vector_up.
185 Update all callers.
186 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
187 Update all users.
188 (collect_symtabs_from_filename, symtabs_from_filename): Return
189 symtab_vector_up. Update all callers.
190
191 2018-08-29 Tom Tromey <tom@tromey.com>
192
193 * csky-tdep.c (csky_analyze_prologue): Use
194 core_addr_to_string_nz.
195
196 2018-08-29 Tom Tromey <tom@tromey.com>
197
198 * windows-nat.c (struct xlate_exception) <them>: Change type to
199 DWORD.
200 (xlate): Fix formatting. Remove last entry.
201 (struct xlate_exception, xlate): Comment out.
202 (windows_nat_target::resume): Use ranged for.
203
204 2018-08-29 Jim Wilson <jimw@sifive.com>
205
206 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
207 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
208 of NT_PRFPREG.
209 (riscv_linux_nat_target::store_registers): Likewise.
210
211 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
212
213 PR gdb/23555
214 PR gdb/23558
215 * gnulib/aclocal.m4: Regenerate.
216 * gnulib/config.in: Regenerate.
217 * gnulib/configure: Regenerate.
218 * gnulib/import/Makefile.am: Update.
219 * gnulib/import/Makefile.in: Update.
220 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
221 * gnulib/import/_Noreturn.h: ... this.
222 * gnulib/import/alloca.in.h: Update.
223 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
224 * gnulib/import/arg-nonnull.h: ... this.
225 * gnulib/import/assure.h: Update.
226 * gnulib/import/at-func.c: Update.
227 * gnulib/import/basename-lgpl.c: Update.
228 * gnulib/import/extra/snippet/c++defs.h: Rename to...
229 * gnulib/import/c++defs.h: ... this.
230 * gnulib/import/canonicalize-lgpl.c: Update.
231 * gnulib/import/cdefs.h: Update.
232 * gnulib/import/chdir-long.c: Update.
233 * gnulib/import/chdir-long.h: Update.
234 * gnulib/import/cloexec.c: Update.
235 * gnulib/import/cloexec.h: Update.
236 * gnulib/import/close.c: Update.
237 * gnulib/import/closedir.c: Update.
238 * gnulib/import/config.charset: Update.
239 * gnulib/import/dirent-private.h: Update.
240 * gnulib/import/dirent.in.h: Update.
241 * gnulib/import/dirfd.c: Update.
242 * gnulib/import/dirname-lgpl.c: Update.
243 * gnulib/import/dirname.h: Update.
244 * gnulib/import/dosname.h: Update.
245 * gnulib/import/dup-safer-flag.c: Update.
246 * gnulib/import/dup-safer.c: Update.
247 * gnulib/import/dup.c: Update.
248 * gnulib/import/dup2.c: Update.
249 * gnulib/import/errno.in.h: Update.
250 * gnulib/import/error.c: Update.
251 * gnulib/import/error.h: Update.
252 * gnulib/import/exitfail.c: Update.
253 * gnulib/import/exitfail.h: Update.
254 * gnulib/import/extra/update-copyright: Update.
255 * gnulib/import/fchdir.c: Update.
256 * gnulib/import/fcntl.c: Update.
257 * gnulib/import/fcntl.in.h: Update.
258 * gnulib/import/fd-hook.c: Update.
259 * gnulib/import/fd-hook.h: Update.
260 * gnulib/import/fd-safer-flag.c: Update.
261 * gnulib/import/fd-safer.c: Update.
262 * gnulib/import/fdopendir.c: Update.
263 * gnulib/import/filename.h: Update.
264 * gnulib/import/filenamecat-lgpl.c: Update.
265 * gnulib/import/filenamecat.h: Update.
266 * gnulib/import/flexmember.h: Update.
267 * gnulib/import/float+.h: Update.
268 * gnulib/import/float.c: Update.
269 * gnulib/import/float.in.h: Update.
270 * gnulib/import/fnmatch.c: Update.
271 * gnulib/import/fnmatch.in.h: Update.
272 * gnulib/import/fnmatch_loop.c: Update.
273 * gnulib/import/fpucw.h: Update.
274 * gnulib/import/frexp.c: Update.
275 * gnulib/import/frexpl.c: Update.
276 * gnulib/import/fstat.c: Update.
277 * gnulib/import/fstatat.c: Update.
278 * gnulib/import/getcwd-lgpl.c: Update.
279 * gnulib/import/getcwd.c: Update.
280 * gnulib/import/getdtablesize.c: Update.
281 * gnulib/import/getlogin_r.c: Update.
282 * gnulib/import/getprogname.c: Update.
283 * gnulib/import/getprogname.h: Update.
284 * gnulib/import/gettext.h: Update.
285 * gnulib/import/gettimeofday.c: Update.
286 * gnulib/import/glob-libc.h: Update.
287 * gnulib/import/glob.c: Update.
288 * gnulib/import/glob.in.h: Update.
289 * gnulib/import/glob_internal.h: Update.
290 * gnulib/import/glob_pattern_p.c: Update.
291 * gnulib/import/globfree.c: Update.
292 * gnulib/import/hard-locale.c: Update.
293 * gnulib/import/hard-locale.h: Update.
294 * gnulib/import/intprops.h: Update.
295 * gnulib/import/inttypes.in.h: Update.
296 * gnulib/import/isnan.c: Update.
297 * gnulib/import/isnand-nolibm.h: Update.
298 * gnulib/import/isnand.c: Update.
299 * gnulib/import/isnanl-nolibm.h: Update.
300 * gnulib/import/isnanl.c: Update.
301 * gnulib/import/itold.c: Update.
302 * gnulib/import/libc-config.h: Update.
303 * gnulib/import/limits.in.h: Update.
304 * gnulib/import/localcharset.c: Update.
305 * gnulib/import/localcharset.h: Update.
306 * gnulib/import/localtime-buffer.c: Update.
307 * gnulib/import/localtime-buffer.h: Update.
308 * gnulib/import/lstat.c: Update.
309 * gnulib/import/m4/00gnulib.m4: Update.
310 * gnulib/import/m4/__inline.m4: Update.
311 * gnulib/import/m4/absolute-header.m4: Update.
312 * gnulib/import/m4/alloca.m4: Update.
313 * gnulib/import/m4/builtin-expect.m4: Update.
314 * gnulib/import/m4/canonicalize.m4: Update.
315 * gnulib/import/m4/chdir-long.m4: Update.
316 * gnulib/import/m4/close.m4: Update.
317 * gnulib/import/m4/closedir.m4: Update.
318 * gnulib/import/m4/configmake.m4: Update.
319 * gnulib/import/m4/d-ino.m4: Update.
320 * gnulib/import/m4/d-type.m4: Update.
321 * gnulib/import/m4/dirent_h.m4: Update.
322 * gnulib/import/m4/dirfd.m4: Update.
323 * gnulib/import/m4/dirname.m4: Update.
324 * gnulib/import/m4/double-slash-root.m4: Update.
325 * gnulib/import/m4/dup.m4: Update.
326 * gnulib/import/m4/dup2.m4: Update.
327 * gnulib/import/m4/eealloc.m4: Update.
328 * gnulib/import/m4/environ.m4: Update.
329 * gnulib/import/m4/errno_h.m4: Update.
330 * gnulib/import/m4/error.m4: Update.
331 * gnulib/import/m4/exponentd.m4: Update.
332 * gnulib/import/m4/exponentl.m4: Update.
333 * gnulib/import/m4/extensions.m4: Update.
334 * gnulib/import/m4/extern-inline.m4: Update.
335 * gnulib/import/m4/fchdir.m4: Update.
336 * gnulib/import/m4/fcntl-o.m4: Update.
337 * gnulib/import/m4/fcntl.m4: Update.
338 * gnulib/import/m4/fcntl_h.m4: Update.
339 * gnulib/import/m4/fdopendir.m4: Update.
340 * gnulib/import/m4/filenamecat.m4: Update.
341 * gnulib/import/m4/flexmember.m4: Update.
342 * gnulib/import/m4/float_h.m4: Update.
343 * gnulib/import/m4/fnmatch.m4: Update.
344 * gnulib/import/m4/fnmatch_h.m4: Update.
345 * gnulib/import/m4/fpieee.m4: Update.
346 * gnulib/import/m4/frexp.m4: Update.
347 * gnulib/import/m4/frexpl.m4: Update.
348 * gnulib/import/m4/fstat.m4: Update.
349 * gnulib/import/m4/fstatat.m4: Update.
350 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
351 * gnulib/import/m4/getcwd-path-max.m4: Update.
352 * gnulib/import/m4/getcwd.m4: Update.
353 * gnulib/import/m4/getdtablesize.m4: Update.
354 * gnulib/import/m4/getlogin.m4: Update.
355 * gnulib/import/m4/getlogin_r.m4: Update.
356 * gnulib/import/m4/getpagesize.m4: Update.
357 * gnulib/import/m4/getprogname.m4: Update.
358 * gnulib/import/m4/gettimeofday.m4: Update.
359 * gnulib/import/m4/glibc21.m4: Update.
360 * gnulib/import/m4/glob.m4: Update.
361 * gnulib/import/m4/glob_h.m4: Update.
362 * gnulib/import/m4/gnulib-cache.m4: Update.
363 * gnulib/import/m4/gnulib-common.m4: Update.
364 * gnulib/import/m4/gnulib-comp.m4: Update.
365 * gnulib/import/m4/gnulib-tool.m4: Update.
366 * gnulib/import/m4/hard-locale.m4: Update.
367 * gnulib/import/m4/include_next.m4: Update.
368 * gnulib/import/m4/inttypes-pri.m4: Update.
369 * gnulib/import/m4/inttypes.m4: Update.
370 * gnulib/import/m4/isnand.m4: Update.
371 * gnulib/import/m4/isnanl.m4: Update.
372 * gnulib/import/m4/largefile.m4: Update.
373 * gnulib/import/m4/limits-h.m4: Update.
374 * gnulib/import/m4/localcharset.m4: Update.
375 * gnulib/import/m4/locale-fr.m4: Update.
376 * gnulib/import/m4/locale-ja.m4: Update.
377 * gnulib/import/m4/locale-zh.m4: Update.
378 * gnulib/import/m4/localtime-buffer.m4: Update.
379 * gnulib/import/m4/longlong.m4: Update.
380 * gnulib/import/m4/lstat.m4: Update.
381 * gnulib/import/m4/malloc.m4: Update.
382 * gnulib/import/m4/malloca.m4: Update.
383 * gnulib/import/m4/math_h.m4: Update.
384 * gnulib/import/m4/mbrtowc.m4: Update.
385 * gnulib/import/m4/mbsinit.m4: Update.
386 * gnulib/import/m4/mbsrtowcs.m4: Update.
387 * gnulib/import/m4/mbstate_t.m4: Update.
388 * gnulib/import/m4/memchr.m4: Update.
389 * gnulib/import/m4/memmem.m4: Update.
390 * gnulib/import/m4/mempcpy.m4: Update.
391 * gnulib/import/m4/memrchr.m4: Update.
392 * gnulib/import/m4/mkdir.m4: Update.
393 * gnulib/import/m4/mkstemp.m4: Update.
394 * gnulib/import/m4/mmap-anon.m4: Update.
395 * gnulib/import/m4/mode_t.m4: Update.
396 * gnulib/import/m4/msvc-inval.m4: Update.
397 * gnulib/import/m4/msvc-nothrow.m4: Update.
398 * gnulib/import/m4/multiarch.m4: Update.
399 * gnulib/import/m4/nocrash.m4: Update.
400 * gnulib/import/m4/off_t.m4: Update.
401 * gnulib/import/m4/onceonly.m4: Update.
402 * gnulib/import/m4/open-cloexec.m4: Update.
403 * gnulib/import/m4/open.m4: Update.
404 * gnulib/import/m4/openat.m4: Update.
405 * gnulib/import/m4/opendir.m4: Update.
406 * gnulib/import/m4/pathmax.m4: Update.
407 * gnulib/import/m4/rawmemchr.m4: Update.
408 * gnulib/import/m4/readdir.m4: Update.
409 * gnulib/import/m4/readlink.m4: Update.
410 * gnulib/import/m4/realloc.m4: Update.
411 * gnulib/import/m4/rename.m4: Update.
412 * gnulib/import/m4/rewinddir.m4: Update.
413 * gnulib/import/m4/rmdir.m4: Update.
414 * gnulib/import/m4/save-cwd.m4: Update.
415 * gnulib/import/m4/secure_getenv.m4: Update.
416 * gnulib/import/m4/setenv.m4: Update.
417 * gnulib/import/m4/signal_h.m4: Update.
418 * gnulib/import/m4/ssize_t.m4: Update.
419 * gnulib/import/m4/stat-time.m4: Update.
420 * gnulib/import/m4/stat.m4: Update.
421 * gnulib/import/m4/std-gnu11.m4: Update.
422 * gnulib/import/m4/stdbool.m4: Update.
423 * gnulib/import/m4/stddef_h.m4: Update.
424 * gnulib/import/m4/stdint.m4: Update.
425 * gnulib/import/m4/stdio_h.m4: Update.
426 * gnulib/import/m4/stdlib_h.m4: Update.
427 * gnulib/import/m4/strchrnul.m4: Update.
428 * gnulib/import/m4/strdup.m4: Update.
429 * gnulib/import/m4/strerror.m4: Update.
430 * gnulib/import/m4/string_h.m4: Update.
431 * gnulib/import/m4/strstr.m4: Update.
432 * gnulib/import/m4/strtok_r.m4: Update.
433 * gnulib/import/m4/sys_socket_h.m4: Update.
434 * gnulib/import/m4/sys_stat_h.m4: Update.
435 * gnulib/import/m4/sys_time_h.m4: Update.
436 * gnulib/import/m4/sys_types_h.m4: Update.
437 * gnulib/import/m4/tempname.m4: Update.
438 * gnulib/import/m4/time_h.m4: Update.
439 * gnulib/import/m4/unistd-safer.m4: Update.
440 * gnulib/import/m4/unistd_h.m4: Update.
441 * gnulib/import/m4/warn-on-use.m4: Update.
442 * gnulib/import/m4/wchar_h.m4: Update.
443 * gnulib/import/m4/wchar_t.m4: Update.
444 * gnulib/import/m4/wctype_h.m4: Update.
445 * gnulib/import/m4/wint_t.m4: Update.
446 * gnulib/import/malloc.c: Update.
447 * gnulib/import/malloc/scratch_buffer.h: Update.
448 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
449 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
450 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
451 * gnulib/import/malloca.c: Update.
452 * gnulib/import/malloca.h: Update.
453 * gnulib/import/malloca.valgrind: Update.
454 * gnulib/import/math.in.h: Update.
455 * gnulib/import/mbrtowc.c: Update.
456 * gnulib/import/mbsinit.c: Update.
457 * gnulib/import/mbsrtowcs-impl.h: Update.
458 * gnulib/import/mbsrtowcs-state.c: Update.
459 * gnulib/import/mbsrtowcs.c: Update.
460 * gnulib/import/memchr.c: Update.
461 * gnulib/import/memmem.c: Update.
462 * gnulib/import/mempcpy.c: Update.
463 * gnulib/import/memrchr.c: Update.
464 * gnulib/import/mkdir.c: Update.
465 * gnulib/import/mkstemp.c: Update.
466 * gnulib/import/msvc-inval.c: Update.
467 * gnulib/import/msvc-inval.h: Update.
468 * gnulib/import/msvc-nothrow.c: Update.
469 * gnulib/import/msvc-nothrow.h: Update.
470 * gnulib/import/open.c: Update.
471 * gnulib/import/openat-die.c: Update.
472 * gnulib/import/openat-priv.h: Update.
473 * gnulib/import/openat-proc.c: Update.
474 * gnulib/import/openat.c: Update.
475 * gnulib/import/openat.h: Update.
476 * gnulib/import/opendir.c: Update.
477 * gnulib/import/pathmax.h: Update.
478 * gnulib/import/pipe-safer.c: Update.
479 * gnulib/import/rawmemchr.c: Update.
480 * gnulib/import/readdir.c: Update.
481 * gnulib/import/readlink.c: Update.
482 * gnulib/import/realloc.c: Update.
483 * gnulib/import/ref-add.sin: Update.
484 * gnulib/import/ref-del.sin: Update.
485 * gnulib/import/rename.c: Update.
486 * gnulib/import/rewinddir.c: Update.
487 * gnulib/import/rmdir.c: Update.
488 * gnulib/import/same-inode.h: Update.
489 * gnulib/import/save-cwd.c: Update.
490 * gnulib/import/save-cwd.h: Update.
491 * gnulib/import/scratch_buffer.h: Update.
492 * gnulib/import/secure_getenv.c: Update.
493 * gnulib/import/setenv.c: Update.
494 * gnulib/import/signal.in.h: Update.
495 * gnulib/import/stat-time.c: Update.
496 * gnulib/import/stat-time.h: Update.
497 * gnulib/import/stat-w32.c: Update.
498 * gnulib/import/stat-w32.h: Update.
499 * gnulib/import/stat.c: Update.
500 * gnulib/import/stdbool.in.h: Update.
501 * gnulib/import/stddef.in.h: Update.
502 * gnulib/import/stdint.in.h: Update.
503 * gnulib/import/stdio.in.h: Update.
504 * gnulib/import/stdlib.in.h: Update.
505 * gnulib/import/str-two-way.h: Update.
506 * gnulib/import/strchrnul.c: Update.
507 * gnulib/import/strdup.c: Update.
508 * gnulib/import/streq.h: Update.
509 * gnulib/import/strerror-override.c: Update.
510 * gnulib/import/strerror-override.h: Update.
511 * gnulib/import/strerror.c: Update.
512 * gnulib/import/string.in.h: Update.
513 * gnulib/import/stripslash.c: Update.
514 * gnulib/import/strnlen1.c: Update.
515 * gnulib/import/strnlen1.h: Update.
516 * gnulib/import/strstr.c: Update.
517 * gnulib/import/strtok_r.c: Update.
518 * gnulib/import/sys_stat.in.h: Update.
519 * gnulib/import/sys_time.in.h: Update.
520 * gnulib/import/sys_types.in.h: Update.
521 * gnulib/import/tempname.c: Update.
522 * gnulib/import/tempname.h: Update.
523 * gnulib/import/time.in.h: Update.
524 * gnulib/import/unistd--.h: Update.
525 * gnulib/import/unistd-safer.h: Update.
526 * gnulib/import/unistd.in.h: Update.
527 * gnulib/import/unsetenv.c: Update.
528 * gnulib/import/verify.h: Update.
529 * gnulib/import/extra/snippet/warn-on-use.h: Update.
530 * gnulib/import/wchar.in.h: Update.
531 * gnulib/import/wctype.in.h: Update.
532 * gnulib/import/xalloc-oversized.h: Update.
533 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
534 "53e2c179f26a890fa6685af4b6c1397ee370433b".
535
536 2018-08-16 Gary Benson <gbenson@redhat.com>
537
538 PR gdb/13000:
539 * gdb/main.c (captured_main_1): Exit with nonzero status
540 in batch mode if the last command to be executed failed.
541 * NEWS: Mention the above.
542
543 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
544
545 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
546 end of warning message.
547
548 2018-08-29 Alan Hayward <alan.hayward@arm.com>
549
550 PR gdb/22943:
551 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
552 (aarch64_extract_return_value): Use
553 aapcs_is_vfp_call_or_return_candidate.
554 (aarch64_return_in_memory): Likewise.
555 (aarch64_store_return_value): Likewise.
556
557 2018-08-29 Alan Hayward <alan.hayward@arm.com>
558
559 * aarch64-tdep.c
560 (aapcs_is_vfp_call_or_return_candidate): Make static
561 (pass_in_v_or_stack): Remove function.
562 (pass_in_v_vfp_candidate): New function.
563 (aarch64_push_dummy_call): Check for float register candidates.
564
565 2018-08-29 Alan Hayward <alan.hayward@arm.com>
566
567 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
568 (aapcs_is_vfp_call_or_return_candidate_1): New function.
569 (aapcs_is_vfp_call_or_return_candidate): Likewise.
570
571 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
572
573 PR build/23399
574 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
575 (struct ipa_sym_addresses): Rename to...
576 (struct ipa_sym_addresses_common): ... this.
577 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
578
579 2018-08-28 Tom Tromey <tom@tromey.com>
580
581 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
582 (token_fifo): Now a std::vector.
583 (yylex, c_parse): Update.
584 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
585 (token_fifo): Now a std::vector.
586 (yylex, d_parse): Update.
587 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
588 (token_fifo): Now a std::vector.
589 (yylex, go_parse): Update.
590
591 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
592
593 * parser-defs.h (struct type_stack) <elements>: Change type to
594 std::vector<union type_stack_elt>.
595 <depth, size>: Remove.
596 * parse.c (parse_exp_in_context_1): Adjust.
597 (type_stack_reserve): Remove.
598 (check_type_stack_depth): Remove.
599 (insert_into_type_stack): Adjust to std::vector.
600 (insert_type): Likewise.
601 (push_type): Likewise.
602 (push_type_int): Likewise.
603 (insert_type_address_space): Likewise.
604 (pop_type): Likewise.
605 (pop_type_int): Likewise.
606 (pop_typelist): Likewise.
607 (pop_type_stack): Likewise.
608 (append_type_stack): Likewise.
609 (push_type_stack): Likewise.
610 (get_type_stack): Likewise.
611 (type_stack_cleanup): Likewise.
612 (push_typelist): Likewise.
613 (follow_types): Likewise.
614 (_initialize_parse): Likewise.
615
616 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
617
618 * NEWS: Mention csky target.
619
620 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
621 Hafiz Abid Qadeer <abidh@codesourcery.com>
622 Don Breazeal <donb@codesourcery.com>
623
624 * csky-linux-tdep.c: New file.
625 * csky-tdep.c: Likewise.
626 * csky-tdep.h: Likewise.
627 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
628 csky-tdep.o.
629 (HFILES_NO_SRCDIR): Add csky-tdep.h.
630 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
631 * configure.tgt: Add csky support.
632
633 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
634
635 * python/py-framefilter.c (py_print_frame): Print frame architecture
636 when printing on an MI output.
637
638 2018-08-27 Tom Tromey <tom@tromey.com>
639
640 PR build/23087:
641 * configure: Rebuild.
642 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
643
644 2018-08-27 Tom Tromey <tom@tromey.com>
645
646 * aarch64-linux-tdep.c
647 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
648 casts to int.
649
650 2018-08-27 Tom Tromey <tom@tromey.com>
651
652 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
653 unsigned.
654 (ppc64_standard_linkage1, ppc64_standard_linkage2)
655 (ppc64_standard_linkage3, ppc64_standard_linkage4)
656 (ppc64_standard_linkage5, ppc64_standard_linkage6)
657 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
658 unsigned.
659
660 2018-08-27 Tom Tromey <tom@tromey.com>
661
662 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
663 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
664
665 2018-08-27 Tom Tromey <tom@tromey.com>
666
667 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
668 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
669 ULONGEST_MAX.
670 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
671 ULONGEST_MAX.
672 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
673 ULONGEST_MAX.
674 * sparc-linux-tdep.c (sparc32_linux_sigframe)
675 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
676 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
677 ULONGEST_MAX.
678 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
679 (ppc64_linux_sigaction_tramp_frame)
680 (ppc32_linux_sighandler_tramp_frame)
681 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
682 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
683 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
684 * mn10300-linux-tdep.c (am33_linux_sigframe)
685 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
686 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
687 * mips-linux-tdep.c (mips_linux_o32_sigframe)
688 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
689 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
690 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
691 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
692 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
693 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
694 * microblaze-linux-tdep.c
695 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
696 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
697 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
698 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
699 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
700 * common/common-types.h (ULONGEST_MAX): New define.
701 (CORE_ADDR_MAX): Fix formatting.
702 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
703 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
704 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
705 (arm_linux_rt_sigreturn_tramp_frame)
706 (arm_eabi_linux_sigreturn_tramp_frame)
707 (arm_eabi_linux_rt_sigreturn_tramp_frame)
708 (thumb2_eabi_linux_sigreturn_tramp_frame)
709 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
710 (arm_linux_restart_syscall_tramp_frame)
711 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
712 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
713 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
714 ULONGEST_MAX.
715 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
716
717 2018-08-27 Tom Tromey <tom@tromey.com>
718
719 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
720 CORE_ADDR_MAX.
721 * mips-tdep.c (mips_deal_with_atomic_sequence)
722 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
723 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
724 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
725 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
726 CORE_ADDR_MAX.
727 * aarch64-tdep.c (aarch64_software_single_step): Use
728 CORE_ADDR_MAX.
729
730 2018-08-27 Tom Tromey <tom@tromey.com>
731
732 * linespec.c (complete_linespec_component): Add cast to "char".
733 * completer.c (completion_tracker::build_completion_result): Add
734 cast to "char".
735
736 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
737
738 * solist.h (struct solist, struct target_so_ops): Fix
739 indentation.
740
741 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
742
743 * ada-tasks.c (ada_task_info_s): Remove typedef.
744 (DEF_VEC_O(ada_task_info_s)): Remove.
745 (struct ada_tasks_inferior_data): Initialize fields.
746 <task_list>: Make an std::vector.
747 (get_ada_tasks_inferior_data): Allocate with new.
748 (ada_get_task_number): Adjust.
749 (get_task_number_from_id): Likewise.
750 (valid_task_id): Likewise.
751 (ada_get_task_info_from_ptid): Likewise.
752 (iterate_over_live_ada_tasks): Likewise.
753 (add_ada_task): Likewise.
754 (read_known_tasks): Likewise.
755 (ada_build_task_list): Likewise.
756 (print_ada_task_info): Likewise.
757 (info_task): Likewise.
758 (task_command_1): Likewise.
759
760 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
761
762 * ada-lang.c (add_angle_brackets): Return std::string.
763
764 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
765
766 * python/py-threadevent.c (py_get_event_thread): Initialize
767 pythread.
768
769 2018-08-24 Pedro Alves <palves@redhat.com>
770
771 * python/py-bpevent.c (create_breakpoint_event_object): Use
772 copy-initialization.
773 * python/py-continueevent.c (emit_continue_event): Use
774 copy-initialization.
775 * python/py-exitedevent.c (create_exited_event_object): Return a
776 gdbpy_ref<>.
777 (emit_exited_event): Use copy-initialization.
778 * python/py-inferior.c (python_new_inferior)
779 (python_inferior_deleted, add_thread_object): Use
780 copy-initialization.
781 * python/py-infevents.c (create_inferior_call_event_object)
782 (create_register_changed_event_object)
783 (create_memory_changed_event_object): Return a gdbpy_ref<>.
784 (emit_inferior_call_event, emit_memory_changed_event)
785 (emit_register_changed_event): Use copy-initialization.
786 * python/py-newobjfileevent.c (create_new_objfile_event_object):
787 Return a gdbpy_ref<>.
788 (emit_new_objfile_event): Use copy-initialization.
789 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
790 (emit_clear_objfiles_event): Use copy-initialization.
791 * python/py-signalevent.c (create_signal_event_object): Use
792 copy-initialization.
793 * python/py-threadevent.c (create_thread_event_object): Use
794 copy-initialization.
795
796 2018-08-24 Pedro Alves <palves@redhat.com>
797 Simon Marchi <simon.marchi@ericsson.com>
798
799 PR gdb/23379
800 * python/py-continueevent.c: Include "gdbthread.h".
801 (create_continue_event_object): Add intro comment. Add 'ptid'
802 parameter. Use it to find thread to pass to
803 create_thread_event_object.
804 (emit_continue_event): Pass PTID down to
805 create_continue_event_object.
806 * python/py-event.h (py_get_event_thread): Declare.
807 (create_thread_event_object): Remove default from 'thread'
808 parameter.
809 * python/py-stopevent.c (create_stop_event_object): Use
810 py_get_event_thread.
811 * python/py-threadevent.c (get_event_thread): Rename to ...
812 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
813 and use it to find the thread.
814 (create_thread_event_object): Assert that THREAD isn't null.
815 Don't find the event thread here.
816
817 2018-08-23 Kevin Buettner <kevinb@redhat.com>
818
819 * block.h (blockrange, blockranges): New struct declarations.
820 (struct block): Add new field named `ranges'.
821 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
822 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
823 macros for accessing ranges in struct block.
824 (make_blockranges): New declaration.
825 block.c (make_blockranges): New function.
826 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
827 for block.
828 * symtab.h (find_pc_partial_function): Add new parameter `block'.
829 * blockframe.c (cache_pc_function_block): New static global.
830 (clear_pc_function_cache): Clear cache_pc_function_block.
831 (find_pc_partial_function): Move comment to symtab.h. Add
832 support for non-contiguous blocks.
833 * cli/cli-cmds.c (block.h): Include.
834 (print_disassembly): Handle printing of non-contiguous blocks.
835 (disassemble_current_function): Likewise.
836 (disassemble_command): Likewise.
837
838 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
839 BLOCK_START.
840 * blockframe.c (get_pc_function_start): Likewise.
841 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
842 (gcc_symbol_address): Likewise.
843 * compile/compile-object-run.c (compile_object_run): Likewise.
844 * compile/compile.c (get_expr_block_and_pc): Likewise.
845 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
846 (func_addr_to_tail_call_list): Likewise.
847 * findvar.c (default_read_var_value): Likewise.
848 * inline-frame.c (inline_frame_this_id): Likewise.
849 (skip-inline_frames): Likewise.
850 * infcmd.c (until_next_command): Likewise.
851 * linespec.c (convert_linespec_to_sals): Likewise.
852 * parse.c (parse_exp_in_context_1): Likewise.
853 * printcmd.c (build_address_symbolic): likewise.
854 (info_address_command): Likewise.
855 symtab.c (find_function_start_sal): Likewise.
856 (skip_prologue_sal): Likewise.
857 (find_function_alias_target): Likewise.
858 (find_gnu_ifunc): Likewise.
859 * stack.c (find_frame_funname): Likewise.
860 * symtab.c (fixup_symbol_section): Likewise.
861 (find_function_start_sal): Likewise.
862 (skip_prologue_sal): Likewsie.
863 (find_function_alias_target): Likewise.
864 (find_gnu_ifunc): Likewise.
865 * tracepoint.c (info_scope_command): Likewise.
866 * value.c (value_fn_field): Likewise.
867
868 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
869 in place of find_pc_partial_function.
870 * blockframe.c (find_function_entry_range_from_pc): New function.
871 * symtab.h (find_function_entry_range_from_pc): Declare and document.
872 * objfiles.c (objfile_relocate1): Relocate start and end addresses
873 for each range in a block.
874
875
876 2018-08-23 Xavier Roirand <roirand@adacore.com>
877
878 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
879 incrementation.
880
881 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
882
883 * solib-svr4.c (read_program_headers_from_bfd): Return
884 gdb::optional<gdb::byte_vector>.
885 (svr4_exec_displacement): Adjust.
886
887 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
888
889 * solib-svr4.c (read_program_header): Return
890 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
891 (find_program_interpreter): Return
892 gdb::optional<gdb::byte_vector>.
893 (scan_dyntag_auxv): Adjust.
894 (enable_break): Adjust.
895 (svr4_exec_displacement): Adjust.
896
897 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
898
899 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
900 * inf-child.c (inf_child_target::terminal_save_inferior): New.
901
902 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
903
904 * guile/scm-string.c (gdbscm_scm_from_printf): Use
905 string_vprintf.
906 * guile/scm-utils.c (gdbscm_printf): Likewise.
907 * serial.c (serial_printf): Likewise.
908 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
909
910 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
911
912 * stack.c (print_frame): Print frame architecture when printing on
913 an MI output.
914 * NEWS: Mention new "arch" attribute in frame output.
915
916 2018-08-21 Alan Hayward <alan.hayward@arm.com>
917
918 * arch/aarch64.h (aarch64_regnum): Update comment.
919
920 2018-08-21 Alan Hayward <alan.hayward@arm.com>
921
922 * NEWS: Add SVE to 8.2 section.
923
924 2018-08-21 Pedro Alves <palves@redhat.com>
925
926 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
927 out from gdbscm_parse_function_args.
928 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
929 gdbscm_parse_function_args_1.
930
931 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
932
933 PR gdb/17816
934 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
935 operator.
936
937 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
938
939 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
940
941 2018-08-19 Michael Spang <spang@google.com>
942
943 PR gdb/11786
944 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
945 for PT_TLS segments.
946
947 2018-08-18 Kevin Buettner <kevinb@redhat.com>
948
949 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
950 dwarf_variable_value.
951 * dwarf2-frame.c (class dwarf_expr_executor):
952 Add override for dwarf_variable_value.
953 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
954 (class symbol_needs_eval_context): Likewise.
955 (indirect_synthetic_pointer): Add forward declaration.
956 (sect_variable_value): New function.
957 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
958 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
959 for DW_OP_GNU_variable_value.
960
961 2018-08-16 Tom Tromey <tom@tromey.com>
962
963 * top.c (read_command_file): Update.
964 (command_line_input): Remove "repeat" argument.
965 * ada-lang.c (get_selections): Update.
966 * linespec.c (decode_line_2): Update.
967 * defs.h (command_line_input): Remove argument.
968 * cli/cli-script.c (read_next_line): Update.
969 * python/py-gdb-readline.c: Update.
970
971 2018-08-17 Tom Tromey <tom@tromey.com>
972
973 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
974 command_line_input.
975
976 2018-08-15 Tom Tromey <tom@tromey.com>
977
978 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
979
980 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
981
982 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
983 If used, use find_pc_partial_function to find address range
984 to disassemble.
985 * mi/mi-main.c (mi_cmd_list_features): Report
986 "data-disassemble-a-option" feature.
987 * NEWS: Mention new -data-disassemble option -a.
988
989 2018-08-13 Tom Tromey <tom@tromey.com>
990
991 * common/common-defs.h (_FORTIFY_SOURCE): Define.
992
993 2018-08-13 Alan Hayward <alan.hayward@arm.com>
994
995 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
996 (aarch64_linux_collect_sve_regset): Likewise.
997 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
998 * regcache.h (regcache_map_entry_size): New function.
999
1000 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1001
1002 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1003 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1004 (SVE_HEADER_VL_LENGTH): Likewise.
1005 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1006 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1007 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1008 (SVE_HEADER_SIZE_OFFSET): Likewise.
1009 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1010 (SVE_HEADER_VL_OFFSET): Likewise.
1011 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1012 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1013 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1014 (SVE_HEADER_SIZE): Likewise.
1015 (aarch64_linux_core_read_vq): Add function.
1016 (aarch64_linux_core_read_description): Check for SVE section.
1017
1018 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1019
1020 * aarch64-fbsd-tdep.c
1021 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1022 collect_size.
1023 * aarch64-linux-tdep.c
1024 (aarch64_linux_iterate_over_regset_sections): Likewise.
1025 * alpha-linux-tdep.c
1026 (alpha_linux_iterate_over_regset_sections):
1027 * alpha-nbsd-tdep.c
1028 (alphanbsd_iterate_over_regset_sections): Likewise.
1029 * amd64-fbsd-tdep.c
1030 (amd64fbsd_iterate_over_regset_sections): Likewise.
1031 * amd64-linux-tdep.c
1032 (amd64_linux_iterate_over_regset_sections): Likewise.
1033 * arm-bsd-tdep.c
1034 (armbsd_iterate_over_regset_sections): Likewise.
1035 * arm-fbsd-tdep.c
1036 (arm_fbsd_iterate_over_regset_sections): Likewise.
1037 * arm-linux-tdep.c
1038 (arm_linux_iterate_over_regset_sections): Likewise.
1039 * corelow.c (get_core_registers_cb): Likewise.
1040 (core_target::fetch_registers): Likewise.
1041 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1042 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1043 * gdbarch.h (void): Regenerate.
1044 * gdbarch.sh: Add supply_size and collect_size.
1045 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1046 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1047 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1048 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1049 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1050 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1051 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1052 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1053 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1054 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1055 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1056 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1057 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1058 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1059 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1060 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1061 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1062 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1063 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1064 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1065 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1066 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1067 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1068 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1069 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1070 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1071 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1072 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1073 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1074 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1075
1076 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1077
1078 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1079 with string_printf.
1080
1081 2018-08-10 Keith Seitz <keiths@redhat.com>
1082
1083 * compile/compile-c-support.c (add_code_header, add_code_footer):
1084 Move into policy class.
1085 (c_push_user_expression, pop_user_expression_nop)
1086 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1087 (compile_program): New host class.
1088 (c_compile_program): New typedef.
1089 (c_compute_porgram): Use c_compile_program.
1090
1091 2018-08-10 Keith Seitz <keiths@redhat.com>
1092
1093 * compile/compile-internal.h (compile_instance::~compile_instance):
1094 Remove calls to htab_delete.
1095 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1096 * compile.c (compile_instance::compile_instance): Initialize
1097 htab unique pointers.
1098 (compile_instance::get_cached_type, compile_instance::insert_type)
1099 (compile_instance::error_symbol_once): Update for unique_ptr.
1100
1101 2018-08-10 Keith Seitz <keiths@redhat.com>
1102
1103 * compile/compile-c-symbols.c (struct symbol_error)
1104 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1105 (compile_instance::insert_symbol_error)
1106 (compile_instance::error_symbol_once): Move to ...
1107 * compile/compile.c: ... here.
1108
1109 2018-08-10 Keith Seitz <keiths@redhat.com>
1110
1111 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1112 instead of `new_compile_instance'.
1113 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1114 Update description.
1115 If the symbol error map is not initialized, create it.
1116 (generate_c_for_for_one_symbol): Do not check/initialize
1117 the symbol error map.
1118 * compile/compile-c-types.c (compile_c_instance): Make a class.
1119 Update all callers.
1120 (compile_instance::compile_instance): Initialize the type cache.
1121 (get_cached_type): New function.
1122 (insert_type): Update description.
1123 (compile_c_instance::m_default_cflags): Define.
1124 (convert_type): Update description. Use get_cached_type.
1125 (delete_instance): Moved to destructor.
1126 (new_compile_instance): Moved to constructor.
1127 * compile/compile-c.h (compile_c_instance): Make class inheriting
1128 from compile_instance.
1129 <base>: Remove field.
1130 <type_map, symbol_err_map>: Move to base class.
1131 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1132 * compile/compile-internal.h (compile_instance): Make class.
1133 <type_map_t, symbol_err_map_t>: Define.
1134 <fe>: Rename to `m_gcc_fe'.
1135 <scope, block, gcc_target_options>: Add `m_' prefix.
1136 <m_type_map, m_symbol_err_map>: New fields, moved from
1137 compile_c_instance.
1138 <destroy>: Remove.
1139 (convert_type, new_compile_instance): Remove.
1140 * compile/compile.c (cleanup_compile_instance): Remove.
1141 (compile_to_object): Use unique_ptr to eliminate cleanups.
1142 (compile_instance::set_print_callback, compile_instance::version)
1143 (compile_instance::set_verbose)
1144 (compile_instance::set_driver_filename)
1145 (compile_instance::set_triplet_regexp)
1146 (compile_instance::set_arguments)
1147 (compile_instance::set_source_file)
1148 (compile_instance::compile): Define.
1149
1150 2018-08-10 Keith Seitz <keiths@redhat.com>
1151
1152 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1153 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1154 gcc-c-fe.def to define C plugin.
1155 (delete_instance): Delete `c_plugin'.
1156 (new_compile_instance): Initialize `c_plugin'.
1157 * compile/compile-c.h: Include gcc_c_plugin.h.
1158 (struct compile_c_instance) <c_plugin>: New member.
1159 * gcc-c-plugin.h: New file.
1160 Update all callers with API change.
1161
1162 2018-08-10 Keith Seitz <keiths@redhat.com>
1163
1164 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1165 (HFILES_NO_SRCDIR): ... to here.
1166 Add compile-internal.h and compile-c.h.
1167 * compile/compile-c-support.c: Include compile-c.h.
1168 * compile/compile-c-symbols.c: Include compile-c.h.
1169 (generate_c_for_variable_locations): Update comment.
1170 * compile/compile-c-types.c: Include compile-c.h.
1171 * compile/compile-c.h: New file -- moved C language declarations
1172 from other files here.
1173 * compile/compile-internal.h: Do not include hashtab.h or
1174 common/enum-flags.h.
1175 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1176 (gcc_convert_symbol, gcc_symbol_address)
1177 (generate_c_for_variable_locations, c_get_mode_for_size)
1178 (c_get_range_decl_name): Definitions moved to compile-c.h.
1179 * compile/compile-loc2c.c: Include compile-c.h.
1180
1181 2018-08-10 Keith Seitz <keiths@redhat.com>
1182
1183 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1184 (c_symbol_substitution_name): ... this.
1185 Update all callers.
1186
1187 2018-08-10 Keith Seitz <keiths@redhat.com>
1188
1189 * compile/compile-c-support.c (c_compute_program): Use
1190 unique_xmalloc_ptr to eliminate cleanup.
1191 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1192 Return a unique_xmalloc_ptr and eliminate cleanup.
1193 * compile/compile-internal.h (generate_c_for_variable_locations):
1194 Return unique_xmalloc_ptr and update description.
1195
1196 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1197
1198 * corelow.c (core_target::get_core_register_section): Rename
1199 min_size to section_min_size.
1200
1201 2018-08-09 Jim Wilson <jimw@sifive.com>
1202
1203 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1204 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1205 * NEWS: Mention new GNU/Linux RISC-V target.
1206 * configure.host: Add riscv*-*-linux*.
1207 * configure.nat: Add riscv*.
1208 * configure.tgt: Add riscv*-*-linux*.
1209 * riscv-linux-nat.c: New file.
1210 * riscv-linux-tdep.c: New file.
1211
1212 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1213
1214 * infrun.c (resume): Make static, add forward declaration.
1215 (proceed): Update header comment.
1216 * infrun.h (resume): Delete declaration.
1217
1218 2018-08-09 Tom Tromey <tom@tromey.com>
1219
1220 * riscv-tdep.h: Minor formatting fixes.
1221
1222 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1223
1224 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1225 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1226 (test_mkdir_recursive): Likewise.
1227 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1228
1229 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1230
1231 * valarith.c (value_subscripted_rvalue): If an array is not in
1232 memory, and we don't know the upper bound, then we can't know that
1233 the requested element exists or not.
1234
1235 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1236
1237 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1238 (target_options_to_string): Add comment.
1239
1240 2018-08-08 Tom Tromey <tom@tromey.com>
1241
1242 * unittests/scoped_mmap-selftests.c: Check result of "write".
1243
1244 2018-08-08 Jim Wilson <jimw@sifive.com>
1245
1246 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1247 (decode_register_index_short): New.
1248 (decode_j_type_insn, decode_cj_type_insn): New.
1249 (decode_b_type_insn, decode_cb_type_insn): New.
1250 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1251 local xlen. Check xlen when decoding ambiguous compressed insns. In
1252 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1253 is_c_sw_insn instead of is_sw_insn.
1254 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1255 (riscv_software_single_step): New.
1256 * riscv-tdep.h (riscv_software_single_step): Declare.
1257
1258 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1259 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1260
1261 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1262
1263 PR gdb/18050:
1264 * target.c (dispose_inferior): Don't dispose of inferiors that are
1265 already killed.
1266
1267 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1268
1269 * remote.c (remote_target::download_tracepoint): Change char* to
1270 const char*.
1271
1272 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1273
1274 * target.h (target_options_to_string): Return an std::string.
1275 * target.c (str_comma_list_concat_elem): Return void, use
1276 std::string.
1277 (do_option): Likewise.
1278 (target_options_to_string): Return an std::string.
1279 * linux-nat.c (linux_nat_target::wait): Adjust.
1280 * target-debug.h (target_debug_print_options): Adjust.
1281
1282 2018-08-07 Tom Tromey <tom@tromey.com>
1283
1284 * Makefile.in (CPPFLAGS): New variable.
1285 (INTERNAL_CPPFLAGS): Use it.
1286
1287 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1288
1289 * NEWS: Mention the index cache.
1290
1291 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1292
1293 * common/pathstuff.h (get_standard_cache_dir): New.
1294 * common/pathstuff.c (get_standard_cache_dir): New.
1295 * build-id.h (build_id_to_string): New.
1296 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1297 DEBUG_STR_SUFFIX): Move to here.
1298 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1299 DEBUG_STR_SUFFIX): Move from there.
1300 (write_psymtabs_to_index): Make non-static, add basename
1301 parameter. Write to temporary files, rename when done.
1302 (save_gdb_index_command): Adjust call to
1303 write_psymtabs_to_index.
1304 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1305 field.
1306 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1307 (get_gdb_index_contents_from_cache): New.
1308 (get_gdb_index_contents_from_cache_dwz): New.
1309 (dwarf2_initialize_objfile): Read index from cache.
1310 (dwarf2_build_psymtabs): Save to index.
1311 * dwarf-index-cache.h: New file.
1312 * dwarf-index-cache.c: New file.
1313 * dwarf-index-write.h: New file.
1314
1315 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1316
1317 * gnulib/aclocal.m4: Re-generate.
1318 * gnulib/config.in: Re-generate.
1319 * gnulib/configure: Re-generate.
1320 * gnulib/import/Makefile.am: Re-generate.
1321 * gnulib/import/Makefile.in: Re-generate.
1322 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1323 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1324 * gnulib/import/m4/mkdir.m4: New file.
1325 * gnulib/import/mkdir.c: New file.
1326 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1327 module.
1328
1329 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1330
1331 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1332 * common/scoped_mmap.c: New file.
1333 * common/scoped_mmap.h (destroy): New method.
1334 (~scoped_mmap, reset): Use destroy.
1335 (scoped_mmap): New move constructor.
1336 (mmap_file): New declaration.
1337 * unittests/scoped_mmap-selftests.c (test_normal,
1338 test_invalid_filename, run_tests): New functions.
1339 (_initialize_scoped_mmap_selftests): Register selftest.
1340
1341 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1342
1343 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1344 (read_gdb_index_from_buffer): ... this. Remove section
1345 parameter, add buffer parameter.
1346 (get_gdb_index_contents_ftype,
1347 get_gdb_index_contents_dwz_ftype): New typedefs.
1348 (dwarf2_read_gdb_index): Add callback parameters to get the
1349 index contents.
1350 (get_gdb_index_contents_from_section): New.
1351 (dwarf2_initialize_objfile): Update call to
1352 dwarf2_read_gdb_index.
1353
1354 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1355
1356 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1357 (gdb_open_cloexec): Likewise.
1358 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1359 (commandline_from_pid): Likewise.
1360 (linux_xfer_osdata_threads): Likewise.
1361 (linux_xfer_osdata_fds): Likewise.
1362 * ada-lang.c (is_package_name): Likewise.
1363 * auxv.c (procfs_xfer_auxv): Likewise.
1364 * breakpoint.c (print_one_breakpoint_location): Use
1365 uiout::field_fmt.
1366 (print_one_catch_solib): Use string_printf.
1367 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1368 (add_pe_forwarded_sym): Likewise.
1369 * dwarf2read.c (create_type_unit_group): Likewise.
1370 (build_error_marker_type): Likewise.
1371 * infcall.c (get_function_name): Likewise.
1372 * valprint.c (print_converted_chars_to_obstack): Likewise.
1373 * xtensa-tdep.c (xtensa_register_type): Likewise.
1374
1375 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1376
1377 * remote.c (remote_target::download_tracepoint): Fix format
1378 string errors.
1379
1380 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1381
1382 * tracefile.c: Include common/byte-vector.h.
1383 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1384 with trace_regblock_size if needed. Update uses of buf.
1385
1386 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1387
1388 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1389 std::vector<unsigned char>.
1390 * tracepoint.c (collection_list::collection_list): Remove
1391 m_regs_mask initializer from initializer list. Resize
1392 m_regs_mask using the largest remote register number.
1393 (collection_list::add_remote_register): Remove size check on
1394 m_regs_mask. Use at to access element.
1395 (collection_list::stringify): Change type of temp_buf to
1396 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1397 stringify the register mask. Use pack_hex_byte for the register
1398 mask.
1399
1400 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1401
1402 * tracepoint.h (class collection_list) <add_register>: Remove.
1403 <add_remote_register, add_ax_registers, add_local_register>:
1404 Declare.
1405 <add_memrange>: Add scope parameter.
1406 * tracepoint.c (encode_actions_1): Likewise.
1407 (collection_list::add_register): Rename to ...
1408 (collection_list::add_remote_register): ... this. Update
1409 comment.
1410 (collection_list::add_ax_registers, add_local_register): New
1411 methods.
1412 (collection_list::add_memrange): Add scope parameter. Call
1413 add_local_register instead of add_register.
1414 (finalize_tracepoint_aexpr): New function.
1415 (collection_list::collect_symbol): Update calls to add_memrange.
1416 Call add_local_register instead of add_register. Call
1417 add_ax_registers. Call finalize_tracepoint_aexpr.
1418 (encode_actions_1): Get remote regnos for $reg action. Call
1419 add_remote_register, add_ax_registers, and add_local_register.
1420 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1421 (validate_actionline): Call finalize_tracepoint_aexpr.
1422
1423 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1424
1425 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1426 Replace array buf with gdb::char_vector buf, of size
1427 get_remote_packet_size (). Replace references to buf and
1428 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1429 and xsnprintf with snprintf. Raise errors if the buffer is too
1430 small.
1431
1432 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1433
1434 * remote.c (remote_target::download_tracepoint): Fix the has_more
1435 predicate in the QTDP action list iteration.
1436
1437 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1438
1439 * remote.c (remote_target::download_tracepoint): Fix indentation
1440 in for block.
1441
1442 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1443
1444 * proc-api.c (_initialize_proc_api): Remove c, unused.
1445 * procfs.c (procfs_init_inferior): Remove signals, unused.
1446 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1447 unused.
1448
1449 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1450 Andrew Burgess <andrew.burgess@embecosm.com>
1451
1452 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1453 'W_STOPCODE (0)' as this could be ambiguous.
1454
1455 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1456
1457 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1458 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1459 "ai_socktype").
1460
1461 2018-08-02 Tom Tromey <tom@tromey.com>
1462
1463 PR symtab/16842.
1464 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1465 symbols.
1466 (process_structure_scope): Likewise.
1467
1468 2018-08-02 Xavier Roirand <roirand@adacore.com>
1469
1470 PR gdb/22629:
1471 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1472 kill inferior.
1473
1474 2018-08-02 Tom Tromey <tom@tromey.com>
1475
1476 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1477 (darwin_suspend_inferior, darwin_resume_inferior)
1478 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1479 (darwin_check_new_threads): Check result of get_darwin_inferior.
1480
1481 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1482
1483 GDB 8.1.1 released.
1484
1485 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1486
1487 * varobj.c (varobj_get_path_expr_parent): Report an error if
1488 parent is a dynamic varobj.
1489
1490 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1491
1492 * gnulib/aclocal.m4: Re-generate.
1493 * gnulib/config.in: Re-generate.
1494 * gnulib/configure: Re-generate.
1495 * gnulib/import/Makefile.in: Re-generate.
1496 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1497 * gnulib/import/m4/onceonly.m4: Re-generate.
1498
1499 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1500
1501 * target-descriptions.c (struct xml_test_tdesc): New.
1502 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1503 (record_xml_tdesc): Update.
1504 (maintenance_check_xml_descriptions): Update.
1505 * target-descriptions.h (record_xml_tdesc): Update comment.
1506
1507 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1508
1509 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1510 checking array bounds are defined.
1511
1512 2018-07-30 Tom Tromey <tom@tromey.com>
1513
1514 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1515 irreflexivity violation.
1516
1517 2018-07-30 Tom Tromey <tom@tromey.com>
1518
1519 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1520 * value.c (unpack_long): Remove lint code.
1521 * valops.c (value_ind): Remove lint code.
1522 * valarith.c (value_x_binop, value_x_unop, value_equal)
1523 (value_pos): Remove lint code.
1524
1525 2018-07-28 Tom de Vries <tdevries@suse.de>
1526
1527 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1528 with undefined upper bound as <optimized out>.
1529
1530 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1531
1532 * gcore.in: Rename variable "name" to "prefix". Expand
1533 "usage" text.
1534
1535 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1536
1537 * windows-nat.c (windows_nat_target::create_inferior): Update to
1538 call close() in global namespace.
1539
1540 2018-07-26 Tom Tromey <tom@tromey.com>
1541
1542 * dwarf-index-write.c (add_address_entry): Don't add objfile
1543 offsets.
1544 * dbxread.c (find_stab_function): Rename from
1545 find_stab_function_addr. Return a bound_minimal_symbol.
1546 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1547 Don't add objfile offsets.
1548 (end_psymtab): Use raw_text_low, raw_text_high,
1549 MSYMBOL_VALUE_RAW_ADDRESS.
1550 (read_ofile_symtab): Update.
1551 (process_one_symbol): Update.
1552 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1553 offsets.
1554 (dw2_relocate): Remove.
1555 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1556 searching addrmap.
1557 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1558 Update.
1559 (process_psymtab_comp_unit_reader, add_partial_symbol)
1560 (add_partial_subprogram, dwarf2_ranges_read): Update.
1561 (load_partial_dies): Update.
1562 (add_address_entry): Don't add objfile offsets.
1563 (dwarf2_build_include_psymtabs): Update.
1564 (create_addrmap_from_aranges): Don't add objfile offsets.
1565 (dw2_find_pc_sect_compunit_symtab): Update.
1566 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1567 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1568 Update.
1569 (parse_partial_symbols): Don't add objfile offsets. Use
1570 raw_text_low, raw_text_high. Update.
1571 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1572 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1573 or call 'relocate' quick function. Clear psymbol_map.
1574 * psympriv.h (struct partial_symbol) <address>: Add section
1575 offset.
1576 <set_unrelocated_address>: Rename from set_address.
1577 <raw_text_low, raw_text_high>: New methods.
1578 <text_low, text_high>: Add objfile parameter.
1579 (add_psymbol_to_bcache): Add 'section' parameter. Call
1580 set_unrelocated_address.
1581 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1582 (find_pc_psymbol): Update.
1583 (fixup_psymbol_section, relocate_psymtabs): Remove.
1584 (dump_psymtab, psym_functions): Update.
1585 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1586 parameter.
1587 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1588 (start_psymtab_common): Update.
1589 * symfile-debug.c (debug_qf_relocate): Remove.
1590 (debug_sym_quick_functions): Update.
1591 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1592 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1593 Update.
1594
1595 2018-07-26 Tom Tromey <tromey@redhat.com>
1596
1597 * dbxread.c (end_psymtab): Use text_high_valid and
1598 text_low_valid.
1599 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1600 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1601 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1602 Update comment.
1603 <text_low_valid, text_high_valid>: New fields.
1604 <set_text_low, set_text_high>: Update.
1605 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1606
1607 2018-07-26 Tom Tromey <tom@tromey.com>
1608
1609 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1610 Update.
1611 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1612 textlow and texthigh fields.
1613 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1614 Update.
1615 * mdebugread.c (parse_lines, parse_partial_symbols)
1616 (psymtab_to_symtab_1): Update.
1617 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1618 Rename fields. Update comment. Now private.
1619 <text_low, text_high, set_text_low, set_text_high>: New methods.
1620 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1621 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1622 (start_psymtab_common, maintenance_info_psymtabs)
1623 (maintenance_check_psymtabs): Update.
1624 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1625 texthigh fields.
1626 (scan_xcoff_symtab): Update.
1627
1628 2018-07-26 Tom Tromey <tromey@redhat.com>
1629
1630 * psympriv.h (struct partial_symbol) <unrelocated_address,
1631 address, set_address>: New methods.
1632 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1633 (fixup_psymbol_section, relocate_psymtabs): Update.
1634 (print_partial_symbols): Add 'objfile' parameter. Update.
1635 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1636 Update.
1637
1638 2018-07-26 Tom Tromey <tom@tromey.com>
1639
1640 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1641 (debug_names::write_psymbols): Update.
1642 * psympriv.h (struct partial_symbol): Derive from
1643 general_symbol_info.
1644 <obj_section>: New method.
1645 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1646 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1647 (find_pc_sect_psymbol, fixup_psymbol_section)
1648 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1649 (print_partial_symbols, recursively_search_psymtabs)
1650 (compare_psymbols, psymbol_hash, psymbol_compare)
1651 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1652 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1653
1654 2018-07-26 Tom Tromey <tromey@redhat.com>
1655
1656 * dbxread.c (end_psymtab): Remove dead code.
1657
1658 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1659
1660 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1661 DWARF unwinders are disabled.
1662 * dwarf2-frame.c: Add dwarf2read.h include.
1663 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1664 disabled.
1665 (dwarf2_frame_unwinders_enabled_p): Define.
1666 (show_dwarf_unwinders_enabled_p): New function.
1667 (_initialize_dwarf2_frame): Register switch to control DWARF
1668 unwinder use.
1669 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1670 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1671 (show_dwarf_cmdlist): Remove static keyword.
1672 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1673 (show_dwarf_cmdlist): Declare.
1674 * NEWS: Document new feature.
1675
1676 2018-07-26 Tom de Vries <tdevries@suse.de>
1677
1678 PR breakpoints/23366
1679 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1680
1681 2018-07-26 Tom de Vries <tdevries@suse.de>
1682
1683 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1684 DW_AT_count can't be translated to a dynamic prop.
1685
1686 2018-07-25 Tom de Vries <tdevries@suse.de>
1687
1688 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1689 try/catch.
1690
1691 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1692
1693 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1694
1695 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1696
1697 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1698
1699 2018-07-24 Keith Seitz <keiths@redhat.comt
1700
1701 PR symtab/23010
1702 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1703 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1704 instead of add_symbol_to_list.
1705 (read_file_scope): Call prepare_one_comp_unit before reading
1706 any other DIEs.
1707
1708 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1709
1710 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1711
1712 2018-07-24 Tom Tromey <tom@tromey.com>
1713
1714 * utils.c (malloc, realloc, free): Don't declare.
1715 * configure, config.in: Rebuild.
1716 * configure.ac: Don't check for declarations of free, malloc, or
1717 realloc.
1718
1719 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1720
1721 * aarch64-linux-nat.c
1722 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1723 variable.
1724 * arm-linux-nat.c (fetch_regs): Likewise.
1725 (store_regs): Likewise.
1726 (fetch_vfp_regs): Likewise.
1727 (store_vfp_regs): Likewise.
1728 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1729 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1730 (arm_linux_nat_target::insert_watchpoint): Likewise.
1731 (arm_linux_nat_target::remove_watchpoint): Likewise.
1732 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1733 Likewise.
1734 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1735 Likewise.
1736 * ppc-linux-nat.c (fetch_register): Likewise.
1737 (fetch_all_gp_regs): Likewise.
1738 (fetch_ppc_registers): Likewise.
1739 (store_all_gp_regs): Likewise.
1740 (store_ppc_registers): Likewise.
1741 (hwdebug_insert_point): Likewise.
1742 (can_use_watchpoint_cond_accel): Likewise.
1743 * remote-sim.c (gdb_os_write_stdout): Likewise.
1744
1745 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1746 Tom Tromey <tom@tromey.com>
1747
1748 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1749 test for it.
1750 * configure: Rebuild.
1751
1752 2018-07-22 Tom Tromey <tom@tromey.com>
1753
1754 * regformats/regdat.sh: Define xmltarget_${name} inside
1755 #ifndef IN_PROCESS_AGENT.
1756
1757 2018-07-22 Tom Tromey <tom@tromey.com>
1758
1759 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1760
1761 2018-07-22 Tom Tromey <tom@tromey.com>
1762
1763 * symfile.c (reread_symbols): Notify iter, not objfile.
1764
1765 2018-07-22 Tom Tromey <tom@tromey.com>
1766
1767 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1768 Use arch_ops.
1769 (ravenscar_thread_target::prepare_to_store): Likewise.
1770
1771 2018-07-22 Tom Tromey <tom@tromey.com>
1772
1773 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1774 unused variable. Call value_fetch_lazy when needed.
1775 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1776 Remove unused variable. Call value_fetch_lazy when needed.
1777
1778 2018-07-22 Tom Tromey <tom@tromey.com>
1779
1780 * m32c-tdep.c (mark_dma): Return void.
1781 (make_regs): Remove unused declarations.
1782
1783 2018-07-22 Tom Tromey <tom@tromey.com>
1784
1785 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1786 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1787 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1788 bkscm_get_valid_block_smob_arg_unsafe for effect.
1789
1790 2018-07-22 Tom Tromey <tom@tromey.com>
1791
1792 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1793 value_type.
1794
1795 2018-07-22 Tom Tromey <tom@tromey.com>
1796
1797 * windows-nat.c (saved_context): Conditionally define.
1798 * remote.c (remote_target::remote_btrace_maybe_reopen):
1799 Conditionally declare "warned".
1800 * inflow.c (sigquit_ours): Conditionally define.
1801 (new_tty): Move "tty" declaration inside #if.
1802 * guile/guile.c (guile_datadir): Conditionally define.
1803 * charset.c (set_be_le_names): Move some declarations inside #if.
1804 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1805 #if.
1806 (parse_xml_btrace_conf): Likewise.
1807
1808 2018-07-22 Tom Tromey <tom@tromey.com>
1809
1810 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1811
1812 2018-07-22 Tom Tromey <tom@tromey.com>
1813
1814 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1815 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1816 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1817 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1818 * stack.c (frame_apply_level_command): Remove unused variable.
1819 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1820 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1821 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1822 unused variable.
1823 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1824 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1825 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1826 variable.
1827 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1828 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1829 variable.
1830 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1831 Remove unused variable.
1832 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1833 variable.
1834 * common/tdesc.c (print_xml_feature::visit): Remove unused
1835 variable.
1836 * compile/compile-object-load.c (store_regs): Remove unused
1837 variables.
1838 * complaints.c (clear_complaints): Remove unused variable.
1839 * corelow.c (core_target_open): Remove unused variable.
1840 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1841 variable.
1842 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1843 variable.
1844 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1845 variable.
1846 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1847 variable.
1848 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1849 variable.
1850 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1851 variable.
1852 * ia64-tdep.c (examine_prologue): Remove unused variable.
1853 * infcall.c (run_inferior_call): Remove unused variable.
1854 * inferior.c (exit_inferior): Remove unused variable.
1855 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1856 * linespec.c (decode_line_2): Remove unused variable.
1857 * linux-nat.c (super_close): Remove.
1858 * linux-tdep.c (linux_info_proc): Remove unused variable.
1859 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1860 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1861 Remove unused variable.
1862 * parse.c (find_minsym_type_and_address): Remove unused variable.
1863 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1864 variable.
1865 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1866 variable.
1867 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1868 variables.
1869 * record-btrace.c (record_btrace_target::store_registers): Remove
1870 unused variable.
1871 (cmd_show_record_btrace_cpu): Remove unused variable.
1872 * riscv-tdep.c (riscv_register_reggroup_p)
1873 (riscv_push_dummy_call, riscv_return_value): Remove unused
1874 variable.
1875 * rust-exp.y (literal): Remove unused variable.
1876 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1877 unused variable.
1878 <STRUCTOP_ANONYMOUS>: Likewise.
1879 * s390-linux-tdep.c (s390_linux_init_abi_31)
1880 (s390_linux_init_abi_64): Remove unused variable.
1881 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1882 (file_select_thread, net_windows_open, _initialize_ser_windows):
1883 Remove unused variables.
1884 * symtab.c (find_pc_sect_line): Remove unused variable.
1885 * target-memory.c (compute_garbled_blocks): Remove unused
1886 variable.
1887 (target_write_memory_blocks): Remove unused variable.
1888 * target.c (target_stack::unpush): Remove unused variables.
1889 * tracepoint.c (start_tracing, all_tracepoint_actions)
1890 (merge_uploaded_trace_state_variables)
1891 (print_one_static_tracepoint_marker): Remove unused variable.
1892 * unittests/basic_string_view/element_access/char/1.cc (test01):
1893 Remove unused variable.
1894 * windows-nat.c (windows_continue, windows_add_all_dlls)
1895 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1896 Remove unused variables.
1897
1898 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1899
1900 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1901 attr_profile in HAVE_ELF.
1902 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1903 HAVE_ELF.
1904
1905 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1906
1907 * frame.c (frame_register_unwind): Change parameter name.
1908 (frame_unwind_register): Likewise.
1909 (frame_unwind_register_value): Likewise.
1910 (frame_unwind_register_signed): Likewise.
1911 (frame_unwind_register_unsigned): Likewise.
1912 * frame.h (frame_register_unwind): Likewise.
1913 (frame_unwind_register): Likewise.
1914 (frame_unwind_register_value): Likewise.
1915 (frame_unwind_register_signed): Likewise.
1916 (frame_unwind_register_unsigned): Likewise.
1917 (frame_unwind_arch): Likewise.
1918
1919 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1920
1921 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1922 ISA maintenance.
1923
1924 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1925
1926 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1927 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1928 hand.
1929
1930 2018-07-20 Keith Seitz <keiths@redhat.com>
1931
1932 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1933 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1934 m_compunit_symtab, m_language>: Add "m_" prefix.
1935 Update all uses.
1936 * buildsym.c: Update all uses.
1937
1938 2018-07-20 Tom Tromey <tom@tromey.com>
1939
1940 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1941 * buildsym.h (record_line_ftype): Remove typedef.
1942
1943 2018-07-20 Tom Tromey <tom@tromey.com>
1944
1945 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1946 (end_expandable_symtab): Likewise.
1947 (end_symtab_get_static_block): Likewise.
1948 (end_symtab_from_static_block): Likewise.
1949 * buildsym-legacy.c (augment_type_symtab): Remove.
1950 (end_expandable_symtab): Remove.
1951 (end_symtab_get_static_block): Remove.
1952 (end_symtab_from_static_block): Remove.
1953
1954 2018-07-20 Tom Tromey <tom@tromey.com>
1955
1956 * dwarf2read.c: Include buildsym.h.
1957 (struct dwarf2_cu) <builder>: New method.
1958 (fixup_go_packaging): Update.
1959 (process_full_comp_unit, process_full_type_unit): Update. Don't
1960 use scoped_free_pendings.
1961 (using_directives): Add "cu" parameter, remove "language".
1962 (read_import_statement, setup_type_unit_groups, )
1963 (read_func_scope, read_lexical_block_scope)
1964 (dwarf2_record_block_ranges, read_namespace): Update.
1965 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1966 (lnp_state_machine::handle_end_sequence): Update.
1967 (class lnp_state_machine) <m_cu>: New member.
1968 <m_record_line_callback>: Remove.
1969 <m_currently_recording_lines>: New member.
1970 (lnp_state_machine::handle_set_file): Update.
1971 (noop_record_line): Remove.
1972 (dwarf_record_line_p): Add cu parameter.
1973 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1974 (lnp_state_machine::record_line)
1975 (lnp_state_machine::lnp_state_machine)
1976 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1977 (dwarf_decode_lines): Update.
1978 (dwarf2_start_subfile): Add cu parameter.
1979 (dwarf2_start_symtab, new_symbol): Update.
1980 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1981 Remove dwarf2_per_objfile parameter.
1982 (dwarf_decode_macros): Update.
1983
1984 2018-07-20 Tom Tromey <tom@tromey.com>
1985
1986 * stabsread.c (define_symbol): Update.
1987 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1988 * dwarf2read.c (new_symbol): Update.
1989 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1990 * cp-namespace.c: Include buildsym.h.
1991 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1992 * buildsym-legacy.c (get_buildsym_compunit): New function.
1993
1994 2018-07-20 Tom Tromey <tom@tromey.com>
1995
1996 * xcoffread.c: Include buildsym-legacy.h.
1997 * windows-nat.c: Include buildsym-legacy.h.
1998 * stabsread.c: Include buildsym-legacy.h.
1999 * mdebugread.c: Include buildsym-legacy.h.
2000 * buildsym-legacy.h: New file.
2001 * buildsym-legacy.c: New file, from buildsym.c.
2002 * go32-nat.c: Include buildsym-legacy.h.
2003 * dwarf2read.c: Include buildsym-legacy.h.
2004 * dbxread.c: Include buildsym-legacy.h.
2005 * cp-namespace.c: Include buildsym-legacy.h.
2006 * coffread.c: Include buildsym-legacy.h.
2007 * buildsym.h: Move some contents to buildsym-legacy.h.
2008 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2009 buildsym-legacy.c.
2010 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2011
2012 2018-07-20 Tom Tromey <tom@tromey.com>
2013
2014 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2015 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2016 (buildsym_compunit::buildsym_compunit)
2017 (buildsym_compunit::~buildsym_compunit)
2018 (buildsym_compunit::get_macro_table): Define.
2019
2020 2018-07-20 Tom Tromey <tom@tromey.com>
2021
2022 * buildsym.c (reset_symtab_globals): Remove.
2023 (buildsym_compunit::end_symtab_from_static_block): Update.
2024 (buildsym_compunit::augment_type_symtab): Update.
2025 (end_symtab_from_static_block): Call free_buildsym_compunit.
2026 (augment_type_symtab, end_symtab, end_expandable_symtab):
2027 Likewise.
2028
2029 2018-07-20 Tom Tromey <tom@tromey.com>
2030
2031 * arch-utils.c: Do not include buildsym.h.
2032 * mipsread.c: Do not include buildsym.h.
2033 * machoread.c: Do not include buildsym.h.
2034 * elfread.c: Do not include buildsym.h.
2035
2036 2018-07-20 Tom Tromey <tom@tromey.com>
2037
2038 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2039 initialization.
2040 (buildsym_compunit): Add new constructor.
2041 (struct buildsym_compunit) <get_last_source_file, finish_block,
2042 record_block_range, start_subfile, patch_subfile_names,
2043 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2044 set_last_source_start_addr, get_last_source_start_addr,
2045 get_local_using_directives, set_local_using_directives,
2046 get_global_using_directives, outermost_context_p,
2047 get_current_context_stack, get_context_stack_depth,
2048 get_current_subfile, get_local_symbols, get_file_symbols,
2049 get_global_symbols, record_debugformat, record_producer,
2050 push_context, pop_context, end_symtab_get_static_block,
2051 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2052 New public methods.
2053 <record_pending_block, finish_block_internal, make_blockvector,
2054 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2055 private methods.
2056 Update all users.
2057
2058 2018-05-22 Tom Tromey <tom@tromey.com>
2059
2060 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2061 parameter.
2062 (finish_block_internal): Update.
2063
2064 2018-07-20 Tom Tromey <tom@tromey.com>
2065
2066 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2067 parameter.
2068 (finish_block_internal): Update.
2069
2070 2018-07-20 Tom Tromey <tom@tromey.com>
2071
2072 * buildsym.h (EXTERN): Don't define or undef.
2073 * buildsym.c (EXTERN): Don't define.
2074
2075 2018-07-20 Tom Tromey <tom@tromey.com>
2076
2077 * buildsym.c: Remove TODO comment.
2078
2079 2018-07-20 Tom Tromey <tom@tromey.com>
2080
2081 * coffread.c (coff_symtab_read): Update.
2082 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2083 (xcoff_new_init): Update.
2084 * mipsread.c (mipscoff_new_init): Update.
2085 * mdebugread.c (mdebug_build_psymtabs): Update.
2086 * elfread.c (elf_new_init): Update.
2087 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2088 Update.
2089 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2090 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2091 (stabsect_build_psymtabs): Update.
2092 * buildsym.h (buildsym_init): Don't declare.
2093 * buildsym.c: Update comment.
2094 (prepare_for_building): Remove.
2095 (start_symtab, restart_symtab): Update.
2096 (reset_symtab_globals): Update comment.
2097 (buildsym_init): Remove.
2098
2099 2018-07-20 Tom Tromey <tom@tromey.com>
2100
2101 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2102 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2103 (read_enum_type, common_block_start, common_block_end)
2104 (cleanup_undefined_types_1, finish_global_stabs): Update.
2105 * mdebugread.c (psymtab_to_symtab_1): Update.
2106 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2107 (read_lexical_block_scope, new_symbol): Update.
2108 * dbxread.c (process_one_symbol): Update.
2109 * coffread.c (coff_symtab_read, process_coff_symbol)
2110 (coff_read_enum_type): Update.
2111 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2112 declare.
2113 (get_local_symbols, get_file_symbols, get_global_symbols): New
2114 functions.
2115 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2116 m_global_symbols.
2117 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2118 (~scoped_free_pendings): Update.
2119 (finish_block, prepare_for_building, reset_symtab_globals)
2120 (end_symtab_get_static_block, end_symtab_with_blockvector)
2121 (augment_type_symtab, push_context): Update.
2122 (get_local_symbols, get_file_symbols, get_global_symbols): New
2123 functions.
2124 (buildsym_init): Update.
2125
2126 2018-07-20 Tom Tromey <tom@tromey.com>
2127
2128 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2129 (process_full_type_unit): Likewise.
2130 (dwarf2_start_symtab): Set list_in_scope.
2131
2132 2018-07-20 Tom Tromey <tom@tromey.com>
2133
2134 * dwarf2read.c (process_psymtab_comp_unit_reader)
2135 (build_type_psymtabs_reader): Do not set list_in_scope.
2136
2137 2018-07-20 Tom Tromey <tom@tromey.com>
2138
2139 * buildsym.c (free_pendings): Remove.
2140 (add_symbol_to_list, scoped_free_pendings)
2141 (finish_block_internal, buildsym_init): Update.
2142
2143 2018-07-20 Tom Tromey <tom@tromey.com>
2144
2145 * xcoffread.c (read_xcoff_symtab): Update.
2146 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2147 Update.
2148 * dbxread.c (process_one_symbol): Update.
2149 * coffread.c (coff_symtab_read): Update.
2150 * buildsym.h (finish_block): Update.
2151 * buildsym.c (finish_block): Remove "listhead" argument.
2152 (end_symtab_get_static_block): Update.
2153
2154 2018-07-20 Tom Tromey <tom@tromey.com>
2155
2156 * buildsym.h (class scoped_free_pendings): Remove constructor.
2157 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2158 method.
2159 <m_pending_block_obstack, m_pending_blocks>: New members.
2160 (pending_block_obstack, pending_blocks): Remove.
2161 (scoped_free_pendings::scoped_free_pendings): Default.
2162 (~scoped_free_pendings): Update.
2163 (free_pending_blocks): Remove.
2164 (finish_block_internal, record_pending_block, make_blockvector)
2165 (end_symtab_get_static_block, augment_type_symtab, push_context)
2166 (buildsym_init): Update.
2167
2168 2018-07-20 Tom Tromey <tom@tromey.com>
2169
2170 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2171 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2172 members.
2173 (pending_addrmap, pending_addrmap_obstack)
2174 (pending_addrmap_interesting): Remove.
2175 (scoped_free_pendings, record_block_range, make_blockvector)
2176 (prepare_for_building, reset_symtab_globals, buildsym_init):
2177 Update.
2178
2179 2018-07-20 Tom Tromey <tom@tromey.com>
2180
2181 * xcoffread.c (process_linenos): Update.
2182 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2183 * mdebugread.c (psymtab_to_symtab_1): Update.
2184 * dwarf2read.c (setup_type_unit_groups)
2185 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2186 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2187 * dbxread.c (process_one_symbol): Update.
2188 * coffread.c (coff_symtab_read, enter_linenos)
2189 (process_coff_symbol): Update.
2190 * buildsym.h (current_subfile): Don't declare.
2191 (get_current_subfile): Declare.
2192 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2193 member.
2194 (start_subfile, free_buildsym_compunit, push_subfile)
2195 (prepare_for_building, start_symtab): Update.
2196 (get_current_subfile): New function.
2197
2198 2018-07-20 Tom Tromey <tom@tromey.com>
2199
2200 * coffread.c (coff_symtab_read): Update.
2201 * xcoffread.c (read_xcoff_symtab): Update.
2202 * dwarf2read.c (new_symbol): Update.
2203 (read_func_scope, read_lexical_block_scope): Update.
2204 * dbxread.c (process_one_symbol): Update.
2205 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2206 (outermost_context_p): Remove macro.
2207 (outermost_context_p, get_current_context_stack)
2208 (get_context_stack_depth): Declare.
2209 (pop_context): Return struct context_stack.
2210 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2211 member.
2212 (context_stack_size): Remove.
2213 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2214 (prepare_for_building, end_symtab_get_static_block)
2215 (augment_type_symtab, push_context): Update.
2216 (pop_context): Return struct context_stack.
2217 (outermost_context_p, get_current_context_stack)
2218 (get_context_stack_depth): New functions.
2219 (buildsym_init): Update.
2220
2221 2018-07-20 Tom Tromey <tom@tromey.com>
2222
2223 * rust-exp.y: Now a pure parser. Update all rules.
2224 (%union): Move earlier.
2225 (current_parser, work_obstack): Remove globals.
2226 (rust_parser, ~rust_parser): Update.
2227 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2228 lex_character, lex_number, lex_string, lex_identifier,
2229 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2230 convert_name, convert_params_to_expression,
2231 convert_ast_to_expression, ast_basic_type, ast_operation,
2232 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2233 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2234 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2235 ast_array_type, ast_slice_type, ast_reference_type,
2236 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2237 (rust_parse): Update.
2238 (rustyyerror, rustyylex): Add parser parameter.
2239 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2240 (rust_lex_stringish_test, rust_lex_test_sequence)
2241 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2242 (rust_lex_test_push_back, rust_lex_tests): Update.
2243
2244 2018-07-19 Pedro Alves <palves@redhat.com>
2245
2246 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2247 gdb::unique_xmalloc_ptr.
2248 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2249 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2250 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2251 copy-initialization.
2252 * guile/scm-pretty-print.c (ppscm_print_children): Use
2253 gdb::unique_xmalloc_ptr instead of cleanups.
2254 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2255 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2256 gdb::unique_xmalloc_ptr.
2257 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2258 Adjust to use gdb::unique_xmalloc_ptr.
2259 * guile/scm-utils.c (extract_arg): Adjust.
2260 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2261 gdb::unique_xmalloc_ptr instead of a cleanup.
2262
2263 2018-07-19 Tom Tromey <tom@tromey.com>
2264
2265 * utils.c (do_value_free_to_mark)
2266 (make_cleanup_value_free_to_mark): Remove.
2267 * utils.h (make_cleanup_value_free_to_mark): Remove.
2268
2269 2018-07-19 Pedro Alves <palves@redhat.com>
2270
2271 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2272 forwarding reference.
2273
2274 2018-07-18 Pedro Alves <palves@redhat.com>
2275
2276 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2277 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2278 cleanup.
2279
2280 2018-07-18 Pedro Alves <palves@redhat.com>
2281
2282 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2283 exceptions.
2284 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2285 (gdbscm_wrap): New.
2286 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2287 directly instead of a cleanup.
2288 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2289 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2290 (vlscm_binop_gdbthrow): New, factored out from ...
2291 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2292 (vlscm_rich_compare): Use gdbscm_wrap.
2293 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2294 instead of a cleanup.
2295 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2296 cleanup.
2297 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2298 Use xfree directly instead of a cleanup.
2299 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2300 Adjust to use gdbscm_wrap and scoped_value_mark.
2301 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2302 (gdbscm_value_address, gdbscm_value_dereference)
2303 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2304 scoped_value_mark.
2305 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2306 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2307 scoped_value_mark.
2308 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2309 gdbscm_wrap and scoped_value_mark.
2310 (gdbscm_value_to_string): Use xfree directly instead of a
2311 cleanup. Move 'buffer' unique_ptr to TRY scope.
2312 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2313 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2314 scoped_value_mark.
2315 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2316 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2317 scoped_value_mark.
2318 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2319 gdbscm_wrap.
2320
2321 2018-07-18 Tom de Vries <tdevries@suse.de>
2322
2323 * findvar.c (default_read_var_value): Also resolve dynamic type for
2324 LOC_OPTIMIZED_OUT vars.
2325
2326 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2327
2328 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2329 decoding.
2330
2331 2018-07-17 Tom Tromey <tom@tromey.com>
2332
2333 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2334 (compute_enum_list, pascm_set_param_value_x)
2335 (gdbscm_parameter_value): Update.
2336 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2337 (gdbscm_scm_to_host_string): Update.
2338 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2339 Update.
2340 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2341 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2342 * guile/scm-string.c (gdbscm_scm_to_string): Return
2343 unique_xmalloc_ptr.
2344 (gdbscm_scm_to_host_string): Likewise.
2345
2346 2018-07-17 Tom Tromey <tom@tromey.com>
2347
2348 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2349 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2350 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2351 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2352 unique_xmalloc_ptr.
2353
2354 2018-07-17 Tom Tromey <tom@tromey.com>
2355
2356 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2357 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2358 Update.
2359 * guile/scm-cmd.c (cmdscm_function): Update.
2360 * guile/scm-pretty-print.c
2361 (ppscm_print_exception_unless_memory_error): Update.
2362 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2363 Return unique_xmalloc_ptr.
2364
2365 2018-07-17 Tom Tromey <tom@tromey.com>
2366
2367 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2368 Use string_printf.
2369
2370 2018-07-17 Jim Wilson <jimw@sifive.com>
2371
2372 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2373 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2374 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2375 unecessary braces after EF_RISCV_RVC test. Delete call to
2376 set_gdbarch_decr_pc_after_break.
2377
2378 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2379 RISCV_LAST_FP_REGNUM + 1.
2380 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2381
2382 2018-07-17 Tom Tromey <tom@tromey.com>
2383
2384 * configure.ac: Remove --disable-gdbcli.
2385 * configure: Rebuild.
2386 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2387 (SUBDIR_CLI_CFLAGS): Remove.
2388 (SFILES): Use SUBDIR_CLI_SRCS.
2389 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2390
2391 2018-07-17 Tom Tromey <tom@tromey.com>
2392
2393 PR gdb/18624:
2394 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2395
2396 2018-07-16 Jim Wilson <jimw@sifive.com>
2397
2398 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2399
2400 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2401
2402 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2403 variable.
2404 (libunwind_frame_sniffer): Likewise.
2405 (libunwind_frame_prev_register): Likewise.
2406 (libunwind_sigtramp_frame_sniffer): Likewise.
2407 * ia64-tdep.c (ia64_access_reg): Likewise.
2408 (ia64_access_rse_reg): Likewise.
2409 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2410 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2411
2412 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2413
2414 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2415
2416 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2417
2418 * remote-sim.c (gdbsim_target::close,
2419 gdbsim_target::mourn_inferior): Remove unused variables.
2420
2421 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2422
2423 * ia64-tdep.c (ktab_buf): New global.
2424 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2425 (get_kernel_table): Adjust.
2426
2427 2018-07-16 Tom Tromey <tom@tromey.com>
2428
2429 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2430 * dwarf2read.c (using_directives, new_symbol): Use
2431 outermost_context_p.
2432 * dbxread.c (process_one_symbol): Use outermost_context_p.
2433 * coffread.c (coff_symtab_read): Use outermost_context_p.
2434
2435 2018-07-16 Tom Tromey <tom@tromey.com>
2436
2437 * dwarf2read.c (using_directives, read_func_scope)
2438 (read_lexical_block_scope): Update.
2439 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2440 * buildsym.h (local_using_directives, global_using_directives):
2441 Don't declare.
2442 (get_local_using_directives, set_local_using_directives)
2443 (get_global_using_directives): Declare.
2444 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2445 m_global_using_directives>: New members.
2446 (finish_block_internal, prepare_for_building)
2447 (reset_symtab_globals, end_symtab_get_static_block)
2448 (push_context): Update.
2449 (get_local_using_directives, set_local_using_directives)
2450 (get_global_using_directives): New functions.
2451 (buildsym_init): Update.
2452
2453 2018-07-16 Tom Tromey <tom@tromey.com>
2454
2455 * xcoffread.c (xcoff_initial_scan): Don't call
2456 free_pending_blocks.
2457 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2458 * buildsym.h (class scoped_free_pendings): Add constructor.
2459 (free_pending_blocks): Don't declare.
2460 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2461 (free_pending_blocks): Now static.
2462
2463 2018-07-16 Tom Tromey <tom@tromey.com>
2464
2465 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2466 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2467 member.
2468 (struct subfile_stack): Remove.
2469 (subfile_stack): Remove.
2470 (push_subfile, pop_subfile, buildsym_init): Update.
2471
2472 2018-07-16 Tom Tromey <tom@tromey.com>
2473
2474 * buildsym.c (push_subfile): Use gdb_assert.
2475 (pop_subfile): Use gdb_assert.
2476
2477 2018-07-16 Tom Tromey <tom@tromey.com>
2478
2479 * buildsym.h (merge_symbol_lists): Remove.
2480 * buildsym.c (merge_symbol_lists): Remove.
2481
2482 2018-07-16 Tom Tromey <tom@tromey.com>
2483
2484 * stabsread.c (scan_file_globals): Update comment.
2485 * stabsread.h (scan_file_globals): Move from buildsym.h.
2486 * buildsym.h (scan_file_globals): Move to stabsread.h.
2487
2488 2018-07-16 Tom Tromey <tom@tromey.com>
2489
2490 * xcoffread.c (xcoff_new_init): Update.
2491 * mipsread.c (mipscoff_new_init): Update.
2492 * mdebugread.c (mdebug_build_psymtabs): Update.
2493 * elfread.c (elf_new_init): Update.
2494 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2495 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2496 * buildsym.h (buildsym_new_init): Don't declare.
2497 * buildsym.c (buildsym_new_init): Remove.
2498
2499 2018-07-16 Tom Tromey <tom@tromey.com>
2500
2501 * stabsread.h (within_function): Move from buildsym.h.
2502 * stabsread.c (start_stabs): Clear within_function.
2503 * coffread.c (coff_start_symtab): Clear within_function.
2504 * buildsym.h (within_function): Move to stabsread.h.
2505 * buildsym.c (prepare_for_building): Update.
2506
2507 2018-07-16 Tom Tromey <tom@tromey.com>
2508
2509 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2510 * dwarf2read.c (dwarf2_start_symtab): Don't set
2511 processing_gcc_compilation.
2512 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2513
2514 2018-07-16 Tom Tromey <tom@tromey.com>
2515
2516 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2517 (next_symbol_text_func): Move from buildsym.h.
2518 * stabsread.c (hashname): Move from buildsym.c.
2519 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2520 (next_symbol_text_func, hashname): Move to stabsread.h.
2521 * buildsym.c: Don't include bcache.h
2522 (hashname): Move to stasbread.c.
2523
2524 2018-07-16 Tom Tromey <tom@tromey.com>
2525
2526 * buildsym.h (context_stack_size): Don't declare.
2527 * buildsym.c (context_stack_size): New global.
2528
2529 2018-07-16 Tom Tromey <tom@tromey.com>
2530
2531 * dbxread.c (processing_acc_compilation): New global.
2532 * buildsym.h (processing_acc_compilation): Don't declare.
2533
2534 2018-07-16 Tom Tromey <tom@tromey.com>
2535
2536 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2537 * dbxread.c (read_ofile_symtab): Update.
2538 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2539 * buildsym.h (last_source_start_addr): Remove.
2540 (set_last_source_start_addr, get_last_source_start_addr):
2541 Declare.
2542 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2543 parameter.
2544 (struct buildsym_compunit) <m_last_source_start_addr>: New
2545 member.
2546 (prepare_for_building): Remove start_addr parameter.
2547 (start_symtab, restart_symtab, end_symtab_get_static_block)
2548 (end_symtab_with_blockvector): Update.
2549 (set_last_source_start_addr, get_last_source_start_addr): New
2550 functions.
2551
2552 2018-07-16 Tom Tromey <tom@tromey.com>
2553
2554 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2555 member.
2556 (have_line_numbers): Remove.
2557 (record_line, prepare_for_building, end_symtab_get_static_block)
2558 (augment_type_symtab): Update.
2559
2560 2018-07-16 Tom Tromey <tom@tromey.com>
2561
2562 * buildsym.c (~buildsym_compunit): Free the macro table.
2563 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2564 methods.
2565 <m_pending_macros>: New member.
2566 (pending_macros): Remove.
2567 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2568 (reset_symtab_globals, end_symtab_get_static_block)
2569 (end_symtab_with_blockvector, augment_type_symtab)
2570 (buildsym_init): Update.
2571
2572 2018-07-16 Tom Tromey <tom@tromey.com>
2573
2574 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2575 parameter.
2576 (buildsym_compunit::set_last_source_file): New method.
2577 <m_last_source_file>: New member.
2578 (prepare_for_building): Remove "name" parameter.
2579 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2580 (last_source_file): Remove.
2581 (set_last_source_file, get_last_source_file): Update.
2582
2583 2018-07-16 Tom Tromey <tom@tromey.com>
2584
2585 * buildsym.c (prepare_for_building): Add assert.
2586
2587 2018-07-16 Tom Tromey <tom@tromey.com>
2588
2589 * buildsym.c (~buildsym_compunit): Update.
2590 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2591 (start_subfile, patch_subfile_names)
2592 (end_symtab_with_blockvector): Update.
2593
2594 2018-07-16 Tom Tromey <tom@tromey.com>
2595
2596 * buildsym.c (struct buildsym_compunit): Add constructor,
2597 destructor, initializers.
2598 (start_buildsym_compunit): Remove.
2599 (free_buildsym_compunit): Use "delete".
2600 (start_symtab, restart_symtab): Use "new".
2601
2602 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2603
2604 * symfile.c (set_objfile_default_section_offset): Remove struct
2605 keyword.
2606
2607 2018-07-14 Stafford Horne <shorne@gmail.com>
2608
2609 * (Responsible Maintainers): Add myself as or1k maintainer.
2610
2611 2018-07-13 Tom Tromey <tom@tromey.com>
2612
2613 * symfile.c (set_objfile_default_section_offset): Use extra braces
2614 around initializer.
2615
2616 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2617
2618 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2619 non-branching basr.
2620
2621 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2622
2623 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2624 unittests/cli-utils-selftests.c
2625 * unittests/cli-utils-selftests.c: New file.
2626
2627 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2628
2629 * NEWS: Mention new commands. Mention change to 'thread apply'.
2630
2631 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2632
2633 * thread.c (thr_try_catch_cmd): New function.
2634 (thread_apply_all_command): Handle qcs flags.
2635 (thread_apply_command): Handle qcs flags.
2636 (taas_command): New function.
2637 (tfaas_command): New function.
2638 (_initialize_thread): Update to setup the new commands 'taas
2639 and 'tfaas'. Change doc string for 'thread apply'.
2640
2641 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2642
2643 * stack.c: (trailing_outermost_frame): New function, mostly
2644 extracted from backtrace_command_1.
2645 (leading_innermost_frame): New function.
2646 (backtrace_command_1): Update to call trailing_outermost_frame.
2647 (frame_apply_command_count): New function.
2648 (frame_apply_level_command): New function.
2649 (frame_apply_all_command): New function.
2650 (frame_apply_command): New function.
2651 (faas_command): New function.
2652 (frame_cmd_list): New variable.
2653 (_initialize_stack): Update to setup the new commands 'frame apply'
2654 and 'faas'.
2655
2656 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2657
2658 * cli-utils.c (number_or_range_parser::get_number): Only handle
2659 numbers or convenience var as numbers.
2660 (parse_flags): New function.
2661 (parse_flags_qcs): New function.
2662 (number_or_range_parser::finished): Ensure parsing end is detected
2663 before end of string.
2664 * cli-utils.h (parse_flags): New function.
2665 (parse_flags_qcs): New function.
2666 (number_or_range_parser): Remove m_finished bool.
2667 (number_or_range_parser::skip_range): Set m_in_range to false.
2668
2669 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2670
2671 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2672 on Windows.
2673
2674 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2675 Jan Kratochvil <jan.kratochvil@redhat.com>
2676 Paul Fertser <fercerpav@gmail.com>
2677 Tsutomu Seki <sekiriki@gmail.com>
2678 Pedro Alves <palves@redhat.com>
2679
2680 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2681 'unittests/parse-connection-spec-selftests.c'.
2682 (COMMON_SFILES): Add 'common/netstuff.c'.
2683 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2684 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2685 * common/netstuff.c: New file.
2686 * common/netstuff.h: New file.
2687 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2688 (wait_for_connect): Update comment. New parameter
2689 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2690 Use 'sock' directly instead of 'scb->fd'.
2691 (try_connect): New function, with code from 'net_open'.
2692 (net_open): Rewrite main loop to deal with multiple
2693 sockets/addresses. Handle IPv6-style hostnames; implement
2694 support for IPv6 connections.
2695 * unittests/parse-connection-spec-selftests.c: New file.
2696
2697 2018-07-11 Pedro Alves <palves@redhat.com>
2698
2699 PR gdb/23377
2700 * remote.c (remote_target::remote_detach_pid): Call
2701 set_current_process.
2702
2703 2018-07-11 Pedro Alves <palves@redhat.com>
2704
2705 * h8300-tdep.c (h8300_gdbarch_init): Remove
2706 set_gdbarch_ecoff_reg_to_regnum calls.
2707
2708 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2709
2710 PR c++/23373
2711 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2712 offsets/sizes for static members of a class/struct.
2713
2714 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2715
2716 * target-descriptions.c (tdesc_register_bitsize): Rename.
2717 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2718 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2719 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2720
2721 2018-07-10 Tom Tromey <tom@tromey.com>
2722
2723 * breakpoint.c (moribund_locations): Now static and a
2724 std::vector.
2725 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2726 (build_bpstat_chain, update_global_location_list)
2727 (breakpoint_retire_moribund): Update.
2728 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2729 VEC.
2730
2731 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2732
2733 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2734 (riscv_register_reggroup_p): Use new function, remove unneeded
2735 parenthesis.
2736 (riscv_push_dummy_call): Extend assert to compare against xlen or
2737 flen based on register type.
2738
2739 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2740
2741 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2742
2743 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2744
2745 * remote.c (show_hardware_watchpoint_limit): New function.
2746 (show_hardware_watchpoint_length_limit): New function.
2747 (show_hardware_breakpoint_limit): New function.
2748 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2749 where appropriate, update help text.
2750
2751 2018-07-09 Tom Tromey <tom@tromey.com>
2752
2753 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2754 (CLIBS): Don't mention NAT_CLIBS.
2755
2756 2018-07-09 Tom Tromey <tom@tromey.com>
2757
2758 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2759 (LIBGDB_OBS, clean mostlyclean): Update.
2760 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2761
2762 2018-07-09 Tom Tromey <tom@tromey.com>
2763
2764 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2765 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2766 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2767
2768 2018-07-09 Tom Tromey <tom@tromey.com>
2769
2770 * Makefile.in (ALLDEPFILES): Remove exec.c.
2771 (COMMON_OBS): Remove exec.o.
2772 (COMMON_SFILES): Add exec.c.
2773
2774 2018-07-09 Tom Tromey <tom@tromey.com>
2775
2776 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2777
2778 2018-07-09 Tom Tromey <tom@tromey.com>
2779
2780 * Makefile.in (clean mostlyclean): Remove stamp-version.
2781 (version.c): Depend on stamp-version.
2782 (stamp-version): New rule, from version.c rule.
2783
2784 2018-07-09 Tom Tromey <tom@tromey.com>
2785
2786 * Makefile.in (init.c): Depend on stamp-init.
2787 (stamp-init): New rule, from init.c rule.
2788 (clean mostlyclean): Remove stamp-init.
2789
2790 2018-07-09 Tom Tromey <tom@tromey.com>
2791
2792 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2793 SUBDIR_GCC_COMPILE_SRCS.
2794
2795 2018-07-09 Tom Tromey <tom@tromey.com>
2796
2797 * Makefile.in (init.c): Remove some unused sed rules.
2798
2799 2018-07-09 Tom Tromey <tom@tromey.com>
2800
2801 * Makefile.in (TSOBS): Remove.
2802 (INIT_FILES): Update.
2803 (LIBGDB_OBS): Update.
2804 (COMMON_SFILES): Add inflow.c.
2805 (SFILES): Remove inflow.c.
2806
2807 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2808
2809 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2810
2811 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2812
2813 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2814 get_saveloc_name, is_signal_frame_name, step_name,
2815 init_remote_name, create_addr_space_name,
2816 destroy_addr_space_name, search_unwind_table_name,
2817 find_dyn_list_name): Constify.
2818
2819 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2820
2821 * darwin-nat.c (darwin_pthread_kill): New function.
2822 (darwin_resume_thread): Use darwin_pthread_kill.
2823
2824 2018-07-05 Tom de Vries <tdevries@suse.de>
2825
2826 * macroexp.c (macro_buffer) <operator=>: New member function.
2827
2828 2018-07-04 Tom Tromey <tom@tromey.com>
2829
2830 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2831
2832 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2833
2834 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2835 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2836 * maint.c: Likewise.
2837 * top.c: Likewise.
2838
2839 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2840
2841 * NEWS: Create a new section for the next release branch.
2842 Rename the section of the current branch, now that it has
2843 been cut.
2844
2845 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2846
2847 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2848 * version.in: Bump version to 8.2.50.DATE-git.
2849
2850 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2851 Pedro Alves <palves@redhat.com>
2852
2853 * linux-nat.c (linux_init_ptrace): Rename to ...
2854 (linux_init_ptrace_procfs): ... this. Call
2855 linux_proc_init_warnings.
2856 (linux_nat_target::post_attach)
2857 (linux_nat_target::post_startup_inferior): Adjust.
2858 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2859 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2860
2861 2018-07-04 Tom de Vries <tdevries@suse.de>
2862
2863 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2864 check ...
2865 (read_comp_unit_head): ... here.
2866
2867 2018-07-03 Tom Tromey <tom@tromey.com>
2868
2869 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2870 (stop_tracing, tstatus_command)
2871 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2872 (print_one_static_tracepoint_marker): Update.
2873 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2874 std::vector.
2875 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2876 VEC.
2877 (all_tracepoints, static_tracepoints_here): Return std::vector.
2878
2879 2018-07-03 Tom Tromey <tom@tromey.com>
2880
2881 * common/ptid.c (ptid_equal): Remove.
2882 * common/ptid.h (ptid_equal): Don't declare.
2883 * ada-tasks.c: Update.
2884 * breakpoint.c: Update.
2885 * common/agent.c: Update.
2886 * corelow.c: Update.
2887 * darwin-nat-info.c: Update.
2888 * darwin-nat.c: Update.
2889 * dcache.c: Update.
2890 * dtrace-probe.c: Update.
2891 * dummy-frame.c: Update.
2892 * fbsd-nat.c: Update.
2893 * frame.c: Update.
2894 * gdbthread.h: Update.
2895 * gnu-nat.c: Update.
2896 * go32-nat.c: Update.
2897 * inf-loop.c: Update.
2898 * inf-ptrace.c: Update.
2899 * infcall.c: Update.
2900 * infcmd.c: Update.
2901 * inflow.c: Update.
2902 * infrun.c: Update.
2903 * linux-fork.c: Update.
2904 * linux-nat.c: Update.
2905 * linux-thread-db.c: Update.
2906 * mi/mi-cmd-var.c: Update.
2907 * mi/mi-interp.c: Update.
2908 * mi/mi-main.c: Update.
2909 * nto-procfs.c: Update.
2910 * ppc-linux-tdep.c: Update.
2911 * procfs.c: Update.
2912 * python/py-inferior.c: Update.
2913 * python/py-record-btrace.c: Update.
2914 * python/py-record.c: Update.
2915 * ravenscar-thread.c: Update.
2916 * regcache.c: Update.
2917 * remote-sim.c: Update.
2918 * remote.c: Update.
2919 * sol-thread.c: Update.
2920 * solib.c: Update.
2921 * target.c: Update.
2922 * tui/tui-stack.c: Update.
2923 * varobj.c: Update.
2924 * windows-nat.c: Update.
2925 * windows-tdep.c: Update.
2926
2927 2018-07-03 Tom Tromey <tom@tromey.com>
2928
2929 * common/ptid.c (ptid_match): Remove.
2930 * common/ptid.h (ptid_match): Don't declare.
2931 * fbsd-nat.c: Update.
2932 * infcmd.c: Update.
2933 * infrun.c: Update.
2934 * linux-nat.c: Update.
2935 * record-btrace.c: Update.
2936 * regcache.c: Update.
2937 * remote.c: Update.
2938
2939 2018-07-03 Tom Tromey <tom@tromey.com>
2940
2941 * common/ptid.c (ptid_tid_p): Remove.
2942 * common/ptid.h (ptid_tid_p): Don't declare.
2943 * sol-thread.c: Update.
2944
2945 2018-07-03 Tom Tromey <tom@tromey.com>
2946
2947 * common/ptid.c (ptid_lwp_p): Remove.
2948 * common/ptid.h (ptid_lwp_p): Don't declare.
2949 * fbsd-nat.c: Update.
2950 * linux-nat.c: Update.
2951 * nat/linux-procfs.c: Update.
2952 * nat/x86-linux-dregs.c: Update.
2953 * sol-thread.c: Update.
2954
2955 2018-07-03 Tom Tromey <tom@tromey.com>
2956
2957 * common/ptid.c (ptid_is_pid): Remove.
2958 * common/ptid.h (ptid_is_pid): Don't declare.
2959 * infrun.c: Update.
2960 * linux-nat.c: Update.
2961 * mi/mi-interp.c: Update.
2962 * remote.c: Update.
2963 * thread.c: Update.
2964
2965 2018-07-03 Tom Tromey <tom@tromey.com>
2966
2967 * common/ptid.c (ptid_get_tid): Remove.
2968 * common/ptid.h (ptid_get_tid): Don't declare.
2969 * ada-tasks.c: Update.
2970 * aix-thread.c: Update.
2971 * bsd-uthread.c: Update.
2972 * darwin-nat.c: Update.
2973 * fbsd-nat.c: Update.
2974 * i386-darwin-nat.c: Update.
2975 * infrun.c: Update.
2976 * linux-tdep.c: Update.
2977 * nto-procfs.c: Update.
2978 * ppc-ravenscar-thread.c: Update.
2979 * python/py-infthread.c: Update.
2980 * ravenscar-thread.c: Update.
2981 * sol-thread.c: Update.
2982 * sparc-ravenscar-thread.c: Update.
2983 * windows-nat.c: Update.
2984
2985 2018-07-03 Tom Tromey <tom@tromey.com>
2986
2987 * common/ptid.c (ptid_get_lwp): Remove.
2988 * common/ptid.h (ptid_get_lwp): Don't declare.
2989 * aarch64-linux-nat.c: Update.
2990 * ada-tasks.c: Update.
2991 * aix-thread.c: Update.
2992 * amd64-linux-nat.c: Update.
2993 * arm-linux-nat.c: Update.
2994 * corelow.c: Update.
2995 * fbsd-nat.c: Update.
2996 * fbsd-tdep.c: Update.
2997 * gnu-nat.c: Update.
2998 * i386-cygwin-tdep.c: Update.
2999 * i386-gnu-nat.c: Update.
3000 * i386-linux-nat.c: Update.
3001 * ia64-linux-nat.c: Update.
3002 * inf-ptrace.c: Update.
3003 * infrun.c: Update.
3004 * linux-fork.c: Update.
3005 * linux-nat.c: Update.
3006 * linux-tdep.c: Update.
3007 * linux-thread-db.c: Update.
3008 * mips-linux-nat.c: Update.
3009 * nat/aarch64-linux-hw-point.c: Update.
3010 * nat/aarch64-linux.c: Update.
3011 * nat/linux-btrace.c: Update.
3012 * nat/linux-osdata.c: Update.
3013 * nat/linux-procfs.c: Update.
3014 * nat/x86-linux-dregs.c: Update.
3015 * obsd-nat.c: Update.
3016 * ppc-fbsd-nat.c: Update.
3017 * ppc-linux-nat.c: Update.
3018 * procfs.c: Update.
3019 * python/py-infthread.c: Update.
3020 * ravenscar-thread.c: Update.
3021 * remote.c: Update.
3022 * s390-linux-nat.c: Update.
3023 * sol-thread.c: Update.
3024 * sol2-tdep.c: Update.
3025 * spu-linux-nat.c: Update.
3026 * x86-linux-nat.c: Update.
3027 * xtensa-linux-nat.c: Update.
3028
3029 2018-07-03 Tom Tromey <tom@tromey.com>
3030
3031 * common/ptid.c (ptid_get_pid): Remove.
3032 * common/ptid.h (ptid_get_pid): Don't declare.
3033 * aarch64-linux-nat.c: Update.
3034 * ada-lang.c: Update.
3035 * aix-thread.c: Update.
3036 * alpha-bsd-nat.c: Update.
3037 * amd64-fbsd-nat.c: Update.
3038 * amd64-linux-nat.c: Update.
3039 * arm-linux-nat.c: Update.
3040 * arm-nbsd-nat.c: Update.
3041 * auxv.c: Update.
3042 * break-catch-syscall.c: Update.
3043 * breakpoint.c: Update.
3044 * bsd-uthread.c: Update.
3045 * corelow.c: Update.
3046 * ctf.c: Update.
3047 * darwin-nat.c: Update.
3048 * fbsd-nat.c: Update.
3049 * fbsd-tdep.c: Update.
3050 * gcore.c: Update.
3051 * gnu-nat.c: Update.
3052 * hppa-nbsd-nat.c: Update.
3053 * hppa-obsd-nat.c: Update.
3054 * i386-fbsd-nat.c: Update.
3055 * ia64-linux-nat.c: Update.
3056 * inf-ptrace.c: Update.
3057 * infcmd.c: Update.
3058 * inferior.c: Update.
3059 * inferior.h: Update.
3060 * inflow.c: Update.
3061 * infrun.c: Update.
3062 * linux-fork.c: Update.
3063 * linux-nat.c: Update.
3064 * linux-tdep.c: Update.
3065 * linux-thread-db.c: Update.
3066 * m68k-bsd-nat.c: Update.
3067 * mi/mi-interp.c: Update.
3068 * mi/mi-main.c: Update.
3069 * mips-linux-nat.c: Update.
3070 * mips-nbsd-nat.c: Update.
3071 * mips64-obsd-nat.c: Update.
3072 * nat/aarch64-linux-hw-point.c: Update.
3073 * nat/aarch64-linux.c: Update.
3074 * nat/linux-btrace.c: Update.
3075 * nat/linux-osdata.c: Update.
3076 * nat/linux-procfs.c: Update.
3077 * nat/x86-linux-dregs.c: Update.
3078 * nto-procfs.c: Update.
3079 * obsd-nat.c: Update.
3080 * ppc-linux-nat.c: Update.
3081 * ppc-nbsd-nat.c: Update.
3082 * ppc-obsd-nat.c: Update.
3083 * proc-service.c: Update.
3084 * procfs.c: Update.
3085 * python/py-inferior.c: Update.
3086 * python/py-infthread.c: Update.
3087 * ravenscar-thread.c: Update.
3088 * record.c: Update.
3089 * remote-sim.c: Update.
3090 * remote.c: Update.
3091 * rs6000-nat.c: Update.
3092 * s390-linux-nat.c: Update.
3093 * sh-nbsd-nat.c: Update.
3094 * sol-thread.c: Update.
3095 * sparc-nat.c: Update.
3096 * sparc64-tdep.c: Update.
3097 * spu-linux-nat.c: Update.
3098 * spu-tdep.c: Update.
3099 * target-debug.h: Update.
3100 * target.c: Update.
3101 * thread.c: Update.
3102 * tid-parse.c: Update.
3103 * tracefile-tfile.c: Update.
3104 * vax-bsd-nat.c: Update.
3105 * windows-nat.c: Update.
3106 * x86-linux-nat.c: Update.
3107 * x86-nat.c: Update.
3108
3109 2018-07-03 Tom Tromey <tom@tromey.com>
3110
3111 * common/ptid.c (pid_to_ptid): Remove.
3112 * common/ptid.h (pid_to_ptid): Don't declare.
3113 * aix-thread.c: Update.
3114 * arm-linux-nat.c: Update.
3115 * common/ptid.c: Update.
3116 * common/ptid.h: Update.
3117 * corelow.c: Update.
3118 * ctf.c: Update.
3119 * darwin-nat.c: Update.
3120 * fbsd-nat.c: Update.
3121 * fork-child.c: Update.
3122 * gnu-nat.c: Update.
3123 * go32-nat.c: Update.
3124 * inf-ptrace.c: Update.
3125 * infcmd.c: Update.
3126 * inferior.c: Update.
3127 * infrun.c: Update.
3128 * linux-fork.c: Update.
3129 * linux-nat.c: Update.
3130 * nat/aarch64-linux-hw-point.c: Update.
3131 * nat/fork-inferior.c: Update.
3132 * nat/x86-linux-dregs.c: Update.
3133 * nto-procfs.c: Update.
3134 * obsd-nat.c: Update.
3135 * procfs.c: Update.
3136 * progspace.c: Update.
3137 * remote.c: Update.
3138 * rs6000-nat.c: Update.
3139 * s390-linux-nat.c: Update.
3140 * sol-thread.c: Update.
3141 * spu-linux-nat.c: Update.
3142 * target.c: Update.
3143 * top.c: Update.
3144 * tracefile-tfile.c: Update.
3145 * windows-nat.c: Update.
3146
3147 2018-07-03 Tom Tromey <tom@tromey.com>
3148
3149 * common/ptid.h (ptid_build): Don't declare.
3150 * common/ptid.c (ptid_build): Remove.
3151 * aix-thread.c: Update.
3152 * bsd-kvm.c: Update.
3153 * bsd-uthread.c: Update.
3154 * common/agent.c: Update.
3155 * common/ptid.c: Update.
3156 * common/ptid.h: Update.
3157 * corelow.c: Update.
3158 * darwin-nat.c: Update.
3159 * fbsd-nat.c: Update.
3160 * gnu-nat.c: Update.
3161 * linux-fork.c: Update.
3162 * linux-nat.c: Update.
3163 * linux-thread-db.c: Update.
3164 * nat/linux-osdata.c: Update.
3165 * nat/linux-procfs.c: Update.
3166 * nto-procfs.c: Update.
3167 * obsd-nat.c: Update.
3168 * proc-service.c: Update.
3169 * procfs.c: Update.
3170 * ravenscar-thread.c: Update.
3171 * remote-sim.c: Update.
3172 * remote.c: Update.
3173 * sol-thread.c: Update.
3174 * target.c: Update.
3175 * windows-nat.c: Update.
3176
3177 2018-07-03 Tom Tromey <tom@tromey.com>
3178
3179 * infrun.c (follow_exec): Use exit_inferior_silent.
3180 * inferior.c (exit_inferior_num_silent): Remove.
3181 * inferior.h (exit_inferior_num_silent): Don't declare.
3182
3183 2018-07-03 Tom Tromey <tom@tromey.com>
3184
3185 PR cli/23340:
3186 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3187 inferior_ptid on error.
3188
3189 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3190 Simon Marchi <simon.marchi@polymtl.ca>
3191
3192 PR tdep/8282
3193 * disasm.h (gdb_disassembler): Add
3194 `m_disassembler_options_holder'. member
3195 * disasm.c (get_all_disassembler_options): New function.
3196 (gdb_disassembler::gdb_disassembler): Use it.
3197 (gdb_buffered_insn_length_init_dis): Likewise.
3198 (gdb_buffered_insn_length): Adjust accordingly.
3199 (set_disassembler_options): Handle options with arguments.
3200 (show_disassembler_options_sfunc): Likewise. Add a leading new
3201 line if showing options with descriptions.
3202 (disassembler_options_completer): Adapt to using the
3203 `disasm_options_and_args_t' structure.
3204 * mips-tdep.c (mips_disassembler_options): New variable.
3205 (mips_disassembler_options_o32): Likewise.
3206 (mips_disassembler_options_n32): Likewise.
3207 (mips_disassembler_options_n64): Likewise.
3208 (gdb_print_insn_mips): Don't set `disassembler_options'.
3209 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3210 functions.
3211 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3212 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3213 `gdbarch_disassembler_options_implicit' and
3214 `gdbarch_valid_disassembler_options'.
3215 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3216 `disasm_options_and_args_t' structure.
3217 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3218 method.
3219 (valid_disassembler_options): Switch from `disasm_options_t' to
3220 the `disasm_options_and_args_t' structure.
3221 * NEWS: Document `set disassembler-options' support for the MIPS
3222 target.
3223 * gdbarch.h: Regenerate.
3224 * gdbarch.c: Regenerate.
3225
3226 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3227
3228 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3229
3230 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3231
3232 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3233 parameter in call to amd64_target_description.
3234 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3235 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3236 (amd64fbsd_init_abi): Likewise.
3237 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3238 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3239 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3240 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3241
3242 2018-06-29 Pedro Alves <palves@redhat.com>
3243
3244 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3245 "segments" parameter.
3246 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3247 (_initialize_amd64_tdep): Update call to
3248 amd64_create_target_description.
3249 (amd64_target_description): Add "segments" parameter. Adjust
3250 the implementation to use it.
3251 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3252 call to amd64_create_target_description.
3253 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3254 * gdb/arch/amd64.h (amd64_create_target_description): Add
3255 "segments" register.
3256 * gdb/arch/amd64.c (amd64_create_target_description): Add
3257 "segments" parameter. Call create_feature_i386_64bit_segments
3258 only if SEGMENTS is true.
3259 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3260 call to amd64_create_target_description.
3261
3262 2018-06-29 Pedro Alves <palves@redhat.com>
3263
3264 * thread.c (thread_target_id_str): New, factored out from ...
3265 (print_thread_info_1): ... here. Use it to compute the max
3266 "Target Id" column width.
3267
3268 2018-06-29 Pedro Alves <palves@redhat.com>
3269
3270 * remote.c (remote_target::extra_thread_info): Delete
3271 'display_buf' and 'n' locals. from the cache, regardless of
3272 packet mechanims is in use. Use cache for qThreadExtra and qP
3273 methods too.
3274
3275 2018-06-29 Pedro Alves <palves@redhat.com>
3276
3277 * blockframe.c (find_pc_sect_containing_function): New function.
3278 * breakpoint.c (print_breakpoint_location): Don't call
3279 find_pc_sect_function.
3280 * linespec.c (create_sals_line_offset): Record the location's
3281 symbol in the sal.
3282 * linespec.c (convert_address_location_to_sals): Fill in sal's
3283 symbol with find_pc_sect_containing_function.
3284 * symtab.c (find_function_start_sal): Rename to ...
3285 (find_function_start_sal_1): ... this.
3286 (find_function_start_sal): Reimplement as wrapper around
3287 find_function_start_sal_1, and use
3288 find_pc_sect_containing_function to fill in the sal's symbol.
3289 (find_function_start_sal(symbol*, bool)): Adjust.
3290 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3291 comments.
3292 (find_pc_sect_containing_function): Declare.
3293
3294 2018-06-29 Pedro Alves <palves@redhat.com>
3295
3296 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3297 true if the the location has no symbol.
3298
3299 2018-06-28 Tom Tromey <tom@tromey.com>
3300
3301 * NEWS: Mention --enable-codesign.
3302 * silent-rules.mk (ECHO_SIGN): New variable.
3303 * configure.ac: Add --enable-codesign.
3304 * configure: Rebuild.
3305 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3306 (gdb$(EXEEXT)): Optionally invoke codesign.
3307
3308 2018-06-28 Pedro Alves <palves@redhat.com>
3309
3310 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3311 comments.
3312 (switch_to_thread_no_regs): Adjust comment.
3313 * infcmd.c (stop_pc): Delete.
3314 (post_create_inferior, info_program_command): Replace references
3315 to stop_pc with references to thread_info->suspend.stop_pc.
3316 * inferior.h (stop_pc): Delete declaration.
3317 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3318 (handle_inferior_event_1, handle_signal_stop)
3319 (process_event_stop_test, keep_going_stepped_thread)
3320 (handle_step_into_function, handle_step_into_function_backward)
3321 (print_stop_location): Replace references to stop_pc with
3322 references to thread_info->suspend.stop_pc.
3323 (struct infcall_suspend_state) <stop_pc>: Delete field.
3324 (save_infcall_suspend_state, restore_infcall_suspend_state):
3325 Remove references to inf_stat->stop_pc.
3326 * linux-fork.c (fork_load_infrun_state): Likewise.
3327 * record-btrace.c (record_btrace_set_replay): Likewise.
3328 * record-full.c (record_full_goto_entry): Likewise.
3329 * remote.c (print_one_stopped_thread): Likewise.
3330 * target.c (target_resume): Extend comment.
3331 * thread.c (set_executing_thread): New.
3332 (set_executing): Use it.
3333 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3334 Remove references to stop_pc.
3335
3336 2018-06-28 Pedro Alves <palves@redhat.com>
3337
3338 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3339 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3340
3341 2018-06-28 Tom Tromey <tom@tromey.com>
3342
3343 * coffread.c (coff_symfile_finish): Update.
3344 * xcoffread.c (xcoff_symfile_finish): Update.
3345 * elfread.c (elf_symfile_finish): Update.
3346 * symfile.h (dwarf2_free_objfile): Don't declare.
3347 * dwarf2read.c (_initialize_dwarf2_read): Use
3348 register_objfile_data_with_cleanup.
3349 (dwarf2_free_objfile): Now static. Change signature.
3350
3351 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3352
3353 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3354 option "-o" to add-symbol-file-load to add an offset to each
3355 section's load address.
3356 * symfile.c (set_objfile_default_section_offset): New function.
3357
3358 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3359
3360 * symfile.c (add_symbol_file_command): Make sure that sections
3361 with the same name are sorted in the same order.
3362
3363 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3364
3365 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3366 require the second argument. If omitted, load sections at the
3367 addresses specified in the file.
3368
3369 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3370
3371 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3372 (_initialize_symfile): Add option "-o" to symbol-file to add an
3373 offset to each section of the symbol file.
3374
3375 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3376
3377 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3378
3379 2018-06-27 Tom Tromey <tom@tromey.com>
3380
3381 * stack.c (_initialize_stack): Update "func" help text.
3382
3383 2018-06-27 Tom Tromey <tom@tromey.com>
3384
3385 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3386 std::vector.
3387 (unwind_infopy_str, pyuw_create_unwind_info)
3388 (unwind_infopy_add_saved_register, pyuw_sniffer)
3389 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3390 Update.
3391 (struct saved_reg): Add constructor.
3392 <value>: Now a gdbpy_ref<>.
3393
3394 2018-06-27 Tom Tromey <tom@tromey.com>
3395
3396 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3397
3398 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3399
3400 * gdb-gdb.py.in: Format using autopep8.
3401
3402 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3403
3404 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3405 (type_lookup_function): Recognize CORE_ADDR values.
3406
3407 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3408
3409 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3410 print tag_name.
3411
3412 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3413
3414 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3415 <__lt__>: Add.
3416
3417 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3418
3419 * gdb-gdb.py: Move to...
3420 * gdb-gdb.py.in: ... here.
3421 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3422 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3423 dependencies.
3424 (distclean): Remove gdb-gdb.py when cleaning.
3425 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3426 * configure: Re-generate.
3427
3428 2018-06-27 Pedro Alves <palves@redhat.com>
3429
3430 * proc-service.c (get_ps_regcache): New.
3431 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3432 (ps_lsetfpregs): Use it.
3433
3434 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3435
3436 PR gdb/21695
3437 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3438 (dwarf_decode_lines_1): Adjust.
3439
3440 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3441
3442 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3443 override.
3444 <info_proc>: Likewise.
3445
3446 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3447
3448 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3449 to windows_fetch_one_register, and only handle the case of
3450 fetching one register. Move the code that reloads the context
3451 and iterates over all registers if R is negative to...
3452 (windows_nat_target::fetch_registers): ... here.
3453 (do_windows_store_inferior_registers): Rename to
3454 windows_store_one_register, and only handle the case of storing
3455 one register. Move the code that handles the case where r is
3456 negative to...
3457 (windows_nat_target::store_registers) ... here.
3458
3459 2018-06-26 Tom Tromey <tom@tromey.com>
3460
3461 PR rust/22574:
3462 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3463 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3464 Update.
3465 (rust_internal_print_type): Add podata parameter.
3466 (rust_print_type): Update.
3467
3468 2018-06-26 Tom Tromey <tom@tromey.com>
3469
3470 * typeprint.h (struct print_offset_data) <update, finish,
3471 maybe_print_hole>: New methods.
3472 <indentation>: New constant.
3473 * typeprint.c (print_offset_data::indentation): Define.
3474 (print_offset_data::maybe_print_hole, print_offset_data::update)
3475 (print_offset_data::finish): Move from c-typeprint.c and rename.
3476 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3477 (print_spaces_filtered_with_print_options): Update.
3478 (c_print_type_union_field_offset, maybe_print_hole)
3479 (c_print_type_struct_field_offset): Move to typeprint.c and
3480 rename.
3481 (c_type_print_base_struct_union): Update.
3482
3483 2018-06-25 Pedro Alves <palves@redhat.com>
3484
3485 * gdbthread.h (thread_info_ref, delete_thread)
3486 (delete_thread_silent, first_thread_of_inferior)
3487 (any_thread_of_inferior, switch_to_thread)
3488 (enable_thread_stack_temporaries)
3489 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3490 (get_last_thread_stack_temporary)
3491 (value_in_thread_stack_temporaries, can_access_registers_thread):
3492 Spell out "struct thread_info" instead of just "thread_info".
3493 * inferior.h (notice_new_inferior): Likewise.
3494
3495 2018-06-25 Pedro Alves <palves@redhat.com>
3496
3497 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3498 pass thread_info pointer to delete_thread.
3499 (windows_nat_target::detach): Pass inferior pointer to
3500 detach_inferior.
3501 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3502 delete_thread.
3503 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3504 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3505 and pass a thread_info pointer to delete_thread.
3506 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3507 pass thread_info pointer to delete_thread.
3508 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3509 delete_thread_silent call.
3510 * procfs.c (procfs_target::detach): Pass inferior pointer to
3511 detach_inferior.
3512 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3513 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3514 delete_thread_silent call.
3515 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3516 pass thread_info pointer to delete_thread.
3517 (windows_nat_target::detach): Pass inferior pointer to
3518 delete_inferior.
3519
3520 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3521
3522 * regcache.c (readable_regcache::read_part): Fix asserts.
3523 (reg_buffer::raw_collect_part): New function.
3524 (regcache::write_part): Fix asserts.
3525 (reg_buffer::raw_supply_part): New function.
3526 (regcache::transfer_regset_register): New helper function.
3527 (regcache::transfer_regset): Call new functions.
3528 (regcache_supply_regset): Use gdb_byte*.
3529 (regcache::supply_regset): Likewise.
3530 (regcache_collect_regset): Likewise.
3531 (regcache::collect_regset): Likewise.
3532 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3533 (reg_buffer::raw_supply_part): Likewise.
3534 (regcache::transfer_regset_register): Likewise.
3535 (regcache::transfer_regset): Use gdb_byte*.
3536
3537 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3538
3539 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3540
3541 2018-06-21 Pedro Alves <palves@redhat.com>
3542
3543 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3544 instead of a ptid_t. All callers adjusted.
3545 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3546 adjusted.
3547 (print_ada_task_info, display_current_task_id, task_command_1):
3548 Adjust.
3549 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3550 inferior_thread.
3551 (breakpoint_kind): Adjust.
3552 (remove_breakpoints_pid): Rename to ...
3553 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3554 pointer. All callers adjusted.
3555 (bpstat_clear_actions): Use inferior_thread.
3556 (get_bpstat_thread): New.
3557 (bpstat_do_actions): Use it.
3558 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3559 to take a thread_info pointer. All callers adjusted.
3560 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3561 (breakpoint_re_set_thread): Use inferior_thread.
3562 * breakpoint.h (struct inferior): Forward declare.
3563 (bpstat_stop_status): Update.
3564 (remove_breakpoints_pid): Delete.
3565 (remove_breakpoints_inf): New.
3566 * bsd-uthread.c (bsd_uthread_target::wait)
3567 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3568 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3569 (maint_btrace_packet_history_cmd)
3570 (maint_btrace_clear_packet_history_cmd): Adjust.
3571 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3572 inferior_thread.
3573 * cli/cli-interp.c: Include "inferior.h".
3574 * common/refcounted-object.h (struct
3575 refcounted_object_ref_policy): New.
3576 * compile/compile-object-load.c: Include gdbthread.h.
3577 (store_regs): Use inferior_thread.
3578 * corelow.c (core_target::close): Use current_inferior.
3579 (core_target_open): Adjust to use first_thread_of_inferior and use
3580 the current inferior.
3581 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3582 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3583 <thread>: ... this new field. All references adjusted.
3584 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3585 Take a thread_info pointer instead of a ptid_t.
3586 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3587 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3588 thread_info pointer instead of a ptid_t.
3589 * elfread.c: Include "inferior.h".
3590 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3591 Use inferior_thread.
3592 * eval.c (evaluate_subexp): Likewise.
3593 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3594 inferior_thread.
3595 * gdb_proc_service.h (struct thread_info): Forward declare.
3596 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3597 <thread>: ... this new field. All references adjusted.
3598 * gdbarch.h, gdbarch.c: Regenerate.
3599 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3600 'thread' parameter. All implementations and callers adjusted.
3601 * gdbthread.h (thread_info) <set_running>: New method.
3602 (delete_thread, delete_thread_silent): Take a thread_info pointer
3603 instead of a ptid.
3604 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3605 (first_thread_of_process): Delete, replaced by ...
3606 (first_thread_of_inferior): ... this new function. All callers
3607 adjusted.
3608 (any_live_thread_of_process): Delete, replaced by ...
3609 (any_live_thread_of_inferior): ... this new function. All callers
3610 adjusted.
3611 (switch_to_thread, switch_to_no_thread): Declare.
3612 (is_executing): Delete.
3613 (enable_thread_stack_temporaries): Update comment.
3614 <enable_thread_stack_temporaries>: Take a thread_info pointer
3615 instead of a ptid_t. Incref the thread.
3616 <~enable_thread_stack_temporaries>: Decref the thread.
3617 <m_ptid>: Delete
3618 <m_thr>: New.
3619 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3620 (get_last_thread_stack_temporary)
3621 (value_in_thread_stack_temporaries, can_access_registers_thread):
3622 Take a thread_info pointer instead of a ptid_t. All callers
3623 adjusted.
3624 * infcall.c (get_call_return_value): Use inferior_thread.
3625 (run_inferior_call): Work with thread pointers instead of ptid_t.
3626 (call_function_by_hand_dummy): Work with thread pointers instead
3627 of ptid_t. Use thread_info_ref.
3628 * infcmd.c (proceed_thread_callback): Access thread's state
3629 directly.
3630 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3631 access thread's state directly.
3632 (continue_command): Use inferior_thread.
3633 (info_program_command): Use find_thread_ptid and access thread
3634 state directly.
3635 (proceed_after_attach_callback): Use thread state directly.
3636 (notice_new_inferior): Take a thread_info pointer instead of a
3637 ptid_t. All callers adjusted.
3638 (exit_inferior): Take an inferior pointer instead of a pid. All
3639 callers adjusted.
3640 (exit_inferior_silent): New.
3641 (detach_inferior): Delete.
3642 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3643 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3644 (detach_inferior_command, kill_inferior_command): Use
3645 find_inferior_id instead of valid_gdb_inferior_id and
3646 gdb_inferior_id_to_pid.
3647 (inferior_command): Use inferior and thread pointers.
3648 * inferior.h (struct thread_info): Forward declare.
3649 (notice_new_inferior): Take a thread_info pointer instead of a
3650 ptid_t. All callers adjusted.
3651 (detach_inferior): Delete declaration.
3652 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3653 instead of a pid. All callers adjusted.
3654 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3655 (valid_gdb_inferior_id): Delete.
3656 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3657 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3658 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3659 ...
3660 <inf>: ... this new field.
3661 <step_ptid>: Delete, replaced by ...
3662 <step_thread>: ... this new field.
3663 (get_displaced_stepping_state): Take an inferior pointer instead
3664 of a pid. All callers adjusted.
3665 (displaced_step_in_progress_any_inferior): Adjust.
3666 (displaced_step_in_progress_thread): Take a thread pointer instead
3667 of a ptid_t. All callers adjusted.
3668 (displaced_step_in_progress, add_displaced_stepping_state): Take
3669 an inferior pointer instead of a pid. All callers adjusted.
3670 (get_displaced_step_closure_by_addr): Adjust.
3671 (remove_displaced_stepping_state): Take an inferior pointer
3672 instead of a pid. All callers adjusted.
3673 (displaced_step_prepare_throw, displaced_step_prepare)
3674 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3675 All callers adjusted.
3676 (start_step_over): Adjust.
3677 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3678 displaced step queue.
3679 (do_target_resume): Adjust.
3680 (fetch_inferior_event): Use inferior_thread.
3681 (context_switch, get_inferior_stop_soon): Take an
3682 execution_control_state pointer instead of a ptid_t. All callers
3683 adjusted.
3684 (switch_to_thread_cleanup): Delete.
3685 (stop_all_threads): Use scoped_restore_current_thread.
3686 * inline-frame.c: Include "gdbthread.h".
3687 (inline_state) <inline_state>: Take a thread pointer instead of a
3688 ptid_t. All callers adjusted.
3689 <ptid>: Delete, replaced by ...
3690 <thread>: ... this new field.
3691 (find_inline_frame_state): Take a thread pointer instead of a
3692 ptid_t. All callers adjusted.
3693 (skip_inline_frames, step_into_inline_frame)
3694 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3695 pointer instead of a ptid_t. All callers adjusted.
3696 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3697 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3698 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3699 pointers directly.
3700 * linux-nat.c (get_detach_signal): Likewise.
3701 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3702 (thread_db_notice_clone): Adjust.
3703 (thread_db_find_new_threads_silently)
3704 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3705 a thread pointer instead of a ptid_t. All callers adjusted.
3706 * mi/mi-cmd-var.c: Include "inferior.h".
3707 (mi_cmd_var_update_iter): Update to use thread pointers.
3708 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3709 inferior directly.
3710 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3711 out to ...
3712 (mi_output_running): ... this new function.
3713 (mi_on_resume_1): Adjust to use it.
3714 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3715 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3716 directly.
3717 (interrupt_thread_callback): : Adjust to use thread and inferior
3718 pointers.
3719 * proc-service.c: Include "gdbthread.h".
3720 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3721 * progspace-and-thread.c: Include "inferior.h".
3722 * progspace.c: Include "inferior.h".
3723 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3724 hold a reference to an inferior_object.
3725 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3726 inferior_thread.
3727 * python/py-inferior.c (struct inferior_object): Give the type a
3728 tag name instead of a typedef.
3729 (python_on_normal_stop): No need to check if the current thread is
3730 listed.
3731 (inferior_to_inferior_object): Change return type to
3732 inferior_object. All callers adjusted.
3733 (find_thread_object): Delete, bits factored out to ...
3734 (thread_to_thread_object): ... this new function.
3735 * python/py-infthread.c (create_thread_object): Use
3736 inferior_to_inferior_object.
3737 (thpy_is_stopped): Use thread pointer directly.
3738 (gdbpy_selected_thread): Use inferior_thread.
3739 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3740 field, replaced with ...
3741 <thread>: ... this new field. All users adjusted.
3742 (btpy_insn_or_gap_new): Drop const.
3743 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3744 callers adjusted.
3745 * python/py-record.c: Include "gdbthread.h".
3746 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3747 a ptid_t. All callers adjusted.
3748 (gdbpy_current_recording): Use inferior_thread.
3749 * python/py-record.h (recpy_record_object) <ptid>: Delete
3750 field, replaced with ...
3751 <thread>: ... this new field. All users adjusted.
3752 (recpy_element_object) <ptid>: Delete
3753 field, replaced with ...
3754 <thread>: ... this new field. All users adjusted.
3755 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3756 a ptid_t. All callers adjusted.
3757 * python/py-threadevent.c: Include "gdbthread.h".
3758 (get_event_thread): Use thread_to_thread_object.
3759 * python/python-internal.h (struct inferior_object): Forward
3760 declare.
3761 (find_thread_object, find_inferior_object): Delete declarations.
3762 (thread_to_thread_object, inferior_to_inferior_object): New
3763 declarations.
3764 * record-btrace.c: Include "inferior.h".
3765 (require_btrace_thread): Use inferior_thread.
3766 (record_btrace_frame_sniffer)
3767 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3768 (get_thread_current_frame): Use scoped_restore_current_thread and
3769 switch_to_thread.
3770 (get_thread_current_frame): Use thread pointer directly.
3771 (record_btrace_replay_at_breakpoint): Use thread's inferior
3772 pointer directly.
3773 * record-full.c: Include "inferior.h".
3774 * regcache.c: Include "gdbthread.h".
3775 (get_thread_arch_regcache): Use the inferior's address space
3776 directly.
3777 (get_thread_regcache, registers_changed_thread): New.
3778 * regcache.h (get_thread_regcache(thread_info *thread)): New
3779 overload.
3780 (registers_changed_thread): New.
3781 (remote_target) <remote_detach_1>: Swap order of parameters.
3782 (remote_add_thread): <remote_add_thread>: Return the new thread.
3783 (get_remote_thread_info(ptid_t)): New overload.
3784 (remote_target::remote_notice_new_inferior): Use thread pointers
3785 directly.
3786 (remote_target::process_initial_stop_replies): Use
3787 thread_info::set_running.
3788 (remote_target::remote_detach_1, remote_target::detach)
3789 (extended_remote_target::detach): Adjust.
3790 * stack.c (frame_show_address): Use inferior_thread.
3791 * target-debug.h (target_debug_print_thread_info_pp): New.
3792 * target-delegates.c: Regenerate.
3793 * target.c (default_thread_address_space): Delete.
3794 (memory_xfer_partial_1): Use current_inferior.
3795 (target_detach): Use current_inferior.
3796 (target_thread_address_space): Delete.
3797 (generic_mourn_inferior): Use current_inferior.
3798 * target.h (struct target_ops) <thread_address_space>: Delete.
3799 (target_thread_address_space): Delete.
3800 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3801 pointers directly.
3802 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3803 thread pointer instead of a ptid_t. Adjust all callers.
3804 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3805 (first_thread_of_process): Delete, replaced by ...
3806 (first_thread_of_inferior): ... this new function. All callers
3807 adjusted.
3808 (any_thread_of_process): Rename to ...
3809 (any_thread_of_inferior): ... this, and take an inferior pointer.
3810 (any_live_thread_of_process): Rename to ...
3811 (any_live_thread_of_inferior): ... this, and take an inferior
3812 pointer.
3813 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3814 (value_in_thread_stack_temporaries)
3815 (get_last_thread_stack_temporary): Take a thread pointer instead
3816 of a ptid_t. Adjust all callers.
3817 (thread_info::set_running): New.
3818 (validate_registers_access): Use inferior_thread.
3819 (can_access_registers_ptid): Rename to ...
3820 (can_access_registers_thread): ... this, and take a thread
3821 pointer.
3822 (print_thread_info_1): Adjust to compare thread pointers instead
3823 of ptids.
3824 (switch_to_no_thread, switch_to_thread): Make extern.
3825 (scoped_restore_current_thread::~scoped_restore_current_thread):
3826 Use m_thread pointer directly.
3827 (scoped_restore_current_thread::scoped_restore_current_thread):
3828 Use inferior_thread.
3829 (thread_command): Use thread pointer directly.
3830 (thread_num_make_value_helper): Use inferior_thread.
3831 * top.c (execute_command): Use inferior_thread.
3832 * tui/tui-interp.c: Include "inferior.h".
3833 * varobj.c (varobj_create): Use inferior_thread.
3834 (value_of_root_1): Use find_thread_global_id instead of
3835 global_thread_id_to_ptid.
3836
3837 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3838
3839 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3840 possible.
3841 (regcache::write_part): Likewise.
3842 (readable_regcache::cooked_read_part): Update comment.
3843 (readable_regcache::cooked_write_part): Likewise.
3844 * regcache.h: (readable_regcache::read_part): Likewise.
3845 (regcache::write_part): Likewise.
3846
3847 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3848 Dirk Schubert <dirk.schubert@arm.com>
3849
3850 * aarch64-linux-nat.c (post_attach): New.
3851 (aarch64_linux_nat_target::post_attach): Override post_attach to
3852 record the number of hardware debug registers.
3853
3854 2018-06-20 Tom Tromey <tom@tromey.com>
3855
3856 * python/py-param.c (add_setshow_generic): Make parameters const.
3857 (parmpy_init): Update.
3858
3859 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3860
3861 * regcache.h (regcache_cooked_read_ftype): Rename to...
3862 (register_read_ftype): ...this, change type to function_view.
3863 (class reg_buffer) <save>: Remove src parameter.
3864 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3865 parameter non-const in first overload. Remove src parameter in
3866 second overload.
3867 * regcache.c (do_cooked_read): Remove.
3868 (readonly_detached_regcache::readonly_detached_regcache): Make
3869 parameter non-const, adjust call to other constructor.
3870 (reg_buffer::save): Remove src parameter.
3871 * frame.c (do_frame_register_read): Remove.
3872 (frame_save_as_regcache): Use lambda function.
3873 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3874 parameter to ppu2spu_data *.
3875 (ppu2spu_sniffer): Use lambda function.
3876
3877 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3878
3879 * record-full.c (record_full_target::insert_breakpoint): Remove
3880 "struct" keyword, add const.
3881
3882 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3883
3884 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3885 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3886 * configure.ac: Remove AC_PREREQ, add missing quoting.
3887 * gnulib/configure.ac: Modernize usage of
3888 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3889 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3890 (AUTOMAKE_VERSION): Bump to 1.15.1.
3891 * configure: Re-generate.
3892 * config.in: Re-generate.
3893 * aclocal.m4: Re-generate.
3894 * gnulib/aclocal.m4: Re-generate.
3895 * gnulib/config.in: Re-generate.
3896 * gnulib/configure: Re-generate.
3897 * gnulib/import/Makefile.in: Re-generate.
3898
3899 2018-06-19 Pedro Alves <palves@redhat.com>
3900
3901 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3902 (lookup_minimal_symbol_by_pc_section): ... here with
3903 gdb_assert_not_reached added.
3904
3905 2018-06-19 Pedro Alves <palves@redhat.com>
3906
3907 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3908 parameter with a block parameter. Compare location's block symbol
3909 with the frame's block instead of addresses.
3910 (skip_inline_frames): Pass the current block instead of the
3911 frame's address. Break out as soon as we determine the frame
3912 should not be skipped.
3913
3914 2018-06-18 Tom Tromey <tom@tromey.com>
3915
3916 * solib-aix.c (solib_aix_get_section_offsets): Return
3917 unique_xmalloc_ptr.
3918 (solib_aix_solib_create_inferior_hook): Update.
3919
3920 2018-06-18 Tom Tromey <tom@tromey.com>
3921
3922 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3923
3924 2018-06-18 Tom Tromey <tom@tromey.com>
3925
3926 * solib-frv.c (frv_relocate_main_executable): Use
3927 unique_xmalloc_ptr.
3928 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3929 unique_xmalloc_ptr.
3930
3931 2018-06-18 Tom Tromey <tom@tromey.com>
3932
3933 * objfiles.h (inhibit_section_map_updates): Update.
3934 (resume_section_map_updates, resume_section_map_updates_cleanup):
3935 Remove.
3936 * solib-svr4.c (svr4_handle_solib_event): Update.
3937 * objfiles.c (inhibit_section_map_updates): Return
3938 scoped_restore_tmpl<int>.
3939 (resume_section_map_updates, resume_section_map_updates_cleanup):
3940 Remove.
3941
3942 2018-06-18 Tom Tromey <tom@tromey.com>
3943
3944 * valprint.h (read_string): Update.
3945 * valprint.c (read_string): Change type of "buffer".
3946 (val_print_string): Update.
3947 * python/py-value.c (valpy_string): Update.
3948 * language.h (struct language_defn) <la_get_string>: Change
3949 type of "buffer".
3950 (default_get_string, c_get_string): Update.
3951 * language.c (default_get_string): Change type of "buffer".
3952 * guile/scm-value.c (gdbscm_value_to_string): Update.
3953 * c-lang.c (c_get_string): Change type of "buffer".
3954
3955 2018-06-18 Tom Tromey <tom@tromey.com>
3956
3957 * ser-mingw.c (struct pipe_state_destroyer): New.
3958 (pipe_state_up): New typedef.
3959 (cleanup_pipe_state): Remove.
3960 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3961
3962 2018-06-18 Tom Tromey <tom@tromey.com>
3963
3964 * rust-lang.h (rust_yyerror): Don't declare.
3965 * rust-lang.c (rust_language_defn): Update.
3966 * rust-exp.y (yyerror): Now static.
3967 * parse.c (parse_exp_in_context_1): Update.
3968 * p-lang.h (p_yyerror): Don't declare.
3969 * p-lang.c (p_language_defn): Update.
3970 * p-exp.y (yyerror): Now static.
3971 * opencl-lang.c (opencl_language_defn): Update.
3972 * objc-lang.c (objc_language_defn): Update.
3973 * m2-lang.h (m2_yyerror): Don't declare.
3974 * m2-lang.c (m2_language_defn): Update.
3975 * m2-exp.y (yyerror): Now static.
3976 * language.h (struct language_defn) <la_error>: Remove.
3977 * language.c (unk_lang_error): Remove.
3978 (unknown_language_defn, auto_language_defn): Remove.
3979 * go-lang.h (go_yyerror): Don't declare.
3980 * go-lang.c (go_language_defn): Update.
3981 * go-exp.y (yyerror): Now static.
3982 * f-lang.h (f_yyerror): Don't declare.
3983 * f-lang.c (f_language_defn): Update.
3984 * f-exp.y (yyerror): Now static.
3985 * d-lang.h (d_yyerror): Don't declare.
3986 * d-lang.c (d_language_defn): Update.
3987 * d-exp.y (yyerror): Now static.
3988 * c-lang.h (c_yyerror): Don't declare.
3989 * c-lang.c (c_language_defn, cplus_language_defn)
3990 (asm_language_defn, minimal_language_defn): Update.
3991 * c-exp.y (yyerror): Now static.
3992 * ada-lang.h (ada_yyerror): Don't declare.
3993 * ada-lang.c (ada_language_defn): Update.
3994 * ada-exp.y (yyerror): Now static.
3995
3996 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3997
3998 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3999 (store_sveregs_to_thread): Likewise.
4000 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4001 (aarch64_linux_store_inferior_registers): Likewise.
4002 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4003 function.
4004 (aarch64_sve_regs_copy_to_regcache): Likewise.
4005 (aarch64_sve_regs_copy_from_regcache): Likewise.
4006 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4007 declaration.
4008 (aarch64_sve_regs_copy_to_regcache): Likewise.
4009 (aarch64_sve_regs_copy_from_regcache): Likewise.
4010 (sve_context): Structure from Linux headers.
4011 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4012 (SVE_SIG_ZREG_SIZE): Likewise.
4013 (SVE_SIG_PREG_SIZE): Likewise.
4014 (SVE_SIG_FFR_SIZE): Likewise.
4015 (SVE_SIG_REGS_OFFSET): Likewise.
4016 (SVE_SIG_ZREGS_OFFSET): Likewise.
4017 (SVE_SIG_ZREG_OFFSET): Likewise.
4018 (SVE_SIG_ZREGS_SIZE): Likewise.
4019 (SVE_SIG_PREGS_OFFSET): Likewise.
4020 (SVE_SIG_PREG_OFFSET): Likewise.
4021 (SVE_SIG_PREGS_SIZE): Likewise.
4022 (SVE_SIG_FFR_OFFSET): Likewise.
4023 (SVE_SIG_REGS_SIZE): Likewise.
4024 (SVE_SIG_CONTEXT_SIZE): Likewise.
4025 (SVE_PT_REGS_MASK): Likewise.
4026 (SVE_PT_REGS_FPSIMD): Likewise.
4027 (SVE_PT_REGS_SVE): Likewise.
4028 (SVE_PT_VL_INHERIT): Likewise.
4029 (SVE_PT_VL_ONEXEC): Likewise.
4030 (SVE_PT_REGS_OFFSET): Likewise.
4031 (SVE_PT_FPSIMD_OFFSET): Likewise.
4032 (SVE_PT_FPSIMD_SIZE): Likewise.
4033 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4034 (SVE_PT_SVE_PREG_SIZE): Likewise.
4035 (SVE_PT_SVE_FFR_SIZE): Likewise.
4036 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4037 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4038 (__SVE_SIG_TO_PT): Likewise.
4039 (SVE_PT_SVE_OFFSET): Likewise.
4040 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4041 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4042 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4043 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4044 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4045 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4046 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4047 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4048 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4049 (SVE_PT_SVE_SIZE): Likewise.
4050 (SVE_PT_SIZE): Likewise.
4051 (HAS_SVE_STATE): New define.
4052
4053 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4054
4055 * nat/aarch64-sve-linux-sigcontext.h: New file.
4056 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4057 new files.
4058 (SVE_VQ_MIN): Likewise.
4059 (SVE_VQ_MAX): Likewise.
4060 (SVE_VL_MIN): Likewise.
4061 (SVE_VL_MAX): Likewise.
4062 (SVE_NUM_ZREGS): Likewise.
4063 (SVE_NUM_PREGS): Likewise.
4064 (sve_vl_valid): Likewise.
4065 (struct user_sve_header): Likewise.
4066
4067 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4068 Richard Bunt <Richard.Bunt@arm.com>
4069
4070 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4071 was requested by GDB.
4072
4073 2018-06-15 Tom de Vries <tdevries@suse.de>
4074
4075 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4076
4077 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4078
4079 * gnulib/update-gnulib.sh: Print expected versions of
4080 autoconf/aclocal.
4081
4082 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4083
4084 * arch-utils.c (default_type_align): Use type_length_units.
4085 * gdbtypes.c (type_align): Use type_length_units.
4086
4087 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4088
4089 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4090 of 'define' command.
4091
4092 2018-06-14 Tom de Vries <tdevries@suse.de>
4093
4094 PR cli/22573
4095 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4096 get_no_prettyformat_print_options.
4097
4098 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4099
4100 * sparc-nat.h: Include target.h.
4101 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4102 <fetch_registers>: Remove this argument in function call.
4103 <store_registers>: Remove this argument in function call, remove
4104 extra semicolon.
4105 <low_forget_process>: Call sparc64_forget_process instead of
4106 sparc_forget_process.
4107
4108 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4109
4110 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4111 (procfs_target::make_corefile_notes): Adjust to new
4112 target_read_alloc return type.
4113
4114 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4115 Stephen Roberts <stephen.roberts@arm.com>
4116
4117 PR gdb/22882
4118 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4119 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4120 Move should_notify_stop local into more inner scope.
4121
4122 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4123 Stephen Roberts <stephen.roberts@arm.com>
4124
4125 PR gdb/22882
4126 * infrun.c (resume_1): Add call to mark_async_event_handler.
4127
4128 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4129
4130 * infrun.c (do_target_wait): Change old version of $pc printed.
4131
4132 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4133
4134 * dwarf2read.c (read_index_from_section): Rename to...
4135 (read_gdb_index_from_section): ... this, update all callers.
4136 (dwarf2_read_index): Rename to...
4137 (dwarf2_read_gdb_index): ... this, update all callers.
4138
4139 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4140
4141 * gdb/hppa-linux-nat.c
4142 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4143 hppa_linux_nat_target::fetch_registers.
4144
4145 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4146
4147 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4148 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4149 (AARCH64_DWARF_SVE_FFR): Likewise.
4150 (AARCH64_DWARF_SVE_P0): Likewise.
4151 (AARCH64_DWARF_SVE_Z0): Likewise.
4152
4153 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4154
4155 * common/common-regcache.h (raw_compare): New function.
4156 * regcache.c (regcache::raw_compare): Likewise.
4157 * regcache.h (regcache::raw_compare): New declaration.
4158
4159 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4160
4161 * common/common-regcache.h (reg_buffer_common): New structure.
4162 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4163 (reg_buffer::raw_supply): Likewise.
4164 (reg_buffer::raw_supply_integer): Likewise.
4165 (reg_buffer::raw_supply_zeroed): Likewise.
4166 (reg_buffer::raw_collect): Likewise.
4167 (reg_buffer::raw_collect_integer): Likewise.
4168 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4169 (reg_buffer::raw_supply): Likewise.
4170 (reg_buffer::raw_supply_integer): Likewise.
4171 (reg_buffer::raw_supply_zeroed): Likewise.
4172 (reg_buffer::raw_collect): Likewise.
4173 (reg_buffer::raw_collect_integer): Likewise.
4174
4175 2018-06-10 Tom Tromey <tom@tromey.com>
4176
4177 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4178 (class remote_state) <stop_reply_queue>: Now std::vector.
4179 (remote_state::~remote_state)
4180 (remote_target::stop_reply_queue_length): Update.
4181 (struct queue_iter_param, remove_child_of_pending_fork)
4182 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4183 (check_pending_event_prevents_wildcard_vcont_callback)
4184 (remove_stop_reply_for_inferior)
4185 (remove_stop_reply_of_remote_state)
4186 (remote_notif_remove_once_on_match)
4187 (stop_reply_match_ptid_and_ws)
4188 (remote_kill_child_of_pending_fork): Remove.
4189 (remote_target::remove_new_fork_children)
4190 (remote_target::check_pending_events_prevent_wildcard_vcont)
4191 (remote_target::discard_pending_stop_replies)
4192 (remote_target::discard_pending_stop_replies_in_queue)
4193 (remote_target::remote_notif_remove_queued_reply)
4194 (remote_target::queued_stop_reply)
4195 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4196 (remote_target::wait, remote_target::kill_new_fork_children)
4197 (remote_target::async): Update.
4198
4199 2018-06-10 Tom Tromey <tom@tromey.com>
4200
4201 * record-full.c (record_full_arch_list_cleanups): Remove.
4202 (record_full_message): Use try/catch.
4203 (record_full_wait_cleanups): Remove.
4204 (record_full_wait_1): Use try/catch.
4205 (record_full_restore): Likewise.
4206
4207 2018-06-10 Tom Tromey <tom@tromey.com>
4208
4209 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4210 declare VEC. Add constructor.
4211 <in_target_beneath>: Now bool.
4212 (record_full_breakpoints): Now a std::vector, static.
4213 (record_full_sync_record_breakpoints)
4214 (record_full_init_record_breakpoints)
4215 (record_full_target::insert_breakpoint)
4216 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4217
4218 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4219
4220 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4221 * serial.c (serial_interface_lookup): Remove struct keyword.
4222
4223 2018-06-10 Tom Tromey <tom@tromey.com>
4224
4225 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4226 method.
4227 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4228 a method.
4229 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4230 method.
4231 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4232 "beneath" as a method.
4233 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4234 Use "beneath" as a method.
4235
4236 2018-06-10 Tom Tromey <tom@tromey.com>
4237
4238 * tracefile.c (struct trace_file_writer_deleter): New.
4239 <operator()>: Rename from trace_file_writer_xfree.
4240 (trace_file_writer_up): New typedef.
4241 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4242
4243 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4244
4245 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4246 <m_registers, m_register_status>: Change type to
4247 std::unique_ptr.
4248 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4249 XCNEWVEC.
4250
4251 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4252
4253 * common/common-regcache.h (enum register_status): Add
4254 underlying type "signed char".
4255 * regcache.h (reg_buffer) <m_register_status>: Change type to
4256 register_status *.
4257 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4258 register_status instead of signed char.
4259 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4260 (reg_buffer::get_register_status): Remove cast.
4261 (readable_regcache::raw_read): Remove cast.
4262 (readable_regcache::cooked_read): Remove cast.
4263
4264 2018-06-09 Tom Tromey <tom@tromey.com>
4265
4266 * source.c (reverse_search_command, forward_search_command): Use
4267 scoped_fd.
4268
4269 2018-06-09 Tom Tromey <tom@tromey.com>
4270
4271 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4272 (serial_ops_list): Now static, std::vector.
4273 (serial_interface_lookup, serial_add_interface): Update.
4274
4275 2018-06-09 Tom Tromey <tom@tromey.com>
4276
4277 * dwarf2read.c (process_cu_includes): Update.
4278 (process_full_comp_unit): Update.
4279 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4280 std::vector.
4281
4282 2018-06-08 Paul Koning <paul_koning@dell.com>
4283
4284 PR gdb/23252
4285
4286 * python/python.c (do_start_initialization):
4287 Avoid call to internal Python API.
4288 (init__gdb_module): New function.
4289
4290 2018-06-08 Gary Benson <gbenson@redhat.com>
4291
4292 * linux-thread-db.c (valprint.h): New include.
4293 (struct check_thread_db_info): New structure.
4294 (check_thread_db_on_load, tdb_testinfo): New static globals.
4295 (check_thread_db, check_thread_db_callback): New functions.
4296 (try_thread_db_load_1): Run integrity checks if requested.
4297 (maintenance_check_libthread_db): New function.
4298 (_initialize_thread_db): Register "maint check libthread-db"
4299 and "maint set/show check-libthread-db".
4300 * NEWS: Mention the above new commands.
4301
4302 2018-06-08 Tom Tromey <tom@tromey.com>
4303
4304 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4305 now a method.
4306
4307 2018-06-08 Tom Tromey <tom@tromey.com>
4308
4309 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4310
4311 2018-06-08 Tom Tromey <tom@tromey.com>
4312
4313 * common/btrace-common.h (struct btrace_data): Add constructor,
4314 destructor, move assignment operator.
4315 <empty, clear, fini>: New methods.
4316 <format>: Initialize.
4317 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4318 (btrace_data_empty): Don't declare.
4319 * common/btrace-common.c (btrace_data_init): Remove.
4320 (btrace_data::fini): Rename from btrace_data_fini.
4321 (btrace_data::empty): Rename from btrace_data_empty.
4322 (btrace_data::clear): Rename from btrace_data_clear. Return
4323 bool.
4324 * btrace.h (make_cleanup_btrace_data): Don't declare.
4325 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4326 (parse_xml_btrace): Update.
4327 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4328 (maint_btrace_clear_packet_history_cmd): Update.
4329
4330 2018-06-07 Pedro Alves <palves@redhat.com>
4331
4332 * target.h (target_ops) <beneath>: Now a method. All references
4333 updated.
4334 (class target_stack): New.
4335 * target.c (g_target_stack): New.
4336 (g_current_top_target): Delete.
4337 (current_top_target): Get the top target out of g_target_stack.
4338 (target_stack::push, target_stack::unpush): New.
4339 (push_target, unpush_target): Reimplement.
4340 (target_is_pushed): Reimplement in terms of g_target_stack.
4341 (target_ops::beneath, target_stack::find_beneath): New.
4342
4343 2018-06-07 Pedro Alves <palves@redhat.com>
4344
4345 * target.h (find_target_beneath): Delete declaration.
4346 * target.c (find_target_beneath): Delete definition.
4347 * aix-thread.c: All callers of find_target_beneath adjusted to
4348 call target_ops::beneath instead.
4349 * bsd-uthread.c: Likewise.
4350 * linux-thread-db.c: Likewise.
4351 * ravenscar-thread.c: Likewise.
4352 * sol-thread.c: Likewise.
4353 * spu-multiarch.c: Likewise.
4354
4355 2018-06-07 Pedro Alves <palves@redhat.com>
4356
4357 * target.h (target_ops) <beneath>: Now a method. All references
4358 updated.
4359 (target_ops) <m_beneath>: New.
4360 * target.c (target_ops::beneath): New.
4361 * corelow.c: Adjust all references to target_ops::beneath.
4362 * linux-thread-db.c: Likewise.
4363 * make-target-delegates: Likewise.
4364 * record-btrace.c: Likewise.
4365 * record-full.c: Likewise.
4366 * remote.c: Likewise.
4367 * target.c: Likewise.
4368 * target-delegates.c: Regenerate.
4369
4370 2018-06-07 Pedro Alves <palves@redhat.com>
4371
4372 * target.h (target_stack): Delete.
4373 (current_top_target): Declare function.
4374 * target.c (target_stack): Delete.
4375 (g_current_top_target): New.
4376 (current_top_target): New function.
4377 * auxv.c: Use current_top_target instead of target_stack
4378 throughout.
4379 * avr-tdep.c: Likewise.
4380 * breakpoint.c: Likewise.
4381 * corefile.c: Likewise.
4382 * elfread.c: Likewise.
4383 * eval.c: Likewise.
4384 * exceptions.c: Likewise.
4385 * frame.c: Likewise.
4386 * gdbarch-selftests.c: Likewise.
4387 * gnu-v3-abi.c: Likewise.
4388 * ia64-tdep.c: Likewise.
4389 * ia64-vms-tdep.c: Likewise.
4390 * infcall.c: Likewise.
4391 * infcmd.c: Likewise.
4392 * infrun.c: Likewise.
4393 * linespec.c: Likewise.
4394 * linux-tdep.c: Likewise.
4395 * minsyms.c: Likewise.
4396 * ppc-linux-nat.c: Likewise.
4397 * ppc-linux-tdep.c: Likewise.
4398 * procfs.c: Likewise.
4399 * regcache.c: Likewise.
4400 * remote.c: Likewise.
4401 * rs6000-tdep.c: Likewise.
4402 * s390-linux-nat.c: Likewise.
4403 * s390-tdep.c: Likewise.
4404 * solib-aix.c: Likewise.
4405 * solib-darwin.c: Likewise.
4406 * solib-dsbt.c: Likewise.
4407 * solib-spu.c: Likewise.
4408 * solib-svr4.c: Likewise.
4409 * solib-target.c: Likewise.
4410 * sparc-tdep.c: Likewise.
4411 * sparc64-tdep.c: Likewise.
4412 * spu-tdep.c: Likewise.
4413 * symfile.c: Likewise.
4414 * symtab.c: Likewise.
4415 * target-descriptions.c: Likewise.
4416 * target-memory.c: Likewise.
4417 * target.c: Likewise.
4418 * target.h: Likewise.
4419 * tracefile-tfile.c: Likewise.
4420 * tracepoint.c: Likewise.
4421 * valops.c: Likewise.
4422 * valprint.c: Likewise.
4423 * value.c: Likewise.
4424 * windows-tdep.c: Likewise.
4425 * mi/mi-main.c: Likewise.
4426
4427 2018-06-07 Tom Tromey <tom@tromey.com>
4428
4429 * valprint.h (build_address_symbolic): Declare.
4430 * printcmd.c (print_address_symbolic): Update.
4431 (build_address_symbolic): Change "name" and "filename" to
4432 std::string.
4433 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4434 Update.
4435 * defs.h (build_address_symbolic): Remove declaration.
4436
4437 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4438
4439 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4440 (aarch64_vnv_type): Add function.
4441 (aarch64_pseudo_register_name): Add V regs for SVE.
4442 (aarch64_pseudo_register_type): Likewise.
4443 (aarch64_pseudo_register_reggroup_p): Likewise.
4444 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4445 (aarch64_pseudo_read_value): Add V regs for SVE.
4446 (aarch64_pseudo_write_2): Use V0 offset for SVE
4447 (aarch64_pseudo_write): Add V regs for SVE.
4448 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4449
4450 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4451
4452 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4453 (sve_vl_from_vq): Likewise.
4454
4455 2018-06-05 Tom Tromey <tom@tromey.com>
4456
4457 * cli/cli-cmds.c (show_version): Update.
4458 * top.c (print_gdb_version): Add "interactive" parameter.
4459 Update.
4460 * main.c (captured_main_1): Update.
4461 * top.h (print_gdb_version): Add "interactive" parameter and a
4462 comment.
4463
4464 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4465
4466 * common/enum-flags.h: Add trailing semicolon to example in
4467 comment.
4468
4469 2018-06-05 Tom Tromey <tom@tromey.com>
4470
4471 PR cli/12326:
4472 * NEWS: Add entry about pager.
4473 * utils.c (pagination_disabled_for_command): New global.
4474 (prompt_for_continue): Allow "c" response to prompt.
4475 (reinitialize_more_filter): Clear
4476 pagination_disabled_for_command.
4477 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4478
4479 2018-06-04 Tom Tromey <tom@tromey.com>
4480
4481 * ada-lang.h (ada_lookup_symbol_list): Update.
4482 * ada-lang.c (resolve_subexp): Update.
4483 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4484 parameter.
4485 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4486 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4487 results parameter to std::vector.
4488 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4489 Update.
4490 * ada-exp.y (block_lookup): Update.
4491 (select_possible_type_sym): Change type of syms. Remove nsyms
4492 parameter.
4493 (write_var_or_type, write_name_assoc): Update.
4494
4495 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4496
4497 * windows-nat.c (windows_nat_target::xfer_partial): Return
4498 TARGET_XFER_E_IO if we need to delegate to the target beneath
4499 but BENEATH is NULL.
4500
4501 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4502
4503 * Makefile.in (config.status): Add configure.nat as a
4504 dependency.
4505
4506 2018-06-04 Tom Tromey <tom@tromey.com>
4507
4508 * cp-name-parser.y (cpname_state): Add method declarations.
4509 (HANDLE_QUAL): Update.
4510 (cpname_state::d_grab, cpname_state::fill_comp)
4511 (cpname_state::make_operator, cpname_state::make_dtor)
4512 (cpname_state::make_builtin_type, cpname_state::make_name)
4513 (cpname_state::d_qualify, cpname_state::d_int_type)
4514 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4515 (%union): Move earlier.
4516
4517 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4518
4519 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4520
4521 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4522
4523 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4524 (aarch64_pseudo_write_1): Likewise.
4525 (aarch64_pseudo_read_value): Use helper.
4526 (aarch64_pseudo_write): Likewise.
4527
4528 2018-06-04 Pedro Alves <palves@redhat.com>
4529
4530 * darwin-nat.c (darwin_ops): Delete.
4531 (darwin_attach_pid): Use get_native_target.
4532
4533 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4534
4535 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4536 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4537
4538 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4539
4540 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4541 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4542 (aarch64_gdbarch_init): Check for SVE.
4543 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4544
4545 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4546
4547 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4548 * aarch64-tdep.h (aarch64_read_description): Likewise.
4549 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4550 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4551 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4552 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4553 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4554
4555 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4556
4557 * value.c (value_fetch_lazy_bitfield): New.
4558 (value_fetch_lazy_memory): New.
4559 (value_fetch_lazy_register): New.
4560 (value_fetch_lazy): Factor out to smaller functions.
4561
4562 2018-06-01 Tom Tromey <tom@tromey.com>
4563
4564 * cp-name-parser.y (backslashable, represented): Now const.
4565
4566 2018-06-01 Tom Tromey <tom@tromey.com>
4567
4568 * cp-name-parser.y: Include parser-defs.h.
4569 (parser_fprintf): Remove declaration.
4570
4571 2018-06-01 Tom Tromey <tom@tromey.com>
4572
4573 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4574 %parse-param.
4575 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4576 (global_result): Remove globals.
4577 (struct cpname_state): New.
4578 (yyparse): Don't declare.
4579 (yylex, yyerror): Move declarations after %union.
4580 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4581 (make_name): Add state parameter.
4582 Update all callers.
4583 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4584 parameter.
4585 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4586 Update.
4587 (yylex): Add lvalp, state parameters.
4588 (yyerror): Add state parameter.
4589 (cp_demangled_name_to_comp): Update.
4590
4591 2018-06-01 Tom Tromey <tom@tromey.com>
4592
4593 * cp-name-parser.y (parser_fprintf): Declare.
4594 (GDB_YY_REMAP_PREFIX): Define.
4595 Include yy-remap.h. Don't redefine yy* identifiers.
4596
4597 2018-06-01 Tom Tromey <tom@tromey.com>
4598
4599 * python/py-type.c (typy_legacy_template_argument): Update.
4600 * cp-support.h (cp_demangled_name_to_comp): Update.
4601 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4602 parameter to be a "std::string *".
4603 (main): Update.
4604
4605 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4606
4607 * ada-lex.l: Include "diagnostics.h" instead of
4608 "common/diagnostics.h".
4609 * unittests/environ-selftests.c: Likewise.
4610 * common/diagnostics.h: Moved to ../include.
4611
4612 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4613
4614 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4615 to language_mode_manual while calling breakpoint_re_set_one.
4616
4617 2018-06-01 Tom Tromey <tom@tromey.com>
4618
4619 * valops.c (value_cast_structs, destructor_name_p): Update.
4620 * symtab.c (gdb_mangle_name): Update.
4621 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4622 Update.
4623 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4624 (pascal_object_print_value_fields, pascal_object_print_value):
4625 Update.
4626 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4627 * linespec.c (find_methods): Update.
4628 * gdbtypes.h (type_name_no_tag): Remove.
4629 (type_name_or_error): Rename from type_name_no_tag_or_error.
4630 * gdbtypes.c (type_name_no_tag): Remove.
4631 (type_name_or_error): Rename from type_name_no_tag_or_error.
4632 (lookup_struct_elt_type, check_typedef): Update.
4633 * expprint.c (print_subexp_standard): Update.
4634 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4635 * d-namespace.c (d_lookup_nested_symbol): Update.
4636 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4637 (cp_print_class_member): Update.
4638 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4639 * completer.c (add_struct_fields): Update.
4640 * c-typeprint.c (cp_type_print_derivation_info)
4641 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4642 Update.
4643 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4644 (ada_prefer_type, ada_is_exception_sym): Update.
4645
4646 2018-06-01 Tom Tromey <tom@tromey.com>
4647
4648 * valops.c (enum_constant_from_type, value_namespace_elt)
4649 (value_maybe_namespace_elt): Update.
4650 * valarith.c (find_size_for_pointer_math): Update.
4651 * target-descriptions.c (make_gdb_type): Update.
4652 * symmisc.c (print_symbol): Update.
4653 * stabsread.c (define_symbol, read_type)
4654 (complain_about_struct_wipeout, add_undefined_type)
4655 (cleanup_undefined_types_1): Update.
4656 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4657 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4658 (rust_internal_print_type, rust_composite_type)
4659 (rust_evaluate_funcall, rust_evaluate_subexp)
4660 (rust_inclusive_range_type_p): Update.
4661 * python/py-type.c (typy_get_tag): Update.
4662 * p-typeprint.c (pascal_type_print_base): Update.
4663 * mdebugread.c (parse_symbol, parse_type): Update.
4664 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4665 Update.
4666 * guile/scm-type.c (gdbscm_type_tag): Update.
4667 * go-lang.c (sixg_string_p): Update.
4668 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4669 Update.
4670 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4671 (TYPE_TAG_NAME): Remove.
4672 * gdbtypes.c (type_name_no_tag): Simplify.
4673 (check_typedef, check_types_equal, recursive_dump_type)
4674 (copy_type_recursive, arch_composite_type): Update.
4675 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4676 in summary mode when needed.
4677 * eval.c (evaluate_funcall): Update.
4678 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4679 (process_structure_scope, read_enumeration_type)
4680 (read_namespace_type, read_module_type, determine_prefix): Update.
4681 * cp-support.c (inspect_type): Update.
4682 * coffread.c (process_coff_symbol, decode_base_type): Update.
4683 * c-varobj.c (c_is_path_expr_parent): Update.
4684 * c-typeprint.c (c_type_print_base_struct_union): Update.
4685 (c_type_print_base_1): Update. Print struct/class/union/enum in
4686 summary when using C language.
4687 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4688 (gen_maybe_namespace_elt): Update.
4689 * ada-lang.c (ada_type_name): Simplify.
4690 (empty_record, ada_template_to_fixed_record_type_1)
4691 (template_to_static_fixed_type)
4692 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4693
4694 2018-06-01 Tom Tromey <tom@tromey.com>
4695
4696 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4697 c_print_type.
4698 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4699 (c_print_type): Update.
4700 (c_print_type): New overload.
4701 (c_type_print_varspec_prefix, c_type_print_args)
4702 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4703 (c_type_print_base_struct_union, c_type_print_base_1)
4704 (cp_type_print_method_args): Add "language" parameter.
4705 (c_type_print_base): Update.
4706 * c-lang.h (c_print_type): Add new overload.
4707
4708 2018-06-01 Tom Tromey <tom@tromey.com>
4709
4710 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4711 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4712
4713 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4714
4715 * aarch64-tdep.c (aarch64_sve_register_names): New const
4716 var.
4717 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4718 (AARCH64_SVE_Z_REGS_NUM): New define.
4719 (AARCH64_SVE_P_REGS_NUM): Likewise.
4720 (AARCH64_SVE_NUM_REGS): Likewise.
4721
4722 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4723
4724 * nat/linux-ptrace.h [__alpha__]
4725 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4726 definitions.
4727
4728 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4729
4730 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4731 the endianness selected.
4732 * NEWS: Document `set endian auto' mode operation update.
4733
4734 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4735
4736 * Makefile.in: Add new header.
4737 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4738 (sve_vl_from_vg): Likewise.
4739 (sve_vq_from_vl): Likewise.
4740 (sve_vl_from_vq): Likewise.
4741 (sve_vq_from_vg): Likewise.
4742 (sve_vg_from_vq): Likewise.
4743 * configure.nat: Add new c file.
4744 * nat/aarch64-sve-linux-ptrace.c: New file.
4745 * nat/aarch64-sve-linux-ptrace.h: New file.
4746
4747 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4748
4749 * aarch64-linux-nat.c (aarch64_linux_read_description):
4750 Add parmeter zero.
4751 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4752 Likewise.
4753 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4754 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4755 (aarch64_gdbarch_init): Add parmeter zero.
4756 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4757 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4758 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4759 parmeter.
4760 * doc/gdb.texinfo: Describe SVE feature
4761 * features/aarch64-sve.c: New file.
4762
4763 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4764
4765 PR gdb/23210
4766 * gdbarch.sh (significant_addr_bit): Default to zero when
4767 not set by target architecture.
4768 * gdbarch.c: Re-generated.
4769 * utils.c (address_significant): Update.
4770
4771 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4772
4773 * stack.c (func_command): Remove trailing newline in call to error.
4774
4775 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4776
4777 * regcache.h (regcache_raw_collect): Remove, update callers to
4778 use regcache::raw_collect.
4779 * regcache.c (regcache_raw_collect): Remove.
4780
4781 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4782
4783 * regcache.h (regcache_raw_supply): Remove, update callers to
4784 use detached_regcache::raw_supply.
4785 * regcache.c (regcache_raw_supply): Remove.
4786
4787 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4788
4789 * regcache.h (regcache_cooked_write_part): Remove, update
4790 callers to use regcache::cooked_write_part.
4791 * regcache.c (regcache_cooked_write_part): Remove.
4792
4793 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4794
4795 * regcache.h (regcache_cooked_read_part): Remove, update callers
4796 to use readable_regcache::cooked_read_part.
4797 * regcache.c (regcache_cooked_read_part): Remove.
4798
4799 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4800
4801 * regcache.h (regcache_cooked_read_value): Remove, update
4802 callers to use readable_regcache::cooked_read_value.
4803 * regcache.c (regcache_cooked_read_value): Remove.
4804
4805 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4806
4807 * regcache.h (regcache_cooked_write): Remove, update callers to
4808 use regcache::cooked_write.
4809 * regcache.c (regcache_cooked_write): Remove.
4810
4811 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4812
4813 * regcache.h (regcache_invalidate): Remove, update callers to
4814 use detached_regcache::invalidate instead.
4815 * regcache.c (regcache_invalidate): Remove.
4816
4817 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4818
4819 * regcache.h (regcache_raw_write_part): Remove, update callers
4820 to use regcache::raw_write_part instead.
4821 * regcache.c (regcache_raw_write_part): Remove.
4822
4823 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4824
4825 * regcache.h (regcache_raw_read_part): Remove, update callers to
4826 use readable_regcache::raw_read_part instead.
4827 * regcache.c (regcache_raw_read_part): Remove.
4828
4829 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4830
4831 * regcache.h (regcache_cooked_read): Remove, update callers to
4832 use readable_regcache::cooked_read instead.
4833 * regcache.c (regcache_cooked_read): Remove.
4834
4835 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4836
4837 * regcache.h (regcache_raw_write): Remove, update callers to use
4838 regcache::raw_write instead.
4839 * regcache.c (regcache_raw_write): Remove.
4840
4841 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4842
4843 * regcache.h (regcache_raw_read): Remove, update callers to use
4844 readable_regcache::raw_read instead.
4845 * regcache.c (regcache_raw_read): Remove.
4846
4847 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4848
4849 * regcache.h (regcache_raw_update): Remove, update callers to
4850 use readable_regcache::raw_update instead.
4851 * regcache.c (regcache_raw_update): Remove.
4852
4853 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4854
4855 * regcache.h (regcache_register_status): Remove, update callers
4856 to use reg_buffer::get_register_status directly instead.
4857 * regcache.c (regcache_register_status): Remove.
4858
4859 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4860
4861 * regcache.h (regcache_get_ptid): Remove, update all callers to
4862 call regcache::ptid instead.
4863 * regcache.c (regcache_get_ptid): Remove.
4864
4865 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4866
4867 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4868
4869 2018-05-30 Pedro Alves <palves@redhat.com>
4870
4871 * common/common-exceptions.h (exception_rethrow): Use
4872 ATTRIBUTE_NORETURN.
4873
4874 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4875
4876 * breakpoint.c (print_solib_event, check_status_catch_solib):
4877 Remove struct keyword in range-based for loops.
4878 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4879 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4880 Likewise.
4881 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4882 Likewise.
4883 * symfile.c (addr_info_make_relative): Likewise.
4884 * thread.c (value_in_thread_stack_temporaries): Likewise.
4885
4886 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4887
4888 PR gdb/16841
4889 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4890 aggregate type to get its real type before accessing it.
4891
4892 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4893
4894 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4895 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4896 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4897 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4898 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4899 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4900 * printcmd.c (info_address_command): Likewise.
4901
4902 2018-05-29 Tom Tromey <tom@tromey.com>
4903
4904 * windows-nat.c (handle_exception): Update fall-through comment.
4905
4906 2018-05-29 Tom Tromey <tom@tromey.com>
4907
4908 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4909 (struct program_space) <added_solibs>: Now a std::vector.
4910 * breakpoint.c (print_solib_event): Update.
4911 (check_status_catch_solib): Update.
4912 * progspace.c (clear_program_space_solib_cache): Update.
4913 * solib.c (update_solib_list): Update.
4914
4915 2018-05-29 Tom Tromey <tom@tromey.com>
4916
4917 * python/py-type.c (typy_richcompare): Update.
4918 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4919 * gdbtypes.h (types_deeply_equal): Return bool.
4920 (types_equal): Likewise.
4921 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4922 declare VEC.
4923 (check_types_equal): Change worklist to std::vector. Return
4924 bool.
4925 (struct type_equality_entry): Add constructor.
4926 (compare_maybe_null_strings): Return bool.
4927 (check_types_worklist): Return bool. Change worklist to
4928 std::vector.
4929 (types_deeply_equal): Use std::vector.
4930 (types_equal): Return bool.
4931 (compare_maybe_null_strings): Simplify.
4932
4933 2018-05-29 Tom Tromey <tom@tromey.com>
4934
4935 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4936
4937 2018-05-29 Tom Tromey <tom@tromey.com>
4938
4939 * objc-lang.h: Don't include cp-support.h.
4940 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4941 declare VEC.
4942
4943 2018-05-27 Tom Tromey <tom@tromey.com>
4944
4945 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4946
4947 2018-05-25 Tom Tromey <tom@tromey.com>
4948
4949 * value.c (value::location): Initialize.
4950
4951 2018-05-25 Tom Tromey <tom@tromey.com>
4952
4953 * dbxread.c (init_bincl_list): Remove.
4954 (bincl_list): Now a std::vector.
4955 (bincls_allocated, next_bincl): Remove.
4956 (free_bincl_list, do_free_bincl_list_cleanup)
4957 (make_cleanup_free_bincl_list): Remove.
4958 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4959 unique_xmalloc_ptr.
4960 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4961 (struct header_file_location): Add constructor.
4962 (add_bincl_to_list): Remove.
4963
4964 2018-05-25 Tom Tromey <tom@tromey.com>
4965
4966 * tui/tui.c (tui_enable): Update.
4967 * mi/mi-interp.c (mi_interp::init): Update.
4968 * interps.h (class interp) <name>: New method.
4969 <m_name>: Rename from name.
4970 (~scoped_restore_interp): Update.
4971 * interps.c (interp::interp): Update.
4972 (interp_add, interp_set, interp_lookup_existing)
4973 (current_interp_named_p): Update.
4974
4975 2018-05-25 Tom Tromey <tom@tromey.com>
4976
4977 * interps.c (interp_name): Remove.
4978 * mi/mi-interp.c (mi_interp::init): Update.
4979 * interps.h (interp_name): Remove.
4980 (~scoped_restore_interp): Update.
4981 * tui/tui.c (tui_enable): Update.
4982
4983 2018-05-25 Tom Tromey <tom@tromey.com>
4984
4985 * utils.c (fputs_maybe_filtered): Update.
4986 * linespec.c (decode_line_full): Update.
4987 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4988 (mi_print_breakpoint_for_event, mi_solib_loaded)
4989 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4990 (mi_user_selected_context_changed): Update.
4991 * mi/mi-main.c (mi_execute_command): Update.
4992 * cli/cli-script.c (execute_control_command): Update.
4993 * python/python.c (execute_gdb_command): Update.
4994 * solib.c (info_sharedlibrary_command): Update.
4995 * interps.c (interp_ui_out): Remove.
4996 * interps.h (interp_ui_out): Remove.
4997
4998 2018-05-25 Tom Tromey <tom@tromey.com>
4999
5000 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5001 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5002 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5003
5004 2018-05-25 Tom Tromey <tom@tromey.com>
5005
5006 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5007 * interps.c (interp_exec): Use scoped_restore.
5008
5009 2018-05-25 Tom Tromey <tom@tromey.com>
5010
5011 * remote.c (remote_target::remote_file_get): Use
5012 gdb::byte_vector.
5013 (remote_target::remote_file_put): Likewise.
5014
5015 2018-05-25 Tom Tromey <tom@tromey.com>
5016
5017 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5018 a std::string.
5019 (get_pe_section_index, add_pe_exported_sym): Update.
5020 (read_pe_exported_syms): Use gdb::def_vector.
5021
5022 2018-05-25 Tom Tromey <tom@tromey.com>
5023
5024 * frame.c (remove_prev_frame): Remove.
5025 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5026
5027 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5028
5029 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5030 Remove prototypes.
5031 * mips-linux-nat.c (supply_fpregset): Always call
5032 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5033 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5034 `mips_fill_fpregset'.
5035 * mips-linux-tdep.c (mips_supply_fpregset)
5036 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5037 (mips_fill_fpregset_wrapper): Remove functions.
5038 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5039 (mips_linux_fpregset): Remove variable.
5040 (mips_linux_iterate_over_regset_sections): Use
5041 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5042 (mips_linux_o32_sigframe_init): Remove comment.
5043
5044 2018-05-25 Pedro Alves <palves@redhat.com>
5045
5046 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5047 (struct readahead_cache, struct packet_reg, struct
5048 remote_arch_state, class remote_state): Move higher up in the
5049 file.
5050 (remote_target::m_remote_state): Now an object instead of a pointer.
5051 (remote_target::get_remote_state): Adjust.
5052
5053 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5054
5055 * stack.c (select_and_print_frame): Delete.
5056 (struct function_bounds): Move struct within function.
5057 (func_command): Most content moved into new function
5058 find_frame_for_function, use new function, print result, add
5059 function comment.
5060 (find_frame_for_function): New function, now returns a result.
5061
5062 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5063
5064 * stack.c (iterate_over_block_arg_vars): Fix comment.
5065 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5066
5067 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5068
5069 PR gdb/23203
5070 * frame.c
5071 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5072 Define.
5073 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5074 Define.
5075 * frame.h (class scoped_restore_selected_frame): New class.
5076 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5077 of any exception, use scoped_restore_selected_frame to restore the
5078 frame instead.
5079
5080 2018-05-24 Pedro Alves <palves@redhat.com>
5081
5082 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5083 override.
5084
5085 2018-05-23 Tom Tromey <tom@tromey.com>
5086
5087 * complaints.c (struct complaints): Remove.
5088 (symfile_complaint_book): Remove.
5089 (series): New global.
5090 (complaint_internal): Update.
5091 (clear_complaints): Update.
5092
5093 2018-05-23 Tom Tromey <tom@tromey.com>
5094
5095 * complaints.c (counters): New global.
5096 (struct complain): Remove.
5097 (struct complaints) <root>: Remove.
5098 (complaint_sentinel): Remove.
5099 (symfile_complaint_book): Update.
5100 (find_complaint) Remove.
5101 (complaint_internal, clear_complaints): Update.
5102
5103 2018-05-23 Tom Tromey <tom@tromey.com>
5104
5105 * complaints.c (struct complain) <file, line>: Remove.
5106 (find_complaint): Remove file, line parameters.
5107 (complaint_internal): Update.
5108
5109 2018-05-23 Tom Tromey <tom@tromey.com>
5110
5111 * complaints.c (vcomplaint): Remove.
5112 (complaint_internal) Merge in contents of vcomplaint.
5113
5114 2018-05-23 Tom Tromey <tom@tromey.com>
5115
5116 * complaints.c (struct complaints) <explanation>: Remove.
5117 (symfile_explanations): Remove.
5118 (symfile_complaint_book): Update.
5119 (vcomplaint): Update.
5120 (struct explanation): Remove.
5121
5122 2018-05-23 Tom Tromey <tom@tromey.com>
5123
5124 * complaints.c (symfile_complaints): Remove.
5125 (complaint_internal): Remove "complaints" parameter.
5126 (clear_complaints, vcomplaint): Remove "c" parameter.
5127 (get_complaints): Remove.
5128 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5129 (dwarf2_debug_line_missing_file_complaint)
5130 (dwarf2_debug_line_missing_end_sequence_complaint)
5131 (dwarf2_complex_location_expr_complaint)
5132 (dwarf2_const_value_length_mismatch_complaint)
5133 (dwarf2_section_buffer_overflow_complaint)
5134 (dwarf2_macro_malformed_definition_complaint)
5135 (dwarf2_invalid_attrib_class_complaint)
5136 (create_addrmap_from_index, dw2_symtab_iter_next)
5137 (dw2_expand_marked_cus)
5138 (dw2_debug_names_iterator::find_vec_in_debug_names)
5139 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5140 (create_debug_type_hash_table, init_cutu_and_read_dies)
5141 (partial_die_parent_scope, add_partial_enumeration)
5142 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5143 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5144 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5145 (create_cus_hash_table, create_dwp_hash_table)
5146 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5147 (dwarf2_rnglists_process, dwarf2_ranges_process)
5148 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5149 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5150 (handle_struct_member_die, process_structure_scope)
5151 (read_array_type, read_common_block, read_module_type)
5152 (read_tag_pointer_type, read_typedef, read_base_type)
5153 (read_subrange_type, load_partial_dies, partial_die_info::read)
5154 (partial_die_info::read, partial_die_info::read)
5155 (partial_die_info::read, read_checked_initial_length_and_offset)
5156 (dwarf2_string_attr, read_formatted_entries)
5157 (dwarf_decode_line_header)
5158 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5159 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5160 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5161 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5162 (get_signatured_type, get_DW_AT_signature_type)
5163 (decode_locdesc, file_file_name, consume_improper_spaces)
5164 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5165 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5166 (dwarf2_symbol_mark_computed, set_die_type)
5167 (read_attribute_value): Update.
5168 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5169 Update.
5170 * dbxread.c (unknown_symtype_complaint)
5171 (lbrac_mismatch_complaint, repeated_header_complaint)
5172 (set_namestring, function_outside_compilation_unit_complaint)
5173 (read_dbx_symtab, process_one_symbol): Update.
5174 * gdbtypes.c (stub_noname_complaint): Update.
5175 * windows-nat.c (handle_unload_dll): Update.
5176 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5177 (decode_base_type): Update.
5178 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5179 (eb_complaint, record_include_begin, record_include_end)
5180 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5181 (process_xcoff_symbol, read_symbol)
5182 (function_outside_compilation_unit_complaint)
5183 (scan_xcoff_symtab): Update.
5184 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5185 * buildsym.c (finish_block_internal, make_blockvector)
5186 (end_symtab_get_static_block, augment_type_symtab): Update.
5187 * dtrace-probe.c (dtrace_process_dof)
5188 (dtrace_static_probe_ops::get_probes): Update.
5189 * complaints.h (struct complaint): Don't declare.
5190 (symfile_complaints): Remove.
5191 (complaint_internal): Remove "complaints" parameter.
5192 (complaint): Likewise.
5193 (clear_complaints): Likewise.
5194 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5195 (reread_symbols): Update.
5196 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5197 (dwarf2_frame_cache, decode_frame_entry): Update.
5198 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5199 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5200 (info_selectors_command): Update.
5201 * macrotab.c (macro_include, check_for_redefinition)
5202 (macro_undef): Update.
5203 * objfiles.c (filter_overlapping_sections): Update.
5204 * stabsread.c (invalid_cpp_abbrev_complaint)
5205 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5206 (define_symbol, error_type, read_type, rs6000_builtin_type)
5207 (stabs_method_name_from_physname, read_member_functions)
5208 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5209 (attach_fields_to_type, complain_about_struct_wipeout)
5210 (read_range_type, read_args, common_block_start)
5211 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5212 Update.
5213 * mdebugread.c (index_complaint, unknown_ext_complaint)
5214 (basic_type_complaint, bad_tag_guess_complaint)
5215 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5216 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5217 (parse_procedure, parse_lines)
5218 (function_outside_compilation_unit_complaint)
5219 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5220 (bad_tag_guess_complaint, reg_value_complaint): Update.
5221 * cp-support.c (demangled_name_complaint): Update.
5222 * macroscope.c (sal_macro_scope): Update.
5223 * dwarf-index-write.c (class debug_names): Update.
5224
5225 2018-05-23 Tom Tromey <tom@tromey.com>
5226
5227 * complaints.c (clear_complaints): Remove "noisy" parameter.
5228 * complaints.h (clear_complaints): Update.
5229 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5230 (reread_symbols): Update.
5231
5232 2018-05-23 Tom Tromey <tom@tromey.com>
5233
5234 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5235 SUBSEQUENT_MESSAGE.
5236 (vcomplaint, clear_complaints): Update.
5237 (symfile_explanations): Remove some messages.
5238
5239 2018-05-23 Tom Tromey <tom@tromey.com>
5240
5241 * complaints.c (internal_complaint): Remove.
5242 * complaints.h (internal_complaint): Remove.
5243
5244 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5245
5246 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5247
5248 2018-05-22 Pedro Alves <palves@redhat.com>
5249
5250 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5251 (remote_fileio_badfd, remote_fileio_return_errno)
5252 (remote_fileio_return_success, remote_fileio_func_open)
5253 (remote_fileio_func_open, remote_fileio_func_close)
5254 (remote_fileio_func_read, remote_fileio_func_write)
5255 (remote_fileio_func_lseek, remote_fileio_func_rename)
5256 (remote_fileio_func_unlink, remote_fileio_func_stat)
5257 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5258 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5259 remote_target parameter.
5260 (remote_fio_func_map) <func>: Add remote_target parameter.
5261 (do_remote_fileio_request, remote_fileio_request):
5262 * remote-fileio.h (remote_fileio_request):
5263 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5264 remote_target parameter.
5265 (remote_notif_process, handle_notification): Adjust to pass down
5266 the remote.
5267 (remote_notif_state_allocate): Add remote_target parameter. Save
5268 it.
5269 * remote-notif.h (struct remote_target): Forward declare.
5270 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5271 remote_target parameter.
5272 (struct remote_notif_state) <remote>: New field.
5273 (remote_notif_ack, remote_notif_parse): Add remote_target
5274 parameter.
5275 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5276 remote_target parameter.
5277 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5278 (threads_listing_context, rmt_thread_action, protocol_feature)
5279 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5280 (packet_result, struct threads_listing_context, remote_state):
5281 Move definitions and declarations higher up.
5282 (remote_target) <~remote_target>: Declare.
5283 (remote_download_command_source, remote_file_put, remote_file_get)
5284 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5285 (remote_hostio_pread_vFile, remote_hostio_send_command)
5286 (remote_hostio_set_filesystem, remote_hostio_open)
5287 (remote_hostio_close, remote_hostio_unlink, remote_state)
5288 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5289 (get_memory_write_packet_size, get_memory_read_packet_size)
5290 (append_pending_thread_resumptions, remote_detach_1)
5291 (append_resumption, remote_resume_with_vcont)
5292 (add_current_inferior_and_thread, wait_ns, wait_as)
5293 (process_stop_reply, remote_notice_new_inferior)
5294 (process_initial_stop_replies, remote_add_thread)
5295 (btrace_sync_conf, remote_btrace_maybe_reopen)
5296 (remove_new_fork_children, kill_new_fork_children)
5297 (discard_pending_stop_replies, stop_reply_queue_length)
5298 (check_pending_events_prevent_wildcard_vcont)
5299 (discard_pending_stop_replies_in_queue, stop_reply)
5300 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5301 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5302 (remote_interrupt_as, remote_interrupt_ns)
5303 (remote_get_noisy_reply, remote_query_attached)
5304 (remote_add_inferior, remote_current_thread, get_current_thread)
5305 (set_thread, set_general_thread, set_continue_thread)
5306 (set_general_process, write_ptid)
5307 (remote_unpack_thread_info_response, remote_get_threadinfo)
5308 (parse_threadlist_response, remote_get_threadlist)
5309 (remote_threadlist_iterator, remote_get_threads_with_ql)
5310 (remote_get_threads_with_qxfer)
5311 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5312 (get_offsets, remote_check_symbols, remote_supported_packet)
5313 (remote_query_supported, remote_packet_size)
5314 (remote_serial_quit_handler, remote_detach_pid)
5315 (remote_vcont_probe, remote_resume_with_hc)
5316 (send_interrupt_sequence, interrupt_query)
5317 (remote_notif_get_pending_events, fetch_register_using_p)
5318 (send_g_packet, process_g_packet, fetch_registers_using_g)
5319 (store_register_using_P, store_registers_using_G)
5320 (set_remote_traceframe, check_binary_download)
5321 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5322 (remote_xfer_live_readonly_partial, remote_read_bytes)
5323 (remote_send_printf, remote_flash_write, readchar)
5324 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5325 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5326 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5327 (extended_remote_disable_randomization, extended_remote_run)
5328 (send_environment_packet, extended_remote_environment_support)
5329 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5330 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5331 (packet_command): Now methods of ...
5332 (remote_target): ... this class.
5333 (m_remote_state) <remote_target>: New field.
5334 (struct remote_state) <stop_reply_queue,
5335 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5336 fields.
5337 (remote_state::remote_state): Allocate stop_reply_queue.
5338 (remote_state): Delete global.
5339 (get_remote_state_raw): Delete.
5340 (remote_target::get_remote_state): Allocate m_remote_state on
5341 demand.
5342 (get_current_remote_target): New.
5343 (remote_ops, extended_remote_ops): Delete.
5344 (wait_forever_enabled_p, remote_async_inferior_event_token):
5345 Delete, moved to struct remote_state.
5346 (remote_target::close): Delete self. Destruction bits split to
5347 ...
5348 (remote_target::~remote_target): ... this.
5349 (show_memory_packet_size): Adjust to use
5350 get_current_remote_target.
5351 (struct protocol_feature) <func>: Add remote_target parameter.
5352 All callers adjusted.
5353 (curr_quit_handler_target): New.
5354 (remote_serial_quit_handler): Reimplement.
5355 (remote_target::open_1): Adjust to use get_current_remote_target.
5356 Heap-allocate remote_target/extended_remote_target instances.
5357 (vcont_builder::vcont_builder): Add remote_target parameter, and
5358 save it in m_remote. All callers adjusted.
5359 (vcont_builder::m_remote): New field.
5360 (vcont_builder::restart, vcont_builder::flush)
5361 (vcont_builder::push_action): Use it.
5362 (remote_target::commit_resume): Use it.
5363 (struct queue_iter_param) <remote>: New field.
5364 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5365 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5366 (check_pending_event_prevents_wildcard_vcont_callback)
5367 (remote_target::check_pending_events_prevent_wildcard_vcont)
5368 (remote_target::discard_pending_stop_replies)
5369 (remote_target::discard_pending_stop_replies_in_queue)
5370 (remote_target::remote_notif_remove_queued_reply): Fill in
5371 'remote' field.
5372 (remote_notif_get_pending_events): New.
5373 (remote_target::readchar, remote_target::remote_serial_write):
5374 Save/restore curr_quit_handler_target.
5375 (putpkt): New.
5376 (kill_new_fork_children): Fill in 'remote' field.
5377 (packet_command): Use get_current_remote_target, defer to
5378 remote_target method of same name.
5379 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5380 parameter, and save it in m_remote. All callers adjusted.
5381 (scoped_remote_fd::release): Use m_remote.
5382 (scoped_remote_fd::m_remote): New field.
5383 (remote_file_put, remote_file_get, remote_file_delete): Use
5384 get_current_remote_target, defer to remote_target method of same
5385 name.
5386 (remote_btrace_reset): Add remote_state paremeter. Update all
5387 callers.
5388 (remote_async_inferior_event_handler). Pass down 'data'.
5389 (remote_new_objfile): Use get_current_remote_target.
5390 (remote_target::vcont_r_supported): New.
5391 (set_range_stepping): Use get_current_remote_target and
5392 remote_target::vcont_r_supported.
5393 (_initialize_remote): Don't allocate 'remote_state' and
5394 'stop_reply_queue' globals.
5395 * remote.h (struct remote_target): Forward declare.
5396 (getpkt, putpkt, remote_notif_get_pending_events): Add
5397 'remote_target' parameter.
5398
5399 2018-05-22 Pedro Alves <palves@redhat.com>
5400
5401 * remote.c (vcont_builder): Now a class. Make all data members
5402 private.
5403 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5404 Declare methods.
5405 (vcont_builder_restart): Rename to ...
5406 (vcont_builder::restart): ... this.
5407 (vcont_builder_flush): Rename to ...
5408 (vcont_builder::flush): ... this.
5409 (vcont_builder_push_action): Rename to ...
5410 (vcont_builder::push_action): ... this.
5411 (remote_target::commit_resume): Adjust.
5412
5413 2018-05-22 Pedro Alves <palves@redhat.com>
5414
5415 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5416 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5417 (get_fixed_memory_packet_size): New.
5418 (get_memory_packet_size): Use it.
5419 (set_memory_packet_size): Don't override the config size with
5420 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5421 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5422 Don't refer to get_memory_packet_size if not connected to a remote
5423 target. Show "(default)" if configured size is 0.
5424
5425 2018-05-22 Pedro Alves <palves@redhat.com>
5426
5427 * remote.c (remote_target::mourn_inferior): Move
5428 discard_pending_stop_replies call here from ...
5429 (_initialize_remote): ... here.
5430
5431 2018-05-22 Pedro Alves <palves@redhat.com>
5432
5433 * remote.c (compare_section_command): Remove set_general_process
5434 call.
5435
5436 2018-05-22 Pedro Alves <palves@redhat.com>
5437
5438 * remote.c (struct packet_reg, struct remote_arch_state):
5439 Move higher up in the file.
5440 (remote_state) <m_arch_states>: Store remote_arch_state values
5441 instead of remote_arch_state pointers.
5442 (remote_state::get_remote_arch_state): Adjust.
5443
5444 2018-05-22 Pedro Alves <palves@redhat.com>
5445
5446 * remote.c: Include <unordered_map>.
5447 (remote_state): Now a class.
5448 (remote_state) <get_remote_arch_state>: Declare method.
5449 <get_remote_arch_state>: New field.
5450 (remote_arch_state) <remote_arch_state>: Declare ctor.
5451 <regs>: Now a unique_ptr.
5452 (remote_gdbarch_data_handle): Delete.
5453 (get_remote_arch_state): Delete.
5454 (remote_state::get_remote_arch_state): New.
5455 (get_remote_state): Adjust to call remote_state's
5456 get_remote_arch_state method.
5457 (init_remote_state): Delete, bits factored out to ...
5458 (remote_arch_state::remote_arch_state): ... this new method.
5459 (get_remote_packet_size, get_memory_packet_size)
5460 (process_g_packet, remote_target::fetch_registers)
5461 (remote_target::prepare_to_store, store_registers_using_G)
5462 (remote_target::store_registers, remote_target::get_trace_status):
5463 Adjust to call remote_state's method.
5464 (_initialize_remote): Remove reference to
5465 remote_gdbarch_data_handle.
5466
5467 2018-05-22 Pedro Alves <palves@redhat.com>
5468
5469 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5470 pread>: New method declarations.
5471 (remote_target::open_1): Adjust.
5472 (readahead_cache_invalidate): Rename to ...
5473 (readahead_cache::invalidate): ... this, and adjust to be a class
5474 method.
5475 (readahead_cache_invalidate_fd): Rename to ...
5476 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5477 class method.
5478 (remote_hostio_pwrite): Adjust.
5479 (remote_hostio_pread_from_cache): Rename to ...
5480 (readahead_cache::pread): ... this, and adjust to be a class
5481 method.
5482 (remote_hostio_close): Adjust.
5483
5484 2018-05-22 Pedro Alves <palves@redhat.com>
5485
5486 * remote.c (remote_hostio_close_cleanup): Delete.
5487 (class scoped_remote_fd): New.
5488 (remote_file_put, remote_file_get): Use it.
5489
5490 2018-05-22 Pedro Alves <palves@redhat.com>
5491
5492 (struct vCont_action_support): Use bool and initialize all fields.
5493 (struct readahead_cache): Initialize all fields.
5494 (remote_state): Use bool and initialize all fields.
5495 (remote_state::remote_state, remote_state::~remote_state): New.
5496 (new_remote_state): Delete.
5497 (_initialize_remote): Use new to allocate remote_state.
5498
5499 2018-05-22 Pedro Alves <palves@redhat.com>
5500 張俊芝 <zjz@zjz.name>
5501
5502 PR gdb/22973
5503 * c-exp.y: Include "c-support.h".
5504 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5505 of tolower. Use c_ident_is_alpha to scan names.
5506 * c-lang.c: Include "c-support.h".
5507 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5508 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5509 * c-support.h: New file, with bits factored out from ...
5510 * cp-name-parser.y: ... this file.
5511 Include "c-support.h".
5512 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5513 c-support.h and renamed.
5514 (symbol_end, yylex): Adjust.
5515
5516 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5517
5518 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5519 parameter type to CORE_ADDR.
5520 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5521 parameter type in declaration to CORE_ADDR.
5522 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5523 target_auxv_search to get AT_HWCAP and use the result to get the
5524 target description.
5525 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5526 to CORE_ADDR. Remove the cast of the return value to unsigned
5527 long. Fix error predicate of target_auxv_search.
5528 (ppc_linux_nat_target::read_description): Change the type of the
5529 hwcap variable to CORE_ADDR.
5530
5531 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5532
5533 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5534 if the size of fpscr is larger than 32 bits.
5535
5536 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5537
5538 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5539 (ppc32_linux_vsxregmap): New global.
5540 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5541 regcache_supply_regset, and regcache_collect_regset.
5542 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5543 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5544 (fetch_vsx_register, store_vsx_register): Remove.
5545 (fetch_vsx_registers): Add regno parameter. Get regset using
5546 ppc_linux_vsxregset. Use regset to supply registers.
5547 (store_vsx_registers): Add regno parameter. Get regset using
5548 ppc_linux_vsxregset. Use regset to collect registers.
5549 (fetch_register): Call fetch_vsx_registers instead of
5550 fetch_vsx_register.
5551 (store_register): Call store_vsx_registers instead of
5552 store_vsx_register.
5553 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5554 new regno parameter.
5555 (store_ppc_registers): Call store_vsx_registers with -1 for the
5556 new regno parameter.
5557 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5558 (ppc_collect_vsxregset): Remove.
5559
5560 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5561
5562 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5563 offset fields.
5564 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5565 for vector register offset fields.
5566 (ppc64_fbsd_reg_offsets): Likewise.
5567 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5568 to vector register offset fields.
5569 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5570 to vector register offset fields.
5571 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5572 vector register offset fields.
5573 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5574 initializers for vector register offset fields.
5575 (rs6000_aix64_reg_offsets): Likewise.
5576 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5577 (ppc_supply_vrregset): Remove.
5578 (ppc_collect_vrregset): Remove.
5579 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5580 (ppc_linux_vrregset) : New function.
5581 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5582 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5583 (ppc32_linux_vrregset): Remove.
5584 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5585 and use result instead of ppc32_linux_vrregset.
5586 (ppc32_linux_reg_offsets): Remove initializers for vector register
5587 offset fields.
5588 (ppc64_linux_reg_offsets): Likewise.
5589 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5590 * ppc-linux-nat.c: Include regset.h.
5591 (gdb_vrregset_t): Adjust comment to account for little-endian
5592 mode.
5593 (supply_vrregset, fill_vrregset): Remove.
5594 (fetch_altivec_register, store_altivec_register): Remove.
5595 (fetch_altivec_registers): Add regno parameter. Get regset using
5596 ppc_linux_vrregset. Use regset to supply registers.
5597 (store_altivec_registers): Add regno parameter. Get regset using
5598 ppc_linux_vrregset. Use regset to collect registers.
5599 (fetch_register): Call fetch_altivec_registers instead of
5600 fetch_altivec_register.
5601 (store_register): Call store_altivec_registers instead of
5602 store_altivec_register.
5603 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5604 the new regno parameter.
5605 (store_ppc_registers): Call store_altivec_registers with -1 for
5606 the new regno parameter.
5607
5608 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5609
5610 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5611 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5612 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5613 (gdb_vrregset_t): Change array type size to
5614 PPC_LINUX_SIZEOF_VRREGSET.
5615 (gdb_vsxregset_t): Change array type size to
5616 PPC_LINUX_SIZEOF_VSXREGSET.
5617 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5618 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5619 PPC_LINUX_SIZEOF_VSXREGSET.
5620
5621 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5622
5623 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5624 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5625 nat/ppc-linux.c.
5626 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5627 ppc_linux_target_wordsize with tid.
5628 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5629 wordsize with tid.
5630 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5631 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5632 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5633 tid parameter. Remove static specifier.
5634 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5635 (ppc_linux_target_wordsize): New declaration.
5636
5637 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5638
5639 * arch/ppc-linux-common.c: New file.
5640 * arch/ppc-linux-common.h: New file.
5641 * arch/ppc-linux-tdesc.h: New file.
5642 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5643 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5644 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5645 arch/ppc-linux-tdesc.h.
5646 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5647 arch/ppc-linux-tdesc.h.
5648 (ppc_linux_nat_target::read_description): Remove target
5649 description matching code. Fill a ppc_linux_features struct and
5650 call ppc_linux_match_description with it. Move comment about ISA
5651 2.05 to ppc-linux-common.c.
5652 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5653 arch/ppc-linux-tdesc.h.
5654 (ppc_linux_core_read_description): Remove target description
5655 matching code. Fill a ppc_linux_features struct and call
5656 ppc_linux_match_description with it.
5657 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5658 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5659 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5660 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5661 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5662 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5663 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5664 (tdesc_powerpc_e500l): Remove.
5665
5666 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5667
5668 * ada-lang.c (catch_assert_command): Pass empty string instead
5669 of NULL for excep_string argument.
5670
5671 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5672
5673 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5674 the width of the requested register exceeds the width of the
5675 `ptrace' data type.
5676
5677 2018-05-21 Tom Tromey <tom@tromey.com>
5678
5679 * printcmd.c (output_command): Remove.
5680 (output_command_const): Rename to output_command.
5681 * valprint.h (output_command): Rename from output_command_const.
5682 * tracepoint.c (trace_dump_actions): Call output_command.
5683
5684 2018-05-21 Tom Tromey <tom@tromey.com>
5685
5686 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5687 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5688 * ada-lang.h (create_ada_exception_catchpoint): Update.
5689 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5690 std::string.
5691 (create_excep_cond_exprs, ~ada_catchpoint)
5692 (should_stop_exception, print_one_exception)
5693 (print_mention_exception, print_recreate_exception): Update.
5694 (ada_get_next_arg): Remove.
5695 (catch_ada_exception_command_split): Use std::string. Change type
5696 of "excep_string", "cond_string".
5697 (catch_ada_exception_command): Update.
5698 (create_ada_exception_catchpoint): Change type of excep_string.
5699 (ada_exception_sal): Remove excep_string parameter.
5700 (~ada_catchpoint): Remove.
5701
5702 2018-05-21 Tom Tromey <tom@tromey.com>
5703
5704 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5705 cleanup.
5706
5707 2018-05-21 Tom Tromey <tom@tromey.com>
5708
5709 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5710 Return unique_xmalloc_ptr.
5711 (print_it_exception): Update.
5712
5713 2018-05-21 Tom Tromey <tom@tromey.com>
5714
5715 * tracepoint.c (trace_dump_actions): Use std::string.
5716
5717 2018-05-21 Tom Tromey <tom@tromey.com>
5718
5719 * symfile.c (reread_symbols): Use std::string for original_name.
5720
5721 2018-05-21 Tom Tromey <tom@tromey.com>
5722
5723 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5724 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5725 constructor.
5726
5727 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5728
5729 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5730 instance to...
5731 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5732 * objfiles.c (get_objfile_bfd_data): Allocate
5733 objfile_per_bfd_storage with obstack_new when allocating on
5734 obstack.
5735
5736 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5737
5738 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5739 OBSTACK_ZALLOC.
5740 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5741 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5742 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5743 (add_pending): Likewise.
5744 (parse_symbol): Likewise.
5745 (parse_partial_symbols): Likewise.
5746 (psymtab_to_symtab_1): Likewise.
5747 (new_psymtab): Likewise.
5748 (elfmdebug_build_psymtabs): Likewise.
5749 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5750 * objfiles.c (get_objfile_bfd_data): Likewise.
5751 (objfile_register_static_link): Likewise.
5752 * psymtab.c (allocate_psymtab): Likewise.
5753 * stabsread.c (read_member_functions): Likewise.
5754 * xcoffread.c (xcoff_end_psymtab): Likewise.
5755
5756 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5757
5758 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5759 compiler supports std::is_trivially_constructible.
5760 * common/poison.h: Include obstack.h.
5761 (IsMallocable): Define to is_trivially_constructible if the
5762 compiler supports it, define to true_type otherwise.
5763 (xobnew): New.
5764 (XOBNEW): Redefine.
5765 (xobnewvec): New.
5766 (XOBNEWVEC): Redefine.
5767 * gdb_obstack.h (obstack_zalloc): New.
5768 (OBSTACK_ZALLOC): Redefine.
5769 (obstack_calloc): New.
5770 (OBSTACK_CALLOC): Redefine.
5771 (obstack_new): New.
5772 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5773 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5774 gdbarch.c.
5775 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5776 obstack_calloc/obstack_zalloc.
5777 (gdbarch_obstack_zalloc): Remove.
5778 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5779
5780 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5781
5782 * stack.c (backtrace_command_1): Remove useless variable int i.
5783
5784 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5785
5786 * stack.c (print_frame_info): Fix comment.
5787
5788 2018-05-18 Tom Tromey <tom@tromey.com>
5789
5790 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5791 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5792 (~dwarf2_per_objfile): Update
5793 (dwarf2_get_dwz_file): Use new.
5794 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5795 unique_ptr.
5796
5797 2018-05-18 Tom Tromey <tom@tromey.com>
5798
5799 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5800 unique_ptr.
5801 * dwarf2read.c (struct dwp_file): Add constructor and
5802 initializers.
5803 (open_and_init_dwp_file): Return a unique_ptr.
5804 (dwarf2_per_objfile, create_dwp_hash_table)
5805 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5806 (lookup_dwo_unit_in_dwp): Update.
5807 (open_and_init_dwp_file, get_dwp_file): Update.
5808
5809 2018-05-18 Tom Tromey <tom@tromey.com>
5810
5811 * dwarf2read.c (dwarf2_per_objfile): Update.
5812 (struct mapped_index): Add initializers.
5813 (dwarf2_read_index): Use new.
5814 (dw2_symtab_iter_init): Update.
5815 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5816 unique_ptr.
5817
5818 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5819
5820 * dwarf2read.c (mapped_index) <total_size>: Remove.
5821
5822 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5823
5824 * unittests/format_pieces-selftests.c (test_format_specifier):
5825 Add ARI comments.
5826
5827 2018-05-18 Tom Tromey <tom@tromey.com>
5828
5829 * c-typeprint.c (maybe_print_hole): New function.
5830 (c_print_type_struct_field_offset): Update.
5831 (c_type_print_base_struct_union): Call maybe_print_hole.
5832
5833 2018-05-17 Keith Seitz <keiths@redhat.com>
5834
5835 * breakpoint.c (build_bpstat_chain): New function, moved from
5836 bpstat_stop_status.
5837 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5838 If no stop chain is passed, call build_bpstat_chain to build it.
5839 * breakpoint.h (build_bpstat_chain): Declare.
5840 (bpstat_stop_status): Move documentation here from breakpoint.c.
5841 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5842 build the stop chain and pass it to skip_inline_frames.
5843 Pass this stop chain to bpstat_stop_status.
5844 * inline-frame.c: Include breakpoint.h.
5845 (stopped_by_user_bp_inline_frame): New function.
5846 (skip_inline_frames): Add parameter `stop_chain'.
5847 Move documention to inline-frame.h.
5848 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5849 whether the frame should be elided.
5850 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5851 Add moved documentation and update for new parameter.
5852
5853 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5854
5855 PR cli/14975
5856 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5857 unittests/format_pieces-selftests.c.
5858 * common/format.h (format_piece) <operator==>: New.
5859 (format_pieces) <operator[]>: Remove.
5860 * common/format.c (format_pieces::format_pieces): Handle \e.
5861 * unittests/format_pieces-selftests.c: New.
5862
5863 2018-05-17 Tom Tromey <tom@tromey.com>
5864
5865 PR symtab/23010:
5866 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5867 (dw2_instantiate_symtab): Add skip_partial parameter.
5868 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5869 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5870 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5871 (dw2_expand_symtabs_matching_one)
5872 (dw2_find_pc_sect_compunit_symtab)
5873 (dw2_debug_names_lookup_symbol)
5874 (dw2_debug_names_expand_symtabs_for_function): Update.
5875 (init_cutu_and_read_dies): Add skip_partial parameter.
5876 (process_psymtab_comp_unit, build_type_psymtabs_1)
5877 (process_skeletonless_type_unit, load_partial_comp_unit)
5878 (psymtab_to_symtab_1): Update.
5879 (load_full_comp_unit): Add skip_partial parameter.
5880 (process_imported_unit_die, dwarf2_read_addr_index)
5881 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5882 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5883 (read_signatured_type): Update.
5884
5885 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5886
5887 * value.c (release_value): Remove unused variable.
5888 (record_latest_value): Likewise.
5889 (access_value_history): Likewise.
5890 (preserve_values): Likewise.
5891
5892 2018-05-17 Tom Tromey <tom@tromey.com>
5893
5894 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5895 Initialize.
5896
5897 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5898
5899 PR gdb/22286
5900 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5901 Also handle registers whose width is not a multiple of
5902 PTRACE_TYPE_RET.
5903 (linux_nat_trad_target::store_register): Likewise.
5904
5905 2018-05-16 Tom Tromey <tom@tromey.com>
5906
5907 * gdbcore.h (core_bfd): Redefine.
5908 * corelow.c (core_target::close): Update.
5909 (core_target_open): Update.
5910 * progspace.h (struct program_space) <cbfd>: Now a
5911 gdb_bfd_ref_ptr.
5912
5913 2018-05-16 Tom Tromey <tom@tromey.com>
5914
5915 PR cli/19551:
5916 * symfile-add-flags.h (enum symfile_add_flags)
5917 <SYMFILE_NOT_FILENAME>: New constant.
5918 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5919 objfile name from BFD.
5920 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5921 * minidebug.c (find_separate_debug_file_in_section): Put
5922 ".gnu_debugdata" into BFD's file name.
5923
5924 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5925
5926 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5927 Remove.
5928
5929 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5930
5931 PR binutils/21446
5932 * aarch64-tdep.c (aarch64_analyze_prologue,
5933 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5934 Indicate not interested in errors.
5935
5936 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5937
5938 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5939 Supply the MIPS_ZERO_REGNUM register.
5940
5941 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5942
5943 * mips-tdep.c (mask_address_var): Make variable static.
5944
5945 2018-05-14 Tom Tromey <tom@tromey.com>
5946
5947 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5948
5949 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5950
5951 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5952 FXSAVE_ADDR for the mxcsr register.
5953
5954 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5955
5956 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5957
5958 2018-05-11 Pedro Alves <palves@redhat.com>
5959
5960 * corelow.c (core_target) <core_target>: No longer inline.
5961 Initialize m_core_gdbarch, m_core_vec and build the section table
5962 here.
5963 <~core_target>: New.
5964 <core_gdbarch, get_core_register_section>: New methods.
5965 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5966 factored out from ...
5967 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5968 (core_ops): Delete.
5969 (sniff_core_bfd): Add gdbarch parameter.
5970 (core_close): Delete, merged into ...
5971 (core_target::close): ... here. Delete self.
5972 (core_close_cleanup): Delete.
5973 (core_target_open): Allocate a core_target on the heap. Use a
5974 unique_ptr instead of a cleanup. Bits moved into the core_target
5975 ctor. Adjust to use core_target methods instead of globals.
5976 (get_core_register_section): Rename to ...
5977 (core_target::get_core_register_section): ... this and adjust.
5978 (struct get_core_registers_cb_data): New.
5979 (get_core_registers_cb): Use it. Use bool.
5980 (core_target::fetch_registers, core_target::files_info)
5981 (core_target::xfer_partial, core_target::read_description)
5982 (core_target::pid_to, core_target::thread_name): Adjust to
5983 reference class fields instead of globals.
5984 * target.h (struct target_ops_deleter, target_ops_up): New.
5985
5986 2018-05-11 Pedro Alves <palves@redhat.com>
5987
5988 * corefile.c (core_file_command): Move to corelow.c.
5989 * corelow.c (the_core_target): Delete.
5990 (core_file_command): Moved from corefile.c. Check exec_bfd
5991 instead of the_core_target. Use target_detach instead of calling
5992 into the_core_target directly.
5993 (maybe_say_no_core_file_now): New.
5994 (core_target::detach): Use it.
5995 (_initialize_corelow): Remove references to the_core_target.
5996 * gdbcore.h (the_core_target): Delete.
5997
5998 2018-05-11 Tom Tromey <tromey@redhat.com>
5999 Pedro Alves <palves@redhat.com>
6000
6001 * corefile.c (core_bfd): Remove.
6002 * gdbcore.h (core_bfd): Now a macro.
6003 * progspace.h (struct program_space) <cbfd>: New field.
6004
6005 2018-05-11 Tom Tromey <tom@tromey.com>
6006
6007 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6008 gdb::def_vector.
6009
6010 2018-05-10 Tom Tromey <tom@tromey.com>
6011
6012 * configure: Rebuild.
6013 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6014
6015 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6016
6017 PR server/23158:
6018 * regformats/regdat.sh: Adjust script, following the addition
6019 of the new expedite_regs parameter to init_target_desc.
6020
6021 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6022
6023 PR gdb/23127
6024 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6025 set_gdbarch_significant_addr_bit.
6026 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6027 set_gdbarch_significant_addr_bit.
6028 * utils.c (address_significant): Update to sign extend addr.
6029
6030 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6031
6032 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6033 (xtensa_linux_init_abi): Limit tdep->num_regs by
6034 tdep->num_nopriv_regs.
6035 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6036 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6037 not initialized.
6038
6039 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6040
6041 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6042
6043 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6044
6045 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6046 (I387_MXCSR_INIT_VAL): New constant.
6047 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6048 buffer if it was supplied by the inferior.
6049 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6050 (i387_xsave_get_clear_bv): New function.
6051 (i387_supply_xsave): Only read x87 control registers from the
6052 xsave buffer if the feature is enabled, and the state will have
6053 been written, otherwise, provide a suitable default.
6054 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6055 including x87 control registers. Update control registers if they
6056 have changed from the default value, and mark features as enabled
6057 as required.
6058 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6059
6060 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6061
6062 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6063
6064 2018-05-07 Tom Tromey <tom@tromey.com>
6065
6066 * configure: Rebuild.
6067 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6068
6069 2018-05-07 Tom Tromey <tom@tromey.com>
6070
6071 PR tdep/20362:
6072 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6073 bit. Use correct value for VDIV.
6074
6075 2018-05-04 Tom Tromey <tom@tromey.com>
6076
6077 * configure: Rebuild.
6078 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6079
6080 2018-05-04 Tom Tromey <tom@tromey.com>
6081
6082 * linux-record.c (record_linux_system_call) <case
6083 RECORD_SYS_RECVFROM>: Add "break".
6084
6085 2018-05-04 Tom Tromey <tom@tromey.com>
6086
6087 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6088 Add missing "break".
6089 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6090 Add missing "break".
6091
6092 2018-05-04 Tom Tromey <tom@tromey.com>
6093
6094 * rs6000-tdep.c (ppc_process_record_op4)
6095 (ppc_process_record_op63): Add fall-through comment.
6096
6097 2018-05-04 Tom Tromey <tom@tromey.com>
6098
6099 * i386-tdep.c (i386_process_record): Add fall-through comment.
6100
6101 2018-05-04 Tom Tromey <tom@tromey.com>
6102
6103 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6104 comment.
6105
6106 2018-05-04 Tom Tromey <tom@tromey.com>
6107
6108 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6109 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6110 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6111 comment.
6112 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6113 comment.
6114 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6115 comment.
6116
6117 2018-05-04 Tom Tromey <tom@tromey.com>
6118
6119 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6120
6121 2018-05-04 Tom Tromey <tom@tromey.com>
6122
6123 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6124 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6125 * symfile.c (section_is_mapped): Fix fall-through comment.
6126 * stabsread.c (define_symbol, read_member_functions): Fix
6127 fall-through comment.
6128 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6129 comment.
6130 * remote.c (remote_wait_as): Fix fall-through comment.
6131 * p-exp.y (yylex): Fix fall-through comment.
6132 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6133 comment.
6134 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6135 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6136 * jv-exp.y (yylex): Fix fall-through comment.
6137 * go-exp.y (lex_one_token): Fix fall-through comment.
6138 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6139 fall-through comment.
6140 * f-exp.y (yylex): Fix fall-through comment.
6141 * dwarf2read.c (process_die): Fix fall-through comments.
6142 * dbxread.c (process_one_symbol): Fix fall-through comment.
6143 * d-exp.y (lex_one_token): Fix fall-through comment.
6144 * cp-name-parser.y (yylex): Fix fall-through comment.
6145 * coffread.c (coff_symtab_read): Fix fall-through comment.
6146 * c-exp.y (lex_one_token): Fix fall-through comment.
6147 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6148 comment.
6149 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6150 comment.
6151
6152 2018-05-04 Tom Tromey <tom@tromey.com>
6153
6154 PR python/22730:
6155 * NEWS: Mention gdb.execute change.
6156 * gdbcmd.h (execute_control_command): Don't declare.
6157 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6158 execute_control_commands, execute_control_commands_to_string.
6159 * cli/cli-script.h (execute_control_commands)
6160 (execute_control_commands_to_string): Declare.
6161 (execute_control_command): Add from_tty parameter.
6162 * cli/cli-script.c (execute_control_commands)
6163 (execute_control_commands_to_string): New functions.
6164 (execute_user_command): Use execute_control_commands.
6165 (execute_control_command_1): Add "from_tty" parameter. Update.
6166 (execute_control_command): Likewise.
6167
6168 2018-05-04 Tom Tromey <tom@tromey.com>
6169
6170 PR python/22731:
6171 * NEWS: Mention that breakpoint commands are writable.
6172 * python/py-breakpoint.c (bppy_set_commands): New function.
6173 (breakpoint_object_getset) <"commands">: Use it.
6174
6175 2018-05-04 Tom Tromey <tom@tromey.com>
6176
6177 * tracepoint.c (actions_command): Update.
6178 * mi/mi-cmd-break.c (mi_command_line_array)
6179 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6180 (mi_read_next_line): Remove.
6181 (mi_cmd_break_commands): Update.
6182 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6183 function_view.
6184 * cli/cli-script.c (get_command_line): Update.
6185 (process_next_line): Use function_view. Constify.
6186 (recurse_read_control_structure, read_command_lines)
6187 (read_command_lines_1): Change argument types to function_view.
6188 (do_define_command, document_command): Update.
6189 * breakpoint.h (check_tracepoint_command): Don't declare.
6190 * breakpoint.c (check_tracepoint_command): Remove.
6191 (commands_command_1, create_tracepoint_from_upload): Update.
6192
6193 2018-05-04 Tom Tromey <tom@tromey.com>
6194
6195 PR gdb/11750:
6196 * cli/cli-script.h (enum command_control_type) <define_control>:
6197 New constant.
6198 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6199 (build_command_line, execute_control_command_1)
6200 (process_next_line): Likewise.
6201 (do_define_command): New function, extracted from define_command.
6202 (define_command): Use it.
6203
6204 2018-05-04 Tom Tromey <tom@tromey.com>
6205
6206 * tracepoint.c (actions_command): Update.
6207 * cli/cli-script.h (read_command_lines): Update.
6208 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6209 (MAX_TMPBUF): Remove define.
6210 (define_command): Use string_printf.
6211 (document_command): Likewise.
6212 * breakpoint.c (commands_command_1): Update.
6213
6214 2018-05-04 Tom Tromey <tom@tromey.com>
6215
6216 * top.c (execute_command): Update.
6217 * cli/cli-script.h (print_command_lines): Now varargs.
6218 * cli/cli-script.c (print_command_lines): Now varargs.
6219 (execute_control_command_1) <case while_control, case if_control>:
6220 Update.
6221
6222 2018-05-04 Tom Tromey <tom@tromey.com>
6223
6224 * tracepoint.c (all_tracepoint_actions): Rename from
6225 all_tracepoint_actions_and_cleanup. Change return type.
6226 (actions_command, encode_actions_1, encode_actions)
6227 (trace_dump_actions, tdump_command): Update.
6228 * remote.c (remote_download_command_source): Update.
6229 * python/python.c (gdbpy_eval_from_control_command)
6230 (python_command, python_interactive_command): Update.
6231 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6232 * guile/guile.c (guile_command)
6233 (gdbscm_eval_from_control_command, guile_command): Update.
6234 * compile/compile.c (compile_code_command)
6235 (compile_print_command, compile_to_object): Update.
6236 * cli/cli-script.h (struct command_lines_deleter): New.
6237 (counted_command_line): New typedef.
6238 (struct command_line): Add constructor, destructor.
6239 <body_list>: Remove.
6240 <body_list_0, body_list_1>: New members.
6241 (command_line_up): Remove typedef.
6242 (read_command_lines, read_command_lines_1, get_command_line):
6243 Update.
6244 (copy_command_lines): Don't declare.
6245 * cli/cli-script.c (build_command_line): Use "new".
6246 (get_command_line): Return counted_command_line.
6247 (print_command_lines, execute_user_command)
6248 (execute_control_command_1, while_command, if_command): Update.
6249 (realloc_body_list): Remove.
6250 (process_next_line, recurse_read_control_structure): Update.
6251 (read_command_lines, read_command_lines_1): Return counted_command_line.
6252 (free_command_lines): Use "delete".
6253 (copy_command_lines): Remove.
6254 (define_command, document_command, show_user_1): Update.
6255 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6256 a counted_command_line.
6257 * breakpoint.h (counted_command_line): Remove typedef.
6258 (breakpoint_set_commands): Update.
6259 * breakpoint.c (check_no_tracepoint_commands)
6260 (validate_commands_for_breakpoint): Update.
6261 (breakpoint_set_commands): Change commands to be a
6262 counted_command_line.
6263 (commands_command_1, update_dprintf_command_list)
6264 (create_tracepoint_from_upload): Update.
6265
6266 2018-05-04 Tom Tromey <tom@tromey.com>
6267
6268 * cli/cli-decode.h (cmd_list_element): New constructor.
6269 (~cmd_list_element): New destructor.
6270 (struct cmd_list_element): Add initializers.
6271 * cli/cli-decode.c (do_add_cmd): Use "new".
6272 (delete_cmd): Use "delete".
6273
6274 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6275 Pedro Alves <palves@redhat.com>
6276
6277 PR breakpoints/19806 and support for PR external/20207.
6278 * NEWS: Mention Aarch64 watchpoint improvements.
6279 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6280 watchpoints and PR external/20207 watchpoints.
6281 * nat/aarch64-linux-hw-point.c
6282 (kernel_supports_any_contiguous_range): New.
6283 (aarch64_watchpoint_offset): New.
6284 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6285 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6286 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6287 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6288 next_addr_orig_p. Support PR external/20207 watchpoints.
6289 (aarch64_downgrade_regs): New.
6290 (aarch64_dr_state_insert_one_point): New parameters offset and
6291 addr_orig.
6292 (aarch64_dr_state_remove_one_point): Likewise.
6293 (aarch64_handle_breakpoint): Update caller.
6294 (aarch64_handle_aligned_watchpoint): Likewise.
6295 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6296 aligned_offset.
6297 (aarch64_linux_set_debug_regs): Remove const from state. Call
6298 aarch64_downgrade_regs.
6299 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6300 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6301 (DR_CONTROL_MASK): ... this.
6302 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6303 (unsigned int aarch64_watchpoint_offset): New prototype.
6304 (aarch64_linux_set_debug_regs): Remove const from state.
6305 * utils.c (align_up, align_down): Move to ...
6306 * common/common-utils.c (align_up, align_down): ... here.
6307 * utils.h (align_up, align_down): Move to ...
6308 * common/common-utils.h (align_up, align_down): ... here.
6309
6310 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6311
6312 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6313 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6314 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6315 Re-implement to match the ABI as summarized in GCC's
6316 gcc/config/sparc/sparc.c. All callers updated.
6317 (sparc32_store_arguments): Remove assertion.
6318
6319 2018-05-04 Tom Tromey <tom@tromey.com>
6320
6321 * printcmd.c: Don't include tui.h.
6322 (decode_format): Use skip_spaces.
6323
6324 2018-05-04 Tom Tromey <tom@tromey.com>
6325
6326 PR gdb/22619:
6327 * printcmd.c (last_count): New global.
6328 (x_command): Use saved count when repeating.
6329
6330 2018-05-04 Tom Tromey <tom@tromey.com>
6331
6332 * nto-procfs.c (do_closedir_cleanup): Remove.
6333 (procfs_pidlist): Use gdb_dir_up.
6334 * procfs.c (do_closedir_cleanup): Remove.
6335 (proc_update_threads): Use gdb_dir_up.
6336 * common/filestuff.h (struct gdb_dir_deleter): New.
6337 (gdb_dir_up): New typedef.
6338
6339 2018-05-04 Tom Tromey <tom@tromey.com>
6340
6341 * ada-lang.c (print_mention_exception): Use std::string.
6342
6343 2018-05-04 Tom Tromey <tom@tromey.com>
6344
6345 * ada-lang.c (create_excep_cond_exprs): Update.
6346 (ada_exception_catchpoint_cond_string): Use std::string.
6347
6348 2018-05-04 Tom Tromey <tom@tromey.com>
6349
6350 * ada-lang.c (xget_renaming_scope): Return std::string.
6351 (old_renaming_is_invisible): Update.
6352
6353 2018-05-04 Tom Tromey <tom@tromey.com>
6354
6355 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6356 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6357
6358 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6359
6360 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6361
6362 2018-05-04 Tom Tromey <tom@tromey.com>
6363
6364 * remote.c (remote_query_supported_append): Change type.
6365 (remote_check_symbols): Update.
6366
6367 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6368
6369 PR gdb/11420
6370 * configure.ac: Prepend libpython.
6371 * python/python-config.py: Likewise.
6372 * configure: Regenerate.
6373
6374 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6375
6376 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6377
6378 2018-05-03 Pedro Alves <palves@redhat.com>
6379
6380 * s390-linux-nat.c
6381 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6382 override. Write 'true' instead of '1'.
6383 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6384 declaration.
6385
6386 2018-05-02 Pedro Alves <palves@redhat.com>
6387
6388 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6389 add_inf_child_target.
6390 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6391 add_inf_child_target.
6392 * aix-thread.c (aix_thread_target_info): New.
6393 (aix_thread_target) <shortname, longname, doc>: Delete.
6394 <info>: New.
6395 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6396 add_inf_child_target.
6397 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6398 add_inf_child_target.
6399 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6400 add_inf_child_target.
6401 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6402 add_inf_child_target.
6403 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6404 add_inf_child_target.
6405 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6406 add_inf_child_target.
6407 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6408 add_inf_child_target.
6409 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6410 add_inf_child_target.
6411 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6412 add_inf_child_target.
6413 * bfd-target.c (target_bfd_target_info): New.
6414 (target_bfd) <shortname, longname, doc>: Delete.
6415 <info>: New.
6416 * bsd-kvm.c (bsd_kvm_target_info): New.
6417 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6418 <info>: New.
6419 (bsd_kvm_target::open): Rename to ...
6420 (bsd_kvm_target_open): ... this. Adjust.
6421 * bsd-uthread.c (bsd_uthread_target_info): New.
6422 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6423 <info>: New.
6424 * corefile.c (core_file_command): Adjust.
6425 * corelow.c (core_target_info): New.
6426 (core_target) <shortname, longname, doc>: Delete.
6427 <info>: New.
6428 (core_target::open): Rename to ...
6429 (core_target_open): ... this. Adjust.
6430 * ctf.c (ctf_target_info): New.
6431 (ctf_target) <shortname, longname, doc>: Delete.
6432 <info>: New.
6433 (ctf_target::open): Rename to ...
6434 (ctf_target_open): ... this.
6435 (_initialize_ctf): Adjust.
6436 * exec.c (exec_target_info): New.
6437 (exec_target) <shortname, longname, doc>: Delete.
6438 <info>: New.
6439 (exec_target::open): Rename to ...
6440 (exec_target_open): ... this.
6441 * gdbcore.h (core_target_open): Declare.
6442 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6443 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6444 add_inf_child_target.
6445 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6446 add_inf_child_target.
6447 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6448 add_inf_child_target.
6449 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6450 add_inf_child_target.
6451 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6452 add_inf_child_target.
6453 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6454 add_inf_child_target.
6455 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6456 add_inf_child_target.
6457 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6458 add_inf_child_target.
6459 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6460 add_inf_child_target.
6461 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6462 add_inf_child_target.
6463 * inf-child.c (inf_child_target_info): New.
6464 (inf_child_target::info): New.
6465 (inf_child_open_target): Remove 'target' parameter. Use
6466 get_native_target instead.
6467 (inf_child_target::open): Delete.
6468 (add_inf_child_target): New.
6469 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6470 Delete.
6471 <info>: New.
6472 (add_inf_child_target): Declare.
6473 (inf_child_open_target): Declare.
6474 * linux-thread-db.c (thread_db_target_info): New.
6475 (thread_db_target) <shortname, longname, doc>: Delete.
6476 <info>: New.
6477 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6478 add_inf_child_target.
6479 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6480 add_inf_child_target.
6481 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6482 add_inf_child_target.
6483 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6484 add_inf_child_target.
6485 * make-target-delegates (print_class): Adjust.
6486 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6487 add_inf_child_target.
6488 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6489 add_inf_child_target.
6490 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6491 add_inf_child_target.
6492 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6493 add_inf_child_target.
6494 * nto-procfs.c (nto_native_target_info): New.
6495 (nto_procfs_target_native) <shortname, longname, doc>:
6496 Delete.
6497 <info>: New.
6498 (nto_procfs_target_info): New.
6499 (nto_procfs_target_procfs) <shortname, longname, doc>:
6500 Delete.
6501 <info>: New.
6502 (init_procfs_targets): Adjust.
6503 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6504 add_inf_child_target.
6505 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6506 add_inf_child_target.
6507 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6508 add_inf_child_target.
6509 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6510 add_inf_child_target.
6511 * ravenscar-thread.c (ravenscar_target_info): New.
6512 (ravenscar_thread_target) <shortname, longname, doc>:
6513 Delete.
6514 <info>: New.
6515 * record-btrace.c (record_btrace_target_info):
6516 (record_btrace_target) <shortname, longname, doc>: Delete.
6517 <info>: New.
6518 (record_btrace_target::open): Rename to ...
6519 (record_btrace_target_open): ... this. Adjust.
6520 * record-full.c (record_longname, record_doc): New.
6521 (record_full_base_target) <shortname, longname, doc>: Delete.
6522 <info>: New.
6523 (record_full_target_info): New.
6524 (record_full_target): <shortname>: Delete.
6525 <info>: New.
6526 (record_full_core_open_1, record_full_open_1): Update comments.
6527 (record_full_base_target::open): Rename to ...
6528 (record_full_open): ... this.
6529 (cmd_record_full_restore): Update.
6530 (_initialize_record_full): Update.
6531 * remote-sim.c (remote_sim_target_info): New.
6532 (gdbsim_target) <shortname, longname, doc>: Delete.
6533 <info>: New.
6534 (gdbsim_target::open): Rename to ...
6535 (gdbsim_target_open): ... this.
6536 (_initialize_remote_sim): Adjust.
6537 * remote.c (remote_doc): New.
6538 (remote_target_info): New.
6539 (remote_target) <shortname, longname, doc>: Delete.
6540 <info>: New.
6541 (extended_remote_target_info): New.
6542 (extended_remote_target) <shortname, longname, doc>: Delete.
6543 <info>: New.
6544 (remote_target::open_1): Make static. Adjust.
6545 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6546 * s390-linux-nat.c (_initialize_s390_nat): Use
6547 add_inf_child_target.
6548 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6549 add_inf_child_target.
6550 * sol-thread.c (thread_db_target_info): New.
6551 (sol_thread_target) <shortname, longname, doc>: Delete.
6552 <info>: New.
6553 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6554 add_inf_child_target.
6555 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6556 add_inf_child_target.
6557 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6558 add_inf_child_target.
6559 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6560 add_inf_child_target.
6561 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6562 add_inf_child_target.
6563 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6564 add_inf_child_target.
6565 * spu-linux-nat.c (_initialize_spu_nat): Use
6566 add_inf_child_target.
6567 * spu-multiarch.c (spu_multiarch_target_info): New.
6568 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6569 <info>: New.
6570 * target-delegates.c: Regenerate.
6571 * target.c: Include <unordered_map>.
6572 (target_ops_p): Delete.
6573 (DEF_VEC_P(target_ops_p)): Delete.
6574 (target_factories): New.
6575 (test_target_info): New.
6576 (test_target_ops::info): New.
6577 (open_target): Adjust to use target_factories.
6578 (add_target_with_completer): Rename to ...
6579 (add_target): ... this. Change prototype. Register target_info
6580 and open callback in target_factories. Register target_info in
6581 command context instead of target_ops.
6582 (add_target): Delete old implementation.
6583 (add_deprecated_target_alias): Change prototype. Adjust.
6584 (the_native_target): New.
6585 (set_native_target, get_native_target): New.
6586 (find_default_run_target): Use the_native_target.
6587 (find_attach_target, find_run_target): Simplify.
6588 (target_ops::open): Delete.
6589 (dummy_target_info): New.
6590 (dummy_target::shortname, dummy_target::longname)
6591 (dummy_target::doc): Delete.
6592 (dummy_target::info): New.
6593 (debug_target::shortname, debug_target::longname)
6594 (debug_target::doc): Delete.
6595 (debug_target::info): New.
6596 * target.h (struct target_info): New.
6597 (target_ops::~target_ops): Add comment.
6598 (target_ops::info): New.
6599 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6600 longer virtual. Implement in terms of target_info.
6601 (set_native_target, get_native_target): Declare.
6602 (target_open_ftype): New.
6603 (add_target, add_target_with_completer)
6604 (add_deprecated_target_alias): Change prototype.
6605 (test_target) <shortname, longname, doc>: Delete.
6606 <info>: New.
6607 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6608 add_inf_child_target.
6609 * tracefile-tfile.c (tfile_target_info): New.
6610 (tfile_target) <shortname, longname, doc>: Delete.
6611 <info>: New.
6612 (tfile_target::open): Rename to ...
6613 (tfile_target_open): ... this.
6614 (_initialize_tracefile_tfile): Adjust.
6615 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6616 add_inf_child_target.
6617 * windows-nat.c (_initialize_windows_nat): Use
6618 add_inf_child_target.
6619 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6620 add_inf_child_target.
6621
6622 2018-05-02 Pedro Alves <palves@redhat.com>
6623
6624 * linux-nat.h (linux_nat_target) <low_new_thread,
6625 low_delete_thread, low_new_fork, low_forget_process,
6626 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6627 New virtual methods.
6628 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6629 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6630 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6631 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6632 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6633 Delete.
6634 * linux-fork.c (delete_fork): Adjust to call low method.
6635 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6636 (linux_nat_new_fork, linux_nat_forget_process_hook)
6637 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6638 (linux_nat_status_is_event):
6639 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6640 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6641 to call low method.
6642 (sigtrap_is_event): Rename to ...
6643 (linux_nat_target::low_status_is_event): ... this.
6644 (linux_nat_set_status_is_event): Delete.
6645 (save_stop_reason, linux_nat_wait_1)
6646 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6647 low methods.
6648 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6649 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6650 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6651 (linux_nat_set_prepare_to_resume): Delete.
6652 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6653 low virtual methods.
6654 * amd64-linux-nat.c: Likewise.
6655 * arm-linux-nat.c: Likewise.
6656 * i386-linux-nat.c: Likewise.
6657 * ia64-linux-nat.c: Likewise.
6658 * mips-linux-nat.c: Likewise.
6659 * ppc-linux-nat.c: Likewise.
6660 * s390-linux-nat.c: Likewise.
6661 * sparc64-linux-nat.c: Likewise.
6662 * x86-linux-nat.c: Likewise.
6663 * x86-linux-nat.h: Include "nat/x86-linux.h".
6664 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6665 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6666 Override methods.
6667
6668 2018-05-02 Pedro Alves <palves@redhat.com>
6669
6670 * target.h (target_ops)
6671 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6672 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6673 stopped_by_watchpoint, have_continuable_watchpoint,
6674 stopped_data_address, watchpoint_addr_within_range,
6675 can_accel_watchpoint_condition, can_run, thread_alive,
6676 has_all_memory, has_memory, has_stack, has_registers,
6677 has_execution, can_async_p, is_async_p, supports_non_stop,
6678 always_non_stop_p, can_execute_reverse, supports_multi_process,
6679 supports_enable_disable_tracepoint,
6680 supports_disable_randomization, supports_string_tracing,
6681 supports_evaluation_of_breakpoint_conditions,
6682 can_run_breakpoint_commands, filesystem_is_local,
6683 can_download_tracepoint, get_trace_state_variable_value,
6684 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6685 record_is_replaying, record_will_replay,
6686 augmented_libraries_svr4_read>: Adjust to return bool.
6687 * aarch64-linux-nat.c: All implementations adjusted.
6688 * aix-thread.c: All implementations adjusted.
6689 * arm-linux-nat.c: All implementations adjusted.
6690 * breakpoint.c: All implementations adjusted.
6691 * bsd-kvm.c: All implementations adjusted.
6692 * bsd-uthread.c: All implementations adjusted.
6693 * corelow.c: All implementations adjusted.
6694 * ctf.c: All implementations adjusted.
6695 * darwin-nat.c: All implementations adjusted.
6696 * darwin-nat.h: All implementations adjusted.
6697 * exec.c: All implementations adjusted.
6698 * fbsd-nat.c: All implementations adjusted.
6699 * fbsd-nat.h: All implementations adjusted.
6700 * gnu-nat.c: All implementations adjusted.
6701 * gnu-nat.h: All implementations adjusted.
6702 * go32-nat.c: All implementations adjusted.
6703 * ia64-linux-nat.c: All implementations adjusted.
6704 * inf-child.c: All implementations adjusted.
6705 * inf-child.h: All implementations adjusted.
6706 * inf-ptrace.c: All implementations adjusted.
6707 * inf-ptrace.h: All implementations adjusted.
6708 * linux-nat.c: All implementations adjusted.
6709 * linux-nat.h: All implementations adjusted.
6710 * mips-linux-nat.c: All implementations adjusted.
6711 * nto-procfs.c: All implementations adjusted.
6712 * ppc-linux-nat.c: All implementations adjusted.
6713 * procfs.c: All implementations adjusted.
6714 * ravenscar-thread.c: All implementations adjusted.
6715 * record-btrace.c: All implementations adjusted.
6716 * record-full.c: All implementations adjusted.
6717 * remote-sim.c: All implementations adjusted.
6718 * remote.c: All implementations adjusted.
6719 * s390-linux-nat.c: All implementations adjusted.
6720 * sol-thread.c: All implementations adjusted.
6721 * spu-multiarch.c: All implementations adjusted.
6722 * target-delegates.c: All implementations adjusted.
6723 * target.c: All implementations adjusted.
6724 * target.h: All implementations adjusted.
6725 * tracefile-tfile.c: All implementations adjusted.
6726 * tracefile.c: All implementations adjusted.
6727 * tracefile.h: All implementations adjusted.
6728 * windows-nat.c: All implementations adjusted.
6729 * x86-linux-nat.h: All implementations adjusted.
6730 * x86-nat.h: All implementations adjusted.
6731
6732 2018-05-02 Pedro Alves <palves@redhat.com>
6733
6734 * make-target-delegates (scan_target_h): Don't trim lines here.
6735 Replace sequences of tabs and/or whitespace with a single
6736 whitespace.
6737 (top level, parsing methods): Trim each line before processing it
6738 here.
6739
6740 2018-05-02 Pedro Alves <palves@redhat.com>
6741 John Baldwin <jhb@freebsd.org>
6742
6743 * target.h (enum strata) <debug_stratum>: New.
6744 (struct target_ops) <all delegation methods>: Replace by C++
6745 virtual methods, and drop "to_" prefix. All references updated
6746 throughout.
6747 <to_shortname, to_longname, to_doc, to_data,
6748 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6749 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6750 virtual methods. All references updated throughout.
6751 <can_attach, supports_terminal_ours, can_create_inferior,
6752 get_thread_control_capabilities, attach_no_wait>: New
6753 virtual methods.
6754 <insert_breakpoint, remove_breakpoint>: Now
6755 TARGET_DEFAULT_NORETURN methods.
6756 <info_proc>: Now returns bool.
6757 <to_magic>: Delete.
6758 (OPS_MAGIC): Delete.
6759 (current_target): Delete. All references replaced by references
6760 to ...
6761 (target_stack): ... this. New.
6762 (target_shortname, target_longname): Adjust.
6763 (target_can_run): Now a function declaration.
6764 (default_child_has_all_memory, default_child_has_memory)
6765 (default_child_has_stack, default_child_has_registers)
6766 (default_child_has_execution): Remove target_ops parameter.
6767 (complete_target_initialization): Delete.
6768 (memory_breakpoint_target): New template class.
6769 (test_target_ops): Refactor as a C++ class with virtual methods.
6770 * make-target-delegates (NAME_PART): Tighten.
6771 (POINTER_PART, CP_SYMBOL): New.
6772 (SIMPLE_RETURN_PART): Reimplement.
6773 (VEC_RETURN_PART): Expect less.
6774 (RETURN_PART, VIRTUAL_PART): New.
6775 (METHOD): Adjust to C++ virtual methods.
6776 (scan_target_h): Remove reference to C99.
6777 (dname): Output "target_ops::" prefix.
6778 (write_function_header): Adjust to output a C++ class method.
6779 (write_declaration): New.
6780 (write_delegator): Adjust to output a C++ class method.
6781 (tdname): Output "dummy_target::" prefix.
6782 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6783 method.
6784 (tdefault_names, debug_names): Delete.
6785 (return_types, tdefaults, styles, argtypes_array): New.
6786 (top level): All methods are delegators.
6787 (print_class): New.
6788 (top level): Print dummy_target and debug_target classes.
6789 * target-delegates.c: Regenerate.
6790 * target-debug.h (target_debug_print_enum_info_proc_what)
6791 (target_debug_print_thread_control_capabilities)
6792 (target_debug_print_thread_info_p): New.
6793 * target.c (dummy_target): Delete.
6794 (the_dummy_target, the_debug_target): New.
6795 (target_stack): Now extern.
6796 (set_targetdebug): Push/unpush debug target.
6797 (default_child_has_all_memory, default_child_has_memory)
6798 (default_child_has_stack, default_child_has_registers)
6799 (default_child_has_execution): Remove target_ops parameter.
6800 (complete_target_initialization): Delete.
6801 (add_target_with_completer): No longer call
6802 complete_target_initialization.
6803 (target_supports_terminal_ours): Use regular delegation.
6804 (update_current_target): Delete.
6805 (push_target): No longer check magic number. Don't call
6806 update_current_target.
6807 (unpush_target): Don't call update_current_target.
6808 (target_is_pushed): No longer check magic number.
6809 (target_require_runnable): Skip for all stratums over
6810 process_stratum.
6811 (target_ops::info_proc): New.
6812 (target_info_proc): Use find_target_at and
6813 find_default_run_target.
6814 (target_supports_disable_randomization): Use regular delegation.
6815 (target_get_osdata): Use find_target_at.
6816 (target_ops::open, target_ops::close, target_ops::can_attach)
6817 (target_ops::attach, target_ops::can_create_inferior)
6818 (target_ops::create_inferior, target_ops::can_run)
6819 (target_can_run): New.
6820 (default_fileio_target): Use regular delegation.
6821 (target_ops::fileio_open, target_ops::fileio_pwrite)
6822 (target_ops::fileio_pread, target_ops::fileio_fstat)
6823 (target_ops::fileio_close, target_ops::fileio_unlink)
6824 (target_ops::fileio_readlink): New.
6825 (target_fileio_open_1, target_fileio_unlink)
6826 (target_fileio_readlink): Always call the target method. Handle
6827 FILEIO_ENOSYS.
6828 (return_zero, return_zero_has_execution): Delete.
6829 (init_dummy_target): Delete.
6830 (dummy_target::dummy_target, dummy_target::shortname)
6831 (dummy_target::longname, dummy_target::doc)
6832 (debug_target::debug_target, debug_target::shortname)
6833 (debug_target::longname, debug_target::doc): New.
6834 (target_supports_delete_record): Use regular delegation.
6835 (setup_target_debug): Delete.
6836 (maintenance_print_target_stack): Skip debug_stratum.
6837 (initialize_targets): Instantiate the_dummy_target and
6838 the_debug_target.
6839 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6840 use target_stack.
6841 (target_auxv_search, fprint_target_auxv): Adjust.
6842 (info_auxv_command): Adjust to use target_stack.
6843 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6844 * exceptions.c (print_flush): Handle a NULL target_stack.
6845 * regcache.c (target_ops_no_register): Refactor as class with
6846 virtual methods.
6847
6848 * exec.c (exec_target): New class.
6849 (exec_ops): Now an exec_target.
6850 (exec_open, exec_close_1, exec_get_section_table)
6851 (exec_xfer_partial, exec_files_info, exec_has_memory)
6852 (exec_make_note_section): Refactor as exec_target methods.
6853 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6854 Delete.
6855 (exec_target::find_memory_regions): New.
6856 (_initialize_exec): Don't call init_exec_ops.
6857 * gdbcore.h (exec_file_clear): Delete.
6858
6859 * corefile.c (core_target): Delete.
6860 (core_file_command): Adjust.
6861 * corelow.c (core_target): New class.
6862 (the_core_target): New.
6863 (core_close): Remove target_ops parameter.
6864 (core_close_cleanup): Adjust.
6865 (core_target::close): New.
6866 (core_open, core_detach, get_core_registers, core_files_info)
6867 (core_xfer_partial, core_thread_alive, core_read_description)
6868 (core_pid_to_str, core_thread_name, core_has_memory)
6869 (core_has_stack, core_has_registers, core_info_proc): Rework as
6870 core_target methods.
6871 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6872 (_initialize_corelow): Initialize the_core_target.
6873 * gdbcore.h (core_target): Delete.
6874 (the_core_target): New.
6875
6876 * ctf.c: (ctf_target): New class.
6877 (ctf_ops): Now a ctf_target.
6878 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6879 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6880 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6881 methods.
6882 (init_ctf_ops): Delete.
6883 (_initialize_ctf): Don't call it.
6884 * tracefile-tfile.c (tfile_target): New class.
6885 (tfile_ops): Now a tfile_target.
6886 (tfile_open, tfile_close, tfile_files_info)
6887 (tfile_get_tracepoint_status, tfile_trace_find)
6888 (tfile_fetch_registers, tfile_xfer_partial)
6889 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6890 Refactor as tfile_target methods.
6891 (tfile_xfer_partial_features): Remove target_ops parameter.
6892 (init_tfile_ops): Delete.
6893 (_initialize_tracefile_tfile): Don't call it.
6894 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6895 (tracefile_has_stack, tracefile_has_registers)
6896 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6897 tracefile_target methods.
6898 (init_tracefile_ops): Delete.
6899 (tracefile_target::tracefile_target): New.
6900 * tracefile.h: Include "target.h".
6901 (tracefile_target): New class.
6902 (init_tracefile_ops): Delete.
6903
6904 * spu-multiarch.c (spu_multiarch_target): New class.
6905 (spu_ops): Now a spu_multiarch_target.
6906 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6907 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6908 (spu_search_memory, spu_mourn_inferior): Refactor as
6909 spu_multiarch_target methods.
6910 (init_spu_ops): Delete.
6911 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6912 complete_target_initialization.
6913
6914 * ravenscar-thread.c (ravenscar_thread_target): New class.
6915 (ravenscar_ops): Now a ravenscar_thread_target.
6916 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6917 (ravenscar_thread_alive, ravenscar_pid_to_str)
6918 (ravenscar_fetch_registers, ravenscar_store_registers)
6919 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6920 (ravenscar_stopped_by_hw_breakpoint)
6921 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6922 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6923 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6924 methods.
6925 (init_ravenscar_thread_ops): Delete.
6926 (_initialize_ravenscar): Remove references to
6927 init_ravenscar_thread_ops and complete_target_initialization.
6928
6929 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6930 (bsd_uthread_target): New class.
6931 (bsd_uthread_ops): Now a bsd_uthread_target.
6932 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6933 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6934 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6935 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6936 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6937 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6938 (bsd_uthread_target): Delete function.
6939 (_initialize_bsd_uthread): Remove reference to
6940 complete_target_initialization.
6941
6942 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6943 (target_bfd): ... this new class.
6944 (target_bfd_xfer_partial, target_bfd_get_section_table)
6945 (target_bfd_close): Refactor as target_bfd methods.
6946 (target_bfd::~target_bfd): New.
6947 (target_bfd_reopen): Adjust.
6948 (target_bfd::close): New.
6949
6950 * record-btrace.c (record_btrace_target): New class.
6951 (record_btrace_ops): Now a record_btrace_target.
6952 (record_btrace_open, record_btrace_stop_recording)
6953 (record_btrace_disconnect, record_btrace_close)
6954 (record_btrace_async, record_btrace_info)
6955 (record_btrace_insn_history, record_btrace_insn_history_range)
6956 (record_btrace_insn_history_from, record_btrace_call_history)
6957 (record_btrace_call_history_range)
6958 (record_btrace_call_history_from, record_btrace_record_method)
6959 (record_btrace_is_replaying, record_btrace_will_replay)
6960 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6961 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6962 (record_btrace_store_registers, record_btrace_prepare_to_store)
6963 (record_btrace_to_get_unwinder)
6964 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6965 (record_btrace_commit_resume, record_btrace_wait)
6966 (record_btrace_stop, record_btrace_can_execute_reverse)
6967 (record_btrace_stopped_by_sw_breakpoint)
6968 (record_btrace_supports_stopped_by_sw_breakpoint)
6969 (record_btrace_stopped_by_hw_breakpoint)
6970 (record_btrace_supports_stopped_by_hw_breakpoint)
6971 (record_btrace_update_thread_list, record_btrace_thread_alive)
6972 (record_btrace_goto_begin, record_btrace_goto_end)
6973 (record_btrace_goto, record_btrace_stop_replaying_all)
6974 (record_btrace_execution_direction)
6975 (record_btrace_prepare_to_generate_core)
6976 (record_btrace_done_generating_core): Refactor as
6977 record_btrace_target methods.
6978 (init_record_btrace_ops): Delete.
6979 (_initialize_record_btrace): Remove reference to
6980 init_record_btrace_ops.
6981 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6982 the execution_direction global.
6983 (record_full_base_target, record_full_target)
6984 (record_full_core_target): New classes.
6985 (record_full_ops): Now a record_full_target.
6986 (record_full_core_ops): Now a record_full_core_target.
6987 (record_full_target::detach, record_full_target::disconnect)
6988 (record_full_core_target::disconnect)
6989 (record_full_target::mourn_inferior, record_full_target::kill):
6990 New.
6991 (record_full_open, record_full_close, record_full_async): Refactor
6992 as methods of the record_full_base_target class.
6993 (record_full_resume, record_full_commit_resume): Refactor
6994 as methods of the record_full_target class.
6995 (record_full_wait, record_full_stopped_by_watchpoint)
6996 (record_full_stopped_data_address)
6997 (record_full_stopped_by_sw_breakpoint)
6998 (record_full_supports_stopped_by_sw_breakpoint)
6999 (record_full_stopped_by_hw_breakpoint)
7000 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7001 methods of the record_full_base_target class.
7002 (record_full_store_registers, record_full_xfer_partial)
7003 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7004 Refactor as methods of the record_full_target class.
7005 (record_full_can_execute_reverse, record_full_get_bookmark)
7006 (record_full_goto_bookmark, record_full_execution_direction)
7007 (record_full_record_method, record_full_info, record_full_delete)
7008 (record_full_is_replaying, record_full_will_replay)
7009 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7010 (record_full_stop_replaying): Refactor as methods of the
7011 record_full_base_target class.
7012 (record_full_core_resume, record_full_core_kill)
7013 (record_full_core_fetch_registers)
7014 (record_full_core_prepare_to_store)
7015 (record_full_core_store_registers, record_full_core_xfer_partial)
7016 (record_full_core_insert_breakpoint)
7017 (record_full_core_remove_breakpoint)
7018 (record_full_core_has_execution): Refactor
7019 as methods of the record_full_core_target class.
7020 (record_full_base_target::supports_delete_record): New.
7021 (init_record_full_ops): Delete.
7022 (init_record_full_core_ops): Delete.
7023 (record_full_save): Refactor as method of the
7024 record_full_base_target class.
7025 (_initialize_record_full): Remove references to
7026 init_record_full_ops and init_record_full_core_ops.
7027
7028 * remote.c (remote_target, extended_remote_target): New classes.
7029 (remote_ops): Now a remote_target.
7030 (extended_remote_ops): Now an extended_remote_target.
7031 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7032 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7033 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7034 (remote_pass_signals, remote_set_syscall_catchpoint)
7035 (remote_program_signals, )
7036 (remote_thread_always_alive): Remove target_ops parameter.
7037 (remote_thread_alive, remote_thread_name)
7038 (remote_update_thread_list, remote_threads_extra_info)
7039 (remote_static_tracepoint_marker_at)
7040 (remote_static_tracepoint_markers_by_strid)
7041 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7042 (remote_open): Refactor as methods of remote_target.
7043 (extended_remote_open, extended_remote_detach)
7044 (extended_remote_attach, extended_remote_post_attach):
7045 (extended_remote_supports_disable_randomization)
7046 (extended_remote_create_inferior): : Refactor as method of
7047 extended_remote_target.
7048 (remote_set_permissions, remote_open_1, remote_detach)
7049 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7050 (remote_resume, remote_commit_resume, remote_stop)
7051 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7052 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7053 (remote_prepare_to_store, remote_store_registers)
7054 (remote_flash_erase, remote_flash_done, remote_files_info)
7055 (remote_kill, remote_mourn, remote_insert_breakpoint)
7056 (remote_remove_breakpoint, remote_insert_watchpoint)
7057 (remote_watchpoint_addr_within_range)
7058 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7059 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7060 (remote_supports_stopped_by_sw_breakpoint)
7061 (remote_stopped_by_hw_breakpoint)
7062 (remote_supports_stopped_by_hw_breakpoint)
7063 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7064 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7065 (remote_verify_memory): Refactor as methods of remote_target.
7066 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7067 parameter.
7068 (remote_xfer_partial, remote_get_memory_xfer_limit)
7069 (remote_search_memory, remote_rcmd, remote_memory_map)
7070 (remote_pid_to_str, remote_get_thread_local_address)
7071 (remote_get_tib_address, remote_read_description): Refactor as
7072 methods of remote_target.
7073 (remote_target::fileio_open, remote_target::fileio_pwrite)
7074 (remote_target::fileio_pread, remote_target::fileio_close): New.
7075 (remote_hostio_readlink, remote_hostio_fstat)
7076 (remote_filesystem_is_local, remote_can_execute_reverse)
7077 (remote_supports_non_stop, remote_supports_disable_randomization)
7078 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7079 (remote_supports_enable_disable_tracepoint)
7080 (remote_supports_string_tracing)
7081 (remote_can_run_breakpoint_commands, remote_trace_init)
7082 (remote_download_tracepoint, remote_can_download_tracepoint)
7083 (remote_download_trace_state_variable, remote_enable_tracepoint)
7084 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7085 (remote_trace_start, remote_get_trace_status)
7086 (remote_get_tracepoint_status, remote_trace_stop)
7087 (remote_trace_find, remote_get_trace_state_variable_value)
7088 (remote_save_trace_data, remote_get_raw_trace_data)
7089 (remote_set_disconnected_tracing, remote_core_of_thread)
7090 (remote_set_circular_trace_buffer, remote_traceframe_info)
7091 (remote_get_min_fast_tracepoint_insn_len)
7092 (remote_set_trace_buffer_size, remote_set_trace_notes)
7093 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7094 (remote_disable_btrace, remote_teardown_btrace)
7095 (remote_read_btrace, remote_btrace_conf)
7096 (remote_augmented_libraries_svr4_read, remote_load)
7097 (remote_pid_to_exec_file, remote_can_do_single_step)
7098 (remote_execution_direction, remote_thread_handle_to_thread_info):
7099 Refactor as methods of remote_target.
7100 (init_remote_ops, init_extended_remote_ops): Delete.
7101 (remote_can_async_p, remote_is_async_p, remote_async)
7102 (remote_thread_events, remote_upload_tracepoints)
7103 (remote_upload_trace_state_variables): Refactor as methods of
7104 remote_target.
7105 (_initialize_remote): Remove references to init_remote_ops and
7106 init_extended_remote_ops.
7107
7108 * remote-sim.c (gdbsim_target): New class.
7109 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7110 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7111 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7112 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7113 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7114 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7115 Refactor as methods of gdbsim_target.
7116 (gdbsim_ops): Now a gdbsim_target.
7117 (init_gdbsim_ops): Delete.
7118 (gdbsim_cntrl_c): Adjust.
7119 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7120
7121 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7122 (the_amd64_linux_nat_target): New.
7123 (amd64_linux_fetch_inferior_registers)
7124 (amd64_linux_store_inferior_registers): Refactor as methods of
7125 amd64_linux_nat_target.
7126 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7127 * i386-linux-nat.c: Don't include "linux-nat.h".
7128 (i386_linux_nat_target): New class.
7129 (the_i386_linux_nat_target): New.
7130 (i386_linux_fetch_inferior_registers)
7131 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7132 as methods of i386_linux_nat_target.
7133 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7134 * inf-child.c (inf_child_ops): Delete.
7135 (inf_child_fetch_inferior_registers)
7136 (inf_child_store_inferior_registers): Delete.
7137 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7138 methods of inf_child_target.
7139 (inf_child_target::supports_terminal_ours)
7140 (inf_child_target::terminal_init)
7141 (inf_child_target::terminal_inferior)
7142 (inf_child_target::terminal_ours_for_output)
7143 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7144 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7145 New.
7146 (inf_child_open, inf_child_disconnect, inf_child_close)
7147 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7148 (inf_child_post_startup_inferior, inf_child_can_run)
7149 (inf_child_pid_to_exec_file): Refactor as methods of
7150 inf_child_target.
7151 (inf_child_follow_fork): Delete.
7152 (inf_child_target::can_create_inferior)
7153 (inf_child_target::can_attach): New.
7154 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7155 (inf_child_target::has_stack, inf_child_target::has_registers)
7156 (inf_child_target::has_execution): New.
7157 (inf_child_fileio_open, inf_child_fileio_pwrite)
7158 (inf_child_fileio_pread, inf_child_fileio_fstat)
7159 (inf_child_fileio_close, inf_child_fileio_unlink)
7160 (inf_child_fileio_readlink, inf_child_use_agent)
7161 (inf_child_can_use_agent): Refactor as methods of
7162 inf_child_target.
7163 (return_zero, inf_child_target): Delete.
7164 (inf_child_target::inf_child_target): New.
7165 * inf-child.h: Include "target.h".
7166 (inf_child_target): Delete function prototype.
7167 (inf_child_target): New class.
7168 (inf_child_open_target, inf_child_mourn_inferior)
7169 (inf_child_maybe_unpush_target): Delete.
7170 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7171 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7172 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7173 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7174 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7175 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7176 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7177 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7178 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7179 methods of inf_ptrace_target.
7180 (inf_ptrace_target): Delete function.
7181 * inf-ptrace.h: Include "inf-child.h".
7182 (inf_ptrace_target): Delete function declaration.
7183 (inf_ptrace_target): New class.
7184 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7185 * linux-nat.c (linux_target): New.
7186 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7187 (linux_nat_target::~linux_nat_target): New.
7188 (linux_child_post_attach, linux_child_post_startup_inferior)
7189 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7190 (linux_child_remove_fork_catchpoint)
7191 (linux_child_insert_vfork_catchpoint)
7192 (linux_child_remove_vfork_catchpoint)
7193 (linux_child_insert_exec_catchpoint)
7194 (linux_child_remove_exec_catchpoint)
7195 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7196 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7197 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7198 (linux_nat_stopped_data_address)
7199 (linux_nat_stopped_by_sw_breakpoint)
7200 (linux_nat_supports_stopped_by_sw_breakpoint)
7201 (linux_nat_stopped_by_hw_breakpoint)
7202 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7203 (linux_nat_kill, linux_nat_mourn_inferior)
7204 (linux_nat_xfer_partial, linux_nat_thread_alive)
7205 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7206 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7207 (linux_child_static_tracepoint_markers_by_strid)
7208 (linux_nat_is_async_p, linux_nat_can_async_p)
7209 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7210 (linux_nat_supports_multi_process)
7211 (linux_nat_supports_disable_randomization, linux_nat_async)
7212 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7213 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7214 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7215 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7216 methods of linux_nat_target.
7217 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7218 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7219 parameter.
7220 (check_stopped_by_watchpoint): Adjust.
7221 (linux_xfer_partial): Delete.
7222 (linux_target_install_ops, linux_target, linux_nat_add_target):
7223 Delete.
7224 (linux_nat_target::linux_nat_target): New.
7225 * linux-nat.h: Include "inf-ptrace.h".
7226 (linux_nat_target): New.
7227 (linux_target, linux_target_install_ops, linux_nat_add_target):
7228 Delete function declarations.
7229 (linux_target): Declare global.
7230 * linux-thread-db.c (thread_db_target): New.
7231 (thread_db_target::thread_db_target): New.
7232 (thread_db_ops): Delete.
7233 (the_thread_db_target): New.
7234 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7235 (thread_db_update_thread_list, thread_db_pid_to_str)
7236 (thread_db_extra_thread_info)
7237 (thread_db_thread_handle_to_thread_info)
7238 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7239 (thread_db_resume): Refactor as methods of thread_db_target.
7240 (init_thread_db_ops): Delete.
7241 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7242 * x86-linux-nat.c: Don't include "linux-nat.h".
7243 (super_post_startup_inferior): Delete.
7244 (x86_linux_nat_target::~x86_linux_nat_target): New.
7245 (x86_linux_child_post_startup_inferior)
7246 (x86_linux_read_description, x86_linux_enable_btrace)
7247 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7248 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7249 methods of x86_linux_nat_target.
7250 (x86_linux_create_target): Delete. Bits folded ...
7251 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7252 pointer.
7253 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7254 (x86_linux_nat_target): New class.
7255 (x86_linux_create_target): Delete.
7256 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7257 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7258 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7259 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7260 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7261 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7262 make extern.
7263 (x86_use_watchpoints): Delete.
7264 * x86-nat.h: Include "breakpoint.h" and "target.h".
7265 (x86_use_watchpoints): Delete.
7266 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7267 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7268 (x86_insert_watchpoint, x86_remove_watchpoint)
7269 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7270 (x86_stopped_by_hw_breakpoint): New declarations.
7271 (x86_nat_target): New template class.
7272
7273 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7274 (the_ppc_linux_nat_target): New.
7275 (ppc_linux_fetch_inferior_registers)
7276 (ppc_linux_can_use_hw_breakpoint)
7277 (ppc_linux_region_ok_for_hw_watchpoint)
7278 (ppc_linux_ranged_break_num_registers)
7279 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7280 (ppc_linux_insert_mask_watchpoint)
7281 (ppc_linux_remove_mask_watchpoint)
7282 (ppc_linux_can_accel_watchpoint_condition)
7283 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7284 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7285 (ppc_linux_watchpoint_addr_within_range)
7286 (ppc_linux_masked_watch_num_registers)
7287 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7288 (ppc_linux_read_description): Refactor as methods of
7289 ppc_linux_nat_target.
7290 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7291
7292 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7293 (procfs_target): New class.
7294 (the_procfs_target): New.
7295 (procfs_target): Delete function.
7296 (procfs_auxv_parse, procfs_attach, procfs_detach)
7297 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7298 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7299 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7300 (procfs_create_inferior, procfs_update_thread_list)
7301 (procfs_thread_alive, procfs_pid_to_str)
7302 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7303 (procfs_stopped_data_address, procfs_insert_watchpoint)
7304 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7305 (proc_find_memory_regions, procfs_info_proc)
7306 (procfs_make_note_section): Refactor as methods of procfs_target.
7307 (_initialize_procfs): Adjust.
7308 * sol-thread.c (sol_thread_target): New class.
7309 (sol_thread_ops): Now a sol_thread_target.
7310 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7311 (sol_thread_fetch_registers, sol_thread_store_registers)
7312 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7313 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7314 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7315 (init_sol_thread_ops): Delete.
7316 (_initialize_sol_thread): Adjust. Remove references to
7317 init_sol_thread_ops and complete_target_initialization.
7318
7319 * windows-nat.c (windows_nat_target): New class.
7320 (windows_fetch_inferior_registers)
7321 (windows_store_inferior_registers, windows_resume, windows_wait)
7322 (windows_attach, windows_detach, windows_pid_to_exec_file)
7323 (windows_files_info, windows_create_inferior)
7324 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7325 (windows_close, windows_pid_to_str, windows_xfer_partial)
7326 (windows_get_tib_address, windows_get_ada_task_ptid)
7327 (windows_thread_name, windows_thread_alive): Refactor as
7328 windows_nat_target methods.
7329 (do_initial_windows_stuff): Adjust.
7330 (windows_target): Delete function.
7331 (_initialize_windows_nat): Adjust.
7332
7333 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7334 (darwin_mourn_inferior, darwin_kill_inferior)
7335 (darwin_create_inferior, darwin_attach, darwin_detach)
7336 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7337 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7338 (darwin_supports_multi_process): Refactor as darwin_nat_target
7339 methods.
7340 (darwin_resume_to, darwin_files_info): Delete.
7341 (_initialize_darwin_inferior): Rename to ...
7342 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7343 * darwin-nat.h: Include "inf-child.h".
7344 (darwin_nat_target): New class.
7345 (darwin_complete_target): Delete.
7346 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7347 (darwin_target): New.
7348 (i386_darwin_fetch_inferior_registers)
7349 (i386_darwin_store_inferior_registers): Refactor as methods of
7350 darwin_nat_target.
7351 (darwin_complete_target): Delete, with ...
7352 (_initialize_i386_darwin_nat): ... bits factored out here.
7353
7354 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7355 (the_alpha_linux_nat_target): New.
7356 (alpha_linux_register_u_offset): Refactor as
7357 alpha_linux_nat_target method.
7358 (_initialize_alpha_linux_nat): Adjust.
7359 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7360 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7361 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7362 methods of linux_nat_trad_target.
7363 (linux_trad_target): Delete.
7364 * linux-nat-trad.h (linux_trad_target): Delete function.
7365 (linux_nat_trad_target): New class.
7366 * mips-linux-nat.c (mips_linux_nat_target): New class.
7367 (super_fetch_registers, super_store_registers, super_close):
7368 Delete.
7369 (the_mips_linux_nat_target): New.
7370 (mips64_linux_regsets_fetch_registers)
7371 (mips64_linux_regsets_store_registers)
7372 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7373 (mips_linux_register_u_offset, mips_linux_read_description)
7374 (mips_linux_can_use_hw_breakpoint)
7375 (mips_linux_stopped_by_watchpoint)
7376 (mips_linux_stopped_data_address)
7377 (mips_linux_region_ok_for_hw_watchpoint)
7378 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7379 (mips_linux_close): Refactor as methods of mips_linux_nat.
7380 (_initialize_mips_linux_nat): Adjust to C++ification.
7381
7382 * aix-thread.c (aix_thread_target): New class.
7383 (aix_thread_ops): Now an aix_thread_target.
7384 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7385 (aix_thread_fetch_registers, aix_thread_store_registers)
7386 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7387 (aix_thread_thread_alive, aix_thread_pid_to_str)
7388 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7389 Refactor as methods of aix_thread_target.
7390 (init_aix_thread_ops): Delete.
7391 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7392 and complete_target_initialization.
7393 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7394 (rs6000_nat_target): New class.
7395 (the_rs6000_nat_target): New.
7396 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7397 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7398 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7399 (super_create_inferior): Delete.
7400 (_initialize_rs6000_nat): Adjust to C++ification.
7401
7402 * arm-linux-nat.c (arm_linux_nat_target): New class.
7403 (the_arm_linux_nat_target): New.
7404 (arm_linux_fetch_inferior_registers)
7405 (arm_linux_store_inferior_registers, arm_linux_read_description)
7406 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7407 (arm_linux_remove_hw_breakpoint)
7408 (arm_linux_region_ok_for_hw_watchpoint)
7409 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7410 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7411 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7412 arm_linux_nat_target.
7413 (_initialize_arm_linux_nat): Adjust to C++ification.
7414
7415 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7416 (the_aarch64_linux_nat_target): New.
7417 (aarch64_linux_fetch_inferior_registers)
7418 (aarch64_linux_store_inferior_registers)
7419 (aarch64_linux_child_post_startup_inferior)
7420 (aarch64_linux_read_description)
7421 (aarch64_linux_can_use_hw_breakpoint)
7422 (aarch64_linux_insert_hw_breakpoint)
7423 (aarch64_linux_remove_hw_breakpoint)
7424 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7425 (aarch64_linux_region_ok_for_hw_watchpoint)
7426 (aarch64_linux_stopped_data_address)
7427 (aarch64_linux_stopped_by_watchpoint)
7428 (aarch64_linux_watchpoint_addr_within_range)
7429 (aarch64_linux_can_do_single_step): Refactor as methods of
7430 aarch64_linux_nat_target.
7431 (super_post_startup_inferior): Delete.
7432 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7433
7434 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7435 (the_hppa_linux_nat_target): New.
7436 (hppa_linux_fetch_inferior_registers)
7437 (hppa_linux_store_inferior_registers): Refactor as methods of
7438 hppa_linux_nat_target.
7439 (_initialize_hppa_linux_nat): Adjust to C++ification.
7440
7441 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7442 (the_ia64_linux_nat_target): New.
7443 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7444 (ia64_linux_stopped_data_address)
7445 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7446 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7447 ia64_linux_nat_target methods.
7448 (super_xfer_partial): Delete.
7449 (_initialize_ia64_linux_nat): Adjust to C++ification.
7450
7451 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7452 (the_m32r_linux_nat_target): New.
7453 (m32r_linux_fetch_inferior_registers)
7454 (m32r_linux_store_inferior_registers): Refactor as
7455 m32r_linux_nat_target methods.
7456 (_initialize_m32r_linux_nat): Adjust to C++ification.
7457
7458 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7459 (the_m68k_linux_nat_target): New.
7460 (m68k_linux_fetch_inferior_registers)
7461 (m68k_linux_store_inferior_registers): Refactor as
7462 m68k_linux_nat_target methods.
7463 (_initialize_m68k_linux_nat): Adjust to C++ification.
7464
7465 * s390-linux-nat.c (s390_linux_nat_target): New class.
7466 (the_s390_linux_nat_target): New.
7467 (s390_linux_fetch_inferior_registers)
7468 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7469 (s390_insert_watchpoint, s390_remove_watchpoint)
7470 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7471 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7472 (s390_auxv_parse, s390_read_description): Refactor as methods of
7473 s390_linux_nat_target.
7474 (_initialize_s390_nat): Adjust to C++ification.
7475
7476 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7477 (the_sparc_linux_nat_target): New.
7478 (_initialize_sparc_linux_nat): Adjust to C++ification.
7479 * sparc-nat.c (sparc_fetch_inferior_registers)
7480 (sparc_store_inferior_registers): Remove target_ops parameter.
7481 * sparc-nat.h (sparc_fetch_inferior_registers)
7482 (sparc_store_inferior_registers): Remove target_ops parameter.
7483 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7484 (the_sparc64_linux_nat_target): New.
7485 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7486
7487 * spu-linux-nat.c (spu_linux_nat_target): New class.
7488 (the_spu_linux_nat_target): New.
7489 (spu_child_post_startup_inferior, spu_child_post_attach)
7490 (spu_child_wait, spu_fetch_inferior_registers)
7491 (spu_store_inferior_registers, spu_xfer_partial)
7492 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7493 methods.
7494 (_initialize_spu_nat): Adjust to C++ification.
7495
7496 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7497 (the_tilegx_linux_nat_target): New.
7498 (fetch_inferior_registers, store_inferior_registers):
7499 Refactor as methods.
7500 (_initialize_tile_linux_nat): Adjust to C++ification.
7501
7502 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7503 (the_xtensa_linux_nat_target): New.
7504 (xtensa_linux_fetch_inferior_registers)
7505 (xtensa_linux_store_inferior_registers): Refactor as
7506 xtensa_linux_nat_target methods.
7507 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7508
7509 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7510 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7511 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7512 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7513 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7514 (fbsd_stopped_by_sw_breakpoint)
7515 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7516 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7517 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7518 (fbsd_post_startup_inferior, fbsd_post_attach)
7519 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7520 (fbsd_set_syscall_catchpoint)
7521 (super_xfer_partial, super_resume, super_wait)
7522 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7523 (fbsd_handle_debug_trap): Remove target_ops parameter.
7524 (fbsd_nat_add_target): Delete.
7525 * fbsd-nat.h: Include "inf-ptrace.h".
7526 (fbsd_nat_add_target): Delete.
7527 (USE_SIGTRAP_SIGINFO): Define.
7528 (fbsd_nat_target): New class.
7529
7530 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7531 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7532 (amd64bsd_target): Delete.
7533 * amd64-bsd-nat.h: New file.
7534 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7535 "x86-bsd-nat.h".
7536 (amd64_fbsd_nat_target): New class.
7537 (the_amd64_fbsd_nat_target): New.
7538 (amd64fbsd_read_description): Refactor as method of
7539 amd64_fbsd_nat_target.
7540 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7541 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7542 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7543 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7544 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7545 (i386bsd_target): Delete.
7546 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7547 (i386bsd_fetch_inferior_registers)
7548 (i386bsd_store_inferior_registers): Declare.
7549 (i386_bsd_nat_target): New class.
7550 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7551 (the_i386_fbsd_nat_target): New.
7552 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7553 i386_fbsd_nat_target methods.
7554 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7555 (_initialize_i386fbsd_nat): Adjust to C++ification.
7556 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7557 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7558 (_initialize_x86_bsd_nat): Adjust to C++ification.
7559 * x86-bsd-nat.h: Include "x86-nat.h".
7560 (x86bsd_target): Delete declaration.
7561 (x86bsd_nat_target): New class.
7562
7563 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7564 (the_aarch64_fbsd_nat_target): New.
7565 (aarch64_fbsd_fetch_inferior_registers)
7566 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7567 aarch64_fbsd_nat_target.
7568 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7569 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7570 (the_alpha_bsd_nat_target): New.
7571 (alphabsd_fetch_inferior_registers)
7572 (alphabsd_store_inferior_registers): Refactor as
7573 alpha_bsd_nat_target methods.
7574 (_initialize_alphabsd_nat): Refactor as methods of
7575 alpha_bsd_nat_target.
7576 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7577 (the_amd64_nbsd_nat_target): New.
7578 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7579 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7580 (the_amd64_obsd_nat_target): New.
7581 (_initialize_amd64obsd_nat): Adjust to C++ification.
7582 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7583 (the_arm_fbsd_nat_target): New.
7584 (arm_fbsd_fetch_inferior_registers)
7585 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7586 (_initialize_arm_fbsd_nat): Refactor as methods of
7587 arm_fbsd_nat_target.
7588 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7589 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7590 (the_arm_netbsd_nat_target): New.
7591 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7592 arm_netbsd_nat_target.
7593 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7594 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7595 (the_hppa_nbsd_nat_target): New.
7596 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7597 hppa_nbsd_nat_target methods.
7598 (_initialize_hppanbsd_nat): Adjust to C++ification.
7599 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7600 (the_hppa_obsd_nat_target): New.
7601 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7602 methods of hppa_obsd_nat_target.
7603 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7604 add_target.
7605 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7606 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7607 add_target.
7608 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7609 (_initialize_i386obsd_nat): Use add_target.
7610 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7611 (the_m68k_bsd_nat_target): New.
7612 (m68kbsd_fetch_inferior_registers)
7613 (m68kbsd_store_inferior_registers): Refactor as methods of
7614 m68k_bsd_nat_target.
7615 (_initialize_m68kbsd_nat): Adjust to C++ification.
7616 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7617 (the_mips_fbsd_nat_target): New.
7618 (mips_fbsd_fetch_inferior_registers)
7619 (mips_fbsd_store_inferior_registers): Refactor as methods of
7620 mips_fbsd_nat_target.
7621 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7622 add_target.
7623 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7624 (the_mips_nbsd_nat_target): New.
7625 (mipsnbsd_fetch_inferior_registers)
7626 (mipsnbsd_store_inferior_registers): Refactor as methods of
7627 mips_nbsd_nat_target.
7628 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7629 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7630 (the_mips64_obsd_nat_target): New.
7631 (mips64obsd_fetch_inferior_registers)
7632 (mips64obsd_store_inferior_registers): Refactor as methods of
7633 mips64_obsd_nat_target.
7634 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7635 add_target.
7636 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7637 nbsd_nat_target.
7638 * nbsd-nat.h: Include "inf-ptrace.h".
7639 (nbsd_nat_target): New class.
7640 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7641 (obsd_wait): Refactor as methods of obsd_nat_target.
7642 (obsd_add_target): Delete.
7643 * obsd-nat.h: Include "inf-ptrace.h".
7644 (obsd_nat_target): New class.
7645 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7646 (the_ppc_fbsd_nat_target): New.
7647 (ppcfbsd_fetch_inferior_registers)
7648 (ppcfbsd_store_inferior_registers): Refactor as methods of
7649 ppc_fbsd_nat_target.
7650 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7651 add_target.
7652 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7653 (the_ppc_nbsd_nat_target): New.
7654 (ppcnbsd_fetch_inferior_registers)
7655 (ppcnbsd_store_inferior_registers): Refactor as methods of
7656 ppc_nbsd_nat_target.
7657 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7658 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7659 (the_ppc_obsd_nat_target): New.
7660 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7661 methods of ppc_obsd_nat_target.
7662 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7663 add_target.
7664 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7665 (the_sh_nbsd_nat_target): New.
7666 (shnbsd_fetch_inferior_registers)
7667 (shnbsd_store_inferior_registers): Refactor as methods of
7668 sh_nbsd_nat_target.
7669 (_initialize_shnbsd_nat): Adjust to C++ification.
7670 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7671 (inf_ptrace_xfer_partial): Delete.
7672 (sparc_xfer_partial, sparc_target): Delete.
7673 * sparc-nat.h (sparc_fetch_inferior_registers)
7674 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7675 (sparc_target): Delete function declaration.
7676 (sparc_target): New template class.
7677 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7678 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7679 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7680 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7681 add_target.
7682 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7683 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7684 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7685 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7686 add_target.
7687 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7688 (the_vax_bsd_nat_target): New.
7689 (vaxbsd_fetch_inferior_registers)
7690 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7691 methods.
7692 (_initialize_vaxbsd_nat): Adjust to C++ification.
7693
7694 * bsd-kvm.c (bsd_kvm_target): New class.
7695 (bsd_kvm_ops): Now a bsd_kvm_target.
7696 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7697 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7698 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7699 bsd_kvm_target.
7700 (bsd_kvm_return_one): Delete.
7701 (bsd_kvm_add_target): Adjust to C++ification.
7702
7703 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7704 (nto_procfs_target_procfs): New classes.
7705 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7706 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7707 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7708 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7709 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7710 (procfs_remove_hw_breakpoint, procfs_resume)
7711 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7712 (procfs_kill_inferior, procfs_store_registers)
7713 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7714 as methods of nto_procfs_target.
7715 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7716 (nto_native_ops): Delete.
7717 (procfs_open, procfs_native_open): Delete.
7718 (nto_native_ops): Now an nto_procfs_target_native.
7719 (init_procfs_targets): Adjust to C++ification.
7720 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7721 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7722 Refactor as methods of nto_procfs_target.
7723
7724 * go32-nat.c (go32_nat_target): New class.
7725 (the_go32_nat_target): New.
7726 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7727 (go32_store_registers, go32_xfer_partial, go32_files_info)
7728 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7729 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7730 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7731 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7732 (go32_target): Delete.
7733 (_initialize_go32_nat): Adjust to C++ification.
7734
7735 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7736 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7737 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7738 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7739 gnu_nat_target.
7740 (gnu_target): Delete.
7741 * gnu-nat.h (gnu_target): Delete.
7742 (gnu_nat_target): New class.
7743 * i386-gnu-nat.c (gnu_base_target): New.
7744 (i386_gnu_nat_target): New class.
7745 (the_i386_gnu_nat_target): New.
7746 (_initialize_i386gnu_nat): Adjust to C++ification.
7747
7748 2018-05-02 Pedro Alves <palves@redhat.com>
7749
7750 * bfd-target.c (target_bfd_xclose): Rename to ...
7751 (target_bfd_close): ... this.
7752 (target_bfd_reopen): Adjust.
7753 * target.c (target_close): Remove references to to_xclose.
7754 * target.h (target_ops::to_xclose): Delete.
7755 (target_ops::to_close): Update comments.
7756
7757 2018-05-02 Pedro Alves <palves@redhat.com>
7758
7759 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7760 "linux-nat.h".
7761 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7762 * inf-ptrace.c (inf_ptrace_register_u_offset)
7763 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7764 (inf_ptrace_store_register, inf_ptrace_store_registers)
7765 (inf_ptrace_trad_target): Move to ...
7766 * linux-nat-trad.c: ... this new file.
7767 * linux-nat-trad.h: New file.
7768 * linux-nat.c (linux_target_install_ops): Make extern.
7769 (linux_trad_target): Delete.
7770 * linux-nat.h (linux_trad_target): Delete declaration.
7771 (linux_target_install_ops): Declare.
7772 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7773 "linux-nat.h".
7774
7775 2018-05-02 Pedro Alves <palves@redhat.com>
7776
7777 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7778 procfs_target/add_target here.
7779 * procfs.c (procfs_target): Make static.
7780 (_initialize_procfs): Call add_target here.
7781 * procfs.h (struct target_ops): Remove forward declaration.
7782 (procfs_target): Remove declaration.
7783 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7784
7785 2018-05-02 Pedro Alves <palves@redhat.com>
7786
7787 * procfs.c (procfs_stopped_by_watchpoint)
7788 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7789 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7790 Forward declare.
7791 (procfs_use_watchpoints): Delete, move contents...
7792 (procfs_target): ... here.
7793 * procfs.h (procfs_use_watchpoints): Delete declaration.
7794 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7795 procfs_use_watchpoints.
7796 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7797 procfs_use_watchpoints.
7798
7799 2018-05-02 Tom Tromey <tom@tromey.com>
7800
7801 PR python/20084:
7802 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7803 and var_zuinteger_unlimited.
7804 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7805 and PARAM_ZUINTEGER_UNLIMITED.
7806 (set_parameter_value): Handle var_zuinteger and
7807 var_zuinteger_unlimited.
7808 (add_setshow_generic): Likewise.
7809 (parmpy_init): Likewise.
7810
7811 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7812
7813 PR rust/23124
7814 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7815 pointer is not null before dereferencing it.
7816
7817 2018-04-30 Tom Tromey <tom@tromey.com>
7818
7819 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7820 is_mi_like_p.
7821
7822 2018-04-30 Tom Tromey <tom@tromey.com>
7823
7824 * breakpoint.c (mention): Remove use of is_mi_like_p.
7825 (print_mention_ranged_breakpoint): Likewise.
7826 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7827 of is_mi_like_p.
7828
7829 2018-04-30 Tom Tromey <tom@tromey.com>
7830
7831 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7832
7833 2018-04-30 Tom Tromey <tom@tromey.com>
7834
7835 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7836 (info_spu_event_command): Remove some uses of is_mi_like_p.
7837
7838 2018-04-30 Tom Tromey <tom@tromey.com>
7839
7840 * python/py-framefilter.c (py_print_single_arg)
7841 (enumerate_locals, py_print_args, py_print_frame): Remove some
7842 uses of is_mi_like_p.
7843
7844 2018-04-30 Tom Tromey <tom@tromey.com>
7845
7846 * ui-out.c: Update.
7847 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7848 * ui-out.h (ui_out::is_mi_like_p): Now const.
7849 (ui_out::do_is_mi_like_p): Now const.
7850 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7851
7852 2018-04-30 Tom Tromey <tom@tromey.com>
7853
7854 * varobj.c (varobj_set_visualizer): Use new_reference.
7855 * python/python.c (gdbpy_decode_line): Use new_reference.
7856 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7857 new_reference.
7858
7859 2018-04-30 Tom Tromey <tom@tromey.com>
7860
7861 * varobj.c (install_new_value): Use new_reference.
7862 * value.h (value_incref): Return void. Swap intro comment with
7863 value_decref.
7864 * value.c (set_value_parent): Use new_reference.
7865 (value_incref): Return void. Update intro comment.
7866 (release_value): Use new_reference.
7867 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7868
7869 2018-04-30 Tom Tromey <tom@tromey.com>
7870
7871 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7872 * gdb_bfd.h (new_bfd_ref): Remove.
7873 (gdb_bfd_open): Update comment.
7874 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7875 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7876 (gdb_bfd_fdopenr): Use new_reference.
7877 * exec.c (exec_file_attach): Use new_reference.
7878
7879 2018-04-30 Tom Tromey <tom@tromey.com>
7880
7881 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7882 method.
7883
7884 2018-04-30 Tom Tromey <tom@tromey.com>
7885
7886 * jit.c (jit_read_code_entry): Use type_align.
7887 * i386-tdep.c (i386_gdbarch_init): Don't call
7888 set_gdbarch_long_long_align_bit.
7889 * gdbarch.sh: Remove long_long_align_bit.
7890 * gdbarch.c, gdbarch.h: Rebuild.
7891 * arc-tdep.c (arc_type_align): New function.
7892 (arc_gdbarch_init): Use arc_type_align. Don't call
7893 set_gdbarch_long_long_align_bit.
7894
7895 2018-04-30 Tom Tromey <tom@tromey.com>
7896
7897 * rust-lang.c (rust_type_alignment): Remove.
7898 (rust_composite_type): Use type_align.
7899
7900 2018-04-30 Tom Tromey <tom@tromey.com>
7901
7902 * NEWS: Mention Type.align.
7903 * python/py-type.c (typy_get_alignof): New function.
7904 (type_object_getset): Add "alignof".
7905
7906 2018-04-30 Tom Tromey <tom@tromey.com>
7907
7908 PR exp/17095:
7909 * NEWS: Update.
7910 * std-operator.def (UNOP_ALIGNOF): New operator.
7911 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7912 New.
7913 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7914 * c-lang.c (c_op_print_tab): Add alignof.
7915 * c-exp.y (ALIGNOF): New token.
7916 (exp): Add "ALIGNOF" production.
7917 (ident_tokens): Add _Alignof and alignof.
7918
7919 2018-04-30 Tom Tromey <tom@tromey.com>
7920
7921 * i386-tdep.c (i386_type_align): New function.
7922 (i386_gdbarch_init): Update.
7923 * gdbarch.sh (type_align): New method.
7924 * gdbarch.c, gdbarch.h: Rebuild.
7925 * arch-utils.h (default_type_align): Declare.
7926 * arch-utils.c (default_type_align): New function.
7927 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7928 (struct type) <align_log2>: New field.
7929 <instance_flags>: Now a bitfield.
7930 (TYPE_RAW_ALIGN): New macro.
7931 (type_align, type_raw_align, set_type_align): Declare.
7932 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7933 functions.
7934 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7935 (get_alignment, maybe_set_alignment): New functions.
7936 (read_structure_type, read_enumeration_type, read_array_type)
7937 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7938 (read_subrange_type, read_base_type): Set type alignment.
7939
7940 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7941
7942 * dwarf2read.c (read_index_from_section): Use bool.
7943
7944 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7945
7946 PR gdb/22950
7947 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7948 with #ifdef.
7949
7950 2018-04-29 John Reiser <jreiser@BitWagon.com>
7951
7952 PR build/22873
7953 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7954 last step, and do it atomically.
7955
7956 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7957
7958 * compile/compile-c-types.c (convert_int, convert_float):
7959 Update for C FE v1.
7960
7961 2018-04-27 Tom Tromey <tom@tromey.com>
7962
7963 PR rust/22545:
7964 * rust-lang.c (rust_inclusive_range_type_p): New function.
7965 (rust_range): Handle inclusive ranges.
7966 (rust_compute_range): Likewise.
7967 * rust-exp.y (struct rust_op) <inclusive>: New field.
7968 (DOTDOTEQ): New constant.
7969 (range_expr): Add "..=" productions.
7970 (operator_tokens): Add "..=" token.
7971 (ast_range): Add "inclusive" parameter.
7972 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7973 ranges.
7974 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7975 bounds values.
7976 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7977 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7978 Update comments.
7979 * expprint.c (print_subexp_standard): Handle new bounds values.
7980 (dump_subexp_body_standard): Likewise.
7981
7982 2018-04-27 Tom Tromey <tom@tromey.com>
7983
7984 * configure: Rebuild.
7985 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7986 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7987 "OVERRIDE".
7988 (class symbol_needs_eval_context): Likewise.
7989 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7990 (mock_mapped_index::symbol_name_at): Use "override". Remove
7991 "virtual".
7992 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7993 "override".
7994 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7995 * aarch64-tdep.c (instruction_reader::read): Use "override".
7996 (instruction_reader_test::read): Likewise.
7997 * arm-tdep.c (instruction_reader::read): Use "override".
7998 (instruction_reader_thumb::read): Likewise.
7999
8000 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8001
8002 PR remote/9665
8003 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8004 instead of remote_send.
8005 (remote_send): Remove.
8006
8007 2018-04-26 Pedro Alves <palves@redhat.com>
8008
8009 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8010 find_function_start_sal instead of find_pc_line.
8011
8012 2018-04-26 Pedro Alves <palves@redhat.com>
8013
8014 * breakpoint.c (set_breakpoint_location_function): Handle
8015 mst_data_gnu_ifunc.
8016 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8017 * elfread.c (elf_symtab_read): Give data symbols with
8018 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8019 (elf_rel_plt_read): Update comment.
8020 * linespec.c (convert_linespec_to_sals): Handle
8021 mst_data_gnu_ifunc.
8022 (minsym_found): Handle mst_data_gnu_ifunc.
8023 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8024 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8025 * parse.c (find_minsym_type_and_address): Handle
8026 mst_data_gnu_ifunc.
8027 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8028 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8029 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8030 comment.
8031 <mst_data_gnu_ifunc>: New enumerator.
8032
8033 2018-04-26 Pedro Alves <palves@redhat.com>
8034
8035 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8036 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8037 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8038 Handle it.
8039 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8040 (lookup_minimal_symbol_by_pc): Adjust.
8041 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8042 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8043 * minsyms.h (lookup_msym_prefer): New enum.
8044 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8045 parameter by a lookup_msym_prefer parameter.
8046
8047 2018-04-26 Pedro Alves <palves@redhat.com>
8048
8049 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8050 ends in "@plt" instead of looking at the symbol's section.
8051
8052 2018-04-26 Pedro Alves <palves@redhat.com>
8053
8054 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8055 all references.
8056 (find_pc_partial_function_gnu_ifunc): Rename to ...
8057 (find_pc_partial_function): ... this, and remove references to
8058 'is_gnu_ifunc_p'.
8059 (find_pc_partial_function): Delete old implementation.
8060 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8061
8062 2018-04-26 Pedro Alves <palves@redhat.com>
8063
8064 * linespec.c (struct bound_minimal_symbol_search_key): New.
8065 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8066 skip first line if we found a GNU ifunc minimal symbol by name.
8067 (compare_msymbols): Change parameters to work with a destructured
8068 lhs minsym.
8069 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8070 functions.
8071
8072 2018-04-26 Pedro Alves <palves@redhat.com>
8073
8074 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8075 ifunc targets here. Instead, if we have an ifunc minsym, use its
8076 address/name.
8077 (add_location_to_breakpoint): Store the minsym and the objfile in
8078 the breakpoint location.
8079 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8080 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8081 Record the minsym in the sal.
8082 * symtab.h (symtab_and_line) <msymbol>: New field.
8083
8084 2018-04-26 Pedro Alves <palves@redhat.com>
8085
8086 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8087 unless we actually resolved the ifunc.
8088
8089 2018-04-26 Pedro Alves <palves@redhat.com>
8090
8091 * c-exp.y (variable production): Prefer ifunc minsyms over
8092 regular function symbols.
8093 * symtab.c (find_gnu_ifunc): New function.
8094 * minsyms.h (lookup_msym_prefer): New enum.
8095 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8096 parameter by a lookup_msym_prefer parameter.
8097 * symtab.h (find_gnu_ifunc): New declaration.
8098
8099 2018-04-26 Pedro Alves <palves@redhat.com>
8100
8101 * blockframe.c (find_gnu_ifunc_target_type): New function.
8102 (find_function_type): New.
8103 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8104 return a value with a memory address.
8105 (eval_call): For calls to GNU ifunc functions, try to find the
8106 type of the target function from the type that the resolver
8107 returns.
8108 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8109 symbols.
8110 * infcall.c (find_function_return_type): Delete.
8111 (find_function_addr): Add 'function_type' parameter. For calls to
8112 GNU ifunc functions, try to find the type of the target function
8113 from the type that the resolver returns, and return it via
8114 FUNCTION_TYPE.
8115 (call_function_by_hand_dummy): Adjust to use the function type
8116 returned by find_function_addr.
8117 (find_function_addr): Add 'function_type' parameter and move
8118 description here.
8119 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8120 declarations.
8121
8122 2018-04-26 Pedro Alves <palves@redhat.com>
8123
8124 * c-exp.y (variable production): Skip finding an alias for ifunc
8125 symbols.
8126
8127 2018-04-26 Pedro Alves <palves@redhat.com>
8128
8129 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8130
8131 2018-04-25 Pedro Alves <palves@redhat.com>
8132
8133 * infcmd.c (kill_command): Print the pid as string, not the whole
8134 thread's ptid. Add comment. s/has been killed/killed/ in output
8135 message.
8136 * remote.c (remote_detach_1): Print the pid as string, not the
8137 whole thread's ptid.
8138
8139 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8140 Sergio Durigan Junior <sergiodj@redhat.com>
8141 Pedro Alves <palves@redhat.com>
8142
8143 * infcmd.c (kill_command): Print message when inferior has
8144 been killed.
8145 * inferior.c (print_inferior_events): Remove 'static'. Set as
8146 '1'.
8147 (add_inferior): Improve message printed when
8148 'print_inferior_events' is on.
8149 (exit_inferior): Remove message printed when
8150 'print_inferior_events' is on.
8151 (detach_inferior): Improve message printed when
8152 'print_inferior_events' is on.
8153 (initialize_inferiors): Use 'add_inferior_silent' to set
8154 'current_inferior_'.
8155 * inferior.h (print_inferior_events): Declare here as
8156 'extern'.
8157 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8158 '[Detaching...]' messages when 'print_inferior_events' is on.
8159 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8160 as prefix/suffix for messages. Remove periods. Fix erroneous
8161 'Detaching after fork from child...', replace it by '... from
8162 parent...'.
8163 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8164 prefix/suffix when printing 'Detaching...' messages. Print
8165 them when 'print_inferior_events' is on.
8166 * remote.c (remote_detach_1): Print message when detaching
8167 from inferior and '!is_fork_parent'.
8168
8169 2018-04-24 Tom Tromey <tom@tromey.com>
8170
8171 * cli-out.h: Reindent.
8172
8173 2018-04-24 Tom Tromey <tom@tromey.com>
8174
8175 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8176 (cli_ui_out::do_field_string): Use fputs_filtered.
8177 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8178
8179 2018-04-23 Tom Tromey <tom@tromey.com>
8180
8181 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8182 gdb::unique_xmalloc_ptr.
8183
8184 2018-04-23 Tom Tromey <tom@tromey.com>
8185
8186 * configure: Rebuild.
8187
8188 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8189
8190 PR gdb/23095
8191 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8192 prepare_for_testing. Set normal_bp to r_debug_state if target
8193 is bsd.
8194
8195 2018-04-21 Pedro Alves <palves@redhat.com>
8196 Rajendra SY <rajendra.sy@gmail.com>
8197
8198 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8199 * remote.c (extended_remote_attach): In all-stop mode, mark the
8200 thread as executing.
8201
8202 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8203
8204 * thread.c (thread_apply_all_command): Fix comment.
8205 (thread_command): Fix comment.
8206
8207 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8208
8209 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8210 parameter.
8211 * features/aarch64-core.c (create_feature_aarch64_core):
8212 Regenerate.
8213 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8214 Likewise.
8215 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8216 Likewise.
8217 * features/i386/32bit-avx512.c
8218 (create_feature_i386_32bit_avx512): Likewise.
8219 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8220 Likewise.
8221 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8222 Likewise.
8223 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8224 Likewise.
8225 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8226 Likewise.
8227 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8228 Likewise.
8229 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8230 Likewise.
8231 * features/i386/64bit-avx512.c
8232 (create_feature_i386_64bit_avx512): Likewise.
8233 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8234 Likewise.
8235 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8236 Likewise.
8237 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8238 Likewise.
8239 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8240 Likewise.
8241 * features/i386/64bit-segments.c
8242 (create_feature_i386_64bit_segments): Likewise.
8243 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8244 Likewise.
8245 * features/i386/x32-core.c
8246 (create_feature_i386_x32_core): Likewise.
8247 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8248 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8249 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8250 * target-descriptions.c: In generated code, don't pass xml
8251 filename.
8252
8253 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8254
8255 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8256 (print_xml_feature::visit_post): Likewise.
8257 (print_xml_feature::visit): Likewise.
8258 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8259 (print_xml_feature): Add new class.
8260 * regformats/regdat.sh: Null xmltarget on feature targets.
8261 * target-descriptions.c (struct target_desc): Add xmltarget.
8262 (maintenance_check_tdesc_xml_convert): Add unittest function.
8263 (tdesc_get_features_xml): Add function to get xml.
8264 (maintenance_check_xml_descriptions): Test xml generation.
8265 * xml-tdesc.c (string_read_description_xml): Add function.
8266 * xml-tdesc.h (string_read_description_xml): Add declaration.
8267
8268 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8269
8270 * features/Makefile: Add feature marker to targets with new style
8271 target descriptions.
8272 * regformats/aarch64.dat: Regenerate.
8273 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8274 * regformats/i386/amd64-avx-linux.dat: Likewise.
8275 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8276 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8277 * regformats/i386/amd64-linux.dat: Likewise.
8278 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8279 * regformats/i386/amd64.dat: Likewise.
8280 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8281 * regformats/i386/i386-avx-linux.dat: Likewise.
8282 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8283 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8284 * regformats/i386/i386-linux.dat: Likewise.
8285 * regformats/i386/i386-mmx-linux.dat: Likewise.
8286 * regformats/i386/i386-mpx-linux.dat: Likewise.
8287 * regformats/i386/i386.dat: Likewise.
8288 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8289 * regformats/i386/x32-avx-linux.dat: Likewise.
8290 * regformats/i386/x32-linux.dat: Likewise.
8291 * regformats/tic6x-c62x-linux.dat: Likewise.
8292 * regformats/tic6x-c64x-linux.dat: Likewise.
8293 * regformats/tic6x-c64xp-linux.dat: Likewise.
8294 * regformats/regdat.sh: Parse feature marker.
8295
8296 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8297
8298 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8299 (tdesc_osabi_name): Likewise.
8300 * target-descriptions.c (tdesc_architecture_name): Add new
8301 function.
8302 (tdesc_osabi_name): Likewise.
8303
8304 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8305
8306 * common/tdesc.c (tdesc_predefined_type): Move to here.
8307 (tdesc_named_type): Likewise.
8308 (tdesc_create_vector): Likewise.
8309 (tdesc_create_struct): Likewise.
8310 (tdesc_set_struct_size): Likewise.
8311 (tdesc_create_union): Likewise.
8312 (tdesc_create_flags): Likewise.
8313 (tdesc_create_enum): Likewise.
8314 (tdesc_add_field): Likewise.
8315 (tdesc_add_typed_bitfield): Likewise.
8316 (tdesc_add_bitfield): Likewise.
8317 (tdesc_add_flag): Likewise.
8318 (tdesc_add_enum_value): Likewise.
8319 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8320 (struct tdesc_type_vector): Likewise.
8321 (struct tdesc_type_field): Likewise.
8322 (struct tdesc_type_with_fields): Likewise.
8323 (tdesc_create_enum): Add declaration.
8324 (tdesc_add_typed_bitfield): Likewise.
8325 (tdesc_add_enum_value): Likewise.
8326 * target-descriptions.c (tdesc_type_field): Move from here.
8327 (tdesc_type_builtin): Likewise.
8328 (tdesc_type_vector): Likewise.
8329 (tdesc_type_with_fields): Likewise.
8330 (tdesc_predefined_types): Likewise.
8331 (tdesc_named_type): Likewise.
8332 (tdesc_create_vector): Likewise.
8333 (tdesc_create_struct): Likewise.
8334 (tdesc_set_struct_size): Likewise.
8335 (tdesc_create_union): Likewise.
8336 (tdesc_create_flags): Likewise.
8337 (tdesc_create_enum): Likewise.
8338 (tdesc_add_field): Likewise.
8339 (tdesc_add_typed_bitfield): Likewise.
8340 (tdesc_add_bitfield): Likewise.
8341 (tdesc_add_flag): Likewise.
8342 (tdesc_add_enum_value): Likewise.
8343 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8344 (tdesc_add_typed_bitfield): Likewise.
8345 (tdesc_add_enum_value): Likewise.
8346
8347 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8348
8349 * common/tdesc.c (tdesc_feature::accept): Move to here.
8350 (tdesc_feature::operator==): Likewise.
8351 (tdesc_create_reg): Likewise.
8352 * common/tdesc.h (tdesc_type_kind): Likewise.
8353 (struct tdesc_type): Likewise.
8354 (struct tdesc_feature): Likewise.
8355 * regformats/regdat.sh: Create a feature.
8356 * target-descriptions.c (tdesc_type_kind): Move from here.
8357 (tdesc_type): Likewise.
8358 (tdesc_type_up): Likewise.
8359 (tdesc_feature): Likewise.
8360 (tdesc_create_reg): Likewise.
8361
8362 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8363
8364 * Makefile.in: Add arch/tdesc.c
8365 * common/tdesc.c: New file.
8366 * common/tdesc.h (tdesc_element_visitor): Move to here.
8367 (tdesc_element): Likewise.
8368 (tdesc_reg): Likewise.
8369 (tdesc_reg_up): Likewise.
8370 * regformats/regdef.h (reg): Add offset to constructors.
8371 * target-descriptions.c (tdesc_element_visitor): Move from here.
8372 (tdesc_element): Likewise.
8373 (tdesc_reg): Likewise.
8374 (tdesc_reg_up): Likewise.
8375
8376 2018-04-17 Tom Tromey <tom@tromey.com>
8377
8378 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8379 discriminant field.
8380
8381 2018-04-17 Tom Tromey <tom@tromey.com>
8382
8383 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8384
8385 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8386
8387 * symtab.c (print_symbol_info): Skip printing filename and line
8388 number when `last' is NULL.
8389 (symtab_symbol_info): Use empty string instead of NULL for first
8390 invocation of print_symbol_info.
8391 (rbreak_command): Pass NULL to `last' parameter of
8392 print_symbol_info.
8393
8394 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8395
8396 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8397 instead of nullptr.
8398
8399 2018-04-16 Pedro Alves <palves@redhat.com>
8400
8401 * MAINTAINERS (sh): Remove.
8402 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8403 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8404 (ALLDEPFILES): Remove sh64-tdep.c.
8405 * NEWS: Mentions that support for SH-5/SH64 is removed.
8406 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8407 (sh*-*-openbsd*): Ditto.
8408 (sh64-*-elf*): Remove.
8409 (sh*): Remove.
8410 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8411 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8412 * sh-tdep.c: No longer include "sh64-tdep.h".
8413 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8414 * sh64-tdep.c, sh64-tdep.h: Remove files.
8415
8416 2018-04-16 Pedro Alves <palves@redhat.com>
8417
8418 * MAINTAINERS: Remove m88k.
8419 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8420 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8421 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8422 * NEWS: Mention that support for m88k was removed.
8423 * configure.host (m88*-*-*): Remove support.
8424 * configure.nat (m88k-*-*): Remove support.
8425 * configure.tgt (m88*-*-openbsd*): Remove.
8426 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8427
8428 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8429
8430 * configure.tgt (x86_tobjs): New variable.
8431 (amd64_tobjs, i386_tobjs): Use it.
8432
8433 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8434
8435 * symtab.c (print_symbol_info): Precede the symbol definition by
8436 the line number when available.
8437 * NEWS: Advertise this enhancement.
8438
8439 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8440
8441 * NEWS (New options): announce set/show record btrace cpu.
8442 * btrace.c: Include record-btrace.h.
8443 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8444 the vendor is unknown.
8445 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8446 Maybe overwrite the btrace configuration's cpu.
8447 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8448 (btrace_fetch): Add cpu parameter. Update callers.
8449 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8450 Maybe overwrite the btrace configuration's cpu. Skip enabling
8451 errata workarounds if the vendor is unknown.
8452 * python/py-record-btrace.c: Include record-btrace.h.
8453 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8454 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8455 * record-btrace.c (record_btrace_cpu_state_kind): New.
8456 (record_btrace_cpu): New.
8457 (set_record_btrace_cpu_cmdlist): New.
8458 (record_btrace_get_cpu): New.
8459 (require_btrace_thread, record_btrace_info)
8460 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8461 (cmd_set_record_btrace_cpu_none): New.
8462 (cmd_set_record_btrace_cpu_auto): New.
8463 (cmd_set_record_btrace_cpu): New.
8464 (cmd_show_record_btrace_cpu): New.
8465 (_initialize_record_btrace): Initialize set/show record btrace cpu
8466 commands.
8467 * record-btrace.h (record_btrace_get_cpu): New.
8468
8469 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8470
8471 * record.c (set_record_command): Fix typo in message.
8472
8473 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8474
8475 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8476
8477 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8478
8479 * infrun.c (process_event_stop_test): Call
8480 gdbarch_in_indirect_branch_thunk.
8481 * gdbarch.sh (in_indirect_branch_thunk): New.
8482 * gdbarch.c: Regenerated.
8483 * gdbarch.h: Regenerated.
8484 * x86-tdep.h: New.
8485 * x86-tdep.c: New.
8486 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8487 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8488 (ALLDEPFILES): Add x86-tdep.c.
8489 * arch-utils.h (default_in_indirect_branch_thunk): New.
8490 * arch-utils.c (default_in_indirect_branch_thunk): New.
8491 * i386-tdep: Include x86-tdep.h.
8492 (i386_in_indirect_branch_thunk): New.
8493 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8494 function.
8495 * amd64-tdep: Include x86-tdep.h.
8496 (amd64_in_indirect_branch_thunk): New.
8497 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8498
8499 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8500
8501 PR gdb/23053
8502 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8503 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8504 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8505 regression.
8506
8507 2018-04-12 Tom Tromey <tom@tromey.com>
8508
8509 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8510 (rust_evaluate_subexp): Likewise.
8511
8512 2018-04-12 Pedro Alves <palves@redhat.com>
8513
8514 * procfs.c (procfs_detach): Make forward declaration's prototype
8515 match definition's protototype.
8516 (proc_get_LDT_entry): Remove stale do_cleanups call.
8517
8518 2018-04-12 Pedro Alves <palves@redhat.com>
8519
8520 * target.h (target_ops::to_has_exited): Delete.
8521 (target_has_exited): Delete.
8522 * target-delegates.c: Regenerate.
8523
8524 2018-04-11 Pedro Alves <palves@redhat.com>
8525
8526 * target.c (fileio_fh_t::t): Add comment.
8527 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8528 (target_fileio_close): Handle a NULL target.
8529 (invalidate_fileio_fh): New.
8530 (target_close): Call it.
8531 * remote.c (remote_hostio_send_command): No longer check whether
8532 remote_desc is open.
8533
8534 2018-04-11 Pedro Alves <palves@redhat.com>
8535
8536 * target.c (fileio_fh_t): Make it a named struct instead of a
8537 typedef.
8538 (fileio_fh_t::is_closed): New method.
8539 (DEF_VEC_O (fileio_fh_t)): Remove.
8540 (fileio_fhandles): Now a std::vector.
8541 (is_closed_fileio_fh): Delete.
8542 (acquire_fileio_fd): Adjust. Rename parameters.
8543 (release_fileio_fd): Adjust.
8544 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8545 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8546 (target_fileio_close): Adjust.
8547
8548 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8549
8550 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8551 index.
8552
8553 2018-04-10 Pedro Alves <palves@redhat.com>
8554
8555 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8556 (scoped_finish_thread_state): New class.
8557 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8558 cleanup.
8559 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8560 (fetch_inferior_event, normal_stop): Likewise.
8561 * thread.c (finish_thread_state_cleanup): Delete.
8562
8563 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8564 Pedro Alves <palves@redhat.com>
8565
8566 * value.c: Include "selftest.h" and "common/array-view.h".
8567 (struct range) <operator ==>: New.
8568 (test_ranges_contain): New.
8569 (check_ranges_vector): New.
8570 (test_insert_into_bit_range_vector): New.
8571 (_initialize_values): Register selftests.
8572 * common/array-view.h (operator==, operator!=): New.
8573
8574 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8575
8576 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8577 an iterator.
8578 * inline-frame.c: Include <algorithm>.
8579 (struct inline_state): Add constructor.
8580 (inline_state_s): Remove.
8581 (DEF_VEC_O(inline_state_s)): Remove.
8582 (inline_states): Change type to std::vector.
8583 (find_inline_frame_state): Adjust to std::vector.
8584 (allocate_inline_frame_state): Remove.
8585 (clear_inline_frame_state): Adjust to std::vector.
8586 (skip_inline_frames): Adjust to std::vector.
8587
8588 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8589
8590 * tracepoint.h (struct trace_state_variable): Add constructor.
8591 <name>: Change type to std::string.
8592 * tracepoint.c (tsv_s): Remove.
8593 (DEF_VEC_O(tsv_s)): Remove.
8594 (tvariables): Change to std::vector.
8595 (create_trace_state_variable): Adjust to std::vector.
8596 (find_trace_state_variable): Likewise.
8597 (find_trace_state_variable_by_number): Likewise.
8598 (delete_trace_state_variable): Likewise.
8599 (trace_variable_command): Adjust to std::string.
8600 (delete_trace_variable_command): Likewise.
8601 (tvariables_info_1): Adjust to std::vector.
8602 (save_trace_state_variables): Likewise.
8603 (start_tracing): Likewise.
8604 (merge_uploaded_trace_state_variables): Adjust to std::vector
8605 and std::string.
8606 * target.h (struct target_ops)
8607 <to_download_trace_state_variable>: Pass reference to
8608 trace_state_variable.
8609 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8610 * target-delegates.c: Re-generate.
8611 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8612 (mi_tsv_deleted): Likewise.
8613 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8614 * remote.c (remote_download_trace_state_variable): Change
8615 pointer to reference and adjust.
8616 * make-target-delegates (parse_argtypes): Handle references.
8617 (write_function_header): Likewise.
8618 (munge_type): Likewise.
8619
8620 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8621
8622 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8623 string_view-selftests.c.
8624 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8625 testsuite.
8626 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8627 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8628 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8629 * unittests/basic_string_view/element_access/char/1.cc:
8630 Likewise.
8631 * unittests/basic_string_view/element_access/char/empty.cc:
8632 Likewise.
8633 * unittests/basic_string_view/element_access/char/front_back.cc:
8634 Likewise.
8635 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8636 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8637 Likewise.
8638 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8639 Likewise.
8640 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8641 Likewise.
8642 * unittests/basic_string_view/operations/compare/char/1.cc:
8643 Likewise.
8644 * unittests/basic_string_view/operations/compare/char/13650.cc:
8645 Likewise.
8646 * unittests/basic_string_view/operations/copy/char/1.cc:
8647 Likewise.
8648 * unittests/basic_string_view/operations/data/char/1.cc:
8649 Likewise.
8650 * unittests/basic_string_view/operations/find/char/1.cc:
8651 Likewise.
8652 * unittests/basic_string_view/operations/find/char/2.cc:
8653 Likewise.
8654 * unittests/basic_string_view/operations/find/char/3.cc:
8655 Likewise.
8656 * unittests/basic_string_view/operations/find/char/4.cc:
8657 Likewise.
8658 * unittests/basic_string_view/operations/rfind/char/1.cc:
8659 Likewise.
8660 * unittests/basic_string_view/operations/rfind/char/2.cc:
8661 Likewise.
8662 * unittests/basic_string_view/operations/rfind/char/3.cc:
8663 Likewise.
8664 * unittests/basic_string_view/operations/substr/char/1.cc:
8665 Likewise.
8666 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8667 * unittests/string_view-selftests.c: New file.
8668
8669 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8670
8671 * unittests/basic_string_view/capacity/1.cc: New file.
8672 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8673 * unittests/basic_string_view/cons/char/1.cc: New file.
8674 * unittests/basic_string_view/cons/char/2.cc: New file.
8675 * unittests/basic_string_view/cons/char/3.cc: New file.
8676 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8677 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8678 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8679 * unittests/basic_string_view/element_access/char/1.cc: New file.
8680 * unittests/basic_string_view/element_access/char/2.cc: New file.
8681 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8682 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8683 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8684 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8685 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8686 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8687 * unittests/basic_string_view/include.cc: New file.
8688 * unittests/basic_string_view/inserters/char/1.cc: New file.
8689 * unittests/basic_string_view/inserters/char/2.cc: New file.
8690 * unittests/basic_string_view/inserters/char/3.cc: New file.
8691 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8692 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8693 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8694 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8695 * unittests/basic_string_view/literals/types.cc: New file.
8696 * unittests/basic_string_view/literals/values.cc: New file.
8697 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8698 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8699 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8700 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8701 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8702 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8703 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8704 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8705 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8706 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8707 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8708 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8709 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8710 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8711 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8712 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8713 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8714 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8715 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8716 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8717 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8718 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8719 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8720 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8721 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8722 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8723 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8724 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8725 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8726 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8727 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8728 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8729 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8730 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8731 * unittests/basic_string_view/operators/char/2.cc: New file.
8732 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8733 * unittests/basic_string_view/range_access/char/1.cc: New file.
8734 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8735 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8736 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8737 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8738 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8739 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8740 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8741 * unittests/basic_string_view/typedefs.cc: New file.
8742 * unittests/basic_string_view/types/1.cc: New file.
8743
8744 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8745
8746 * common/gdb_string_view.h: Remove libstdc++ implementation
8747 details, adjust to gdb reality.
8748 * common/gdb_string_view.tcc: Likewise.
8749 * cli/cli-script.c (struct string_view): Remove.
8750 (user_args) <m_args>: Change element type to gdb::string_view.
8751 (user_args::insert_args): Adjust.
8752
8753 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8754
8755 * common/gdb_string_view.h: New file.
8756 * common/gdb_string_view.tcc: New file.
8757
8758 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8759
8760 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8761 * configure: Re-generate.
8762
8763 2018-04-09 Pedro Alves <palves@redhat.com>
8764
8765 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8766 (set_target_gdbarch): Call
8767 gdb::observers::architecture_changed.notify instead of
8768 observer_notify_architecture_changed.
8769
8770 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8771
8772 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8773 (do_restore_current_traceframe_cleanup): Remove.
8774 (restore_current_traceframe_cleanup_dtor): Remove.
8775 (make_cleanup_restore_current_traceframe): Remove.
8776 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8777 New.
8778 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8779 * infrun.c (fetch_inferior_event): Use
8780 scoped_restore_current_traceframe.
8781
8782 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8783
8784 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8785 Remove.
8786 <n_allocated_type_units>: Remove.
8787 <all_type_units>: Change to std::vector.
8788 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8789 to std::vector change.
8790 (dwarf2_per_objfile::get_cutu): Likewise.
8791 (dwarf2_per_objfile::get_tu): Likewise.
8792 (create_signatured_type_table_from_index): Likewise.
8793 (create_signatured_type_table_from_debug_names): Likewise.
8794 (dw2_symtab_iter_next): Likewise.
8795 (dw2_print_stats): Likewise.
8796 (dw2_expand_all_symtabs): Likewise.
8797 (dw2_expand_marked_cus): Likewise.
8798 (dw2_debug_names_iterator::next): Likewise.
8799 (dwarf2_initialize_objfile): Likewise.
8800 (add_signatured_type_cu_to_table): Likewise.
8801 (create_all_type_units): Likewise.
8802 (add_type_unit): Likewise.
8803 (struct tu_abbrev_offset): Add constructor.
8804 (build_type_psymtabs_1): Adjust to std::vector change.
8805 (print_tu_stats): Likewise.
8806 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8807 (write_debug_names): Likewise.
8808
8809 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8810
8811 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8812 Make an std::vector.
8813 <n_comp_units>: Remove.
8814 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8815 to std::vector change.
8816 (dwarf2_per_objfile::get_cutu): Likewise.
8817 (dwarf2_per_objfile::get_cu): Likewise.
8818 (create_cus_from_index): Likewise.
8819 (create_addrmap_from_index): Likewise.
8820 (create_addrmap_from_aranges): Likewise.
8821 (dwarf2_read_index): Likewise.
8822 (dw2_find_last_source_symtab): Likewise.
8823 (dw2_map_symtabs_matching_filename): Likewise.
8824 (dw2_symtab_iter_next): Likewise.
8825 (dw2_print_stats): Likewise.
8826 (dw2_expand_all_symtabs): Likewise.
8827 (dw2_expand_symtabs_with_fullname): Likewise.
8828 (dw2_expand_marked_cus): Likewise.
8829 (dw2_map_symbol_filenames): Likewise.
8830 (create_cus_from_debug_names): Likewise.
8831 (dwarf2_read_debug_names): Likewise.
8832 (dw2_debug_names_iterator::next): Likewise.
8833 (dwarf2_initialize_objfile): Likewise.
8834 (set_partial_user): Likewise.
8835 (dwarf2_build_psymtabs_hard): Likewise.
8836 (read_comp_units_from_section): Remove arguments, adjust to
8837 std::vector change.
8838 (create_all_comp_units): Adjust to std::vector and
8839 read_comp_units_from_section changes.
8840 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8841 change.
8842 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8843 (psyms_seen_size): Likewise.
8844 (write_gdbindex): Likewise.
8845 (write_debug_names): Likewise.
8846
8847 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8848
8849 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8850 with dwarf2_per_objfile.
8851 (create_cus_from_index): Likewise.
8852 (create_signatured_type_table_from_index): Likewise.
8853 (dwarf2_read_index): Likewise.
8854 (dwarf2_initialize_objfile): Likewise.
8855 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8856 per_cu rather than get_dwarf2_per_objfile.
8857
8858 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8859
8860 * dwarf2read.h (struct signatured_type): Forward declare.
8861 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8862 New methods.
8863 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8864 (dw2_get_cutu): ...this.
8865 (dwarf2_per_objfile::get_cu): Rename from...
8866 (dw2_get_cu): ...this.
8867 (dwarf2_per_objfile::get_tu): New.
8868 (create_addrmap_from_index): Adjust.
8869 (create_addrmap_from_aranges): Adjust.
8870 (dw2_find_last_source_symtab): Adjust.
8871 (dw2_map_symtabs_matching_filename): Adjust.
8872 (dw2_symtab_iter_next): Adjust.
8873 (dw2_print_stats): Adjust.
8874 (dw2_expand_all_symtabs): Adjust.
8875 (dw2_expand_symtabs_with_fullname): Adjust.
8876 (dw2_expand_marked_cus): Adjust.
8877 (dw_expand_symtabs_matching_file_matcher): Adjust.
8878 (dw2_map_symbol_filenames): Adjust.
8879 (dw2_debug_names_iterator::next): Adjust.
8880 (dwarf2_initialize_objfile): Adjust.
8881 (set_partial_user): Adjust.
8882 (dwarf2_build_psymtabs_hard): Adjust.
8883
8884 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8885
8886 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8887 Remove unused variables.
8888 (dw2_map_symtabs_matching_filename): Likewise.
8889 (dwarf2_record_block_ranges): Likewise.
8890 (dwarf2_read_addr_index): Likewise.
8891 (follow_die_offset): Likewise.
8892
8893 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8894
8895 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8896 to symbol_file_add_main.
8897
8898 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8899
8900 PR mi/22299
8901 * mi/mi-console.c (do_fputc_async_safe): New.
8902 (mi_console_file::write_async_safe): New.
8903 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8904 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8905 New.
8906 * ui-file.c (ui_file::putstrn): Adjust call to
8907 fputstrn_unfiltered.
8908 * utils.c (printchar): Replace do_fputs and do_fprintf
8909 parameters by do_fputc.
8910 (fputstr_filtered): Adjust call to printchar.
8911 (fputstr_unfiltered): Likewise.
8912 (fputstrn_filtered): Likewise.
8913 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8914 printchar.
8915 * utils.h (do_fputc_ftype): New typedef.
8916 (fputstrn_unfiltered): Add do_fputc parameter.
8917
8918 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8919
8920 * regformats/i386/i386-avx.dat: Remove.
8921
8922 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8923
8924 PR gdb/22979
8925 * amd64-tdep.c (amd64_none_init_abi): New function.
8926 (amd64_x32_none_init_abi): New function.
8927 (_initialize_amd64_tdep): Register handlers for x86-64 and
8928 x64_32 with GDB_OSABI_NONE.
8929 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8930 GDB_OSABI_NONE osabi.
8931
8932 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8933
8934 PR gdb/22980
8935 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8936 GDB_OSABI_NONE.
8937 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8938 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8939
8940 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8941
8942 * common/byte-vector.h (char_vector): New type.
8943 * target.h (target_read_alloc): Return
8944 gdb::optional<byte_vector>.
8945 (target_read_stralloc): Return gdb::optional<char_vector>.
8946 (target_get_osdata): Return gdb::optional<char_vector>.
8947 * target.c (target_read_alloc_1): Templatize. Replacement
8948 manual memory management with vector.
8949 (target_read_alloc): Change return type, adjust.
8950 (target_read_stralloc): Change return type, adjust.
8951 (target_get_osdata): Change return type, adjust.
8952 * auxv.c (struct auxv_info) <length>: Remove.
8953 <data>: Change type to gdb::optional<byte_vector>.
8954 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8955 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8956 (target_auxv_search): Adjust.
8957 (fprint_target_auxv): Adjust.
8958 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8959 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8960 (linux_make_corefile_notes): Adjust.
8961 * osdata.c (get_osdata): Adjust.
8962 * remote.c (remote_get_threads_with_qxfer): Adjust.
8963 (remote_memory_map): Adjust.
8964 (remote_traceframe_info): Adjust.
8965 (btrace_read_config): Adjust.
8966 (remote_read_btrace): Adjust.
8967 (remote_pid_to_exec_file): Adjust.
8968 * solib-aix.c (solib_aix_get_library_list): Adjust.
8969 * solib-dsbt.c (decode_loadmap): Don't free buf.
8970 (dsbt_get_initial_loadmaps): Adjust.
8971 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8972 * solib-target.c (solib_target_current_sos): Adjust.
8973 * tracepoint.c (sdata_make_value): Adjust.
8974 * xml-support.c (xinclude_start_include): Adjust.
8975 (xml_fetch_content_from_file): Adjust.
8976 * xml-support.h (xml_fetch_another): Change return type.
8977 (xml_fetch_content_from_file): Change return type.
8978 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8979 * xml-tdesc.c (file_read_description_xml): Adjust.
8980 (fetch_available_features_from_target): Change return type.
8981 (target_fetch_description_xml): Adjust.
8982 (target_read_description_xml): Adjust.
8983
8984 2018-04-06 Tom Tromey <tom@tromey.com>
8985
8986 * value.c (~value): Update.
8987 (struct value) <contents>: Now unique_xmalloc_ptr.
8988 (value_contents_bits_eq, allocate_value_contents)
8989 (value_contents_raw, value_contents_all_raw)
8990 (value_contents_for_printing, value_contents_for_printing_const)
8991 (set_value_enclosing_type): Update.
8992
8993 2018-04-06 Tom Tromey <tom@tromey.com>
8994
8995 * value.c (range_s): Remove typedef, VEC.
8996 (struct range): Add operator<.
8997 (range_lessthan): Remove.
8998 (ranges_contain): Change type.
8999 (~value): Update.
9000 (struct value) <unavailable, optimized_out>: Now std::vector.
9001 (value_entirely_available)
9002 (value_entirely_covered_by_range_vector)
9003 (value_entirely_unavailable, value_entirely_optimized_out):
9004 Update.
9005 (insert_into_bit_range_vector): Change argument type.
9006 (find_first_range_overlap): Likewise.
9007 (struct ranges_and_idx, value_contents_bits_eq)
9008 (require_not_optimized_out, require_available): Update.
9009 (ranges_copy_adjusted): Change argument types.
9010 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9011
9012 2018-04-06 Tom Tromey <tom@tromey.com>
9013
9014 * value.c (~value): Update.
9015 (struct value) <parent>: Now a value_ref_ptr.
9016 (value_parent, set_value_parent, value_address, value_copy):
9017 Update.
9018
9019 2018-04-06 Tom Tromey <tom@tromey.com>
9020
9021 * value.c (struct value): Add constructor, destructor, and member
9022 initializers.
9023 (allocate_value_lazy, value_decref): Update.
9024
9025 2018-04-06 Tom Tromey <tom@tromey.com>
9026
9027 * value.c (struct value) <released, next>: Remove.
9028 (all_values): Now a std::vector.
9029 (allocate_value_lazy): Update.
9030 (value_next): Remove.
9031 (value_mark, value_free_to_mark, release_value)
9032 (value_release_to_mark): Update.
9033
9034 2018-04-06 Tom Tromey <tom@tromey.com>
9035
9036 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9037 (free_value_chain): Remove.
9038 * value.c (free_value_chain): Remove.
9039 (value_release_to_mark): Return a std::vector.
9040 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9041 std::vector.
9042 (check_condition): Update.
9043 * eval.c (fetch_subexp_value): Change "val_chain" to a
9044 std::vector.
9045 * breakpoint.c (update_watchpoint): Update.
9046 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9047
9048 2018-04-06 Tom Tromey <tom@tromey.com>
9049
9050 * value.h (free_all_values): Remove.
9051 * value.c (free_all_values): Remove.
9052
9053 2018-04-06 Tom Tromey <tom@tromey.com>
9054
9055 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9056 (value_history_chain, value_history_count): Remove.
9057 (value_history): New global.
9058 (record_latest_value, access_value_history, show_values)
9059 (preserve_values): Update.
9060
9061 2018-04-06 Tom Tromey <tom@tromey.com>
9062
9063 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9064 * varobj.c (varobj_set_display_format, varobj_set_value)
9065 (install_default_visualizer, construct_visualizer)
9066 (install_new_value, ~varobj, varobj_get_value_type)
9067 (my_value_of_variable, varobj_editable_p): Update.
9068 * c-varobj.c (c_describe_child, c_value_of_variable)
9069 (cplus_number_of_children, cplus_describe_child): Update.
9070 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9071 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9072 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9073
9074 2018-04-06 Tom Tromey <tom@tromey.com>
9075
9076 * printcmd.c (last_examine_address): Change type to
9077 value_ref_ptr.
9078 (do_examine, x_command): Update.
9079
9080 2018-04-06 Tom Tromey <tom@tromey.com>
9081
9082 * value.c (release_value): Update.
9083 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9084 (struct bpstats) <val>: Now a value_ref_ptr.
9085 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9086 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9087 (~watchpoint, print_it_watchpoint, watch_command_1)
9088 (invalidate_bp_value_on_memory_change): Update.
9089
9090 2018-04-06 Tom Tromey <tom@tromey.com>
9091
9092 * varobj.c (varobj_clear_saved_item)
9093 (update_dynamic_varobj_children, install_new_value, ~varobj):
9094 Update.
9095 * value.h (value_incref): Move declaration earlier.
9096 (value_decref): Rename from value_free.
9097 (struct value_ref_policy): New.
9098 (value_ref_ptr): New typedef.
9099 (struct value_deleter): Remove.
9100 (gdb_value_up): Remove typedef.
9101 (release_value): Change return type.
9102 (release_value_or_incref): Remove.
9103 * value.c (set_value_parent): Update.
9104 (value_incref): Change return type.
9105 (value_decref): Rename from value_free.
9106 (value_free_to_mark, free_all_values, free_value_chain): Update.
9107 (release_value): Return value_ref_ptr.
9108 (release_value_or_incref): Remove.
9109 (record_latest_value, set_internalvar, clear_internalvar):
9110 Update.
9111 * stack.c (info_frame_command): Don't call value_free.
9112 * python/py-value.c (valpy_dealloc, valpy_new)
9113 (value_to_value_object): Update.
9114 * printcmd.c (do_examine): Update.
9115 * opencl-lang.c (lval_func_free_closure): Update.
9116 * mi/mi-main.c (register_changed_p): Don't call value_free.
9117 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9118 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9119 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9120 value_free.
9121 * guile/scm-value.c (vlscm_free_value_smob)
9122 (vlscm_scm_from_value): Update.
9123 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9124 (frame_unwind_register_unsigned, get_frame_register_bytes)
9125 (put_frame_register_bytes): Don't call value_free.
9126 * findvar.c (address_from_register): Don't call value_free.
9127 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9128 * dwarf2loc.c (entry_data_value_free_closure)
9129 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9130 (dwarf2_evaluate_loc_desc_full): Update.
9131 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9132 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9133 (~watchpoint, watch_command_1)
9134 (invalidate_bp_value_on_memory_change): Update.
9135 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9136
9137 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9138
9139 PR gdb/23022
9140 * warning.m4: Add -Wno-error=deprecated-register.
9141 * configure: Re-generate.
9142
9143 2018-04-05 Tom Tromey <tom@tromey.com>
9144
9145 * linespec.h: Remove include of "vec.h".
9146
9147 2018-04-05 Tom Tromey <tom@tromey.com>
9148
9149 * linespec.c (typep): Remove typedef.
9150 (find_methods, find_superclass_methods): Take a std::vector.
9151 (find_method): Use std::vector.
9152
9153 2018-04-05 Tom Tromey <tom@tromey.com>
9154
9155 * utils.c (compare_strings): Remove.
9156 * utils.h (compare_strings): Remove.
9157 * objc-lang.h (find_imps): Update.
9158 * objc-lang.c (find_methods): Take a std::vector.
9159 (uniquify_strings, find_imps): Likewise.
9160 * linespec.c (find_methods): Take a std::vector.
9161 (decode_objc): Use std::vector.
9162 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9163 a std::vector.
9164 (find_method, find_function_symbols): Use std::vector.
9165
9166 2018-04-05 Tom Tromey <tom@tromey.com>
9167
9168 * completer.c (completion_tracker::completion_tracker): Remove
9169 cast.
9170 (completion_tracker::discard_completions): Likewise.
9171 * breakpoint.c (ambiguous_names_p): Remove cast.
9172 * ada-lang.c (_initialize_ada_language): Remove cast.
9173 * utils.h (streq): Update.
9174 (streq_hash): Add new declaration.
9175 * utils.c (streq): Return bool.
9176 (streq_hash): New function.
9177
9178 2018-04-05 Tom Tromey <tom@tromey.com>
9179
9180 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9181 Remove a string copy.
9182
9183 2018-04-05 Tom Tromey <tom@tromey.com>
9184
9185 * linespec.c (filter_results): Use std::vector.
9186 (decode_line_2, decode_line_full): Update.
9187
9188 2018-04-05 Tom Tromey <tom@tromey.com>
9189
9190 * linespec.c (canonical_to_fullform): Return std::string.
9191 (filter_results): Update.
9192 (struct decode_line_2_item): Add constructor.
9193 <fullform, displayform>: Now std::string.
9194 (decode_line_2_compare_items): Now a std::sort comparator.
9195 (decode_line_2): Update.
9196
9197 2018-04-05 Tom Tromey <tom@tromey.com>
9198
9199 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9200 (unexpected_linespec_error): Update.
9201 (linespec_parse_basic, parse_linespec): Update.
9202
9203 2018-04-05 Tom Tromey <tom@tromey.com>
9204
9205 * linespec.c (linespec_parse_basic): Reindent.
9206
9207 2018-04-05 Tom Tromey <tom@tromey.com>
9208
9209 * minsyms.h (iterate_over_minimal_symbols): Update.
9210 * minsyms.c (iterate_over_minimal_symbols): Take a
9211 gdb::function_view.
9212 * linespec.c (struct collect_minsyms): Remove.
9213 (compare_msyms): Now a std::sort comparator.
9214 (add_minsym): Add parameters.
9215 (search_minsyms_for_name): Update. Use std::vector.
9216
9217 2018-04-03 Tom Tromey <tom@tromey.com>
9218
9219 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9220 gdb::byte_vector.
9221
9222 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9223
9224 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9225
9226 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9227
9228 PR gdb/16959
9229 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9230 printing static type.
9231
9232 2018-04-01 Tom Tromey <tom@tromey.com>
9233
9234 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9235 (rs6000_xfer_shared_libraries): Update.
9236
9237 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9238
9239 * common/gdb_vecs.h (char_ptr): Remove.
9240 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9241
9242 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9243
9244 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9245 with std::vector.
9246 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9247
9248 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9249
9250 * tracepoint.h (struct uploaded_tp): Initialize fields.
9251 <actions, step_actions, cmd_strings>: Change type to
9252 std::vector<char *>.
9253 * tracepoint.c (get_uploaded_tp): Allocate with new.
9254 (free_uploaded_tps): Free with delete.
9255 (parse_tracepoint_definition): Adjust to std::vector change.
9256 * breakpoint.c (read_uploaded_action): Likewise.
9257 (create_tracepoint_from_upload): Likewise.
9258 * ctf.c (ctf_write_uploaded_tp): Likewise.
9259 (SET_ARRAY_FIELD): Likewise.
9260 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9261
9262 2018-03-30 Tom Tromey <tom@tromey.com>
9263
9264 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9265 std::unique_ptr.
9266 (svr4_keep_data_in_core): Update.
9267 (svr4_read_so_list): Update.
9268
9269 2018-03-30 Tom Tromey <tom@tromey.com>
9270
9271 * windows-nat.c (handle_output_debug_string, handle_exception):
9272 Update.
9273 * target.h (target_read_string): Update.
9274 * target.c (target_read_string): Change "string" to
9275 unique_xmalloc_ptr.
9276 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9277 Update.
9278 * solib-frv.c (frv_current_sos): Update.
9279 * solib-dsbt.c (dsbt_current_sos): Update.
9280 * solib-darwin.c (darwin_current_sos): Update.
9281 * linux-thread-db.c (inferior_has_bug): Update.
9282 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9283 Update. Remove alloca.
9284 * ada-lang.c (ada_main_name): Update.
9285
9286 2018-03-30 Tom Tromey <tom@tromey.com>
9287
9288 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9289 (struct dwo_file_deleter): New.
9290 (dwo_file_up): New typedef.
9291 (open_and_init_dwo_file): Use dwo_file_up.
9292 (free_dwo_file_cleanup): Remove.
9293
9294 2018-03-30 Tom Tromey <tom@tromey.com>
9295
9296 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9297 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9298
9299 2018-03-30 Tom Tromey <tom@tromey.com>
9300
9301 * dwarf2read.c (class free_cached_comp_units): New class.
9302 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9303 (free_cached_comp_units): Remove function.
9304
9305 2018-03-30 Tom Tromey <tom@tromey.com>
9306
9307 * utils.h (make_cleanup_unpush_target): Remove.
9308 * inf-ptrace.c (struct target_unpusher): New.
9309 (target_unpush_up) New typedef.
9310 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9311 target_unpush_up.
9312 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9313
9314 2018-03-27 Tom Tromey <tom@tromey.com>
9315
9316 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9317
9318 2018-03-27 Pedro Alves <palves@redhat.com>
9319 Tom Tromey <tom@tromey.com>
9320
9321 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9322 destructor. Now a class.
9323 (gdb_readline_wrapper_cleanup): Remove function.
9324 (gdb_readline_wrapper): Remove cleanups.
9325
9326 2018-03-27 Tom Tromey <tom@tromey.com>
9327
9328 * typeprint.h (struct type_print_options) <local_typedefs,
9329 global_typedefs>: Remove "struct" keyword.
9330 (class typedef_hash_table): New class.
9331 (recursively_update_typedef_hash, add_template_parameters)
9332 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9333 (find_typedef_in_hash): Don't declare.
9334 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9335 (typedef_hash_table::recursively_update): Rename from
9336 recursively_update_typedef_hash. Now a member.
9337 (typedef_hash_table::add_template_parameters): Rename from
9338 add_template_parameters. Now a member.
9339 (typedef_hash_table::typedef_hash_table): Now a constructor;
9340 rename from create_typedef_hash.
9341 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9342 rename from free_typedef_hash.
9343 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9344 (do_free_global_table): Remove.
9345 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9346 from copy_type_recursive.
9347 (create_global_typedef_table): Remove.
9348 (typedef_hash_table::find_global_typedef): Now a member of
9349 typedef_hash_table.
9350 (typedef_hash_table::find_typedef): Rename from
9351 find_typedef_in_hash; now a member.
9352 (whatis_exp): Update.
9353 * extension.h (struct ext_lang_type_printers): Add constructor and
9354 destructor.
9355 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9356 declare.
9357 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9358 Now a constructor; rename from start_ext_lang_type_printers.
9359 (ext_lang_type_printers): Now a destructor; rename from
9360 free_ext_lang_type_printers.
9361 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9362 Update.
9363 (c_type_print_base_struct_union): Update. Remove cleanups.
9364
9365 2018-03-27 Tom Tromey <tom@tromey.com>
9366
9367 * dwarf-index-write.c: Include <cmath>.
9368
9369 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9370
9371 * NEWS: Add entry describing new "set|show varsize-limit" command.
9372 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9373 command.
9374 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9375 "set variable".
9376
9377 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9378
9379 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9380 dwarf-index-write.c
9381 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9382 * dwarf-index-common.c: New file.
9383 * dwarf-index-common.h: New file.
9384 * dwarf-index-write.c: New file.
9385 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9386 (struct dwarf2_section_info): Move from here.
9387 (dwarf2_section_info_def): Likewise.
9388 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9389 (offset_type): Likewise.
9390 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9391 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9392 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9393 (byte_swap): Likewise.
9394 (MAYBE_SWAP): Likewise.
9395 (dwarf2_per_cu_ptr): Likewise.
9396 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9397 (struct tu_stats): Likewise.
9398 (struct dwarf2_per_objfile): Likewise.
9399 (struct dwarf2_per_cu_data): Likewise.
9400 (struct signatured_type): Likewise.
9401 (sig_type_ptr): Likewise.
9402 (DEF_VEC_P (sig_type_ptr)): Likewise.
9403 (INDEX4_SUFFIX): Likewise.
9404 (INDEX5_SUFFIX): Likewise.
9405 (DEBUG_STR_SUFFIX): Likewise.
9406 (dwarf2_read_section): Make non-static.
9407 (mapped_index_string_hash): Move from here.
9408 (dwarf5_djb_hash): Likewise.
9409 (file_write): Likewise.
9410 (class data_buf): Likewise.
9411 (struct symtab_index_entry): Likewise.
9412 (struct mapped_symtab): Likewise.
9413 (find_slot): Likewise.
9414 (hash_expand): Likewise.
9415 (add_index_entry): Likewise.
9416 (uniquify_cu_indices): Likewise.
9417 (class c_str_view): Likewise.
9418 (class c_str_view_hasher): Likewise.
9419 (class vector_hasher): Likewise.
9420 (write_hash_table): Likewise.
9421 (psym_index_map): Likewise.
9422 (struct addrmap_index_data): Likewise.
9423 (add_address_entry): Likewise.
9424 (add_address_entry_worker): Likewise.
9425 (write_address_map): Likewise.
9426 (symbol_kind): Likewise.
9427 (write_psymbols): Likewise.
9428 (struct signatured_type_index_data): Likewise.
9429 (write_one_signatured_type): Likewise.
9430 (recursively_count_psymbols): Likewise.
9431 (recursively_write_psymbols): Likewise.
9432 (class debug_names): Likewise.
9433 (check_dwarf64_offsets): Likewise.
9434 (psyms_seen_size): Likewise.
9435 (write_gdbindex): Likewise.
9436 (write_debug_names): Likewise.
9437 (assert_file_size): Likewise.
9438 (write_psymtabs_to_index): Likewise.
9439 (save_gdb_index_command): Likewise.
9440 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9441 command.
9442 * dwarf2read.h: New file.
9443
9444 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9445
9446 PR gdb/22670
9447 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9448 symbol name if the CU's language stores symbol names in linkage
9449 format.
9450 * language.h (struct language_defn)
9451 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9452 all instances of this struct.
9453
9454 2018-03-26 Tom Tromey <tom@tromey.com>
9455
9456 * stack.c (backtrace_command_1): Remove verbose code.
9457
9458 2018-03-26 Tom Tromey <tom@tromey.com>
9459
9460 * python/py-framefilter.c (py_print_type): Don't catch
9461 exceptions. Return void.
9462 (py_print_value): Likewise.
9463 (py_print_single_arg): Likewise.
9464 (enumerate_args): Don't catch exceptions.
9465 (py_print_args): Likewise.
9466 (py_print_frame): Likewise.
9467 (gdbpy_apply_frame_filter): Catch exceptions here.
9468
9469 2018-03-26 Tom Tromey <tom@tromey.com>
9470
9471 * stack.c (_initialize_stack): Remove trailing newlines from help
9472 text. Add "Usage" line to "backtrace" help.
9473
9474 2018-03-26 Tom Tromey <tom@tromey.com>
9475
9476 PR python/16486:
9477 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9478
9479 2018-03-26 Tom Tromey <tom@tromey.com>
9480
9481 * python/py-framefilter.c (py_print_single_arg): Return
9482 EXT_LANG_BT_ERROR from catch.
9483
9484 2018-03-26 Tom Tromey <tom@tromey.com>
9485
9486 PR backtrace/15584:
9487 * stack.c (backtrace_command_1): Move some code into no-filters
9488 "if".
9489
9490 2018-03-26 Tom Tromey <tom@tromey.com>
9491
9492 * python/py-framefilter.c (throw_quit_or_print_exception): New
9493 function.
9494 (gdbpy_apply_frame_filter): Use it.
9495
9496 2018-03-26 Tom Tromey <tom@tromey.com>
9497
9498 PR cli/17716:
9499 * python/py-framefilter.c (py_print_type, py_print_value)
9500 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9501 RETURN_MASK_ERROR.
9502
9503 2018-03-26 Tom Tromey <tom@tromey.com>
9504
9505 * python/py-framefilter.c (enumerate_args): Use
9506 gdb::unique_xmalloc_ptr.
9507
9508 2018-03-26 Tom Tromey <tom@tromey.com>
9509
9510 * python/py-framefilter.c (py_print_frame): Return
9511 EXT_LANG_BT_OK.
9512 (gdbpy_apply_frame_filter): Update comment.
9513 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9514 Remove.
9515 <EXT_LANG_BT_NO_FILTERS>: Change value.
9516
9517 2018-03-26 Tom Tromey <tom@tromey.com>
9518
9519 PR backtrace/15582:
9520 * stack.c (backtrace_command): Parse "hide" argument.
9521 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9522 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9523 constant.
9524
9525 2018-03-26 Tom Tromey <tom@tromey.com>
9526
9527 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9528 add "flags".
9529 (backtrace_command): Remove "fulltrace", add "flags".
9530
9531 2018-03-26 Tom Tromey <tom@tromey.com>
9532
9533 * stack.c (backtrace_command): Rewrite command line parsing.
9534
9535 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9536
9537 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9538
9539 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9540
9541 * filename-seen-cache.h: Add include guard.
9542
9543 2018-03-26 Keith Seitz <keiths@redhat.com>
9544
9545 * symfile.c (place_section): Remove "struct" from section_addr_info
9546 in comment.
9547 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9548 "struct" keyword from section_addr_info.
9549
9550 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9551
9552 * regformats/regdef.h (reg): Add constructors.
9553
9554 2018-03-25 Pedro Alves <palves@redhat.com>
9555
9556 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9557 if then/else bodies in var_func_name extraction.
9558
9559 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9560
9561 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9562 lookup_minimal_symbol() to find symbol entry.
9563 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9564
9565 2018-03-23 Keith Seitz <keiths@redhat.com>
9566
9567 PR c++/22968
9568 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9569 nested type definitions for C++, too.
9570
9571 2018-03-23 Tom Tromey <tom@tromey.com>
9572
9573 * machoread.c (struct oso_el): Add a constructor. Don't define as
9574 a typedef.
9575 (macho_register_oso): Remove.
9576 (macho_symtab_read): Take a std::vector.
9577 (oso_el_compare_name): Now a std::sort comparator.
9578 (macho_symfile_read_all_oso): Take a std::vector.
9579 (macho_symfile_read): Use std::vector. Remove cleanups.
9580
9581 2018-03-22 Tom Tromey <tom@tromey.com>
9582
9583 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9584 (record_full_goto_bookmark): Use std::string.
9585
9586 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9587
9588 PR tdep/18295
9589 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9590 a single mask.
9591
9592 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9593
9594 * rs6000-tdep.c (store_insn_p): New function.
9595 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9596 and cr_reg to their unshifted values. Use store_insn_p to
9597 match LR saves using either R1 or fdata->alloca_reg. Use
9598 store_insn_p to match CR saves. Set alloca_reg_offset
9599 when alloca_reg and framep are set. Remove lr_reg shift
9600 when assigning to fdata->lr_register.
9601
9602 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9603
9604 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9605 command line args instead of emitting a warning.
9606
9607 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9608
9609 * tracepoint.h (struct static_tracepoint_marker): Initialize
9610 fields, define default constructor, move constructor and move
9611 assignment, disable the rest.
9612 <str_id, extra>: Make std::string.
9613 (release_static_tracepoint_marker): Remove.
9614 (free_current_marker): Remove.
9615 * tracepoint.c (free_current_marker): Remove.
9616 (parse_static_tracepoint_marker_definition): Adjust to
9617 std::string, use new hex2str overload.
9618 (release_static_tracepoint_marker): Remove.
9619 (print_one_static_tracepoint_marker): Get marker by reference
9620 and adjust to std::string.
9621 (info_static_tracepoint_markers_command): Adjust to std::vector
9622 changes
9623 * target.h (static_tracepoint_marker_p): Remove typedef.
9624 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9625 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9626 bool.
9627 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9628 * target-debug.h
9629 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9630 (target_debug_print_std_vector_static_tracepoint_marker): New.
9631 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9632 to...
9633 (target_debug_print_static_tracepoint_marker_p): ... this.
9634 * target-delegates.c: Re-generate.
9635 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9636 Make std::string.
9637 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9638 (decode_static_tracepoint_spec): Adjust to std::vector.
9639 (tracepoint_print_one_detail): Adjust to std::string.
9640 (strace_marker_decode_location): Adjust to std::string.
9641 (update_static_tracepoint): Adjust to std::string, remove call
9642 to release_static_tracepoint_marker.
9643 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9644 Adjust to std::vector.
9645 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9646 (remote_static_tracepoint_markers_by_strid): Adjust to
9647 std::vector.
9648 * common/rsp-low.h (hex2str): New overload with explicit count
9649 of bytes.
9650 * common/rsp-low.c (hex2str): New overload with explicit count
9651 of bytes.
9652 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9653 (_initialize_rsp_low_selftests): Add test_hex2str test.
9654 * unittests/tracepoint-selftests.c
9655 (test_parse_static_tracepoint_marker_definition): Adjust to
9656 std::string.
9657
9658 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9659
9660 * tracepoint.c (parse_static_tracepoint_marker_definition):
9661 Consider case where the definition is followed by more
9662 definitions.
9663 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9664 tracepoint-selftests.c.
9665 * unittests/tracepoint-selftests.c: New.
9666
9667 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9668
9669 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9670 Carvalho.
9671
9672 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9673
9674 * symtab.c (find_pc_sect_line): fixed indentation.
9675
9676 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9677
9678 * symtab.c (find_pc_sect_line): now uses binary search.
9679
9680 2018-03-19 Tom Tromey <tom@tromey.com>
9681
9682 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9683 "IDENT" production.
9684
9685 2018-03-19 Pedro Alves <palves@redhat.com>
9686 Tom Tromey <tom@tromey.com>
9687
9688 * unittests/observable-selftests.c: New file.
9689 * common/observable.h: New file.
9690 * observable.h: New file.
9691 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9692 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9693 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9694 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9695 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9696 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9697 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9698 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9699 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9700 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9701 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9702 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9703 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9704 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9705 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9706 tui/tui-interp.c, valops.c: Update all users.
9707 * tui/tui-hooks.c (tui_bp_created_observer)
9708 (tui_bp_deleted_observer, tui_bp_modified_observer)
9709 (tui_inferior_exit_observer, tui_before_prompt_observer)
9710 (tui_normal_stop_observer, tui_register_changed_observer):
9711 Remove.
9712 (tui_observers_token): New global.
9713 (attach_or_detach, tui_attach_detach_observers): New functions.
9714 (tui_install_hooks, tui_remove_hooks): Use
9715 tui_attach_detach_observers.
9716 * record-btrace.c (record_btrace_thread_observer): Remove.
9717 (record_btrace_thread_observer_token): New global.
9718 * observer.sh: Remove.
9719 * observer.c: Rename to observable.c.
9720 * observable.c (namespace gdb_observers): Define new objects.
9721 (observer_debug): Move into gdb_observers namespace.
9722 (struct observer, struct observer_list, xalloc_observer_list_node)
9723 (xfree_observer_list_node, generic_observer_attach)
9724 (generic_observer_detach, generic_observer_notify): Remove.
9725 (_initialize_observer): Update.
9726 Don't include observer.inc.
9727 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9728 (clean mostlyclean): Likewise.
9729 (observer.h, observer.inc): Remove targets.
9730 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9731 (COMMON_SFILES): Use observable.c, not observer.c.
9732 * .gitignore: Remove observer.h.
9733
9734 2018-03-18 Tom Tromey <tom@tromey.com>
9735
9736 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9737 gdb::def_vector.
9738 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9739
9740 2018-03-17 Tom Tromey <tom@tromey.com>
9741
9742 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9743
9744 2018-03-17 Tom Tromey <tom@tromey.com>
9745
9746 * target.c (class scoped_target_fd): New.
9747 (target_fileio_close_cleanup): Remove.
9748 (target_fileio_read_alloc_1): Use scoped_target_fd.
9749
9750 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9751
9752 * silent-rules.mk: New.
9753 * Makefile.in: Include silent-rules.mk
9754 (srcdir, VPATH, top_srcdir): Move up.
9755 (COMPILE): Add ECHO_CXX.
9756 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9757 (init.c): Add ECHO_INIT_C.
9758 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9759 (version.c): Add ECHO_GEN.
9760 (printcmd.o): Add ECHO_CXX.
9761 (target-float.o): Add ECHO_CXX.
9762 (ada-exp.o): Add ECHO_CXX.
9763 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9764 (insight$(EXEEXT)): Add ECHO_CXXLD.
9765 * gnulib/configure.ac: Add AM_SILENT_RULES.
9766 * gnulib/aclocal.m4: Re-generate.
9767 * gnulib/configure: Re-generate.
9768 * gnulib/import/Makefile.in: Re-generate.
9769
9770 2018-03-16 Tom Tromey <tom@tromey.com>
9771
9772 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9773 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9774 * utils.c (do_free_section_addr_info)
9775 (make_cleanup_free_section_addr_info): Remove.
9776 * symfile.h (struct other_sections): Add constructor.
9777 (struct section_addr_info): Remove.
9778 (section_addr_info): New typedef.
9779 (struct sym_fns) <sym_offsets>: Change type of parameter.
9780 (build_section_addr_info_from_objfile)
9781 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9782 (default_symfile_offsets, symbol_file_add)
9783 (symbol_file_add_from_bfd)
9784 (build_section_addr_info_from_section_table): Update.
9785 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9786 * symfile.c (alloc_section_addr_info): Remove.
9787 (build_section_addr_info_from_section_table): Change return type.
9788 Update.
9789 (build_section_addr_info_from_bfd)
9790 (build_section_addr_info_from_objfile): Likewise.
9791 (free_section_addr_info): Remove.
9792 (relative_addr_info_to_section_offsets): Change type of "addrs".
9793 (addrs_section_compar): Now a std::sort comparator.
9794 (addrs_section_sort): Change return type.
9795 (addr_info_make_relative): Change type of "addrs". Update.
9796 (default_symfile_offsets, syms_from_objfile_1)
9797 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9798 (symbol_file_add_separate): Update.
9799 (symbol_file_add): Change type of "addrs". Update.
9800 (add_symbol_file_command): Update. Remove cleanups.
9801 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9802 cleanups.
9803 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9804 * solib.c (solib_read_symbols): Update.
9805 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9806 * machoread.c (macho_symfile_offsets): Update.
9807 * jit.c (jit_bfd_try_read_symtab): Update.
9808
9809 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9810
9811 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9812 unittests/utils-selftests.c.
9813 * unittests/utils-selftests.c: New file.
9814
9815 2018-03-14 Tom Tromey <tom@tromey.com>
9816
9817 PR cli/14977:
9818 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9819 for NULL.
9820
9821 2018-03-14 Tom Tromey <tom@tromey.com>
9822
9823 PR cli/19918:
9824 * printcmd.c (printf_pointer): Allow "-" in format.
9825
9826 2018-03-14 Tom Tromey <tom@tromey.com>
9827
9828 * printcmd.c (_initialize_printcmd): Add usage to printf.
9829
9830 2018-03-14 Yao Qi <qiyao@sourceware.org>
9831
9832 * MAINTAINERS: Update my email address.
9833
9834 2018-03-13 Tom Tromey <tom@tromey.com>
9835
9836 * machoread.c (macho_check_dsym): Change filenamep to a
9837 std::string*.
9838 (macho_symfile_read): Update.
9839 * symfile.c (load_command): Use std::string.
9840
9841 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9842
9843 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9844 to error message string.
9845 (riscv_register_name): Use xsnprintf instead of sprintf.
9846 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9847 internal_error.
9848 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9849 error.
9850 (riscv_push_dummy_call): Likewise.
9851
9852 2018-03-12 Tom Tromey <tom@tromey.com>
9853
9854 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9855 Use gdb::byte_vector.
9856 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9857
9858 2018-03-12 Yao Qi <yao.qi@linaro.org>
9859
9860 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9861 parameter type to readable_regcache.
9862 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9863 the declaration.
9864
9865 2018-03-11 Tom Tromey <tom@tromey.com>
9866
9867 * dwarf2read.c (struct nextfield): Add initializers.
9868 (struct nextfnfield): Remove.
9869 (struct fnfieldlist): Add initializers. Remove "length" and
9870 "head", use std::vector.
9871 (struct decl_field_list): Remove.
9872 (struct field_info): Add initializers.
9873 <fields, baseclasses>: Now std::vector.
9874 <nbaseclasses, nfnfields, typedef_field_list_count,
9875 nested_types_list_count>: Remove.
9876 (dwarf2_add_field, dwarf2_add_type_defn)
9877 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9878 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9879 (process_structure_scope): Update.
9880
9881 2018-03-11 Tom Tromey <tom@tromey.com>
9882
9883 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9884 for use by std::sort.
9885 (build_type_psymtabs_1): Use std::vector.
9886
9887 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9888
9889 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9890 and LIBMPFR in the printed configuration.
9891
9892 2018-03-08 Tom Tromey <tom@tromey.com>
9893
9894 * source.c (get_filename_and_charpos): Use scoped_fd.
9895 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9896 (procfs_pidlist): Likewise.
9897 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9898 (iterate_over_mappings): Likewise.
9899
9900 2018-03-08 Tom Tromey <tom@tromey.com>
9901
9902 * infcall.c (struct call_return_meta_info)
9903 <stack_temporaries_enabled>: Remove.
9904 (get_call_return_value, call_function_by_hand_dummy): Update.
9905 * thread.c (disable_thread_stack_temporaries): Remove.
9906 (enable_thread_stack_temporaries): Remove.
9907 (thread_stack_temporaries_enabled_p): Return bool.
9908 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9909 (get_last_thread_stack_temporary): Update.
9910 * eval.c (evaluate_subexp): Update.
9911 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9912 class, not a function.
9913 (value_ptr, value_vec): Remove typedefs.
9914 (class thread_info) <stack_temporaries_enabled>: Now bool.
9915 <stack_temporaries>: Now a std::vector.
9916 (thread_stack_temporaries_enabled_p)
9917 (value_in_thread_stack_temporaries): Return bool.
9918
9919 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9920
9921 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9922 (getpkt_or_notif_sane_1): Likewise.
9923
9924 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9925
9926 * build-id.c (build_id_to_debug_bfd): Use std::string.
9927
9928 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9929
9930 * build-id.c (find_separate_debug_file_by_buildid): Return
9931 std::string.
9932 * build-id.h (find_separate_debug_file_by_buildid): Return
9933 std::string.
9934 * coffread.c (coff_symfile_read): Adjust to std::string.
9935 * elfread.c (elf_symfile_read): Adjust to std::string.
9936 * symfile.c (separate_debug_file_exists): Change parameter to
9937 std::string.
9938 (find_separate_debug_file): Return std::string.
9939 (find_separate_debug_file_by_debuglink): Return std::string.
9940 * symfile.h (find_separate_debug_file_by_debuglink): Return
9941 std::string.
9942
9943 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9944
9945 * common/xml-utils.c (xml_escape_text): Move code to...
9946 (xml_escape_text_append): ... this new function.
9947 * common/xml-utils.h (xml_escape_text_append): New declaration.
9948 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9949 New function.
9950 (_initialize_xml_utils): register test_xml_escape_text_append as
9951 a selftest.
9952
9953 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9954
9955 * defs.h: Remove MAX_REGISTER_SIZE.
9956 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9957 asserts.
9958 * python/py-unwind.c (pyuw_sniffer): Likewise.
9959
9960 2018-03-07 Tom Tromey <tom@tromey.com>
9961
9962 * linux-tdep.c (linux_info_proc): Update.
9963 * target.h (struct target_ops) <to_fileio_readlink>: Return
9964 optional<string>.
9965 (target_fileio_readlink): Return optional<string>.
9966 * remote.c (remote_hostio_readlink): Return optional<string>.
9967 * inf-child.c (inf_child_fileio_readlink): Return
9968 optional<string>.
9969 * target.c (target_fileio_readlink): Return optional<string>.
9970
9971 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9972
9973 * regcache.c (cooked_read_test): Add riscv to the list of
9974 architectures that have a save_reggroup.
9975
9976 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9977
9978 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9979 value is not a dynamic class object.
9980
9981 2018-03-06 Tom Tromey <tom@tromey.com>
9982
9983 * rust-exp.y: Formatting fixes.
9984
9985 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9986
9987 * riscv-tdep.c (riscv_register_name): Remove target description
9988 support.
9989 (riscv_gdbarch_init): Remove target description check.
9990
9991 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9992
9993 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9994 comment.
9995 * riscv-tdep.h: Likewise.
9996
9997 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9998
9999 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10000 (riscv_pseudo_register_write): Delete.
10001 (riscv_gdbarch_init): Remove all use of pseudo registers.
10002
10003 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10004
10005 * record-btrace.c (btrace_print_lines): Replace cleanup
10006 parameter with RAII equivalents.
10007 (btrace_insn_history): Replace cleanup with RAII equivalents.
10008 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10009 make_cleanup_ui_out_tuple_begin_end): Remove.
10010 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10011 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10012 make_cleanup_ui_out_list_begin_end): Remove.
10013
10014 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10015
10016 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10017 parameter types to std::vector. Use bool.
10018 (record_btrace_wait): Replace VEC(tp_t) with
10019 std::vector<thread_info *>.
10020 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10021
10022 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10023
10024 * record-btrace.c (record_btrace_disable_callback): Remove.
10025 (struct scoped_btrace_disable): New.
10026 (record_btrace_open): Use scoped_btrace_disable.
10027
10028 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10029
10030 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10031 reading values from registers.
10032
10033 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10034
10035 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10036 where appropriate.
10037
10038 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10039
10040 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10041 change parameter type. Use GDB's print functions, and use
10042 core_addr_to_string where appropriate.
10043 (riscv_push_dummy_call): Use core_addr_to_string where
10044 appropriate, update call to riscv_print_arg_location, and reindent
10045 a few lines.
10046 (riscv_return_value): Update call to riscv_print_arg_location.
10047
10048 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10049 Tim Newsome <tim@sifive.com>
10050 Albert Ou <a0u@eecs.berkeley.edu>
10051 Darius Rad <darius@bluespec.com>
10052
10053 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10054 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10055 (ALLDEPFILES): Add riscv-tdep.c
10056 * configure.tgt: Add riscv support.
10057 * riscv-tdep.c: New file.
10058 * riscv-tdep.h: New file.
10059 * NEWS: Mention new target.
10060 * MAINTAINERS: Add entry for riscv.
10061
10062 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10063
10064 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10065 fields within aggregates.
10066
10067 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10068
10069 * record-btrace.c (btrace_print_lines): Change type of flags to
10070 gdb_disassembly_flags.
10071
10072 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10073
10074 * fbsd-nat.c: Include "inf-ptrace.h".
10075 (USE_SIGTRAP_SIGINFO): Conditionally define.
10076 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10077 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10078 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10079 function.
10080 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10081 Likewise.
10082 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10083 Likewise.
10084 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10085 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10086 "supports_stopped_by_hw_breakpoint" target methods.
10087
10088 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10089
10090 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10091 * fbsd-nat.c (debug_fbsd_nat): New variable.
10092 (show_fbsd_nat_debug): New function.
10093 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10094 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10095
10096 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10097
10098 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10099 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10100 prototype.
10101 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10102 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10103 method.
10104
10105 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10106
10107 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10108 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10109
10110 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10111
10112 * charset.c (struct charset_vector): New.
10113 (charsets): Change type to charset_vector.
10114 (find_charset_names): Adjust.
10115 (add_one): Adjust.
10116 (_initialize_charset): Adjust.
10117
10118 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10119
10120 * progspace.h (struct program_space) <deleted_solibs>: Change
10121 type to std::vector<std::string>.
10122 * progspace.c (clear_program_space_solib_cache): Adjust.
10123 * breakpoint.c (print_solib_event): Adjust.
10124 (check_status_catch_solib): Adjust.
10125 * solib.c (update_solib_list): Adjust.
10126 * ui-out.h (class ui_out) <field_string>: New overload.
10127 * ui-out.c (ui_out::field_string): New overload.
10128
10129 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10130
10131 * progspace.h (struct program_space): Add constructor and
10132 destructor, initialize fields.
10133 (add_program_space): Remove.
10134 * progspace.c (add_program_space): Rename to...
10135 (program_space::program_space): ... this.
10136 (release_program_space): Rename to...
10137 (program_space::~program_space): ... this.
10138 (delete_program_space): Use delete to delete program_space.
10139 (initialize_progspace): Use new to allocate program_space.
10140 * inferior.c (add_inferior_with_spaces): Likewise.
10141 (clone_inferior_command): Likewise.
10142 * infrun.c (follow_fork_inferior): Likewise.
10143 (handle_vfork_child_exec_or_exit): Likewise.
10144
10145 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10146
10147 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10148 (delim_string_to_char_ptr_vec): Return std::vector of
10149 gdb::unique_xmalloc_ptr.
10150 (dirnames_to_char_ptr_vec_append): Take std::vector of
10151 gdb::unique_xmalloc_ptr.
10152 (dirnames_to_char_ptr_vec): Return std::vector of
10153 gdb::unique_xmalloc_ptr.
10154 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10155 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10156 (delim_string_to_char_ptr_vec): Return an std::vector of
10157 gdb::unique_xmalloc_ptr, adjust the code.
10158 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10159 gdb::unique_xmalloc_ptr, adjust the code.
10160 (dirnames_to_char_ptr_vec): Return an std::vector of
10161 gdb::unique_xmalloc_ptr, adjust the code.
10162 * auto-load.c (auto_load_safe_path_vec): Change type to
10163 std::vector of gdb::unique_xmalloc_ptr.
10164 (auto_load_expand_dir_vars): Return an std::vector of
10165 gdb::unique_xmalloc_ptr, adjust the code.
10166 (auto_load_safe_path_vec_update): Adjust.
10167 (filename_is_in_auto_load_safe_path_vec): Adjust.
10168 (auto_load_objfile_script_1): Adjust.
10169 * build-id.c (build_id_to_debug_bfd): Adjust.
10170 * linux-thread-db.c (thread_db_load_search): Adjust.
10171 * source.c (add_path): Adjust.
10172 (openp): Adjust.
10173 * symfile.c (find_separate_debug_file): Adjust.
10174 * utils.c (do_free_char_ptr_vec): Remove.
10175 (make_cleanup_free_char_ptr_vec): Remove.
10176
10177 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10178
10179 PR gdb/22907
10180 * common/pathstuff.c: Conditionally include "<windows.h>".
10181
10182 2018-03-01 Georg Sauthoff <mail@georg.so>
10183
10184 PR gdb/22888
10185 * gcore.in: Quote variables and switch interpreter to bash.
10186
10187 2018-03-01 Tom Tromey <tom@tromey.com>
10188
10189 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10190 assertion. Add assertion for discriminant_index.
10191 (quirk_rust_enum): Use correct base type name in univariant case.
10192
10193 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10194
10195 * record.c (get_call_history_modifiers): Return a
10196 record_print_flags.
10197 (cmd_record_call_history): Adjust.
10198 * record-btrace.c (record_btrace_call_history): Adjust.
10199 (record_btrace_call_history_range): Adjust.
10200 (record_btrace_call_history_from): Adjust.
10201 * target-debug.h (target_debug_print_record_print_flags): New.
10202 * target-delegates.c: Re-generate.
10203 * target.c (target_call_history): Change flags type.
10204 (target_call_history_from): Likewise.
10205 (target_call_history_range): Likewise.
10206 * target.h (struct target_ops) <target_call_history>: Likewise.
10207 (target_call_history_from): Likewise.
10208 (target_call_history_range): Likewise.
10209
10210 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10211 Simon Marchi <simon.marchi@polymtl.ca>
10212
10213 * common/common-utils.c: Include "sys/stat.h".
10214 (is_regular_file): Move here from "source.c"; change return
10215 type to "bool".
10216 * common/common-utils.h (is_regular_file): New prototype.
10217 * common/pathstuff.c (contains_dir_separator): New function.
10218 * common/pathstuff.h (contains_dir_separator): New prototype.
10219 * source.c: Don't include "sys/stat.h".
10220 (is_regular_file): Move to "common/common-utils.c".
10221
10222 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10223
10224 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10225 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10226 * auto-load.c: Include "common/pathstuff.h".
10227 * common/common-def.h (current_directory): Move here.
10228 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10229 function.
10230 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10231 prototype.
10232 * common/pathstuff.c: New file.
10233 * common/pathstuff.h: New file.
10234 * compile/compile.c: Include "common/pathstuff.h".
10235 * defs.h (current_directory): Move to "common/common-defs.h".
10236 * dwarf2read.c: Include "common/pathstuff.h".
10237 * exec.c: Likewise.
10238 * guile/scm-safe-call.c: Likewise.
10239 * linux-thread-db.c: Likewise.
10240 * main.c: Likewise.
10241 * nto-tdep.c: Likewise.
10242 * objfiles.c: Likewise.
10243 * source.c: Likewise.
10244 * symtab.c: Likewise.
10245 * utils.c: Include "common/pathstuff.h".
10246 (gdb_realpath): Move to "common/pathstuff.c".
10247 (gdb_realpath_keepfile): Likewise.
10248 (gdb_abspath): Likewise.
10249 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10250 (gdb_realpath_keepfile): Likewise.
10251 (gdb_abspath): Likewise.
10252
10253 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10254
10255 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10256 wildcard process pid for super_resume for kernels with a
10257 specific bug.
10258
10259 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10260
10261 * compile/compile.c (get_args): Add additional comments
10262 explaining function.
10263
10264 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10265 Tom Tromey <tom@tromey.com>
10266
10267 * target.h (memory_write_request_s): Remove typedef. Don't define
10268 VEC.
10269 (target_write_memory_blocks): Change argument to std::vector.
10270 (struct memory_write_request): Add constructor.
10271 * target-memory.c (compare_block_starting_address): Return bool.
10272 Change argument types.
10273 (claim_memory): Change arguments to use std::vector.
10274 (split_regular_and_flash_blocks, blocks_to_erase)
10275 (compute_garbled_blocks): Likewise.
10276 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10277 (target_write_memory_blocks): Change argument to std::vector.
10278 * symfile.c (struct load_section_data): Add constructor and
10279 destructor. Use std::vector for "requests".
10280 (struct load_progress_data): Add initializers.
10281 (load_section_callback): Update. Use "new".
10282 (clear_memory_write_data): Remove.
10283 (generic_load): Update.
10284
10285 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10286
10287 * arch/aarch64.h: Use common/tdesc.h.
10288
10289 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10290
10291 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10292 architecture with a 64-bit ABI.
10293
10294 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10295
10296 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10297 ahead of target description loading.
10298
10299 2018-02-26 Tom Tromey <tom@tromey.com>
10300
10301 * stack.c (backtrace_command_1): Update.
10302 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10303 of "flags".
10304 * python/py-framefilter.c (py_print_frame)
10305 (gdbpy_apply_frame_filter): Change type of "flags".
10306 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10307 of "flags".
10308 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10309 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10310 * extension.h (enum frame_filter_flag): Rename from
10311 frame_filter_flags.
10312 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10313 (apply_ext_lang_frame_filter): Change type of "flags".
10314 * extension.c (apply_ext_lang_frame_filter): Change type of
10315 "flags".
10316 * extension-priv.h (struct extension_language_ops)
10317 <apply_frame_filter>: Change type of "flags".
10318
10319 2018-02-26 Tom Tromey <tom@tromey.com>
10320
10321 PR python/16497:
10322 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10323 off-by-one in py_end computation.
10324 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10325 PRINT_MORE_FRAMES.
10326 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10327 constant.
10328
10329 2018-02-26 Tom Tromey <tom@tromey.com>
10330
10331 * dwarf2read.c (struct variant_field): New.
10332 (struct nextfield) <variant>: New field.
10333 (dwarf2_add_field): Handle DW_TAG_variant_part.
10334 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10335 discriminated union.
10336 (read_structure_type): Handle DW_TAG_variant_part.
10337 (handle_struct_member_die): New function, extracted from
10338 process_structure_scope. Handle DW_TAG_variant.
10339 (process_structure_scope): Handle discriminated unions. Call
10340 handle_struct_member_die.
10341
10342 2018-02-26 Tom Tromey <tom@tromey.com>
10343
10344 * rust-lang.h (rust_last_path_segment): Declare.
10345 * rust-lang.c (rust_last_path_segment): Now public. Change
10346 contract.
10347 (struct disr_info): Remove.
10348 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10349 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10350 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10351 (rust_enum_p, rust_enum_variant): New function.
10352 (rust_underscore_fields): Remove "offset" parameter.
10353 (rust_print_enum): New function.
10354 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10355 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10356 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10357 enums.
10358 (rust_internal_print_type): New function, from rust_print_type.
10359 Remove enum code.
10360 (rust_print_type): Call rust_internal_print_type.
10361 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10362 Update enum handling.
10363 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10364 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10365 (rust_union_quirks): New functions.
10366 (process_full_comp_unit, process_full_type_unit): Call
10367 rust_union_quirks.
10368 (process_structure_scope): Update rust_unions if necessary.
10369
10370 2018-02-26 Tom Tromey <tom@tromey.com>
10371
10372 * value.h (value_union_variant): Declare.
10373 * valops.c (value_union_variant): New function.
10374 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10375 (struct discriminant_info): New.
10376 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10377 enumerator.
10378 (struct main_type) <flag_discriminated_union>: New field.
10379
10380 2018-02-26 Tom Tromey <tom@tromey.com>
10381
10382 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10383 unittests/unpack-selftests.c.
10384 * unittests/unpack-selftests.c: New file.
10385 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10386
10387 2018-02-26 Yao Qi <yao.qi@linaro.org>
10388
10389 * dwarf2read.c (struct partial_die_info) <read>: New method.
10390 (read_partial_die): Remove the declaration.
10391 (load_partial_dies): Update.
10392 (partial_die_info::partial_die_info):
10393 (read_partial_die): Change it to partial_die_info::read.
10394
10395 2018-02-26 Yao Qi <yao.qi@linaro.org>
10396
10397 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10398 (fixup_partial_die): Remove declaration.
10399 (scan_partial_symbols): Update.
10400 (partial_die_parent_scope): Likewise.
10401 (partial_die_full_name): Likewise.
10402 (fixup_partial_die): Change it to partial_die_info::fixup.
10403
10404 2018-02-26 Yao Qi <yao.qi@linaro.org>
10405
10406 * dwarf2read.c (read_partial_die): Update the declaration.
10407 (load_partial_dies): Caller update.
10408 (read_partial_die): Remove one argument abbrev_len.
10409
10410 2018-02-26 Yao Qi <yao.qi@linaro.org>
10411
10412 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10413 assignment operator.
10414 (load_partial_dies): Use ctor and copy ctor.
10415 (read_partial_die): Update.
10416 (dwarf2_cu::find_partial_die): Use ctor.
10417
10418 2018-02-26 Yao Qi <yao.qi@linaro.org>
10419
10420 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10421 (find_partial_die_in_comp_unit): Change it to
10422 dwarf2_cu::find_partial_die.
10423 (find_partial_die): Update.
10424
10425 2018-02-26 Yao Qi <yao.qi@linaro.org>
10426
10427 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10428 is NULL.
10429
10430 2018-02-26 Yao Qi <yao.qi@linaro.org>
10431
10432 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10433
10434 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10435
10436 * arch/amd64.h: Use common/tdesc.h.
10437 * arch/i386.c: Likewise.
10438 * arch/i386.h: Likewise.
10439 * arch/tic6x.c: Likewise.
10440 * arch/tdesc.h: Move file from here...
10441 * common/tdesc.h: ...to here.
10442 * features/aarch64-core.c: Regenerate.
10443 * features/aarch64-fpu.c: Regenerate.
10444 * features/i386/32bit-avx.c: Regenerate.
10445 * features/i386/32bit-avx512.c: Regenerate.
10446 * features/i386/32bit-core.c: Regenerate.
10447 * features/i386/32bit-linux.c: Regenerate.
10448 * features/i386/32bit-mpx.c: Regenerate.
10449 * features/i386/32bit-pkeys.c: Regenerate.
10450 * features/i386/32bit-sse.c: Regenerate.
10451 * features/i386/64bit-avx.c: Regenerate.
10452 * features/i386/64bit-avx512.c: Regenerate.
10453 * features/i386/64bit-core.c: Regenerate.
10454 * features/i386/64bit-linux.c: Regenerate.
10455 * features/i386/64bit-mpx.c: Regenerate.
10456 * features/i386/64bit-pkeys.c: Regenerate.
10457 * features/i386/64bit-segments.c: Regenerate.
10458 * features/i386/64bit-sse.c: Regenerate.
10459 * features/i386/x32-core.c: Regenerate.
10460 * features/tic6x-c6xp.c: Regenerate.
10461 * features/tic6x-core.c: Regenerate.
10462 * features/tic6x-gp.c: Regenerate.
10463 * target-descriptions.c: Use common/tdesc.h.
10464 * target-descriptions.h: Likewise.
10465
10466 2018-02-24 Tom Tromey <tom@tromey.com>
10467
10468 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10469 (try_thread_db_load_from_dir, thread_db_load_search): Use
10470 std::string.
10471 (info_auto_load_libthread_db_compare): Return bool. Change
10472 argument types.
10473 (info_auto_load_libthread_db): Use std::vector, std::string.
10474 Remove cleanups.
10475
10476 2018-02-24 Tom Tromey <tom@tromey.com>
10477
10478 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10479 std::string.
10480 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10481 std::string*.
10482 * gdbarch.c: Rebuild.
10483 * gdbarch.h: Rebuild.
10484 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10485 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10486 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10487 std::string*.
10488
10489 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10490
10491 * gdbtypes.h (sect_offset): Change type to uint64_t.
10492 (sect_offset_str): New function.
10493 * dwarf2read.c (create_addrmap_from_aranges): Use
10494 sect_offset_str.
10495 (error_check_comp_unit_head): Likewise.
10496 (create_debug_type_hash_table): Likewise.
10497 (read_cutu_die_from_dwo): Likewise.
10498 (init_cutu_and_read_dies): Likewise.
10499 (init_cutu_and_read_dies_no_follow): Likewise.
10500 (process_psymtab_comp_unit_reader): Likewise.
10501 (partial_die_parent_scope): Likewise.
10502 (peek_die_abbrev): Likewise.
10503 (process_queue): Likewise.
10504 (dwarf2_physname): Likewise.
10505 (read_namespace_alias): Likewise.
10506 (read_import_statement): Likewise.
10507 (create_dwo_cu_reader): Likewise.
10508 (create_cus_hash_table): Likewise.
10509 (lookup_dwo_cutu): Likewise.
10510 (inherit_abstract_dies): Likewise.
10511 (read_func_scope): Likewise.
10512 (read_call_site_scope): Likewise.
10513 (dwarf2_add_member_fn): Likewise.
10514 (read_common_block): Likewise.
10515 (read_module_type): Likewise.
10516 (read_typedef): Likewise.
10517 (read_subrange_type): Likewise.
10518 (load_partial_dies): Likewise.
10519 (read_partial_die): Likewise.
10520 (find_partial_die): Likewise.
10521 (read_str_index): Likewise.
10522 (dwarf2_string_attr): Likewise.
10523 (build_error_marker_type): Likewise.
10524 (lookup_die_type): Likewise.
10525 (dump_die_shallow): Likewise.
10526 (follow_die_ref): Likewise.
10527 (dwarf2_fetch_die_loc_sect_off): Likewise.
10528 (dwarf2_fetch_constant_bytes): Likewise.
10529 (follow_die_sig): Likewise.
10530 (get_signatured_type): Likewise.
10531 (get_DW_AT_signature_type): Likewise.
10532 (dwarf2_find_containing_comp_unit): Likewise.
10533 (set_die_type): Likewise.
10534
10535 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10536
10537 * arch/aarch64.c: Include "common-defs.h".
10538 * arch/amd64.c: Likewise.
10539 * arch/i386.c: Likewise.
10540
10541 2018-02-21 Tom Tromey <tom@tromey.com>
10542
10543 * value.h: (extract_field_op): Update.
10544 * eval.c (extract_field_op): Return a const char *.
10545 * expression.h (parse_expression_for_completion): Update.
10546 * completer.c (complete_expression): Update.
10547 (add_struct_fields): Make fieldname const.
10548 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10549 (mark_completion_tag, parse_exp_in_context_1): Update.
10550 (parse_expression_for_completion): Change "name" to
10551 unique_xmalloc_ptr*.
10552
10553 2018-02-21 Tom Tromey <tom@tromey.com>
10554
10555 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10556
10557 2018-02-21 Yao Qi <yao.qi@linaro.org>
10558
10559 * avr-tdep.c (avr_read_pc): Change parameter type to
10560 readable_regcache.
10561 * gdbarch.sh (read_pc): Likewise.
10562 * gdbarch.c: Re-generated.
10563 * gdbarch.h: Re-generated.
10564 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10565 readable_regcache.
10566 * ia64-tdep.c (ia64_read_pc): Likewise.
10567 * mips-tdep.c (mips_read_pc): Likewise.
10568 * spu-tdep.c (spu_read_pc): Likewise.
10569
10570 2018-02-21 Yao Qi <yao.qi@linaro.org>
10571
10572 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10573 * regcache-dump.c: New file.
10574 * regcache.c: Move register_dump to regcache-dump.c.
10575 (maintenance_print_registers): Likewise.
10576 (maintenance_print_raw_registers): Likewise.
10577 (maintenance_print_cooked_registers): Likewise.
10578 (maintenance_print_register_groups): Likewise.
10579 (maintenance_print_remote_registers): Likewise.
10580 (_initialize_regcache): Likewise.
10581 * regcache.h (register_dump): Moved from regcache.c.
10582
10583 2018-02-21 Yao Qi <yao.qi@linaro.org>
10584
10585 * regcache.c (regcache::regcache): Update.
10586 (regcache::invalidate): Move it to detached_regcache::invalidate.
10587 (get_thread_arch_aspace_regcache): Update.
10588 (regcache::raw_update): Update.
10589 (regcache::cooked_read): Remove some code.
10590 (regcache::cooked_read_value): Likewise.
10591 (regcache::raw_write): Remove assert on m_readonly_p.
10592 (regcache::raw_supply_integer): Move it to
10593 detached_regcache::raw_supply_integer.
10594 (regcache::raw_supply_zeroed): Likewise.
10595 * regcache.h (detached_regcache) <raw_supply_integer>: New
10596 declaration.
10597 <raw_supply_zeroed, invalidate>: Likewise.
10598 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10599 <invalidate>: Likewise.
10600 <m_readonly_p>: Removed.
10601
10602 2018-02-21 Yao Qi <yao.qi@linaro.org>
10603
10604 * infcmd.c (get_return_value): Let stop_regs point to
10605 get_current_regcache.
10606 * regcache.c (regcache::regcache): Remove.
10607 (register_dump_reg_buffer): New class.
10608 (regcache_print): Adjust.
10609 * regcache.h (regcache): Remove constructors.
10610
10611 2018-02-21 Yao Qi <yao.qi@linaro.org>
10612
10613 * regcache.c (class register_dump): New class.
10614 (register_dump_regcache, register_dump_none): New class.
10615 (register_dump_remote, register_dump_groups): New class.
10616 (regcache_print): Update.
10617 * regcache.h (regcache_dump_what): Move it to regcache.c.
10618 (regcache) <dump>: Remove.
10619
10620 2018-02-21 Yao Qi <yao.qi@linaro.org>
10621
10622 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10623 reg_buffer_rw *.
10624 (jit_unwind_reg_set_impl): Call raw_supply.
10625 (jit_frame_sniffer): Use reg_buffer_rw.
10626 * record-full.c (record_full_core_regbuf): Change its type.
10627 (record_full_core_open_1): Use reg_buffer_rw.
10628 (record_full_close): Likewise.
10629 (record_full_core_fetch_registers): Use regcache->raw_supply.
10630 (record_full_core_store_registers): Likewise.
10631 * regcache.c (regcache::get_register_status): Move it to
10632 reg_buffer.
10633 (regcache_raw_set_cached_value): Remove.
10634 (regcache::raw_set_cached_value): Remove.
10635 (regcache::raw_write): Call raw_supply.
10636 (regcache::raw_supply): Move it to reg_buffer_rw.
10637 * regcache.h (regcache_raw_set_cached_value): Remove.
10638 (reg_buffer_rw): New class.
10639
10640 2018-02-21 Yao Qi <yao.qi@linaro.org>
10641
10642 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10643 readonly_detached_regcache.
10644 (dummy_frame_prev_register): Use regcache->cooked_read.
10645 * frame.c (frame_save_as_regcache): Change return type.
10646 (frame_pop): Update.
10647 * frame.h (frame_save_as_regcache): Update declaration.
10648 * inferior.h (get_infcall_suspend_state_regcache): Update
10649 declaration.
10650 * infrun.c (infcall_suspend_state) <registers>: use
10651 readonly_detached_regcache.
10652 (save_infcall_suspend_state): Don't use regcache_dup.
10653 (get_infcall_suspend_state_regcache): Change return type.
10654 * linux-fork.c (struct fork_info) <savedregs>: Change to
10655 readonly_detached_regcache.
10656 <pc>: New field.
10657 (fork_save_infrun_state): Don't use regcache_dup.
10658 (info_checkpoints_command): Adjust.
10659 * mi/mi-main.c (register_changed_p): Update declaration.
10660 (mi_cmd_data_list_changed_registers): Use
10661 readonly_detached_regcache.
10662 (register_changed_p): Change parameter type to
10663 readonly_detached_regcache.
10664 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10665 readonly_detached_regcache.
10666 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10667 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10668 New.
10669 (regcache::save): Move it to reg_buffer.
10670 (regcache::restore): Change parameter type.
10671 (regcache_dup): Remove.
10672 * regcache.h (reg_buffer) <save>: New method.
10673 (readonly_detached_regcache): New class.
10674 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10675 readonly_detached_regcache.
10676 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10677
10678 2018-02-21 Yao Qi <yao.qi@linaro.org>
10679
10680 * frame.c (frame_save_as_regcache): Use regcache method save.
10681 (frame_pop): Use regcache method restore.
10682 * infrun.c (restore_infcall_suspend_state): Likewise.
10683 * linux-fork.c (fork_load_infrun_state): Likewise.
10684 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10685 save.
10686 * regcache.c (regcache_save): Remove.
10687 (regcache::restore): More asserts.
10688 (regcache_cpy): Remove.
10689 * regcache.h (regcache_save): Remove the declaration.
10690 (regcache::restore): Move from private to public.
10691 Remove the friend declaration of regcache_cpy.
10692 (regcache_cpy): Remove declaration.
10693
10694 2018-02-21 Yao Qi <yao.qi@linaro.org>
10695
10696 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10697 parameter type to 'readable_regcache *'.
10698 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10699 * arm-tdep.c (arm_neon_quad_read): Likewise.
10700 (arm_pseudo_read): Likewise.
10701 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10702 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10703 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10704 * gdbarch.c: Re-generated.
10705 * gdbarch.h: Re-generated.
10706 * gdbarch.sh (pseudo_register_read): Change parameter type to
10707 'readable_regcache *'.
10708 (pseudo_register_read_value): Likewise.
10709 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10710 (h8300_pseudo_register_read): Likewise.
10711 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10712 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10713 (i386_pseudo_register_read_into_value): Likewise.
10714 (i386_pseudo_register_read_value): Likewise.
10715 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10716 declaration.
10717 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10718 * m32c-tdep.c (m32c_raw_read): Likewise.
10719 (m32c_read_flg): Likewise.
10720 (m32c_banked_register): Likewise.
10721 (m32c_banked_read): Likewise.
10722 (m32c_sb_read): Likewise.
10723 (m32c_part_read): Likewise.
10724 (m32c_cat_read): Likewise.
10725 (m32c_r3r2r1r0_read): Likewise.
10726 (m32c_pseudo_register_read): Likewise.
10727 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10728 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10729 (mep_pseudo_cr64_read): Likewise.
10730 (mep_pseudo_register_read): Likewise.
10731 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10732 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10733 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10734 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10735 (regcache::cooked_read): Likewise.
10736 (regcache::cooked_read_value): Likewise.
10737 (regcache_cooked_read_signed):
10738 (regcache::cooked_read): Likewise.
10739 * regcache.h (readable_regcache): New class.
10740 (regcache): Inherit readable_regcache. Move some methods to
10741 readable_regcache.
10742 * rl78-tdep.c (rl78_pseudo_register_read): Change
10743 parameter type to 'readable_regcache *'.
10744 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10745 (e500_pseudo_register_read): Change parameter type to
10746 'readable_regcache *'.
10747 (dfp_pseudo_register_read): Likewise.
10748 (vsx_pseudo_register_read): Likewise.
10749 (efpr_pseudo_register_read): Likewise.
10750 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10751 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10752 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10753 (sh64_pseudo_register_read): Likewise.
10754 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10755 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10756 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10757 (spu_pseudo_register_read): Likewise.
10758 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10759 (xtensa_pseudo_register_read): Likewise.
10760
10761 2018-02-21 Yao Qi <yao.qi@linaro.org>
10762
10763 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10764 (regcache::arch): Move it to reg_buffer::arch.
10765 (regcache::register_buffer): Likewise.
10766 (regcache::assert_regnum): Likewise.
10767 (regcache::num_raw_registers): Likewise.
10768 * regcache.h (reg_buffer): New class.
10769 (regcache): Inherit reg_buffer.
10770
10771 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10772
10773 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10774 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10775
10776 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10777
10778 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10779
10780 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10781
10782 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10783 (SFILES): Remove common/*.c files.
10784 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10785 * common/common.host: Add common reference.
10786 * configure.ac: Likewise.
10787 * configure: Regenerate.
10788
10789 2018-02-16 Yao Qi <yao.qi@linaro.org>
10790
10791 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10792 (block_initialize_namespace): Use new.
10793 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10794 (dwarf2_free_objfile): Use delete.
10795 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10796 (copy_type_recursive): Use new.
10797 * gdb_obstack.h (allocate_on_obstack): New.
10798
10799 2018-02-15 Yao Qi <yao.qi@linaro.org>
10800
10801 PR gdb/22849
10802 * inferior.c (exit_inferior_1): Reset inf->control.
10803
10804 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10805
10806 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10807 declaration.
10808
10809 2018-02-14 Pedro Alves <palves@redhat.com>
10810
10811 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10812 frame_cleanup_after_sniffer on exception.
10813
10814 2018-02-14 Tom Tromey <tom@tromey.com>
10815
10816 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10817 const.
10818 (solib_bfd_open): Make pathname const.
10819 * solib.c (solib_bfd_open): Make pathname const.
10820 * solib-spu.c (spu_bfd_fopen): Make name const.
10821 (spu_bfd_open): Make pathname const.
10822 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10823 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10824
10825 2018-02-14 Tom Tromey <tom@tromey.com>
10826
10827 * symfile.c (symfile_bfd_open): Update.
10828 * source.h (openp, source_full_path_of, find_and_open_source):
10829 Change argument type to unique_xmalloc_ptr.
10830 * source.c (openp): Take a unique_xmalloc_ptr.
10831 (source_full_path_of, find_and_open_source): Likewise.
10832 (open_source_file, symtab_to_fullname): Update.
10833 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10834 unique_xmalloc_ptr.
10835 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10836 (exec_file_find): Update.
10837 * psymtab.c (psymtab_to_fullname): Update.
10838 * nto-tdep.h (nto_find_and_open_solib): Update.
10839 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10840 unique_xmalloc_ptr.
10841 * exec.c (exec_file_attach): Update.
10842 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10843 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10844
10845 2018-02-14 Tom Tromey <tom@tromey.com>
10846
10847 * solib.c: Include source.h.
10848 * nto-tdep.c: Include source.h.
10849 * mi/mi-cmd-env.c: Include source.h.
10850 * infcmd.c: Include source.h.
10851 * exec.c: Include source.h.
10852 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10853 (add_path, directory_switch, source_path, init_source_path): Move
10854 declarations...
10855 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10856 (add_path, directory_switch, source_path, init_source_path):
10857 ...here.
10858
10859 2018-02-14 Tom Tromey <tom@tromey.com>
10860
10861 * solist.h (exec_file_find, solib_find): Return
10862 unique_xmalloc_ptr.
10863 (solib_bfd_fopen): Take a const char *.
10864 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10865 (exec_file_find, solib_find): Likewise.
10866 (solib_bfd_fopen): Do not take ownership of "pathname".
10867 (solib_bfd_open): Use unique_xmalloc_ptr.
10868 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10869 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10870 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10871 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10872
10873 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10874
10875 * ada-lang.c (name_match_type_from_name): Remove reference to
10876 ada_name_for_lookup in function's documentation.
10877 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10878
10879 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10880
10881 * defs.h (enum openp_flags): New enum.
10882 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10883 Move to enum openp_flags.
10884 (openp_flags): New enum flags.
10885 (openp): Change parameter type to openp_flags.
10886 * source.c (openp): Change parameter type to openp_flags.
10887 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10888 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10889
10890 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10891
10892 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10893 per-command.
10894
10895 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10896
10897 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10898 into...
10899 (class dwarf2_queue_guard): ...the destructor of this new class.
10900 (dw2_do_instantiate_symtab): Create instance of the new class
10901 dwarf2_queue_guard, remove cleanup.
10902
10903 2018-02-09 Tom Tromey <tom@tromey.com>
10904
10905 * source.c (find_source_lines): Don't reference past the end of
10906 the vector.
10907
10908 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10909
10910 * remote.c (remote_btrace_maybe_reopen): Change error message.
10911 * btrace.c (btrace_enable): Likewise.
10912 (parse_xml_btrace): Likewise.
10913 (parse_xml_btrace_conf): Likewise.
10914
10915 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10916
10917 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10918 (linux_enable_pt, linux_enable_bts): Call
10919 diagnose_perf_event_open_fail.
10920
10921 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10922
10923 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10924 Remove parameter and change return type. Update callers. Move it.
10925 (linux_enable_bts, linux_enable_pt): Improve error message.
10926 (linux_enable_pt): Remove zero buffer size check.
10927 (linux_enable_btrace): Improve error messages. Remove NULL return
10928 check.
10929
10930 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10931
10932 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10933 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10934 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10935 (linux_supports_pt, linux_supports_btrace): Remove.
10936 (linux_enable_bts): Call cpu_supports_bts.
10937 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10938 * remote.c (remote_supports_btrace): Remove.
10939 (init_remote_ops): Remove remote_supports_btrace.
10940 * target-delegates.c: Regenerated.
10941 * target.c (target_supports_btrace): Remove.
10942 * target.h (target_ops) <to_supports_btrace>: Remove
10943 (target_supports_btrace): Remove.
10944 * x86-linux-nat.c (x86_linux_create_target): Remove
10945 linux_supports_btrace.
10946
10947 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10948
10949 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10950 btrace failed.
10951 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10952 exception and use message in own exception.
10953
10954 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10955
10956 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10957 (perf_event_pt_event_type): Use gdb_file_up.
10958 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10959 scoped_fd, and scoped_mmap.
10960
10961 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10962
10963 * common/scoped_mmap.h: New.
10964 * unittests/scoped_mmap-selftest.c: New.
10965 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10966 unittests/scoped_mmap-selftest.c.
10967
10968 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10969
10970 * common/scoped_fd.h: New.
10971 * unittests/scoped_fd-selftest.c: New.
10972 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10973 unittests/scoped_fd-selftest.c.
10974
10975 2018-02-09 Tom Tromey <tom@tromey.com>
10976
10977 * auto-load.c (auto_load_section_scripts): Use
10978 gdb::unique_xmalloc_ptr.
10979
10980 2018-02-09 Tom Tromey <tom@tromey.com>
10981
10982 * auto-load.c (execute_script_contents): Use std::string.
10983
10984 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10985
10986 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10987 Python function, rather than a new command.
10988
10989 2018-02-08 Tom Tromey <tom@tromey.com>
10990
10991 * solib.c (solib_find_1): Use std::string.
10992 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10993
10994 2018-02-08 Tom Tromey <tom@tromey.com>
10995
10996 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10997
10998 2018-02-08 Tom Tromey <tom@tromey.com>
10999
11000 * source.c (find_source_lines): Use gdb::def_vector.
11001
11002 2018-02-08 Tom Tromey <tom@tromey.com>
11003
11004 * macrocmd.c (struct temporary_macro_definition): New.
11005 (macro_define_command): Use temporary_macro_definition. Remove
11006 cleanups.
11007 (free_macro_definition_ptr): Remove.
11008
11009 2018-02-08 Tom Tromey <tom@tromey.com>
11010
11011 * macroexp.c (maybe_expand): Use std::string.
11012
11013 2018-02-08 Tom Tromey <tom@tromey.com>
11014
11015 * macroexp.c (struct macro_buffer): Add initializers for some
11016 members.
11017 (init_buffer, init_shared_buffer, free_buffer)
11018 (free_buffer_return_text): Remove.
11019 (macro_buffer): New constructors.
11020 (~macro_buffer): New destructor.
11021 (macro_buffer::set_shared): New method.
11022 (macro_buffer::resize_buffer, macro_buffer::appendc)
11023 (macro_buffer::appendmem): Now methods, not free functions.
11024 (set_token, append_tokens_without_splicing, stringify)
11025 (macro_stringify): Update.
11026 (gather_arguments): Change return type. Remove argc_p argument,
11027 add args_ptr argument. Use std::vector.
11028 (substitute_args): Remove argc argument. Accept std::vector.
11029 (expand): Update. Use std::vector.
11030 (scan, macro_expand, macro_expand_next): Update.
11031
11032 2018-02-08 Tom Tromey <tom@tromey.com>
11033
11034 * symtab.c (default_collect_symbol_completion_matches_break_on):
11035 Use unique_xmalloc_ptr.
11036 * macroscope.h: (sal_macro_scope, user_macro_scope)
11037 (default_macro_scope): Return unique_xmalloc_ptr.
11038 * macroscope.c (sal_macro_scope, user_macro_scope)
11039 (default_macro_scope): Return unique_xmalloc_ptr.
11040 * macroexp.h (macro_expand, macro_expand_once): Return
11041 unique_xmalloc_ptr.
11042 * macroexp.c (macro_expand, macro_expand_once): Return
11043 unique_xmalloc_ptr.
11044 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11045 (info_macro_command, info_macros_command): Use
11046 unique_xmalloc_ptr.
11047 * compile/compile-c-support.c (write_macro_definitions): Use
11048 unique_xmalloc_ptr.
11049 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11050
11051 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11052
11053 * value.c (value_static_field): Assign field type instead of
11054 containing type when returning an optimized out value.
11055
11056 2018-02-06 Yao Qi <yao.qi@linaro.org>
11057
11058 * ft32-tdep.c (ft32_read_pc): Remove.
11059 (ft32_write_pc): Remove.
11060 (ft32_gdbarch_init): Update.
11061 * m32r-tdep.c (m32r_read_pc): Remove.
11062 (m32r_gdbarch_init): Update.
11063 * mep-tdep.c (mep_read_pc): Remove.
11064 (mep_gdbarch_init): Update.
11065 * microblaze-tdep.c (microblaze_write_pc): Remove.
11066 (microblaze_gdbarch_init): Update.
11067 * mn10300-tdep.c (mn10300_read_pc): Remove.
11068 (mn10300_write_pc): Remove.
11069 (mn10300_gdbarch_init): Update.
11070 * moxie-tdep.c (moxie_read_pc): Remove.
11071 (moxie_write_pc): Remove.
11072 (moxie_gdbarch_init): Update.
11073
11074 2018-02-06 Yao Qi <yao.qi@linaro.org>
11075
11076 * expprint.c (print_subexp_standard): Handle
11077 OP_F77_UNDETERMINED_ARGLIST.
11078 (dump_subexp_body_standard): Likewise.
11079
11080 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11081
11082 * target-descriptions.c (tdesc_element_visitor) Add empty
11083 implementations.
11084 (tdesc_type): Move make_gdb_type from here.
11085 (tdesc_type_builtin): Likewise.
11086 (tdesc_type_vector): Likewise.
11087 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11088 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11089 (make_gdb_type_union): Likewise.
11090 (make_gdb_type_flags): Likewise.
11091 (make_gdb_type_enum): Likewise.
11092 (make_gdb_type): New function.
11093 (tdesc_register_type): Use static make_gdb_type.
11094
11095 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11096
11097 * infcmd.c (default_print_one_register_info): Align natural-format
11098 column values consistently one under another.
11099 (pad_to_column): New function.
11100
11101 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11102
11103 * dwarf2read.c (dwarf2_physname): Move commment.
11104
11105 2018-02-01 Leszek Swirski <leszeks@google.com>
11106
11107 * varobj.c (varobj_formatted_print_options): Allow recursive
11108 pretty printing if pretty printing is enabled.
11109
11110 2018-02-01 Leszek Swirski <leszeks@google.com>
11111
11112 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11113 names after a structop as a filename.
11114
11115 2018-02-01 Yao Qi <yao.qi@linaro.org>
11116
11117 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11118 (arm_record_coproc_data_proc): Likewise.
11119
11120 2018-02-01 Yao Qi <yao.qi@linaro.org>
11121
11122 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11123
11124 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11125
11126 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11127 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11128
11129 2018-01-31 Pedro Alves <palves@redhat.com>
11130
11131 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11132 * inflow.c (child_terminal_save_inferior): Wrap reference to
11133 tcgetpgrp in HAVE_TERMIOS_H.
11134 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11135 _WIN32.
11136 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11137 always iterate over all inferiors.
11138 (gdbsim_cntrl_c): Adjust.
11139 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11140
11141 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11142
11143 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11144 index type is objfile-owned if the element type is as well.
11145
11146 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11147
11148 GDB 8.1 released.
11149
11150 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11151
11152 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11153 "features/s390x-linux64.c".
11154 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11155 s390_linux32 and s390x_linux64.
11156 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11157 default tdesc.
11158 * s390-tdep.c: Include "features/s390-linux32.c" and
11159 "features/s390x-linux64.c".
11160 (s390_tdesc_valid): Add check for tdesc_has_registers.
11161 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11162 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11163 tdesc_s390x_linux64.
11164 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11165 tdesc_s390x_linux64 to...
11166 * s390-tdep.h: ...here.
11167
11168 2018-01-30 Pedro Alves <palves@redhat.com>
11169
11170 PR gdb/13211
11171 * config.in, configure: Regenerate.
11172 * configure.ac: Check for getpgid.
11173 * go32-nat.c (go32_pass_ctrlc): New.
11174 (go32_target): Install it.
11175 * inf-child.c (inf_child_target): Install
11176 child_terminal_save_inferior, child_pass_ctrlc and
11177 child_interrupt.
11178 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11179 (inf_ptrace_target): No longer install it.
11180 * infcmd.c (interrupt_target_1): Adjust.
11181 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11182 (child_interrupt): Declare.
11183 (inferior::terminal_state): New.
11184 * inflow.c (struct terminal_info): Update comments.
11185 (inferior_process_group): Delete.
11186 (terminal_is_ours): Delete.
11187 (gdb_tty_state): New.
11188 (child_terminal_init): Adjust.
11189 (is_gdb_terminal, sharing_input_terminal_1)
11190 (sharing_input_terminal): New functions.
11191 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11192 Set the process's actual process group in the foreground if
11193 possible. Handle is_ours_for_output/is_ours distinction. Don't
11194 mark terminal as the inferior's if not sharing GDB's terminal.
11195 Don't check attach_flag.
11196 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11197 pass down a target_terminal_state.
11198 (child_terminal_save_inferior): New, factored out from ...
11199 (child_terminal_ours_1): ... this. Handle
11200 target_terminal_state::is_ours_for_output.
11201 (child_interrupt, child_pass_ctrlc): New.
11202 (inflow_inferior_exit): Clear the inferior's terminal_state.
11203 (copy_terminal_info): Copy the inferior's terminal state.
11204 (_initialize_inflow): Remove reference to terminal_is_ours.
11205 * inflow.h (inferior_process_group): Delete.
11206 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11207 * procfs.c (procfs_target): Don't install procfs_interrupt.
11208 (procfs_interrupt): Delete.
11209 * remote.c (remote_serial_quit_handler): Adjust.
11210 (remote_interrupt): Remove ptid parameter. Adjust.
11211 * target-delegates.c: Regenerate.
11212 * target.c: Include "terminal.h".
11213 (target_terminal::terminal_state): Rename to ...
11214 (target_terminal::m_terminal_state): ... this.
11215 (target_terminal::init): Adjust.
11216 (target_terminal::inferior): Adjust to per-inferior
11217 terminal_state.
11218 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11219 (target_terminal::ours, target_terminal::ours_for_output): Use
11220 target_terminal_is_ours_kind.
11221 (target_interrupt): Remove ptid parameter. Adjust.
11222 (default_target_pass_ctrlc): Adjust.
11223 * target.h (target_ops::to_terminal_save_inferior): New field.
11224 (target_ops::to_interrupt): Remove ptid_t parameter.
11225 (target_interrupt): Remove ptid_t parameter. Update comment.
11226 (target_pass_ctrlc): Update comment.
11227 * target/target.h (target_terminal_state): New scoped enum,
11228 factored out of ...
11229 (target_terminal::terminal_state): ... here.
11230 (target_terminal::inferior): Update comments.
11231 (target_terminal::restore_inferior): New.
11232 (target_terminal::is_inferior, target_terminal::is_ours)
11233 (target_terminal::is_ours_for_output): Adjust.
11234 (target_terminal::scoped_restore_terminal_state): Adjust to
11235 rename, and call restore_inferior() instead of inferior().
11236 (target_terminal::scoped_restore_terminal_state::m_state): Change
11237 type.
11238 (target_terminal::terminal_state): Rename to ...
11239 (target_terminal::m_terminal_state): ... this and change type.
11240
11241 2018-01-30 Pedro Alves <palves@redhat.com>
11242
11243 * linux-nat.c (wait_for_signal): New function.
11244 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11245 directly.
11246 (async_terminal_is_ours)
11247 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11248 (linux_nat_add_target): Don't override
11249 to_terminal_inferior/to_terminal_ours.
11250
11251 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11252
11253 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11254
11255 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11256
11257 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11258 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11259 dwarf2_per_objfile_free here.
11260 (dwarf2_per_objfile_free): Remove.
11261 (_initialize_dwarf2_read): Don't register
11262 dwarf2_per_objfile_free as a registry cleanup.
11263
11264 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11265
11266 Avoid compilation errors in MinGW native builds
11267
11268 The error is triggered by including python-internal.h, and the
11269 error message is:
11270
11271 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11272 from build-gnulib/import/math.h:27,
11273 from d:/usr/Python26/include/pyport.h:235,
11274 from d:/usr/Python26/include/Python.h:58,
11275 from python/python-internal.h:94,
11276 from python/py-arch.c:24:
11277 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11278 using ::hypot;
11279 ^~~~~
11280
11281 This happens because Python headers define 'hypot' to expand t
11282 '_hypot' in the Windows builds.
11283 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11284 'hypoth'. This avoids a compilation error.
11285
11286 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11287
11288 * MAINTAINERS (Write After Approval): Fix ordering.
11289
11290 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11291
11292 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11293
11294 2018-01-26 Alan Modra <amodra@gmail.com>
11295
11296 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11297 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11298 Remove nop. Make const. Comment.
11299 (powerpc32_plt_stub_so_2): New.
11300 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11301 Correct count. Update uses.
11302 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11303 Move common code reading PLT entry word. Correct
11304 powerpc32_plt_stub PLT address calculation.
11305 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11306 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11307 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11308 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11309 (ppc64_standard_linkage8): Likewise.
11310 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11311 Correct insns description.
11312 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11313
11314 2018-01-24 Pedro Alves <palves@redhat.com>
11315
11316 GCC PR libstdc++/83906
11317 * gdbtypes.c (operator==(const dynamic_prop &,
11318 const dynamic_prop &)): New.
11319 (operator==(const range_bounds &, const range_bounds &)): New.
11320 (check_types_equal): Use them instead of memcmp.
11321 * gdbtypes.h (operator==(const dynamic_prop &,
11322 const dynamic_prop &)): Declare.
11323 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11324 (operator==(const range_bounds &, const range_bounds &)): Declare.
11325 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11326
11327 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11328
11329 * s390-linux-tdep.c (s390_record_address_mask)
11330 (s390_record_calc_disp_common, s390_record_calc_disp)
11331 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11332 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11333 (s390_process_record): Move to s390-tdep.c.
11334 (s390_linux_init_abi_any): Adjust.
11335 * s390-tdep.c (s390_record_address_mask)
11336 (s390_record_calc_disp_common, s390_record_calc_disp)
11337 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11338 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11339 (s390_process_record): Moved from s390-linux-tdep.c
11340 (s390_gdbarch_init): Adjust.
11341
11342 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11343
11344 * s390-linux-nat.c (s390-tdep.h): New include.
11345 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11346 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11347 (ALLDEPFILES): Add s390-tdep.c.
11348 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11349 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11350 * s390-tdep.h: ...this. New file.
11351 * s390-linux-tdep.c (s390-tdep.h): New include.
11352 (_initialize_s390_tdep): Rename to...
11353 (_initialize_s390_linux_tdep): ...this and adjust.
11354 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11355 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11356 s390-tdep.h.
11357 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11358 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11359 (s390_is_partial_instruction, s390_software_single_step)
11360 (is_non_branch_ril, s390_displaced_step_copy_insn)
11361 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11362 (s390_prologue_data, s390_addr, s390_store, s390_load)
11363 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11364 (s390_register_call_saved, s390_guess_tracepoint_registers)
11365 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11366 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11367 (s390_pseudo_register_name, s390_pseudo_register_type)
11368 (s390_pseudo_register_read, s390_pseudo_register_write)
11369 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11370 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11371 (s390_addr_bits_remove, s390_address_class_type_flags)
11372 (s390_address_class_type_flags_to_name)
11373 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11374 (s390_function_arg_float, s390_function_arg_vector)
11375 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11376 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11377 (s390_frame_align, s390_register_return_value, s390_return_value)
11378 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11379 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11380 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11381 (s390_trad_frame_prev_register, s390_unwind_cache)
11382 (s390_prologue_frame_unwind_cache)
11383 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11384 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11385 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11386 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11387 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11388 (s390_frame_base_address, s390_local_base_address)
11389 (s390_frame_base, s390_gcc_target_options)
11390 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11391 (s390_validate_reg_range, s390_tdesc_valid)
11392 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11393 * s390-tdep.c: ...this. New file.
11394
11395 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11396
11397 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11398 (s390_process_record, s390_gdbarch_tdep_alloc)
11399 (s390_linux_init_abi_any): Use/set new hook.
11400
11401 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11402
11403 * s390-linux-tdep.c (osabi.h): New include.
11404 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11405 (s390_linux_init_abi_any): New functions.
11406 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11407
11408 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11409
11410 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11411 tdesc_has_registers check
11412
11413 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11414
11415 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11416 (s390_validate_reg_range): New macro.
11417 (s390_gdbarch_init): Adjust.
11418
11419 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11420
11421 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11422 (s390_gdbarch_tdep_alloc): Adjust.
11423 (s390_gdbarch_init): Adjust.
11424
11425 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11426
11427 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11428 <have_tdb>: Change type to bool.
11429 (s390_gdbarch_tdep_alloc): Adjust.
11430 (s390_gdbarch_init): Adjust.
11431
11432 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11433
11434 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11435 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11436 (s390_gdbarch_tdep_alloc): New function.
11437 (s390_gdbarch_init): Allocate tdep at start and use its fields
11438 instead of separate variables.
11439
11440 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11441
11442 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11443 when looking for cached gdbarch and add comment for remaining.
11444
11445 2018-01-22 Pedro Alves <palves@redhat.com>
11446 Sergio Durigan Junior <sergiodj@redhat.com>
11447
11448 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11449 case.
11450
11451 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11452
11453 * MAINTAINERS: Update my company e-mail address.
11454
11455 2018-01-22 Yao Qi <yao.qi@linaro.org>
11456
11457 * regcache.c (cooked_write_test): New function.
11458 (_initialize_regcache): Register the test.
11459
11460 2018-01-22 Yao Qi <yao.qi@linaro.org>
11461
11462 * ia64-tdep.c (ia64_pseudo_register_read): Call
11463 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11464 * m32c-tdep.c (m32c_cat_read): Likewise.
11465 (m32c_r3r2r1r0_read): Likewise.
11466 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11467 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11468
11469 2018-01-22 Yao Qi <yao.qi@linaro.org>
11470
11471 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11472 method raw_read instead of regcache_raw_read.
11473 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11474 * arm-tdep.c (arm_neon_quad_read): Likewise.
11475 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11476 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11477 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11478 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11479 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11480 (i386_pseudo_register_read_into_value): Likewise.
11481 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11482 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11483 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11484 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11485 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11486 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11487 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11488 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11489 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11490
11491 2018-01-22 Yao Qi <yao.qi@linaro.org>
11492
11493 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11494 * configure.tgt: Remove target mt.
11495 * mt-tdep.c: Remove.
11496 * regcache.c (cooked_read_test): Remove the check for mt.
11497
11498 2018-01-22 Yao Qi <yao.qi@linaro.org>
11499
11500 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11501 instead of gdbarch_pseudo_register_read_value.
11502
11503 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11504
11505 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11506 language is Ada.
11507
11508 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11509
11510 * linespec.c (create_sals_line_offset): Remove code that preserved
11511 the symtab_and_line's line number.
11512
11513 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11514
11515 * varobj.c (varobj_create): Don't set valid_block when creating a
11516 floating varobj.
11517
11518 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11519
11520 * varobj.c (varobj_create): Remove out of date comment.
11521
11522 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11523
11524 PR mi/20395
11525 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11526 updating innermost block.
11527 * parse.c (innermost_block_tracker::update): Take extra type
11528 parameter, and check types match before updating innermost block.
11529 (write_dollar_variable): Update innermost block for registers.
11530 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11531 (innermost_block_tracker::innermost_block_tracker): Initialise
11532 m_types member.
11533 (innermost_block_tracker::reset): Take type parameter.
11534 (innermost_block_tracker::update): Take type parameter, and pass
11535 type through as needed.
11536 (innermost_block_tracker::m_types): New member.
11537 * varobj.c (varobj_create): Pass type when reseting innermost
11538 block.
11539
11540 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11541
11542 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11543 * ada-lang.c (resolve_subexp): Likewise.
11544 * breakpoint.c (set_breakpoint_condition) Likewise.
11545 (watch_command_1) Likewise.
11546 * c-exp.y (variable): Likewise.
11547 * d-exp.y (PrimaryExpression): Likewise.
11548 * f-exp.y (variable): Likewise.
11549 * go-exp.y (variable): Likewise.
11550 * m2-exp.y (variable): Likewise.
11551 * objfiles.c (objfile::~objfile): Likewise.
11552 * p-exp.y (variable): Likewise.
11553 * parse.c (innermost_block): Change type.
11554 * parser-defs.h (class innermost_block_tracker): New.
11555 (innermost_block): Change to innermost_block_tracker.
11556 * printcmd.c (display_command): Switch to innermost_block API.
11557 (do_one_display): Likewise.
11558 * rust-exp.y (do_one_display): Likewise.
11559 * symfile.c (clear_symtab_users): Likewise.
11560 * varobj.c (varobj_create): Switch to innermost_block API, replace
11561 use of innermost_block with block stored on varobj object.
11562
11563 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11564
11565 * expression.h (innermost_block): Remove declaration.
11566 * varobj.c: Add 'parser-defs.h' include.
11567
11568 2018-01-19 Tom Tromey <tom@tromey.com>
11569
11570 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11571 symbols in the static and global blocks.
11572
11573 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11574
11575 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11576 gdb_ptrace.h, and move including gdb_wait.h ...
11577 * nat/linux-ptrace.h: ... to here.
11578
11579 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11580
11581 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11582 inf_ptrace_detach_success.
11583 (inf_ptrace_detach_success): Add inferior parameter, use it
11584 instead of inferior_ptid, pass it to detach_inferior.
11585 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11586 parameter.
11587 * inferior.c (detach_inferior): Add overload that takes an
11588 inferior object.
11589 * inferior.h (detach_inferior): Likewise.
11590 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11591 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11592 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11593
11594 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11595
11596 * target.h (struct target_ops) <to_detach>: Add inferior
11597 parameter.
11598 (target_detach): Likewise.
11599 * target.c (dispose_inferior): Pass inferior down.
11600 (target_detach): Pass inferior down. Assert that it is equal to
11601 the current inferior.
11602 * aix-thread.c (aix_thread_detach): Pass inferior down.
11603 * corefile.c (core_file_command): Pass current_inferior() down.
11604 * corelow.c (core_detach): Add inferior parameter.
11605 * darwin-nat.c (darwin_detach): Likewise.
11606 * gnu-nat.c (gnu_detach): Likewise.
11607 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11608 * infcmd.c (detach_command): Pass current_inferior() down to
11609 target_detach.
11610 * infrun.c (follow_fork_inferior): Pass parent_inf to
11611 target_detach.
11612 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11613 target_detach.
11614 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11615 * linux-thread-db.c (thread_db_detach): Likewise.
11616 * nto-procfs.c (procfs_detach): Likewise.
11617 * procfs.c (procfs_detach): Likewise.
11618 * record.c (record_detach): Likewise.
11619 * record.h (struct inferior): Forward-declare.
11620 (record_detach): Add inferior parameter.
11621 * remote-sim.c (gdbsim_detach): Likewise.
11622 * remote.c (remote_detach_1): Likewise.
11623 (remote_detach): Likewise.
11624 (extended_remote_detach): Likewise.
11625 * sol-thread.c (sol_thread_detach): Likewise.
11626 * target-debug.h (target_debug_print_inferior_p): New macro.
11627 * target-delegates.c: Re-generate.
11628 * top.c (kill_or_detach): Pass inferior down to target_detach.
11629 * windows-nat.c (windows_detach): Add inferior parameter.
11630
11631 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11632
11633 * target.h (struct target_ops) <to_detach>: Remove args
11634 parameter.
11635 (target_detach): Likewise.
11636 * target.c (dispose_inferior): Adjust.
11637 (target_detach): Remove args parameter, adjust.
11638 * aix-thread.c (aix_thread_detach): Adjust.
11639 * corefile.c (core_file_command): Adjust.
11640 * corelow.c (core_detach): Adjust.
11641 * darwin-nat.c (darwin_detach): Adjust.
11642 * gnu-nat.c (gnu_detach): Adjust.
11643 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11644 * infcmd.c (detach_command): Adjust
11645 * infrun.c (follow_fork_inferior): Adjust.
11646 (handle_vfork_child_exec_or_exit): Adjust.
11647 * linux-fork.c (linux_fork_detach): Remove args parameter.
11648 * linux-fork.h (linux_fork_detach): Likewise.
11649 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11650 * linux-thread-db.c (thread_db_detach): Likewise.
11651 * nto-procfs.c (procfs_detach): Likewise.
11652 * procfs.c (procfs_detach): Likewise.
11653 (do_detach): Remove signo parameter.
11654 * record.c (record_detach): Remove args parameter.
11655 * record.h (record_detach): Likewise.
11656 * remote-sim.c (gdbsim_detach): Likewise.
11657 * remote.c (remote_detach_1): Likewise.
11658 (remote_detach): Likewise.
11659 (extended_remote_detach): Likewise.
11660 * sol-thread.c (sol_thread_detach): Likewise.
11661 * target-delegates.c: Re-generate.
11662 * top.c (struct qt_args) <args>: Remove field.
11663 (kill_or_detach): Don't pass args.
11664 (quit_force): Don't set args.
11665 * windows-nat.c (windows_detach): Remove args parameter.
11666
11667 2018-01-19 Yao Qi <yao.qi@linaro.org>
11668
11669 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11670 (arm_linux_init_abi): Install it.
11671
11672 2018-01-19 Yao Qi <yao.qi@linaro.org>
11673
11674 * osabi.c (gdb_osabi_names): Extend the regexp for
11675 arm-linux-gnueabihf.
11676
11677 2018-01-18 Yao Qi <yao.qi@linaro.org>
11678
11679 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11680 m_abbrevs.
11681 (abbrev_table::add_abbrev): Update.
11682 (abbrev_table::lookup_abbrev): Update.
11683
11684 2018-01-18 Yao Qi <yao.qi@linaro.org>
11685
11686 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11687
11688 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11689
11690 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11691 to "std::string".
11692
11693 2018-01-17 Tom Tromey <tom@tromey.com>
11694
11695 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11696
11697 2018-01-17 Tom Tromey <tom@tromey.com>
11698
11699 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11700 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11701 (create_array_type_with_stride): Update.
11702 * dwarf2read.c (set_die_type): Update.
11703
11704 2018-01-17 Tom Tromey <tom@tromey.com>
11705
11706 * dwarf2read.c (delayed_method_info): Remove typedef.
11707 (dwarf2_cu::method_info): Now a std::vector.
11708 (add_to_method_list): Update.
11709 (free_delayed_list): Remove.
11710 (compute_delayed_physnames): Update.
11711 (process_full_comp_unit, process_full_type_unit): Clear the method
11712 list. Remove cleanups.
11713 (psymtab_include_file_name): Add name_holder parameter. Use
11714 unique_xmalloc_ptr.
11715 (dwarf_decode_lines): Update.
11716
11717 2018-01-17 Tom Tromey <tom@tromey.com>
11718 Simon Marchi <simon.marchi@ericsson.com>
11719
11720 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11721 (dwarf2_per_objfile::free_cached_comp_units)
11722 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11723 (init_cutu_and_read_dies_no_follow): Update.
11724 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11725 (dwarf2_cu::~dwarf2_cu): New.
11726 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11727 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11728
11729 2018-01-17 Tom Tromey <tom@tromey.com>
11730 Simon Marchi <simon.marchi@ericsson.com>
11731
11732 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11733 (struct die_reader_specs) <abbrev_table>: New member.
11734 (struct abbrev_table): Add constructor.
11735 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11736 <abbrev_obstack>: Now an auto_obstack.
11737 (abbrev_table_up): New typedef.
11738 (init_cu_die_reader): Add abbrev_table parameter.
11739 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11740 Add result_dwo_abbrev_table.
11741 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11742 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11743 Update.
11744 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11745 parameter.
11746 (skip_children): Update.
11747 (abbrev_table::alloc_abbrev): Rename from
11748 abbrev_table_alloc_abbrev.
11749 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11750 (abbrev_table::lookup_abbrev): Rename from
11751 abbrev_table_lookup_abbrev.
11752 (abbrev_table_read_table): Return abbrev_table_up.
11753 (abbrev_table_free, abbrev_table_free_cleanup)
11754 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11755 (load_partial_dies): Update.
11756
11757 2018-01-17 Tom Tromey <tom@tromey.com>
11758
11759 * dwarf2read.c (dwarf2_compute_name): Update comment.
11760 (read_func_scope, read_variable): Update.
11761 (new_symbol): Remove.
11762 (new_symbol_full): Rename to new_symbol.
11763
11764 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11765
11766 PR gdb/16577
11767 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11768 a warning instead of throwing an error, set section size to 0 and return
11769 NULL.
11770 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11771
11772 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11773
11774 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11775 std::string.
11776 (linux_ptrace_attach_fail_reason_string): Likewise.
11777 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11778 Likewise.
11779 (linux_ptrace_attach_fail_reason_string): Likewise.
11780 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11781
11782 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11783
11784 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11785
11786 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11787
11788 PR gdb/21559
11789 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11790 checking for fs_base/gs_base fields in struct user_regs_struct.
11791 * configure: Regenerate.
11792
11793 2018-01-17 Yao Qi <yao.qi@linaro.org>
11794
11795 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11796 function.
11797 (aarch64_linux_init_abi): Install it to gdbarch hook
11798 gcc_target_options.
11799
11800 2018-01-15 Pedro Alves <palves@redhat.com>
11801
11802 * common/signals-state-save-restore.c
11803 (save_original_signals_state): Fix typos.
11804
11805 2017-01-12 Tom Tromey <tom@tromey.com>
11806 Sergio Durigan Junior <sergiodj@redhat.com>
11807
11808 * Makefile.in (install-only): Install gdb-add-index.
11809
11810 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11811
11812 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11813
11814 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11815
11816 * infrun.c (keep_going_pass_signal): Clear step-over info when
11817 insert_breakpoints fails.
11818
11819 2018-01-11 Pedro Alves <palves@redhat.com>
11820
11821 PR gdb/22583
11822 * infrun.c (resume): Rename to ...
11823 (resume_1): ... this.
11824 (resume): Reimplement as wrapper around resume_1.
11825
11826 2018-01-11 Pedro Alves <palves@redhat.com>
11827
11828 PR remote/22597
11829 * remote.c (remote_parse_stop_reply): Default to the last-set
11830 general thread instead of to 'magic_null_ptid'.
11831
11832 2018-01-10 Pedro Alves <palves@redhat.com>
11833
11834 * language.h (language_get_symbol_name_matcher): Rename ...
11835 (get_symbol_name_matcher): ... this.
11836 * language.c (language_get_symbol_name_matcher): Ditto.
11837 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11838 callers adjusted.
11839
11840 2018-01-10 Pedro Alves <palves@redhat.com>
11841
11842 PR gdb/22670
11843 * dwarf2read.c
11844 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11845 Adjust to use language_get_symbol_name_matcher instead of
11846 language_defn::la_get_symbol_name_matcher.
11847 * language.c (language_get_symbol_name_matcher): If in Ada mode
11848 and the lookup name is a verbatim match, return Ada's matcher.
11849 * language.h (language_get_symbol_name_matcher): Adjust comment.
11850 (ada_lookup_name_info::verbatim_p):: New method.
11851
11852 2018-01-10 Pedro Alves <palves@redhat.com>
11853
11854 PR gdb/22670
11855 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11856 minsym's language is language_auto or language_cplus, pass down
11857 language_ada instead.
11858 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11859
11860 2018-01-10 Pedro Alves <palves@redhat.com>
11861
11862 PR gdb/22670
11863 * minsyms.c (linkage_name_str): New function.
11864 (iterate_over_minimal_symbols): Use it.
11865
11866 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11867
11868 * NEWS: Document that 'info proc' now works on FreeBSD.
11869
11870 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11871
11872 * configure.ac: Check for kinfo_getfile in libutil.
11873 * configure: Regenerate.
11874 * config.in: Regenerate.
11875 * fbsd-nat.c: Include "fbsd-tdep.h".
11876 (fbsd_fetch_cmdline): New.
11877 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11878 rather than calling error.
11879 (fbsd_info_proc): New.
11880 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11881 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11882 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11883
11884 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11885
11886 * fbsd-nat.c (struct free_deleter): Remove.
11887 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11888
11889 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11890
11891 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11892 NULL for an empty pathname.
11893
11894 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11895
11896 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11897 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11898 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11899 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11900 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11901 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11902 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11903 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11904 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11905 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11906 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11907 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11908 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11909 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11910 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11911
11912 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11913
11914 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11915 (gnu_xfer_auxv): New function.
11916 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11917 TARGET_OBJECT_AUXV.
11918
11919 2018-01-08 Yao Qi <yao.qi@linaro.org>
11920 Simon Marchi <simon.marchi@ericsson.com>
11921
11922 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11923 common/selftest.c.
11924 (COMMON_OBS): Remove selftest.o.
11925 * configure.ac: Append selftest-arch.c and common/selftest.c to
11926 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11927 * configure: Re-generated.
11928 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11929 GDB_SELF_TEST.
11930 (maintenance_info_selftests): Likewise.
11931
11932 2018-01-08 Xavier Roirand <roirand@adacore.com>
11933
11934 * ada-valprint.c (val_print_packed_array_elements): Use
11935 proper number of elements when printing an array indexed
11936 by an enumeration type.
11937
11938 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11939
11940 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11941 (dw2_get_file_names_reader): Adjust.
11942 (lookup_dwo_signatured_type): Adjust.
11943 (lookup_dwp_signatured_type): Adjust.
11944 (lookup_signatured_type): Adjust.
11945 (create_type_unit_group): Adjust.
11946 (get_type_unit_group): Adjust.
11947 (process_psymtab_comp_unit_reader): Adjust.
11948 (build_type_psymtabs_reader): Adjust.
11949 (scan_partial_symbols): Adjust.
11950 (add_partial_symbol): Adjust.
11951 (add_partial_subprogram): Adjust.
11952 (peek_die_abbrev): Adjust.
11953 (fixup_go_packaging): Adjust.
11954 (process_imported_unit_die): Adjust.
11955 (dwarf2_compute_name): Adjust.
11956 (dwarf2_physname): Adjust.
11957 (read_import_statement): Adjust.
11958 (handle_DW_AT_stmt_list): Adjust.
11959 (read_file_scope): Adjust.
11960 (read_func_scope): Adjust.
11961 (read_lexical_block_scope): Adjust.
11962 (read_call_site_scope): Adjust.
11963 (read_variable): Adjust.
11964 (dwarf2_rnglists_process): Adjust.
11965 (dwarf2_ranges_process): Adjust.
11966 (dwarf2_ranges_read): Adjust.
11967 (dwarf2_get_pc_bounds): Adjust.
11968 (dwarf2_record_block_ranges): Adjust.
11969 (dwarf2_add_field): Adjust.
11970 (dwarf2_add_member_fn): Adjust.
11971 (read_structure_type): Adjust.
11972 (process_structure_scope): Adjust.
11973 (read_enumeration_type): Adjust.
11974 (read_array_type): Adjust.
11975 (mark_common_block_symbol_computed): Adjust.
11976 (read_common_block): Adjust.
11977 (read_namespace_type): Adjust.
11978 (read_namespace): Adjust.
11979 (read_module_type): Adjust.
11980 (read_tag_pointer_type): Adjust.
11981 (read_tag_ptr_to_member_type): Adjust.
11982 (read_tag_string_type): Adjust.
11983 (read_subroutine_type): Adjust.
11984 (read_typedef): Adjust.
11985 (read_base_type): Adjust.
11986 (attr_to_dynamic_prop): Adjust.
11987 (read_subrange_type): Adjust.
11988 (read_unspecified_type): Adjust.
11989 (dwarf2_read_abbrevs): Adjust.
11990 (load_partial_dies): Adjust.
11991 (read_partial_die): Adjust.
11992 (find_partial_die): Adjust.
11993 (guess_partial_die_structure_name): Adjust.
11994 (fixup_partial_die): Adjust.
11995 (read_attribute_value): Adjust.
11996 (read_addr_index): Adjust.
11997 (read_addr_index_from_leb128): Adjust.
11998 (read_str_index): Adjust.
11999 (dwarf2_string_attr): Adjust.
12000 (get_debug_line_section): Adjust.
12001 (dwarf_decode_line_header): Adjust.
12002 (lnp_state_machine::check_line_address): Adjust.
12003 (dwarf_decode_lines_1): Adjust.
12004 (dwarf_decode_lines): Adjust.
12005 (dwarf2_start_symtab): Adjust.
12006 (var_decode_location): Adjust.
12007 (new_symbol_full): Adjust.
12008 (dwarf2_const_value_data): Adjust.
12009 (dwarf2_const_value_attr): Adjust.
12010 (dwarf2_const_value): Adjust.
12011 (die_type): Adjust.
12012 (die_containing_type): Adjust.
12013 (build_error_marker_type): Adjust.
12014 (lookup_die_type): Adjust.
12015 (guess_full_die_structure_name): Adjust.
12016 (anonymous_struct_prefix): Adjust.
12017 (determine_prefix): Adjust.
12018 (dwarf2_name): Adjust.
12019 (follow_die_ref_or_sig): Adjust.
12020 (follow_die_offset): Adjust.
12021 (follow_die_ref): Adjust.
12022 (follow_die_sig_1): Adjust.
12023 (follow_die_sig): Adjust.
12024 (get_signatured_type): Adjust.
12025 (get_DW_AT_signature_type): Adjust.
12026 (decode_locdesc): Adjust.
12027 (dwarf_decode_macros): Adjust.
12028 (cu_debug_loc_section): Adjust.
12029 (fill_in_loclist_baton): Adjust.
12030 (dwarf2_symbol_mark_computed): Adjust.
12031 (init_one_comp_unit): Don't assign
12032 dwarf2_cu::dwarf2_per_objfile.
12033 (set_die_type): Adjust.
12034
12035 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12036
12037 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12038 <dwarf2_per_objfile>: New field.
12039 (dwarf2_per_objfile): Remove global.
12040 (get_dwarf2_per_objfile): New function.
12041 (set_dwarf2_per_objfile): New function.
12042 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12043 dwarf2_per_objfile.
12044 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12045 (read_abbrev_offset): Likewise.
12046 (read_indirect_string): Likewise.
12047 (read_indirect_line_string): Likewise.
12048 (read_indirect_string_at_offset): Likewise.
12049 (read_indirect_string_from_dwz): Likewise.
12050 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12051 dwarf2_per_objfile.
12052 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12053 (create_all_comp_units): Change objfile parameter to
12054 dwarf2_per_objfile.
12055 (create_all_type_units): Likewise.
12056 (process_queue): Add dwarf2_per_objfile parameter.
12057 (read_and_check_comp_unit_head): Likewise.
12058 (lookup_dwo_unit_in_dwp): Likewise.
12059 (get_dwp_file): Likewise.
12060 (process_cu_includes): Likewise.
12061 (struct free_dwo_file_cleanup_data): New struct.
12062 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12063 set_dwarf2_per_objfile.
12064 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12065 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12066 context, adjust calls.
12067 (dw2_instantiate_symtab): Likewise.
12068 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12069 (dw2_get_cu): Likewise.
12070 (create_cu_from_index_list): Change objfile parameter to
12071 dwarf2_per_objfile.
12072 (create_cus_from_index_list): Get dwarf2_per_objfile from
12073 context, adjust calls.
12074 (create_cus_from_index): Likewise.
12075 (create_signatured_type_table_from_index): Change objfile
12076 parameter to dwarf2_per_objfile.
12077 (create_signatured_type_table_from_debug_names): Change objfile
12078 parameter to dwarf2_per_objfile.
12079 (create_addrmap_from_index): Likewise.
12080 (create_addrmap_from_aranges): Likewise.
12081 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12082 (dw2_setup): Remove.
12083 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12084 context.
12085 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12086 get_dwarf2_per_objfile.
12087 (dw2_forget_cached_source_info): Likewise.
12088 (dw2_map_symtabs_matching_filename): Likewise.
12089 (struct dw2_symtab_iterator) <index>: Remove.
12090 <dwarf2_per_objfile>: New field.
12091 (dw2_symtab_iter_init): Replace index parameter with
12092 dwarf2_per_objfile.
12093 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12094 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12095 (dw2_print_stats): Likewise.
12096 (dw2_dump): Likewise.
12097 (dw2_expand_symtabs_for_function): Likewise.
12098 (dw2_expand_all_symtabs): Likewise.
12099 (dw2_expand_symtabs_with_fullname): Likewise.
12100 (dw2_expand_marked_cus): Replace index and objfile parameters
12101 with dwarf2_per_objfile.
12102 (dw_expand_symtabs_matching_file_matcher): Add
12103 dwarf2_per_objfile parameter and adjust calls.
12104 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12105 adjust calls.
12106 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12107 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12108 adjust calls.
12109 (create_cus_from_debug_names_list): Replace objfile parameter
12110 with dwarf2_per_objfile and adjust calls.
12111 (create_cus_from_debug_names): Likewise.
12112 (dwarf2_read_debug_names): Likewise.
12113 (mapped_debug_names::namei_to_name): Adjust call.
12114 (dw2_debug_names_iterator::next): Likewise.
12115 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12116 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12117 (dw2_debug_names_dump): Likewise.
12118 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12119 (dw2_debug_names_expand_symtabs_matching): Likewise.
12120 (dwarf2_initialize_objfile): Likewise.
12121 (dwarf2_build_psymtabs): Likewise.
12122 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12123 this_cu.
12124 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12125 (read_and_check_comp_unit_head): Likewise.
12126 (read_abbrev_offset): Likewise.
12127 (create_debug_type_hash_table): Likewise.
12128 (create_debug_types_hash_table): Likewise.
12129 (create_all_type_units): Replace objfile parameter with
12130 dwarf2_per_objfile.
12131 (add_type_unit): Add dwarf2_per_objfile parameter.
12132 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12133 with dwarf2_per_objfile.
12134 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12135 (lookup_dwp_signatured_type): Likewise.
12136 (lookup_signatured_type): Likewise.
12137 (read_cutu_die_from_dwo): Likewise.
12138 (init_tu_and_read_dwo_dies): Likewise.
12139 (init_cutu_and_read_dies): Likewise.
12140 (init_cutu_and_read_dies_no_follow): Likewise.
12141 (allocate_type_unit_groups_table): Add objfile parameter.
12142 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12143 (get_type_unit_group): Likewise.
12144 (process_psymtab_comp_unit): Update call.
12145 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12146 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12147 (print_tu_stats): Likewise.
12148 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12149 in void* parameter.
12150 (build_type_psymtabs): Change objfile parameter to
12151 dwarf2_per_objfile.
12152 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12153 passed in void* parameter.
12154 (process_skeletonless_type_units): Change objfile parameter to
12155 dwarf2_per_objfile.
12156 (set_partial_user): Likewise.
12157 (dwarf2_build_psymtabs_hard): Likewise.
12158 (read_comp_units_from_section): Likewise.
12159 (create_all_comp_units): Likewise.
12160 (scan_partial_symbols): Update calls.
12161 (add_partial_symbol): Likewise.
12162 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12163 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12164 (process_queue): Add dwarf2_per_objfile parameter.
12165 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12166 (compute_compunit_symtab_includes): Likewise.
12167 (process_cu_includes): Add dwarf2_per_objfile parameter.
12168 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12169 (process_full_type_unit): Likewise.
12170 (process_imported_unit_die): Update call.
12171 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12172 (read_file_scope): Likewise.
12173 (allocate_dwo_file_hash_table): Add objfile parameter.
12174 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12175 (create_cus_hash_table): Likewise.
12176 (create_dwp_hash_table): Likewise.
12177 (create_dwo_unit_in_dwp_v1): Likewise.
12178 (create_dwp_v2_section): Likewise.
12179 (create_dwo_unit_in_dwp_v2): Likewise.
12180 (lookup_dwo_unit_in_dwp): Likewise.
12181 (try_open_dwop_file): Likewise.
12182 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12183 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12184 cleanup to include a reference to dwarf2_per_objfile.
12185 (open_dwp_file): Add dwarf2_per_objfile parameter.
12186 (open_and_init_dwp_file): Likewise.
12187 (get_dwp_file): Likewise.
12188 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12189 (queue_and_load_all_dwo_tus): Update call.
12190 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12191 data.
12192 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12193 (dwarf2_ranges_process): Likewise.
12194 (dwarf2_get_pc_bounds): Likewise.
12195 (mark_common_block_symbol_computed): Likewise.
12196 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12197 (dwarf2_read_abbrevs): Update call.
12198 (read_partial_die): Use dwarf2_per_objfile from cu.
12199 (find_partial_die): Likewise.
12200 (fixup_partial_die): Likewise.
12201 (read_attribute_value): Likewise.
12202 (read_indirect_string_at_offset_from): Add objfile parameter.
12203 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12204 parameter.
12205 (read_indirect_string_from_dwz): Add objfile parameter.
12206 (read_indirect_string): Add objfile parameter.
12207 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12208 (read_addr_index): Use dwarf2_per_objfile from cu.
12209 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12210 call dw2_setup.
12211 (read_str_index): Use dwarf2_per_objfile from cu.
12212 (get_debug_line_section): Likewise.
12213 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12214 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12215 (new_symbol_full): Use dwarf2_per_objfile from cu.
12216 (build_error_marker_type): Likewise.
12217 (lookup_die_type): Likewise.
12218 (determine_prefix): Likewise.
12219 (follow_die_offset): Likewise.
12220 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12221 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12222 (dwarf2_fetch_die_type_sect_off): Likewise.
12223 (dwarf2_get_die_type): Likewise.
12224 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12225 (get_signatured_type): Likewise.
12226 (get_DW_AT_signature_type): Likewise.
12227 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12228 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12229 (cu_debug_loc_section): Likewise.
12230 (fill_in_loclist_baton): Likewise.
12231 (dwarf2_symbol_mark_computed): Likewise.
12232 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12233 dwarf2_per_objfile.
12234 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12235 parameter.
12236 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12237 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12238 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12239 (set_die_type): Use dwarf2_free_objfile from cu.
12240 (get_die_type_at_offset): Likewise.
12241 (dwarf2_per_objfile_free): Don't assign global variable.
12242 (debug_names) <constructor>: Add dwarf2_per_objfile
12243 parameter, update m_debugstrlookup construction.
12244 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12245 parameter.
12246 <m_dwarf2_per_objfile>: New field.
12247 <lookup>: Use m_dwarf2_per_objfile.
12248 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12249 (psyms_seen_size): Likewise.
12250 (write_gdbindex): Replace objfile parameter with
12251 dwarf2_per_objfile.
12252 (write_debug_names): Likewise.
12253 (write_psymtabs_to_index): Likewise.
12254 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12255 calls.
12256
12257 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12258
12259 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12260 <dwarf2_per_objfile>: New field.
12261 (struct dwarf2_per_cu_data) <objfile>: Remove.
12262 <dwarf2_per_objfile>: New field.
12263 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12264 of objfile.
12265 (create_signatured_type_table_from_index): Likewise.
12266 (create_debug_type_hash_table): Likewise.
12267 (fill_in_sig_entry_from_dwo_entry): Likewise.
12268 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12269 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12270 objfile.
12271 (create_partial_symtab): Access objfile through
12272 dwarf2_per_objfile.
12273 (process_psymtab_comp_unit_reader): Likewise.
12274 (read_comp_units_from_section): Likewise.
12275 (scan_partial_symbols): Likewise.
12276 (add_partial_symbol): Likewise.
12277 (add_partial_subprogram): Likewise.
12278 (peek_die_abbrev): Likewise.
12279 (fixup_go_packaging): Likewise.
12280 (process_full_comp_unit): Likewise.
12281 (process_full_type_unit): Likewise.
12282 (process_imported_unit_die): Likewise.
12283 (dwarf2_compute_name): Likewise.
12284 (dwarf2_physname): Likewise.
12285 (read_import_statement): Likewise.
12286 (create_cus_hash_table): Assign dwarf2_physname instead of
12287 objfile.
12288 (read_func_scope): Access objfile through dwarf2_per_objfile.
12289 (read_lexical_block_scope): Likewise.
12290 (read_call_site_scope): Likewise.
12291 (read_variable): Likewise.
12292 (dwarf2_rnglists_process): Likewise.
12293 (dwarf2_ranges_process): Likewise.
12294 (dwarf2_ranges_read): Likewise.
12295 (dwarf2_record_block_ranges): Likewise.
12296 (dwarf2_add_field): Likewise.
12297 (dwarf2_add_member_fn): Likewise.
12298 (read_structure_type): Likewise.
12299 (process_structure_scope): Likewise.
12300 (read_enumeration_type): Likewise.
12301 (read_array_type): Likewise.
12302 (read_common_block): Likewise.
12303 (read_namespace_type): Likewise.
12304 (read_namespace): Likewise.
12305 (read_module_type): Likewise.
12306 (read_tag_pointer_type): Likewise.
12307 (read_tag_ptr_to_member_type): Likewise.
12308 (read_tag_string_type): Likewise.
12309 (read_subroutine_type): Likewise.
12310 (read_typedef): Likewise.
12311 (read_base_type): Likewise.
12312 (attr_to_dynamic_prop): Likewise.
12313 (read_subrange_type): Likewise.
12314 (read_unspecified_type): Likewise.
12315 (load_partial_dies): Likewise.
12316 (read_partial_die): Likewise.
12317 (find_partial_die): Likewise.
12318 (guess_partial_die_structure_name): Likewise.
12319 (fixup_partial_die): Likewise.
12320 (read_attribute_value): Likewise.
12321 (read_addr_index_from_leb128): Likewise.
12322 (dwarf2_read_addr_index): Likewise.
12323 (dwarf2_string_attr): Likewise.
12324 (lnp_state_machine::check_line_address): Likewise.
12325 (dwarf_decode_lines_1): Likewise.
12326 (dwarf_decode_lines): Likewise.
12327 (dwarf2_start_symtab): Likewise.
12328 (var_decode_location): Likewise.
12329 (new_symbol_full): Likewise.
12330 (dwarf2_const_value_data): Likewise.
12331 (dwarf2_const_value_attr): Likewise.
12332 (dwarf2_const_value): Likewise.
12333 (die_type): Likewise.
12334 (die_containing_type): Likewise.
12335 (lookup_die_type): Likewise.
12336 (guess_full_die_structure_name): Likewise.
12337 (anonymous_struct_prefix): Likewise.
12338 (dwarf2_name): Likewise.
12339 (follow_die_ref_or_sig): Likewise.
12340 (follow_die_offset): Likewise.
12341 (follow_die_ref): Likewise.
12342 (dwarf2_fetch_die_loc_sect_off): Likewise.
12343 (dwarf2_fetch_constant_bytes): Likewise.
12344 (dwarf2_fetch_die_type_sect_off): Likewise.
12345 (dwarf2_get_die_type): Likewise.
12346 (follow_die_sig): Likewise.
12347 (decode_locdesc): Likewise.
12348 (dwarf2_per_cu_objfile): Likewise.
12349 (dwarf2_per_cu_text_offset): Likewise.
12350 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12351 objfile.
12352 (set_die_type): Access objfile through
12353 dwarf2_per_objfile.
12354
12355 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12356
12357 * valprint.c (converted_character_d): Remove typedef.
12358 (DEF_VEC_O (converted_character_d)): Remove.
12359 (count_next_character): Use std::vector.
12360 (print_converted_chars_to_obstack): Likewise.
12361 (generic_printstr): Likewise.
12362
12363 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12364
12365 * xml-support.h (struct gdb_xml_value): Add constructor.
12366 <value>: Change type to unique_xmalloc_ptr.
12367 (gdb_xml_value_s): Remove typedef.
12368 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12369 (gdb_xml_element_start_handler): Change parameter type to
12370 std::vector.
12371 (xml_find_attribute): Likewise.
12372 * xml-support.c (xml_find_attribute): Change parameter type to
12373 std::vector and adjust.
12374 (gdb_xml_values_cleanup): Remove.
12375 (gdb_xml_parser::start_element): Adjust to std::vector.
12376 (xinclude_start_include): Change paraeter type to std::vector
12377 and adjust.
12378 * btrace.c (check_xml_btrace_version): Likewise.
12379 (parse_xml_btrace_block): Likewise.
12380 (parse_xml_btrace_pt_config_cpu): Likewise.
12381 (parse_xml_btrace_pt): Likewise.
12382 (parse_xml_btrace_conf_bts): Likewise.
12383 (parse_xml_btrace_conf_pt): Likewise.
12384 * memory-map.c (memory_map_start_memory): Likewise.
12385 (memory_map_start_property): Likewise.
12386 * osdata.c (osdata_start_osdata): Likewise.
12387 (osdata_start_item): Likewise.
12388 (osdata_start_column): Likewise.
12389 * remote.c (start_thread): Likewise.
12390 * solib-aix.c (library_list_start_library): Likewise.
12391 (library_list_start_list): Likewise.
12392 * solib-svr4.c (library_list_start_library): Likewise.
12393 (svr4_library_list_start_list): Likewise.
12394 * solib-target.c (library_list_start_segment): Likewise.
12395 (library_list_start_section): Likewise.
12396 (library_list_start_library): Likewise.
12397 (library_list_start_list): Likewise.
12398 * tracepoint.c (traceframe_info_start_memory): Likewise.
12399 (traceframe_info_start_tvar): Likewise.
12400 * xml-syscall.c (syscall_start_syscall): Likewise.
12401 * xml-tdesc.c (tdesc_start_target): Likewise.
12402 (tdesc_start_feature): Likewise.
12403 (tdesc_start_reg): Likewise.
12404 (tdesc_start_union): Likewise.
12405 (tdesc_start_struct): Likewise.
12406 (tdesc_start_flags): Likewise.
12407 (tdesc_start_enum): Likewise.
12408 (tdesc_start_field): Likewise.
12409 (tdesc_start_enum_value): Likewise.
12410 (tdesc_start_vector): Likewise.
12411
12412 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12413
12414 * extension.h (struct xmethod_worker) <clone>: Remove.
12415 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12416 Remove.
12417 (python_xmethod_worker::clone): Remove.
12418 * valops.c (find_overload_match): Use std::move instead of
12419 clone.
12420
12421 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12422
12423 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12424 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12425 <free_xmethod_worker_data>: Remove.
12426 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12427 <get_xmethod_arg_types>: Remove.
12428 <get_xmethod_result_type>: Remove.
12429 <invoke_xmethod>: Remove.
12430 * extension.c (new_xmethod_worker): Remove.
12431 (clone_xmethod_worker): Remove.
12432 (get_matching_xmethod_workers): Return void, pass std::vector by
12433 pointer.
12434 (get_xmethod_arg_types): Rename to...
12435 (xmethod_worker::get_arg_types): ... this, and adjust.
12436 (get_xmethod_result_type): Rename to...
12437 (xmethod_worker::get_result_type): ... this, and adjust.
12438 (invoke_xmethod): Remove.
12439 (free_xmethod_worker): Remove.
12440 (free_xmethod_worker_vec): Remove.
12441 * extension.h (enum ext_lang_rc): Move here from
12442 extension-priv.h.
12443 (struct xmethod_worker): Add constructor and destructor.
12444 <data>: Remove.
12445 <value>: Remove.
12446 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12447 virtual pure methods.
12448 <get_arg_types, get_result_type>: New methods.
12449 (xmethod_worker_ptr): Remove typedef.
12450 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12451 (xmethod_worker_vec): Remove typedef.
12452 (xmethod_worker_up): New typedef.
12453 (invoke_xmethod): Remove.
12454 (clone_xmethod_worker): Remove.
12455 (free_xmethod_worker): Remove.
12456 (free_xmethod_worker_vec): Remove.
12457 (get_xmethod_arg_types): Remove.
12458 (get_xmethod_result_type): Remove.
12459 * valops.c (find_method_list): Use std::vector, don't use
12460 intermediate vector.
12461 (value_find_oload_method_list): Use std::vector.
12462 (find_overload_match): Use std::vector.
12463 (find_oload_champ): Use std::vector.
12464 * value.c (value_free): Use operator delete.
12465 (value_of_xmethod): Rename to...
12466 (value_from_xmethod): ... this. Don't assign
12467 xmethod_worker::value, take rvalue-reference.
12468 (result_type_of_xmethod): Adjust.
12469 (call_xmethod): Adjust.
12470 * value.h: Include extension.h.
12471 (struct xmethod_worker): Don't forward-declare.
12472 (value_of_xmethod): Rename to...
12473 (value_from_xmethod): ... this, take rvalue-reference.
12474 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12475 (struct python_xmethod_worker): ... this, add constructor and
12476 destructor.
12477 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12478 (gdbpy_free_xmethod_worker_data): Rename to...
12479 (python_xmethod_worker::~python_xmethod_worker): ... this and
12480 adjust.
12481 (gdbpy_clone_xmethod_worker_data): Rename to...
12482 (python_xmethod_worker::clone): ... this and adjust.
12483 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12484 temporary vector.
12485 (gdbpy_get_xmethod_arg_types): Rename to...
12486 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12487 (gdbpy_get_xmethod_result_type): Rename to...
12488 (python_xmethod_worker::do_get_result_type): ... this and
12489 adjust.
12490 (gdbpy_invoke_xmethod): Rename to...
12491 (python_xmethod_worker::invoke): ... this and adjust.
12492 (new_python_xmethod_worker): Rename to...
12493 (python_xmethod_worker::python_xmethod_worker): ... this and
12494 adjust.
12495 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12496 Remove.
12497 (gdbpy_free_xmethod_worker_data): Remove.
12498 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12499 (gdbpy_get_xmethod_arg_types): Remove.
12500 (gdbpy_get_xmethod_result_type): Remove.
12501 (gdbpy_invoke_xmethod): Remove.
12502 * python/python.c (python_extension_ops): Remove obsolete
12503 callbacks.
12504
12505 2018-01-05 Pedro Alves <palves@redhat.com>
12506
12507 PR gdb/18653
12508 * common/signals-state-save-restore.c
12509 (save_original_signals_state): New parameter 'quiet'. Warn if we
12510 find a custom handler preinstalled, instead of internal erroring.
12511 But only warn if !quiet.
12512 * common/signals-state-save-restore.h
12513 (save_original_signals_state): New parameter 'quiet'.
12514 * main.c (captured_main_1): Move save_original_signals_state call
12515 after option handling, and pass QUIET.
12516
12517 2018-01-05 Pedro Alves <palves@redhat.com>
12518
12519 * spu-tdep.c (spu_catch_start): Pass
12520 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12521
12522 2018-01-05 Pedro Alves <palves@redhat.com>
12523
12524 PR gdb/22670
12525 * ada-lang.c (literal_symbol_name_matcher): New function.
12526 (ada_get_symbol_name_matcher): Use it for
12527 symbol_name_match_type::SEARCH_NAME.
12528 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12529 it down instead of assuming symbol_name_match_type::FULL.
12530 * block.h (block_lookup_symbol): New parameter 'match_type'.
12531 * c-valprint.c (print_unpacked_pointer): Use
12532 lookup_symbol_search_name instead of lookup_symbol.
12533 * compile/compile-object-load.c (get_out_value_type): Pass down
12534 symbol_name_match_type::SEARCH_NAME.
12535 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12536 symbol_name_match_type::FULL.
12537 * cp-support.c (cp_get_symbol_name_matcher): Handle
12538 symbol_name_match_type::SEARCH_NAME.
12539 * infrun.c (insert_exception_resume_breakpoint): Use
12540 lookup_symbol_search_name.
12541 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12542 * psymtab.c (maintenance_check_psymtabs): Use
12543 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12544 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12545 SYMBOL_SEARCH_NAME.
12546 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12547 if symbol_name_match_type::SEARCH_NAME.
12548 (lookup_symbol_in_language): Pass down
12549 symbol_name_match_type::FULL.
12550 (lookup_symbol_search_name): New.
12551 (lookup_language_this): Pass down
12552 symbol_name_match_type::SEARCH_NAME.
12553 (lookup_symbol_aux, lookup_local_symbol): New parameter
12554 'match_type'. Pass it down.
12555 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12556 (lookup_symbol_search_name): New declaration.
12557 (lookup_symbol_in_block): New 'match_type' parameter.
12558
12559 2018-01-05 Pedro Alves <palves@redhat.com>
12560
12561 PR gdb/22670
12562 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12563 ada_lookup_symbol.
12564 (ada_lookup_symbol): Reimplement in terms of
12565 ada_lookup_symbol_list, bits factored out from
12566 ada_lookup_encoded_symbol.
12567
12568 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12569
12570 * ada-exp.y (write_object_renaming): When subscripting an array
12571 using a symbol as the index, pass the block in call to
12572 ada_lookup_encoded_symbol when looking that symbol up.
12573
12574 2018-01-05 Jerome Guitton <guitton@adacore.com>
12575
12576 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12577 TYPE_INDEX_TYPE.
12578
12579 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12580
12581 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12582 the case where VALUE_LVAL (val0) is not lval_memory.
12583
12584 2018-01-05 Xavier Roirand <roirand@adacore.com>
12585
12586 * ada-valprint.c (print_optional_low_bound): Handle
12587 character-indexed array printing like boolean-indexed array
12588 printing.
12589
12590 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12591
12592 * NEWS: Create a new section for the next release branch.
12593 Rename the section of the current branch, now that it has
12594 been cut.
12595
12596 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12597
12598 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12599 * version.in: Bump version to 8.1.50.DATE-git.
12600
12601 2018-01-03 Xavier Roirand <roirand@adacore.com>
12602
12603 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12604 Add field.
12605 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12606 Add field.
12607 (default_exception_support_info) <catch_handlers_sym>: Add field.
12608 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12609 (ada_exception_name_addr_1): Add "catch handlers" handling.
12610 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12611 Update all callers.
12612 (create_excep_cond_exprs) <ex>: Add parameter.
12613 (re_set_exception): Update create_excep_cond_exprs call.
12614 (print_it_exception, print_one_exception, print_mention_exception)
12615 (print_recreate_exception): Add "catch handler" handling.
12616 (allocate_location_catch_handlers, re_set_catch_handlers)
12617 (check_status_catch_handlers, print_it_catch_handlers)
12618 (print_one_catch_handlers, print_mention_catch_handlers)
12619 (print_recreate_catch_handlers): New function.
12620 (catch_handlers_breakpoint_ops): New variable.
12621 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12622 Add parameter. Add "catch handler" handling.
12623 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12624 Add "catch handler" handling.
12625 (ada_exception_catchpoint_cond_string): Add "catch handler"
12626 handling.
12627 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12628 call.
12629 (catch_ada_handlers_command): New function.
12630 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12631 operations structure.
12632 (_initialize_ada_language): Add "catch handlers" command entry.
12633 * NEWS: Document "catch handlers" feature.
12634
12635 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12636
12637 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12638 account when creating the array type of the slice.
12639 (ada_value_slice): Likewise.
12640
12641 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12642
12643 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12644 New enum value.
12645 (create_array_type_with_stride): Add byte_stride_prop parameter.
12646 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12647 New parameter. Update all callers in this file.
12648 (array_type_has_dynamic_stride): New function.
12649 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12650 of arrays with dynamic byte strides.
12651 * dwarf2read.c (read_array_type): Add support for dynamic
12652 DW_AT_byte_stride attributes.
12653
12654 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12655
12656 * dwarf2read.c (read_unspecified_type): Treat
12657 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12658
12659 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12660
12661 Update copyright year range in all GDB files.
12662
12663 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12664
12665 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12666 and gdb/testsuite/gdb.base/step-line.c.
12667
12668 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12669
12670 * copyright.py (main): Dump the contents of
12671 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12672 even if BY_HAND is empty.
12673
12674 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12675
12676 * top.c (print_gdb_version): Update Copyright year in version
12677 message.
12678
12679 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12680
12681 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12682
12683 For older changes see ChangeLog-2017.
12684 \f
12685 Local Variables:
12686 mode: change-log
12687 left-margin: 8
12688 fill-column: 74
12689 version-control: never
12690 coding: utf-8
12691 End:
This page took 0.309791 seconds and 4 git commands to generate.